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) #26061

Merged
merged 5 commits into from
Jul 14, 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 @@ -8238,3 +8238,16 @@ func (s *testIntegrationSuite2) TestIssue25591(c *C) {
rows = tk.MustQuery("select t1.col1, t2.col1, t2.col2 from t1_1 t1 inner join t2_1 t2 on t1.col1 not in (1,t2.col1,t2.col2) order by 1,2,3;")
rows.Check(testkit.Rows())
}

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"))
}
5 changes: 3 additions & 2 deletions sessionctx/variable/sysvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ var defaultSysVars = []*SysVar{
{ScopeGlobal | ScopeSession, CollationServer, mysql.DefaultCollationName},
{ScopeNone, "have_rtree_keys", "YES"},
{ScopeGlobal, "innodb_old_blocks_pct", "37"},
{ScopeGlobal, "innodb_file_format", "Antelope"},
{ScopeGlobal, "innodb_file_format", "Barracuda"},
{ScopeGlobal, "innodb_default_row_format", "dynamic"},
{ScopeGlobal, "innodb_compression_failure_threshold_pct", "5"},
{ScopeNone, "performance_schema_events_waits_history_long_size", "10000"},
{ScopeGlobal, "innodb_checksum_algorithm", "innodb"},
Expand Down Expand Up @@ -430,7 +431,7 @@ var defaultSysVars = []*SysVar{
{ScopeNone, "version", mysql.ServerVersion},
{ScopeGlobal | ScopeSession, "transaction_alloc_block_size", "8192"},
{ScopeGlobal, "sql_slave_skip_counter", "0"},
{ScopeGlobal, "innodb_large_prefix", "OFF"},
{ScopeGlobal, "innodb_large_prefix", "ON"},
{ScopeNone, "performance_schema_max_cond_classes", "80"},
{ScopeGlobal, "innodb_io_capacity", "200"},
{ScopeGlobal, "max_binlog_cache_size", "18446744073709547520"},
Expand Down