Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sessionctx: change innodb large prefix default (#24555) #25687

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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