Skip to content

Commit

Permalink
sessionctx: change innodb large prefix default (pingcap#24555) (pingc…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Jun 23, 2021
1 parent ec335b7 commit 85dee1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8966,6 +8966,19 @@ func (s *testIntegrationSuite) TestClusteredIndexCorCol(c *C) {
tk.MustQuery("select (select t2.c_str from t2 where t2.c_str = t1.c_str and t2.c_int = 10 order by t2.c_str limit 1) x from t1;").Check(testkit.Rows("<nil>", "goofy mestorf"))
}

func (s *testIntegrationSuite) TestJiraSetInnoDBDefaultRowFormat(c *C) {
// For issue #23541
// JIRA needs to be able to set this to be happy.
// See: https://nova.moe/run-jira-on-tidb/
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("set global innodb_default_row_format = dynamic")
tk.MustExec("set global innodb_default_row_format = 'dynamic'")
tk.MustQuery("SHOW VARIABLES LIKE 'innodb_default_row_format'").Check(testkit.Rows("innodb_default_row_format dynamic"))
tk.MustQuery("SHOW VARIABLES LIKE 'character_set_server'").Check(testkit.Rows("character_set_server utf8mb4"))
tk.MustQuery("SHOW VARIABLES LIKE 'innodb_file_format'").Check(testkit.Rows("innodb_file_format Barracuda"))
tk.MustQuery("SHOW VARIABLES LIKE 'innodb_large_prefix'").Check(testkit.Rows("innodb_large_prefix ON"))
}

func (s *testIntegrationSerialSuite) TestCollationForBinaryLiteral(c *C) {
tk := testkit.NewTestKit(c, s.store)
collate.SetNewCollationEnabledForTest(true)
Expand Down
5 changes: 3 additions & 2 deletions sessionctx/variable/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ var noopSysVars = []*SysVar{
{Scope: ScopeGlobal | ScopeSession, Name: "range_alloc_block_size", Value: "4096", IsHintUpdatable: true},
{Scope: ScopeNone, Name: "have_rtree_keys", Value: "YES"},
{Scope: ScopeGlobal, Name: "innodb_old_blocks_pct", Value: "37"},
{Scope: ScopeGlobal, Name: "innodb_file_format", Value: "Antelope"},
{Scope: ScopeGlobal, Name: "innodb_file_format", Value: "Barracuda", Type: TypeEnum, PossibleValues: []string{"Antelope", "Barracuda"}},
{Scope: ScopeGlobal, Name: "innodb_default_row_format", Value: "dynamic", Type: TypeEnum, PossibleValues: []string{"redundant", "compact", "dynamic"}},
{Scope: ScopeGlobal, Name: "innodb_compression_failure_threshold_pct", Value: "5"},
{Scope: ScopeNone, Name: "performance_schema_events_waits_history_long_size", Value: "10000"},
{Scope: ScopeGlobal, Name: "innodb_checksum_algorithm", Value: "innodb"},
Expand Down Expand Up @@ -305,7 +306,7 @@ var noopSysVars = []*SysVar{
{Scope: ScopeNone, Name: "datetime_format", Value: "%Y-%m-%d %H:%i:%s"},
{Scope: ScopeGlobal, Name: "log_syslog", Value: ""},
{Scope: ScopeGlobal | ScopeSession, Name: "transaction_alloc_block_size", Value: "8192"},
{Scope: ScopeGlobal, Name: "innodb_large_prefix", Type: TypeBool, Value: BoolOff},
{Scope: ScopeGlobal, Name: "innodb_large_prefix", Type: TypeBool, Value: On},
{Scope: ScopeNone, Name: "performance_schema_max_cond_classes", Value: "80"},
{Scope: ScopeGlobal, Name: "innodb_io_capacity", Value: "200"},
{Scope: ScopeGlobal, Name: "max_binlog_cache_size", Value: "18446744073709547520"},
Expand Down

0 comments on commit 85dee1d

Please sign in to comment.