summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-06 17:16:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-06 17:16:40 +0300
commit4081b7b27a40df6244e0525885cf70e48b7b35bc (patch)
treee9e6199730603d05090e0550e023e92c7a32f88d
parent780d2bb8a7eca4fdbdf70fbd51c0bdbae5b0057e (diff)
parent244f0e6dd815b388282c15db4fe7f15533f4c8fc (diff)
downloadmariadb-git-4081b7b27a40df6244e0525885cf70e48b7b35bc.tar.gz
Merge 10.4 into 10.5
-rwxr-xr-xdebian/rules2
m---------libmariadb0
-rw-r--r--libmysqld/CMakeLists.txt1
-rw-r--r--libmysqld/lib_sql.cc18
-rw-r--r--mysql-test/include/alter_table_mdev539.inc4
-rw-r--r--mysql-test/include/common-tests.inc10
-rw-r--r--mysql-test/include/ctype_utf8mb4.inc3
-rw-r--r--mysql-test/include/default_charset.inc15
-rw-r--r--mysql-test/include/default_group_order.cnf11
-rw-r--r--mysql-test/include/default_my.cnf1
-rw-r--r--mysql-test/include/default_mysqld.cnf1
-rw-r--r--mysql-test/include/default_optimizer_switch.inc18
-rw-r--r--mysql-test/include/grant_cache.inc11
-rw-r--r--mysql-test/include/have_hostname_cache.inc6
-rw-r--r--mysql-test/include/restore_charset.inc13
-rw-r--r--mysql-test/main/alter_table.result3
-rw-r--r--mysql-test/main/alter_table.test3
-rw-r--r--mysql-test/main/analyze.test2
-rw-r--r--mysql-test/main/analyze_format_json.test2
-rw-r--r--mysql-test/main/analyze_stmt.result1
-rw-r--r--mysql-test/main/analyze_stmt.test4
-rw-r--r--mysql-test/main/analyze_stmt_orderby.test1
-rw-r--r--mysql-test/main/analyze_stmt_privileges2.test6
-rw-r--r--mysql-test/main/bootstrap.test2
-rw-r--r--mysql-test/main/bug13633383.test3
-rw-r--r--mysql-test/main/cast.result3
-rw-r--r--mysql-test/main/cast.test3
-rw-r--r--mysql-test/main/compound.result1
-rw-r--r--mysql-test/main/compound.test2
-rw-r--r--mysql-test/main/compress.result9
-rw-r--r--mysql-test/main/connect.result2
-rw-r--r--mysql-test/main/connect.test1
-rw-r--r--mysql-test/main/create.test2
-rw-r--r--mysql-test/main/cte_nonrecursive.test2
-rw-r--r--mysql-test/main/cte_recursive.test2
-rw-r--r--mysql-test/main/ctype_ujis.result6
-rw-r--r--mysql-test/main/ctype_ujis.test6
-rw-r--r--mysql-test/main/ctype_utf16.result2
-rw-r--r--mysql-test/main/ctype_utf16.test3
-rw-r--r--mysql-test/main/ctype_utf16_def-master.opt2
-rw-r--r--mysql-test/main/ctype_utf8.test2
-rw-r--r--mysql-test/main/ctype_utf8mb4.result1
-rw-r--r--mysql-test/main/ctype_utf8mb4.test3
-rw-r--r--mysql-test/main/ctype_utf8mb4_heap.result1
-rw-r--r--mysql-test/main/ctype_utf8mb4_innodb.result1
-rw-r--r--mysql-test/main/ctype_utf8mb4_myisam.result1
-rw-r--r--mysql-test/main/custom_aggregates_i_s.test2
-rw-r--r--mysql-test/main/default.result20
-rw-r--r--mysql-test/main/default.test15
-rw-r--r--mysql-test/main/derived.result1
-rw-r--r--mysql-test/main/derived.test6
-rw-r--r--mysql-test/main/derived_cond_pushdown.result1
-rw-r--r--mysql-test/main/derived_cond_pushdown.test2
-rw-r--r--mysql-test/main/derived_split_innodb.test1
-rw-r--r--mysql-test/main/derived_view.result7
-rw-r--r--mysql-test/main/derived_view.test9
-rw-r--r--mysql-test/main/distinct.test1
-rw-r--r--mysql-test/main/dyncol.result6
-rw-r--r--mysql-test/main/dyncol.test8
-rw-r--r--mysql-test/main/events_1.test1
-rw-r--r--mysql-test/main/events_2.test1
-rw-r--r--mysql-test/main/events_bugs.result1
-rw-r--r--mysql-test/main/events_bugs.test1
-rw-r--r--mysql-test/main/events_grant.test2
-rw-r--r--mysql-test/main/events_logs_tests.result5
-rw-r--r--mysql-test/main/events_logs_tests.test5
-rw-r--r--mysql-test/main/events_restart.test2
-rw-r--r--mysql-test/main/except.result1
-rw-r--r--mysql-test/main/except.test4
-rw-r--r--mysql-test/main/explain_json.test2
-rw-r--r--mysql-test/main/flush2.result15
-rw-r--r--mysql-test/main/flush2.test9
-rw-r--r--mysql-test/main/func_compress.result5
-rw-r--r--mysql-test/main/func_compress.test7
-rw-r--r--mysql-test/main/func_isnull.test1
-rw-r--r--mysql-test/main/func_json.result6
-rw-r--r--mysql-test/main/func_json.test7
-rw-r--r--mysql-test/main/func_math.result2
-rw-r--r--mysql-test/main/func_math.test4
-rw-r--r--mysql-test/main/func_misc.test1
-rw-r--r--mysql-test/main/func_str.result3
-rw-r--r--mysql-test/main/func_str.test3
-rw-r--r--mysql-test/main/func_weight_string.result3
-rw-r--r--mysql-test/main/func_weight_string.test4
-rw-r--r--mysql-test/main/function_defaults.result52
-rw-r--r--mysql-test/main/function_defaults.test48
-rw-r--r--mysql-test/main/grant.opt1
-rw-r--r--mysql-test/main/grant2.opt1
-rw-r--r--mysql-test/main/grant4.opt1
-rw-r--r--mysql-test/main/grant_cache_no_prot.result9
-rw-r--r--mysql-test/main/grant_cache_ps_prot.result9
-rw-r--r--mysql-test/main/grant_explain_non_select.test2
-rw-r--r--mysql-test/main/greedy_optimizer.result8
-rw-r--r--mysql-test/main/greedy_optimizer.test7
-rw-r--r--mysql-test/main/group_by.result7
-rw-r--r--mysql-test/main/group_by.test5
-rw-r--r--mysql-test/main/group_min_max.test2
-rw-r--r--mysql-test/main/handlersocket.opt1
-rw-r--r--mysql-test/main/host_cache_size_functionality.result7
-rw-r--r--mysql-test/main/host_cache_size_functionality.test7
-rw-r--r--mysql-test/main/huge_frm-6224.result3
-rw-r--r--mysql-test/main/huge_frm-6224.test4
-rw-r--r--mysql-test/main/index_intersect.test3
-rw-r--r--mysql-test/main/information_schema-big.result6
-rw-r--r--mysql-test/main/information_schema-big.test4
-rw-r--r--mysql-test/main/information_schema.test3
-rw-r--r--mysql-test/main/information_schema_parameters.test2
-rw-r--r--mysql-test/main/information_schema_routines.test2
-rw-r--r--mysql-test/main/information_schema_stats.result3
-rw-r--r--mysql-test/main/information_schema_stats.test3
-rw-r--r--mysql-test/main/init_connection_query_cache.result3
-rw-r--r--mysql-test/main/init_connection_query_cache.test3
-rw-r--r--mysql-test/main/innodb_ext_key.result2
-rw-r--r--mysql-test/main/innodb_ext_key.test3
-rw-r--r--mysql-test/main/innodb_icp.test1
-rw-r--r--mysql-test/main/intersect.result10
-rw-r--r--mysql-test/main/intersect.test6
-rw-r--r--mysql-test/main/invisible_field.result2
-rw-r--r--mysql-test/main/join.test1
-rw-r--r--mysql-test/main/join_cache.result274
-rw-r--r--mysql-test/main/join_cache.test280
-rw-r--r--mysql-test/main/join_nested_jcl6.result7
-rw-r--r--mysql-test/main/join_nested_jcl6.test3
-rw-r--r--mysql-test/main/join_outer.result4
-rw-r--r--mysql-test/main/join_outer.test4
-rw-r--r--mysql-test/main/join_outer_innodb.test1
-rw-r--r--mysql-test/main/join_outer_jcl6.result19
-rw-r--r--mysql-test/main/join_outer_jcl6.test16
-rw-r--r--mysql-test/main/limit_rows_examined.test1
-rw-r--r--mysql-test/main/log_slow.result1
-rw-r--r--mysql-test/main/log_slow.test2
-rw-r--r--mysql-test/main/log_state.result3
-rw-r--r--mysql-test/main/log_state.test4
-rw-r--r--mysql-test/main/log_tables.result9
-rw-r--r--mysql-test/main/log_tables.test6
-rw-r--r--mysql-test/main/lowercase_table_qcache.result3
-rw-r--r--mysql-test/main/lowercase_table_qcache.test3
-rw-r--r--mysql-test/main/mdev13607.test1
-rw-r--r--mysql-test/main/mdev375.result5
-rw-r--r--mysql-test/main/mdev375.test5
-rw-r--r--mysql-test/main/merge.result8
-rw-r--r--mysql-test/main/merge.test21
-rw-r--r--mysql-test/main/mrr_icp_extra.test5
-rw-r--r--mysql-test/main/multi_update.test2
-rw-r--r--mysql-test/main/myisam.test2
-rw-r--r--mysql-test/main/myisam_explain_non_select_all.test2
-rw-r--r--mysql-test/main/myisam_icp.test1
-rw-r--r--mysql-test/main/myisam_mrr.result1
-rw-r--r--mysql-test/main/myisam_mrr.test1
-rw-r--r--mysql-test/main/myisam_recover.result3
-rw-r--r--mysql-test/main/myisam_recover.test4
-rw-r--r--mysql-test/main/mysql.test2
-rw-r--r--mysql-test/main/mysql_client_test.result10
-rw-r--r--mysql-test/main/mysql_client_test.test13
-rw-r--r--mysql-test/main/mysql_client_test_nonblock.test1
-rw-r--r--mysql-test/main/mysql_comments.test6
-rw-r--r--mysql-test/main/mysqlbinlog-innodb.result8
-rw-r--r--mysql-test/main/mysqlbinlog-innodb.test2
-rw-r--r--mysql-test/main/mysqlbinlog.result40
-rw-r--r--mysql-test/main/mysqlbinlog.test24
-rw-r--r--mysql-test/main/mysqlbinlog_row_big.result1
-rw-r--r--mysql-test/main/mysqlbinlog_row_big.test2
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.result4
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.test2
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.result8
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.test4
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.result4
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.test2
-rw-r--r--mysql-test/main/mysqlcheck.opt1
-rw-r--r--mysql-test/main/mysqlcheck.result24
-rw-r--r--mysql-test/main/mysqlcheck.test23
-rw-r--r--mysql-test/main/mysqld--help.result5
-rw-r--r--mysql-test/main/mysqld--help.test2
-rw-r--r--mysql-test/main/mysqldump-compat-102.test2
-rw-r--r--mysql-test/main/mysqldump-max.test2
-rw-r--r--mysql-test/main/mysqldump-nl.test1
-rw-r--r--mysql-test/main/mysqldump-utf8mb4.test7
-rw-r--r--mysql-test/main/mysqldump.opt1
-rw-r--r--mysql-test/main/mysqldump.test220
-rw-r--r--mysql-test/main/named_pipe.result9
-rw-r--r--mysql-test/main/openssl_1.test8
-rw-r--r--mysql-test/main/opt_tvc.test1
-rw-r--r--mysql-test/main/partition_example.opt1
-rw-r--r--mysql-test/main/partition_innodb.test1
-rw-r--r--mysql-test/main/partition_key_cache.result4
-rw-r--r--mysql-test/main/partition_key_cache.test2
-rw-r--r--mysql-test/main/partition_pruning.test1
-rw-r--r--mysql-test/main/plugin.opt1
-rw-r--r--mysql-test/main/plugin_innodb.opt1
-rw-r--r--mysql-test/main/plugin_load.opt1
-rw-r--r--mysql-test/main/plugin_load_option.opt1
-rw-r--r--mysql-test/main/plugin_not_embedded.opt1
-rw-r--r--mysql-test/main/pool_of_threads.result12
-rw-r--r--mysql-test/main/pool_of_threads.test5
-rw-r--r--mysql-test/main/ps-master.opt2
-rw-r--r--mysql-test/main/ps.test1
-rw-r--r--mysql-test/main/query_cache.result11
-rw-r--r--mysql-test/main/query_cache.test11
-rw-r--r--mysql-test/main/query_cache_debug.result14
-rw-r--r--mysql-test/main/query_cache_debug.test22
-rw-r--r--mysql-test/main/query_cache_innodb.result3
-rw-r--r--mysql-test/main/query_cache_innodb.test4
-rw-r--r--mysql-test/main/query_cache_merge.result6
-rw-r--r--mysql-test/main/query_cache_merge.test8
-rw-r--r--mysql-test/main/query_cache_notembedded.result4
-rw-r--r--mysql-test/main/query_cache_notembedded.test6
-rw-r--r--mysql-test/main/query_cache_ps_no_prot.test2
-rw-r--r--mysql-test/main/query_cache_with_views.result6
-rw-r--r--mysql-test/main/query_cache_with_views.test7
-rw-r--r--mysql-test/main/range.result1
-rw-r--r--mysql-test/main/range.test1
-rw-r--r--mysql-test/main/range_interrupted-13751.test4
-rw-r--r--mysql-test/main/range_mrr_icp.result1
-rw-r--r--mysql-test/main/range_mrr_icp.test2
-rw-r--r--mysql-test/main/range_vs_index_merge.test3
-rw-r--r--mysql-test/main/repair.result4
-rw-r--r--mysql-test/main/repair.test8
-rw-r--r--mysql-test/main/schema.test1
-rw-r--r--mysql-test/main/select.result7
-rw-r--r--mysql-test/main/select.test9
-rw-r--r--mysql-test/main/select_jcl6.result10
-rw-r--r--mysql-test/main/select_jcl6.test1
-rw-r--r--mysql-test/main/select_pkeycache.result7
-rw-r--r--mysql-test/main/selectivity.result7
-rw-r--r--mysql-test/main/selectivity.test14
-rw-r--r--mysql-test/main/selectivity_innodb.result14
-rw-r--r--mysql-test/main/selectivity_innodb.test2
-rw-r--r--mysql-test/main/selectivity_no_engine.test1
-rw-r--r--mysql-test/main/set_statement.result10
-rw-r--r--mysql-test/main/set_statement.test6
-rw-r--r--mysql-test/main/show_bad_definer-5553.test2
-rw-r--r--mysql-test/main/show_check.result7
-rw-r--r--mysql-test/main/show_check.test9
-rw-r--r--mysql-test/main/sp-anchor-type.test1
-rw-r--r--mysql-test/main/sp-error.test2
-rw-r--r--mysql-test/main/sp-security.result2
-rw-r--r--mysql-test/main/sp-security.test6
-rw-r--r--mysql-test/main/sp.result10
-rw-r--r--mysql-test/main/sp.test14
-rw-r--r--mysql-test/main/ssl-big.test1
-rw-r--r--mysql-test/main/ssl.result9
-rw-r--r--mysql-test/main/ssl.test2
-rw-r--r--mysql-test/main/ssl_compress.result9
-rw-r--r--mysql-test/main/ssl_compress.test1
-rw-r--r--mysql-test/main/stat_tables-enospc.result1
-rw-r--r--mysql-test/main/stat_tables-enospc.test3
-rw-r--r--mysql-test/main/stat_tables.result20
-rw-r--r--mysql-test/main/stat_tables.test23
-rw-r--r--mysql-test/main/stat_tables_innodb.result20
-rw-r--r--mysql-test/main/statistics.result12
-rw-r--r--mysql-test/main/statistics.test13
-rw-r--r--mysql-test/main/subselect.result3
-rw-r--r--mysql-test/main/subselect.test3
-rw-r--r--mysql-test/main/subselect2.result2
-rw-r--r--mysql-test/main/subselect2.test3
-rw-r--r--mysql-test/main/subselect3.inc1306
-rw-r--r--mysql-test/main/subselect3.result6
-rw-r--r--mysql-test/main/subselect3.test1316
-rw-r--r--mysql-test/main/subselect3_jcl6.result15
-rw-r--r--mysql-test/main/subselect3_jcl6.test15
-rw-r--r--mysql-test/main/subselect4.test2
-rw-r--r--mysql-test/main/subselect_exists2in.test1
-rw-r--r--mysql-test/main/subselect_extra.test1
-rw-r--r--mysql-test/main/subselect_mat.result56
-rw-r--r--mysql-test/main/subselect_mat_cost.result3
-rw-r--r--mysql-test/main/subselect_mat_cost.test6
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.test1
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result3
-rw-r--r--mysql-test/main/subselect_no_mat.result3
-rw-r--r--mysql-test/main/subselect_no_opts.result3
-rw-r--r--mysql-test/main/subselect_no_scache.result3
-rw-r--r--mysql-test/main/subselect_no_semijoin.result3
-rw-r--r--mysql-test/main/subselect_sj.result46
-rw-r--r--mysql-test/main/subselect_sj.test46
-rw-r--r--mysql-test/main/subselect_sj2.result2
-rw-r--r--mysql-test/main/subselect_sj2.test4
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.result6
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.test4
-rw-r--r--mysql-test/main/subselect_sj2_mat.result2
-rw-r--r--mysql-test/main/subselect_sj2_mat.test2
-rw-r--r--mysql-test/main/subselect_sj_jcl6.result55
-rw-r--r--mysql-test/main/subselect_sj_jcl6.test8
-rw-r--r--mysql-test/main/subselect_sj_mat.result56
-rw-r--r--mysql-test/main/subselect_sj_mat.test58
-rw-r--r--mysql-test/main/subselect_sj_nonmerged.test2
-rw-r--r--mysql-test/main/system_time_debug.result16
-rw-r--r--mysql-test/main/system_time_debug.test16
-rw-r--r--mysql-test/main/table_options-5867.opt1
-rw-r--r--mysql-test/main/trigger-compat.test3
-rw-r--r--mysql-test/main/trigger.test2
-rw-r--r--mysql-test/main/trigger_notembedded.test3
-rw-r--r--mysql-test/main/truncate-stale-6500.result3
-rw-r--r--mysql-test/main/truncate-stale-6500.test3
-rw-r--r--mysql-test/main/truncate_badse.opt1
-rw-r--r--mysql-test/main/type_time_6065.test2
-rw-r--r--mysql-test/main/type_varchar.opt1
-rw-r--r--mysql-test/main/udf_query_cache.result3
-rw-r--r--mysql-test/main/udf_query_cache.test4
-rw-r--r--mysql-test/main/union.result7
-rw-r--r--mysql-test/main/union.test7
-rw-r--r--mysql-test/main/upgrade.opt1
-rw-r--r--mysql-test/main/upgrade.test2
-rw-r--r--mysql-test/main/user_var-binlog.result2
-rw-r--r--mysql-test/main/user_var-binlog.test1
-rw-r--r--mysql-test/main/userstat-badlogin-4824.result3
-rw-r--r--mysql-test/main/userstat-badlogin-4824.test3
-rw-r--r--mysql-test/main/userstat.opt1
-rw-r--r--mysql-test/main/variables-master.opt2
-rw-r--r--mysql-test/main/variables-notembedded.result17
-rw-r--r--mysql-test/main/variables-notembedded.test20
-rw-r--r--mysql-test/main/variables.result41
-rw-r--r--mysql-test/main/variables.test23
-rw-r--r--mysql-test/main/view.result77
-rw-r--r--mysql-test/main/view.test8
-rw-r--r--mysql-test/main/xtradb_mrr.result1
-rw-r--r--mysql-test/main/xtradb_mrr.test3
-rwxr-xr-xmysql-test/mysql-test-run.pl3
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYDbin0 -> 60 bytes
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frmbin0 -> 483 bytes
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYDbin0 -> 60 bytes
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYIbin0 -> 2048 bytes
-rw-r--r--mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frmbin0 -> 972 bytes
-rw-r--r--mysql-test/suite/archive/discover_5438.opt1
-rw-r--r--mysql-test/suite/binlog/include/binlog_cache_stat.test7
-rw-r--r--mysql-test/suite/binlog/include/binlog_row_annotate.inc13
-rw-r--r--mysql-test/suite/binlog/include/ctype_ucs_binlog.test3
-rw-r--r--mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result70
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_cache_stat.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_cache_stat.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/flashback-largebinlog.result1
-rw-r--r--mysql-test/suite/binlog/r/flashback.result4
-rw-r--r--mysql-test/suite/binlog/t/binlog_innodb.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_max_extension.test18
-rw-r--r--mysql-test/suite/binlog/t/binlog_mixed_cache_stat.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test27
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test4
-rw-r--r--mysql-test/suite/binlog/t/binlog_variables_log_bin.test3
-rw-r--r--mysql-test/suite/binlog/t/binlog_variables_relay_log.test3
-rw-r--r--mysql-test/suite/binlog/t/flashback-largebinlog.test4
-rw-r--r--mysql-test/suite/binlog/t/flashback.test4
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.result6
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test2
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package-security.test1
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package.test1
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test2
-rw-r--r--mysql-test/suite/encryption/my.cnf1
-rw-r--r--mysql-test/suite/encryption/r/tempfiles.result3
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt1
-rw-r--r--mysql-test/suite/encryption/t/tempfiles.test3
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.result8
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.test6
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_routines.inc2
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_schemata.inc1
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_tables.inc2
-rw-r--r--mysql-test/suite/funcs_1/datadict/is_triggers.inc6
-rw-r--r--mysql-test/suite/funcs_1/datadict/tables.inc2
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers.result3
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers_embedded.result3
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_07.inc1
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_08.inc1
-rw-r--r--mysql-test/suite/funcs_1/t/innodb_trig_03e.test1
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns.test1
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_innodb.test3
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_memory.test1
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_myisam.test2
-rw-r--r--mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test1
-rw-r--r--mysql-test/suite/funcs_1/t/memory_trig_03e.test1
-rw-r--r--mysql-test/suite/funcs_1/t/myisam_trig_03e.test1
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test2
-rw-r--r--mysql-test/suite/funcs_2/charset/charset_master.test8
-rw-r--r--mysql-test/suite/funcs_2/r/innodb_charset.result4
-rw-r--r--mysql-test/suite/funcs_2/r/memory_charset.result4
-rw-r--r--mysql-test/suite/funcs_2/r/myisam_charset.result4
-rw-r--r--mysql-test/suite/galera/disabled.def5
-rw-r--r--mysql-test/suite/gcol/inc/gcol_select.inc37
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_basic.result6
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_index.result2
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_basic.test6
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_index.test2
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev7046.result4
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_charset.result4
-rw-r--r--mysql-test/suite/innodb/r/recovery_shutdown.result8
-rw-r--r--mysql-test/suite/innodb/r/trx_id_future.result3
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-fkcheck.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb-system-table-view.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt1
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_charset.test4
-rw-r--r--mysql-test/suite/innodb/t/log_alter_table.opt1
-rw-r--r--mysql-test/suite/innodb/t/recovery_shutdown.test15
-rw-r--r--mysql-test/suite/innodb/t/trx_id_future.test7
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext_table_evict.test1
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb_fts_misc.test6
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_compress2.result2
-rw-r--r--mysql-test/suite/innodb_gis/t/rtree_compress2.test2
-rw-r--r--mysql-test/suite/innodb_gis/t/update_root.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test3
-rw-r--r--mysql-test/suite/maria/icp.test1
-rw-r--r--mysql-test/suite/maria/maria-big.test2
-rw-r--r--mysql-test/suite/maria/maria-gis-recovery.test1
-rw-r--r--mysql-test/suite/maria/maria-no-logging.test1
-rw-r--r--mysql-test/suite/maria/maria-recover.test1
-rw-r--r--mysql-test/suite/maria/maria-recovery.test1
-rw-r--r--mysql-test/suite/maria/maria3.result43
-rw-r--r--mysql-test/suite/maria/maria3.test5
-rw-r--r--mysql-test/suite/parts/inc/part_exch_qa_4.inc2
-rw-r--r--mysql-test/suite/parts/inc/part_exch_qa_8.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_mgm.inc1
-rw-r--r--mysql-test/suite/perfschema/include/hostcache_set_state.inc9
-rw-r--r--mysql-test/suite/perfschema/include/stage_setup.inc4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result16
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result12
-rw-r--r--mysql-test/suite/perfschema/r/query_cache.result3
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test2
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_format.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test5
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_peer_addr.test1
-rw-r--r--mysql-test/suite/perfschema/t/query_cache.test4
-rw-r--r--mysql-test/suite/perfschema/t/stage_mdl_global-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/stage_mdl_global.opt2
-rw-r--r--mysql-test/suite/period/r/versioning.result4
-rw-r--r--mysql-test/suite/period/t/versioning.test5
-rw-r--r--mysql-test/suite/plugins/r/qc_info.result2
-rw-r--r--mysql-test/suite/plugins/r/qc_info_priv.result3
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.test2
-rw-r--r--mysql-test/suite/plugins/t/qc_info.test3
-rw-r--r--mysql-test/suite/plugins/t/qc_info_init.inc1
-rw-r--r--mysql-test/suite/plugins/t/qc_info_priv.test3
-rw-r--r--mysql-test/suite/roles/acl_statistics.opt1
-rw-r--r--mysql-test/suite/roles/definer.test4
-rw-r--r--mysql-test/suite/roles/show_create_database-10463.test3
-rw-r--r--mysql-test/suite/rpl/disabled.def1
-rw-r--r--mysql-test/suite/rpl/r/mdev_17588.result14
-rw-r--r--mysql-test/suite/rpl/t/mdev_17588.test23
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvars_server.inc62
-rw-r--r--mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/aria_recover_options_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_client_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_connection_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_database_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_results_basic.resultbin16253 -> 16271 bytes
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_server_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_server_func.result5
-rw-r--r--mysql-test/suite/sys_vars/r/collation_connection_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/collation_database_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/collation_database_func.result3
-rw-r--r--mysql-test/suite/sys_vars/r/collation_server_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/expire_logs_days_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_file_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/histogram_size_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_size_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/join_cache_level_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/long_query_time_basic.result32
-rw-r--r--mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/max_allowed_packet_func.result12
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic.result18
-rw-r--r--mysql-test/suite/sys_vars/r/max_connections_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result35
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result10
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result38
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result37
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/sync_binlog_basic.result17
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_aria.result44
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_debug.result15
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff227
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result346
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff916
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result1867
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff970
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result2172
-rw-r--r--mysql-test/suite/sys_vars/r/table_definition_cache_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/userstat_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/aria_recover_options_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test55
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test54
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_client_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_connection_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_database_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_results_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_server_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_server_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/collation_connection_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/collation_database_basic.test15
-rw-r--r--mysql-test/suite/sys_vars/t/collation_database_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/collation_server_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/expire_logs_days_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/general_log_file_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/histogram_size_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_size_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/join_cache_level_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/long_query_time_basic.test25
-rw-r--r--mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/max_allowed_packet_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/max_connect_errors_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/max_connections_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test25
-rw-r--r--mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test10
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_recover_options_basic.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_switch_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test32
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/sync_binlog_basic.test27
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_aria.test2
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_debug.test1
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_innodb.test2
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_server_embedded.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_server_notembedded.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/table_definition_cache_basic.test63
-rw-r--r--mysql-test/suite/sys_vars/t/userstat_basic.test5
-rw-r--r--mysql-test/suite/vcol/inc/vcol_trigger_sp.inc2
-rw-r--r--mysql-test/suite/vcol/r/update.result4
-rw-r--r--mysql-test/suite/vcol/r/update_binlog.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode.result434
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result336
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result2
-rw-r--r--mysql-test/suite/vcol/t/cross_db.test3
-rw-r--r--mysql-test/suite/vcol/t/update.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_innodb.test1
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_myisam.test43
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode.test322
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test193
-rw-r--r--mysql-test/suite/versioning/common.inc2
-rw-r--r--mysql-test/suite/versioning/common_finish.inc13
-rw-r--r--mysql-test/suite/versioning/r/alter.result12
-rw-r--r--mysql-test/suite/versioning/r/create.result12
-rw-r--r--mysql-test/suite/versioning/r/delete.result2
-rw-r--r--mysql-test/suite/versioning/r/foreign.result20
-rw-r--r--mysql-test/suite/versioning/r/online.result5
-rw-r--r--mysql-test/suite/versioning/r/partition.result21
-rw-r--r--mysql-test/suite/versioning/r/partition_innodb.result3
-rw-r--r--mysql-test/suite/versioning/r/replace.result2
-rw-r--r--mysql-test/suite/versioning/r/select.result10
-rw-r--r--mysql-test/suite/versioning/r/truncate.result4
-rw-r--r--mysql-test/suite/versioning/r/update-big.result2
-rw-r--r--mysql-test/suite/versioning/r/view.result6
-rw-r--r--mysql-test/suite/versioning/t/alter.test9
-rw-r--r--mysql-test/suite/versioning/t/create.test4
-rw-r--r--mysql-test/suite/versioning/t/cte.test4
-rw-r--r--mysql-test/suite/versioning/t/delete.test3
-rw-r--r--mysql-test/suite/versioning/t/derived.test2
-rw-r--r--mysql-test/suite/versioning/t/foreign.test6
-rw-r--r--mysql-test/suite/versioning/t/online.test7
-rw-r--r--mysql-test/suite/versioning/t/partition.test14
-rw-r--r--mysql-test/suite/versioning/t/partition_innodb.test5
-rw-r--r--mysql-test/suite/versioning/t/replace.test4
-rw-r--r--mysql-test/suite/versioning/t/select.test1
-rw-r--r--mysql-test/suite/versioning/t/truncate.test3
-rw-r--r--mysql-test/suite/versioning/t/trx_id.test3
-rw-r--r--mysql-test/suite/versioning/t/update-big.test2
-rw-r--r--mysql-test/suite/versioning/t/view.test8
-rw-r--r--mysys/my_getsystime.c2
-rw-r--r--sql/CMakeLists.txt2
-rw-r--r--sql/field.cc97
-rw-r--r--sql/field.h40
-rw-r--r--sql/handler.h4
-rw-r--r--sql/item.cc4
-rw-r--r--sql/item.h35
-rw-r--r--sql/item_cmpfunc.cc40
-rw-r--r--sql/item_cmpfunc.h2
-rw-r--r--sql/item_func.cc16
-rw-r--r--sql/item_func.h5
-rw-r--r--sql/item_strfunc.cc67
-rw-r--r--sql/item_strfunc.h6
-rw-r--r--sql/mysqld.cc15
-rw-r--r--sql/mysqld.h1
-rw-r--r--sql/set_var.h1
-rw-r--r--sql/sql_base.cc21
-rw-r--r--sql/sql_class.h1
-rw-r--r--sql/sql_insert.cc10
-rw-r--r--sql/sql_mode.cc34
-rw-r--r--sql/sql_mode.h162
-rw-r--r--sql/sql_string.h8
-rw-r--r--sql/sql_table.cc4
-rw-r--r--sql/sql_tvc.cc3
-rw-r--r--sql/sql_update.cc40
-rw-r--r--sql/sys_vars.cc15
-rw-r--r--sql/table.cc54
-rw-r--r--sql/table.h19
-rw-r--r--storage/innobase/include/lock0lock.h12
-rw-r--r--storage/innobase/include/row0vers.h3
-rw-r--r--storage/innobase/include/trx0sys.h31
-rw-r--r--storage/innobase/include/trx0trx.h67
-rw-r--r--storage/innobase/include/trx0trx.ic7
-rw-r--r--storage/innobase/lock/lock0lock.cc236
-rw-r--r--storage/innobase/row/row0vers.cc40
-rw-r--r--storage/innobase/trx/trx0purge.cc2
-rw-r--r--storage/innobase/trx/trx0roll.cc21
-rw-r--r--storage/innobase/trx/trx0trx.cc111
-rw-r--r--storage/innobase/trx/trx0undo.cc4
-rw-r--r--storage/maria/ha_maria.cc18
-rw-r--r--storage/maria/maria_def.h1
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc6
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/my.cnf1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/concurrent_alter.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_qcache.result6
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/select.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/disabled.def1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test13
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/select.test4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/ttl_rows_examined.test1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_rpl/my.cnf1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/my.cnf1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_sys_vars/my.cnf1
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-master.opt1
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-slave.opt1
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-master.opt1
-rw-r--r--storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-slave.opt1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result109
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result109
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_2968-0.test1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_2968-1.test1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_2968-2.test1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_2968-3.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/type_varchar.opt1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/type_varchar.test1
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/disabled.def1
750 files changed, 8328 insertions, 9230 deletions
diff --git a/debian/rules b/debian/rules
index f3911aacf70..df98d3be6c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -157,7 +157,7 @@ override_dh_systemd_enable:
# Start mysql at sequence number 19 before 20 where apache, proftpd etc gets
# started which might depend on a running database server.
override_dh_installinit-arch:
- dh_installinit --name=mysql -- defaults 19 21
+ #dh_installinit --name=mysql -- defaults 19 21
dh_systemd_start --restart-after-upgrade
override_dh_installcron-arch:
diff --git a/libmariadb b/libmariadb
-Subproject 7de639518ffe56a99ac805654381d17f42796be
+Subproject 544b6f1d12f0e5b2a141129075ff2d64feb0e4c
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 3fd792c408a..f2759f19d7d 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -113,6 +113,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_analyze_stmt.cc ../sql/sql_analyze_stmt.h
../sql/compat56.cc
../sql/sql_type.cc ../sql/sql_type.h
+ ../sql/sql_mode.cc
../sql/sql_type_json.cc
../sql/sql_type_geom.cc
../sql/table_cache.cc ../sql/mf_iocache_encr.cc
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index b0fb6054a97..1d5133794d2 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -44,12 +44,13 @@ extern unsigned int mysql_server_last_errno;
extern char mysql_server_last_error[MYSQL_ERRMSG_SIZE];
static my_bool emb_read_query_result(MYSQL *mysql);
static void emb_free_embedded_thd(MYSQL *mysql);
-
+static bool embedded_print_errors= 0;
extern "C" void unireg_clear(int exit_code)
{
DBUG_ENTER("unireg_clear");
- clean_up(!opt_help && (exit_code || !opt_bootstrap)); /* purecov: inspected */
+ embedded_print_errors= 0;
+ clean_up(!opt_help && !exit_code); /* purecov: inspected */
clean_up_mutexes();
my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
DBUG_VOID_RETURN;
@@ -520,7 +521,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
my_bool acl_error;
DBUG_ASSERT(mysql_embedded_init == 0);
-
+ embedded_print_errors= 1;
if (my_thread_init())
return 1;
@@ -1381,8 +1382,17 @@ int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
const char *format, va_list argsi)
{
vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error),
- format, argsi);
+ format, argsi);
mysql_server_last_errno= CR_UNKNOWN_ERROR;
+ if (embedded_print_errors && level == ERROR_LEVEL)
+ {
+ /* The following is for testing when someone removes the above test */
+ const char *tag= (level == ERROR_LEVEL ? "ERROR" :
+ level == WARNING_LEVEL ? "Warning" :
+ "Note");
+ fprintf(stderr,"Got %s: \"%s\" errno: %d\n",
+ tag, mysql_server_last_error, mysql_server_last_errno);
+ }
return 0;
}
diff --git a/mysql-test/include/alter_table_mdev539.inc b/mysql-test/include/alter_table_mdev539.inc
index 66b32473961..ea6d19dfe33 100644
--- a/mysql-test/include/alter_table_mdev539.inc
+++ b/mysql-test/include/alter_table_mdev539.inc
@@ -2,6 +2,8 @@
--echo # mdev-539: fast build of unique/primary indexes for MyISAM/Aria
--echo #
+--source include/default_charset.inc
+
call mtr.add_suppression("Can't find record in '.*'");
--disable_warnings
@@ -62,6 +64,6 @@ insert into customer values
alter ignore table customer add primary key (c_custkey);
show create table customer;
select * from customer where c_custkey=3;
-
+--source include/restore_charset.inc
DROP DATABASE dbt3_s001;
diff --git a/mysql-test/include/common-tests.inc b/mysql-test/include/common-tests.inc
index 204b6d4dd6b..347760bf3c0 100644
--- a/mysql-test/include/common-tests.inc
+++ b/mysql-test/include/common-tests.inc
@@ -1537,8 +1537,10 @@ select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 25
# Test of left join.
#
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
@@ -1572,7 +1574,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
#
# Joins with forms.
@@ -1581,6 +1583,8 @@ SET optimizer_switch=@save_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+SET @@join_cache_level=@local_join_cache_level;
+
#
# Search using 'or' with the same referens group.
# An interval search will be done first with the first table and after that
diff --git a/mysql-test/include/ctype_utf8mb4.inc b/mysql-test/include/ctype_utf8mb4.inc
index cb422f66947..34ef983645b 100644
--- a/mysql-test/include/ctype_utf8mb4.inc
+++ b/mysql-test/include/ctype_utf8mb4.inc
@@ -1,6 +1,7 @@
#
# Tests with the utf8mb4 character set
#
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
@@ -1244,7 +1245,9 @@ drop table t1;
#
SET CHARACTER SET utf8mb4;
+--source include/default_charset.inc
SHOW VARIABLES LIKE 'character\_set\_%';
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
eval CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE $engine;
diff --git a/mysql-test/include/default_charset.inc b/mysql-test/include/default_charset.inc
new file mode 100644
index 00000000000..e5c40100c37
--- /dev/null
+++ b/mysql-test/include/default_charset.inc
@@ -0,0 +1,15 @@
+# This file sets the default character set that most test expects.
+
+# In most cases the variables should match the community server defaults.
+# The values should be changed if the default character set for the server
+# changes and all tests have been updated to supported the new character set
+
+# The purpose if this file is to allow users to change these defaults
+# without having to update all tests.
+
+--disable_query_log
+SET @save_character_set_server= @@character_set_server;
+SET @save_collation_server= @@collation_server;
+set @@character_set_server="latin1";
+set @@collation_server="latin1_swedish_ci";
+--enable_query_log
diff --git a/mysql-test/include/default_group_order.cnf b/mysql-test/include/default_group_order.cnf
new file mode 100644
index 00000000000..a4e84ec2c55
--- /dev/null
+++ b/mysql-test/include/default_group_order.cnf
@@ -0,0 +1,11 @@
+# Define the order that mtr will save groups in the generated my.cnf files
+# The --debug-gdb option is just here to force mtr to remember the group order
+
+[mysqld]
+#debug-gdb=
+[mariadb]
+#debug-gdb=
+[embedded]
+#debug-gdb=
+[server]
+#debug-gdb=
diff --git a/mysql-test/include/default_my.cnf b/mysql-test/include/default_my.cnf
index a46e748daa0..d102c9020cc 100644
--- a/mysql-test/include/default_my.cnf
+++ b/mysql-test/include/default_my.cnf
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
# Use default setting for mysqld processes
+!include default_group_order.cnf
!include default_mysqld.cnf
!include default_client.cnf
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 1178aa17613..387a144bacb 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -128,4 +128,3 @@ local-infile
# tables. Let's enable it in the [server] group, because this group
# is read after [mysqld] and [embedded]
loose-aria
-
diff --git a/mysql-test/include/default_optimizer_switch.inc b/mysql-test/include/default_optimizer_switch.inc
new file mode 100644
index 00000000000..8634c2eee22
--- /dev/null
+++ b/mysql-test/include/default_optimizer_switch.inc
@@ -0,0 +1,18 @@
+# This file sets the default optimizer flags and optimizer variables that
+# most test expects. In most cases the variables should match the community
+# server defaults.
+# The purpose if this file is to allow users to change these defaults
+# without having to update all tests.
+
+--disable_query_log
+set @save_optimizer_switch=@@optimizer_switch;
+set @save_join_cache_level=@@join_cache_level;
+
+set optimizer_switch="index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on";
+
+set optimizer_use_condition_selectivity=4;
+set optimizer_search_depth=62;
+set join_buffer_space_limit=2097152;
+set join_cache_level=2;
+set join_buffer_size=262144;
+--enable_query_log
diff --git a/mysql-test/include/grant_cache.inc b/mysql-test/include/grant_cache.inc
index cb495e7feae..467c1170563 100644
--- a/mysql-test/include/grant_cache.inc
+++ b/mysql-test/include/grant_cache.inc
@@ -37,8 +37,13 @@
--source include/add_anonymous_users.inc
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_sql_mode=@@global.sql_mode;
+set @save_query_cache_type=@@global.query_cache_type;
+
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
+
#
--disable_warnings
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
@@ -208,10 +213,10 @@ flush privileges;
drop table test.t1,mysqltest.t1,mysqltest.t2;
drop database mysqltest;
-set GLOBAL query_cache_size=default;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
--source include/delete_anonymous_users.inc
-set GLOBAL sql_mode=default;
-set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+set GLOBAL sql_mode=@save_sql_mode;
+set GLOBAL query_cache_type=@save_query_cache_type;
diff --git a/mysql-test/include/have_hostname_cache.inc b/mysql-test/include/have_hostname_cache.inc
new file mode 100644
index 00000000000..b6c7c6bd6a6
--- /dev/null
+++ b/mysql-test/include/have_hostname_cache.inc
@@ -0,0 +1,6 @@
+# Ensure that host_cache is enabled
+
+if (`SELECT @@skip_name_resolve != "OFF"`)
+{
+ skip No hostname_cache;
+}
diff --git a/mysql-test/include/restore_charset.inc b/mysql-test/include/restore_charset.inc
new file mode 100644
index 00000000000..afd87838e56
--- /dev/null
+++ b/mysql-test/include/restore_charset.inc
@@ -0,0 +1,13 @@
+# This file sets the default character set that most test expects.
+
+# In most cases the variables should match the community server defaults.
+# The values should be changed if the default character set for the server
+# changes and all tests have been updated to supported the new character set
+
+# The purpose if this file is to allow users to change these defaults
+# without having to update all tests.
+
+--disable_query_log
+SET @@character_set_server=@save_character_set_server;
+SET @@collation_server=@save_collation_server;
+--enable_query_log
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index b5f81642db2..3d21b5c350d 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -1,5 +1,6 @@
drop table if exists t1,t2;
drop database if exists mysqltest;
+set @save_max_allowed_packet=@@global.max_allowed_packet;
create table t1 (
col1 int not null auto_increment primary key,
col2 varchar(30) not null,
@@ -1464,7 +1465,7 @@ disconnect con1;
connection default;
DROP TABLE t1, t2, t3;
SET SQL_MODE=default;
-SET GLOBAL max_allowed_packet=default;
+SET GLOBAL max_allowed_packet=@save_max_allowed_packet;
CREATE TABLE t1 (
id INT(11) NOT NULL,
x_param INT(11) DEFAULT NULL,
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index 5c29dfae6b3..dc6983da38b 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -6,6 +6,7 @@
drop table if exists t1,t2;
drop database if exists mysqltest;
--enable_warnings
+set @save_max_allowed_packet=@@global.max_allowed_packet;
create table t1 (
col1 int not null auto_increment primary key,
@@ -1340,7 +1341,7 @@ SELECT LENGTH(my_t3_fld1) FROM t3;
DROP TABLE t1, t2, t3;
SET SQL_MODE=default;
-SET GLOBAL max_allowed_packet=default;
+SET GLOBAL max_allowed_packet=@save_max_allowed_packet;
#
# Test of ALTER TABLE IF [NOT] EXISTS
diff --git a/mysql-test/main/analyze.test b/mysql-test/main/analyze.test
index 0903db1eca4..85a88158162 100644
--- a/mysql-test/main/analyze.test
+++ b/mysql-test/main/analyze.test
@@ -13,6 +13,8 @@
# before calling mi_state_info_write
#
+--source include/default_optimizer_switch.inc
+
create table t1 (a bigint);
lock tables t1 write;
insert into t1 values(0);
diff --git a/mysql-test/main/analyze_format_json.test b/mysql-test/main/analyze_format_json.test
index 915e0c2bf3c..3f3324e9eec 100644
--- a/mysql-test/main/analyze_format_json.test
+++ b/mysql-test/main/analyze_format_json.test
@@ -5,6 +5,8 @@
drop table if exists t0,t1,t2,t3;
--enable_warnings
+--source include/default_optimizer_switch.inc
+
create table t0 (a int);
INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/main/analyze_stmt.result b/mysql-test/main/analyze_stmt.result
index 3ae49c5eeb6..c5d35759c9c 100644
--- a/mysql-test/main/analyze_stmt.result
+++ b/mysql-test/main/analyze_stmt.result
@@ -1,3 +1,4 @@
+set join_cache_level=2;
drop table if exists t0,t1,t2,t3;
create table t0 (a int) engine=myisam;
INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/main/analyze_stmt.test b/mysql-test/main/analyze_stmt.test
index 15fc00a321d..b40edc1cd0f 100644
--- a/mysql-test/main/analyze_stmt.test
+++ b/mysql-test/main/analyze_stmt.test
@@ -1,6 +1,10 @@
#
# Tests for "ANALYZE $statement" feature
#
+
+# Fix that analyze delete with join doesn't add extra WHERE clause.
+set join_cache_level=2;
+
--disable_warnings
drop table if exists t0,t1,t2,t3;
--enable_warnings
diff --git a/mysql-test/main/analyze_stmt_orderby.test b/mysql-test/main/analyze_stmt_orderby.test
index a1cfb58f31a..ecee8040ed5 100644
--- a/mysql-test/main/analyze_stmt_orderby.test
+++ b/mysql-test/main/analyze_stmt_orderby.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/main/analyze_stmt_privileges2.test b/mysql-test/main/analyze_stmt_privileges2.test
index e3274882ba6..a0f1f4908b6 100644
--- a/mysql-test/main/analyze_stmt_privileges2.test
+++ b/mysql-test/main/analyze_stmt_privileges2.test
@@ -1,4 +1,4 @@
-################################################################################
+###############################################################################
# The test ensures that permission checks are applied correctly to
# ANALYZE INSERT/REPLACE/UPDATE/DELETE/SELECT (I/R/U/D/S further in the test)
# when it's executed on a table or on a view.
@@ -18,7 +18,8 @@
# Search for 'MDEV' to find all of them.
################################################################################
--- source include/not_embedded.inc
+--source include/not_embedded.inc
+--source include/default_optimizer_switch.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
@@ -44,6 +45,7 @@ INSERT INTO privtest_db.t2 VALUES (1,'foo'), (2,'bar'), (3,'qux');
GRANT SELECT ON privtest_db.t2 TO 'privtest'@'localhost';
connect(con1,localhost,privtest,,privtest_db);
+--source include/default_optimizer_switch.inc
--echo
--echo #########################################################################
diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test
index 5484cd1a798..d75d3154064 100644
--- a/mysql-test/main/bootstrap.test
+++ b/mysql-test/main/bootstrap.test
@@ -38,7 +38,7 @@ drop table t1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
#
-# Bootstrap with a query larger than 2*thd->net.max_packet
+# Bootstrap with a large thd->net.max_packet
#
--disable_query_log
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
diff --git a/mysql-test/main/bug13633383.test b/mysql-test/main/bug13633383.test
index 29106d379fe..273cef44d4a 100644
--- a/mysql-test/main/bug13633383.test
+++ b/mysql-test/main/bug13633383.test
@@ -2,6 +2,9 @@
--echo # Bug#13633383 63183: SMALL SORT_BUFFER_SIZE CRASH IN MERGE_BUFFERS
--echo #
+# Avoid warnings from join_buffer
+--source include/default_optimizer_switch.inc
+
CREATE TABLE t1 (
`a` int(11) DEFAULT NULL,
`col432` bit(8) DEFAULT NULL,
diff --git a/mysql-test/main/cast.result b/mysql-test/main/cast.result
index 496dea7c96f..977b34ea815 100644
--- a/mysql-test/main/cast.result
+++ b/mysql-test/main/cast.result
@@ -718,6 +718,7 @@ DROP TABLE t1;
#
# Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
# DOESN'T ADHERE TO MAX_ALLOWED_PACKET
+set @save_max_allowed_packet=@@global.max_allowed_packet;
SET @@GLOBAL.max_allowed_packet=2048;
Warnings:
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
@@ -739,7 +740,7 @@ Warnings:
Warning 1301 Result of cast_as_char() was larger than max_allowed_packet (2048) - truncated
connection default;
disconnect newconn;
-SET @@GLOBAL.max_allowed_packet=default;
+SET @@GLOBAL.max_allowed_packet=@save_max_allowed_packet;
#
# Bug#13519724 63793: CRASH IN DTCOLLATION::SET(DTCOLLATION &SET)
#
diff --git a/mysql-test/main/cast.test b/mysql-test/main/cast.test
index 4ec5470e892..a4b87127187 100644
--- a/mysql-test/main/cast.test
+++ b/mysql-test/main/cast.test
@@ -393,6 +393,7 @@ DROP TABLE t1;
--echo # Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
--echo # DOESN'T ADHERE TO MAX_ALLOWED_PACKET
+set @save_max_allowed_packet=@@global.max_allowed_packet;
SET @@GLOBAL.max_allowed_packet=2048;
# reconnect to make the new max packet size take effect
--connect (newconn, localhost, root,,)
@@ -403,7 +404,7 @@ SELECT length(CONVERT(repeat('a',2048), CHAR(2049)));
connection default;
disconnect newconn;
-SET @@GLOBAL.max_allowed_packet=default;
+SET @@GLOBAL.max_allowed_packet=@save_max_allowed_packet;
--echo #
--echo # Bug#13519724 63793: CRASH IN DTCOLLATION::SET(DTCOLLATION &SET)
diff --git a/mysql-test/main/compound.result b/mysql-test/main/compound.result
index a54faff4562..18df4fd34e2 100644
--- a/mysql-test/main/compound.result
+++ b/mysql-test/main/compound.result
@@ -154,6 +154,7 @@ master-bin.000001 # Query # # use `test`; insert t1 values( NAME_CONST('a',4)+3)
master-bin.000001 # Query # # COMMIT
drop function fn|
drop table t1|
+set @@sql_mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
begin not atomic select @@sql_mode; end|
@@sql_mode
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
diff --git a/mysql-test/main/compound.test b/mysql-test/main/compound.test
index 94a6c18b2f5..1f901e2a2b3 100644
--- a/mysql-test/main/compound.test
+++ b/mysql-test/main/compound.test
@@ -145,6 +145,8 @@ drop table t1|
# MDEV-6606 Server crashes in String::append on selecting sql_mode inside anonymous block
# MDEV-6609 SQL inside an anonymous block is executed with wrong SQL_MODE
#
+
+set @@sql_mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
begin not atomic select @@sql_mode; end|
create table t1 (a int)|
select a from t1 having a > 1|
diff --git a/mysql-test/main/compress.result b/mysql-test/main/compress.result
index 762ab6630d8..8fbbb324b16 100644
--- a/mysql-test/main/compress.result
+++ b/mysql-test/main/compress.result
@@ -1354,8 +1354,10 @@ fld1 fld1
250503 250505
250504 250505
250505 250505
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
companynr companyname
@@ -1431,7 +1433,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
companynr companynr
37 36
@@ -1440,6 +1442,7 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
+SET @@join_cache_level=@local_join_cache_level;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
fld1 companynr fld3 period
038008 37 reporters 1008
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result
index 54893edd340..ba8448b30ab 100644
--- a/mysql-test/main/connect.result
+++ b/mysql-test/main/connect.result
@@ -250,7 +250,7 @@ mysqltest_u1
root
# -- Resetting variables...
-SET GLOBAL max_connections = 151;
+SET GLOBAL max_connections = #max_connections#;
# -- Stopping Event Scheduler...
SET GLOBAL event_scheduler = OFF;
diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test
index d0683cf7a4a..b115e0620ec 100644
--- a/mysql-test/main/connect.test
+++ b/mysql-test/main/connect.test
@@ -217,6 +217,7 @@ SELECT user FROM information_schema.processlist ORDER BY id;
--echo
--echo # -- Resetting variables...
+--replace_result $saved_max_connections #max_connections#
--eval SET GLOBAL max_connections = $saved_max_connections
--echo
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index 8f7b06f5281..4cff86b0672 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -1,3 +1,5 @@
+--source include/default_charset.inc
+
call mtr.add_suppression("table or database name 't-1'");
#
# Check some special create statements.
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test
index c0c5c22bed0..bd8af55071a 100644
--- a/mysql-test/main/cte_nonrecursive.test
+++ b/mysql-test/main/cte_nonrecursive.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
create table t1 (a int, b varchar(32));
insert into t1 values
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test
index 483e1ea8c7a..6a4f55cd408 100644
--- a/mysql-test/main/cte_recursive.test
+++ b/mysql-test/main/cte_recursive.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
create table t1 (a int, b varchar(32));
insert into t1 values
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result
index 8d01212c9b1..66175344615 100644
--- a/mysql-test/main/ctype_ujis.result
+++ b/mysql-test/main/ctype_ujis.result
@@ -2504,6 +2504,8 @@ Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2'
DROP TABLE IF EXISTS t1, t2;
DROP PROCEDURE IF EXISTS sp1;
set names ujis;
+SET @save_character_set_server= @@character_set_server;
+SET @save_character_set_database= @@character_set_database;
set character_set_database = ujis;
set character_set_server = ujis;
CREATE TABLE t1(c1 char(2)) default charset = ujis;
@@ -2539,8 +2541,8 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'a'
Warning 1292 Truncated incorrect INTEGER value: 'a'
set names default;
-set character_set_database=default;
-set character_set_server=default;
+set character_set_database=@save_character_set_server;
+set character_set_server=@save_character_set_database;
End of 5.1 tests
#
# Start of 5.5 tests
diff --git a/mysql-test/main/ctype_ujis.test b/mysql-test/main/ctype_ujis.test
index cf247763b46..72a609edf39 100644
--- a/mysql-test/main/ctype_ujis.test
+++ b/mysql-test/main/ctype_ujis.test
@@ -1178,6 +1178,8 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
set names ujis;
+SET @save_character_set_server= @@character_set_server;
+SET @save_character_set_database= @@character_set_database;
set character_set_database = ujis;
set character_set_server = ujis;
@@ -1219,8 +1221,8 @@ SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
set names default;
-set character_set_database=default;
-set character_set_server=default;
+set character_set_database=@save_character_set_server;
+set character_set_server=@save_character_set_database;
--echo End of 5.1 tests
diff --git a/mysql-test/main/ctype_utf16.result b/mysql-test/main/ctype_utf16.result
index 5e1c92929d6..3c50954242d 100644
--- a/mysql-test/main/ctype_utf16.result
+++ b/mysql-test/main/ctype_utf16.result
@@ -1567,7 +1567,7 @@ SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second));
space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second))
NULL
Warnings:
-Warning 1301 Result of space() was larger than max_allowed_packet (16777216) - truncated
+Warning 1301 Result of space() was larger than max_allowed_packet (XXX) - truncated
#
# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
#
diff --git a/mysql-test/main/ctype_utf16.test b/mysql-test/main/ctype_utf16.test
index 504e62e3e89..0e497b7b7bd 100644
--- a/mysql-test/main/ctype_utf16.test
+++ b/mysql-test/main/ctype_utf16.test
@@ -765,9 +765,10 @@ DROP TABLE t1;
--echo # DATE_ADD/DATE_SUB WITH INTERVAL CRASHES IN GET_INTERVAL_VALUE()
--echo #
+let $max_packet=`select @@max_allowed_packet`;
+--replace_result $max_packet XXX
SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second));
-
--echo #
--echo # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
--echo #
diff --git a/mysql-test/main/ctype_utf16_def-master.opt b/mysql-test/main/ctype_utf16_def-master.opt
index 55bb5d14bbd..909a004bacc 100644
--- a/mysql-test/main/ctype_utf16_def-master.opt
+++ b/mysql-test/main/ctype_utf16_def-master.opt
@@ -1 +1 @@
---character-set-server=utf16,latin1
+--character-set-server=utf16,latin1 --collation-server=utf16_general_ci
diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test
index ab26b69d765..26fc491c568 100644
--- a/mysql-test/main/ctype_utf8.test
+++ b/mysql-test/main/ctype_utf8.test
@@ -7,6 +7,8 @@ let collation=utf8_unicode_ci;
SET TIME_ZONE='+03:00';
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
--disable_warnings
drop table if exists t1,t2,t3,t4;
diff --git a/mysql-test/main/ctype_utf8mb4.result b/mysql-test/main/ctype_utf8mb4.result
index 911108bf74a..b0777a0b9f0 100644
--- a/mysql-test/main/ctype_utf8mb4.result
+++ b/mysql-test/main/ctype_utf8mb4.result
@@ -1850,6 +1850,7 @@ character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4;
diff --git a/mysql-test/main/ctype_utf8mb4.test b/mysql-test/main/ctype_utf8mb4.test
index 9cf87d12340..88fb3d23b62 100644
--- a/mysql-test/main/ctype_utf8mb4.test
+++ b/mysql-test/main/ctype_utf8mb4.test
@@ -5,6 +5,7 @@
#
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2;
@@ -1187,7 +1188,9 @@ drop table t1;
#
SET CHARACTER SET utf8mb4;
+--source include/default_charset.inc
SHOW VARIABLES LIKE 'character\_set\_%';
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4;
diff --git a/mysql-test/main/ctype_utf8mb4_heap.result b/mysql-test/main/ctype_utf8mb4_heap.result
index 18213e65166..127b72674ac 100644
--- a/mysql-test/main/ctype_utf8mb4_heap.result
+++ b/mysql-test/main/ctype_utf8mb4_heap.result
@@ -1682,6 +1682,7 @@ character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE heap;
diff --git a/mysql-test/main/ctype_utf8mb4_innodb.result b/mysql-test/main/ctype_utf8mb4_innodb.result
index baa22f0ffc4..c5fa569bd77 100644
--- a/mysql-test/main/ctype_utf8mb4_innodb.result
+++ b/mysql-test/main/ctype_utf8mb4_innodb.result
@@ -1808,6 +1808,7 @@ character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE InnoDB;
diff --git a/mysql-test/main/ctype_utf8mb4_myisam.result b/mysql-test/main/ctype_utf8mb4_myisam.result
index 67eef5856ec..260f3b639bf 100644
--- a/mysql-test/main/ctype_utf8mb4_myisam.result
+++ b/mysql-test/main/ctype_utf8mb4_myisam.result
@@ -1815,6 +1815,7 @@ character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
+SET @@character_set_server=@save_character_set_server;
CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE crashtest;
CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE MyISAM;
diff --git a/mysql-test/main/custom_aggregates_i_s.test b/mysql-test/main/custom_aggregates_i_s.test
index 6aa6318b7c4..11ed26c59b0 100644
--- a/mysql-test/main/custom_aggregates_i_s.test
+++ b/mysql-test/main/custom_aggregates_i_s.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
flush status;
show status like "%custom_aggregate%";
create table t2 (sal int(10));
diff --git a/mysql-test/main/default.result b/mysql-test/main/default.result
index 73417d0d64e..ca65c66ea41 100644
--- a/mysql-test/main/default.result
+++ b/mysql-test/main/default.result
@@ -3355,18 +3355,26 @@ a b
drop table t1;
set sql_mode=default;
create table t1 (a int default b, b int default 4, t text);
-insert into t1 (b, t) values (5, '1 column is omitted');
-insert into t1 values (default, 5, '2 column gets DEFAULT, keyword');
-insert into t1 values (default(a), 5, '3 column gets DEFAULT(a), expression');
-insert into t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0');
-insert into t1 values (b, 5, '5 the value of the DEFAULT(a), that is b');
+insert t1 (b, t) values (5, '1 column is omitted');
+insert t1 values (default, 5, '2 column gets DEFAULT, keyword');
+insert t1 values (default(a), 5, '3 column gets DEFAULT(a), expression');
+insert t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0');
+insert t1 values (b, 5, '5 the value of the DEFAULT(a), that is b');
+insert t1 (t,b,a) values ('6 reversed, column gets DEFAULT, keyword', 5, default);
+insert t1 (t,b,a) values ('7 reversed, column gets DEFAULT(a), expression', 5, default(a));
+insert t1 (t,b,a) values ('8 reversed, also expression DEFAULT(0)+0', 5, default(a)+0);
+insert t1 (t,b,a) values ('9 reversed, the value of the DEFAULT(a), that is b', 5, b);
select * from t1 order by t;
a b t
5 5 1 column is omitted
-5 5 2 column gets DEFAULT, keyword
+4 5 2 column gets DEFAULT, keyword
4 5 3 column gets DEFAULT(a), expression
4 5 4 also expression DEFAULT(0)+0
4 5 5 the value of the DEFAULT(a), that is b
+5 5 6 reversed, column gets DEFAULT, keyword
+5 5 7 reversed, column gets DEFAULT(a), expression
+5 5 8 reversed, also expression DEFAULT(0)+0
+5 5 9 reversed, the value of the DEFAULT(a), that is b
drop table t1;
create table t1 (col1 int default(-(default(col1))));
ERROR 01000: Expression for field `col1` is referring to uninitialized field `col1`
diff --git a/mysql-test/main/default.test b/mysql-test/main/default.test
index 44778bc568a..27e38eeeb49 100644
--- a/mysql-test/main/default.test
+++ b/mysql-test/main/default.test
@@ -2073,11 +2073,16 @@ set sql_mode=default;
# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
#
create table t1 (a int default b, b int default 4, t text);
-insert into t1 (b, t) values (5, '1 column is omitted');
-insert into t1 values (default, 5, '2 column gets DEFAULT, keyword');
-insert into t1 values (default(a), 5, '3 column gets DEFAULT(a), expression');
-insert into t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0');
-insert into t1 values (b, 5, '5 the value of the DEFAULT(a), that is b');
+insert t1 (b, t) values (5, '1 column is omitted');
+insert t1 values (default, 5, '2 column gets DEFAULT, keyword');
+insert t1 values (default(a), 5, '3 column gets DEFAULT(a), expression');
+insert t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0');
+insert t1 values (b, 5, '5 the value of the DEFAULT(a), that is b');
+# and the same in a different order
+insert t1 (t,b,a) values ('6 reversed, column gets DEFAULT, keyword', 5, default);
+insert t1 (t,b,a) values ('7 reversed, column gets DEFAULT(a), expression', 5, default(a));
+insert t1 (t,b,a) values ('8 reversed, also expression DEFAULT(0)+0', 5, default(a)+0);
+insert t1 (t,b,a) values ('9 reversed, the value of the DEFAULT(a), that is b', 5, b);
select * from t1 order by t;
drop table t1;
diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result
index a875f8ddf9f..87e6dfb3680 100644
--- a/mysql-test/main/derived.result
+++ b/mysql-test/main/derived.result
@@ -1,3 +1,4 @@
+drop table if exists t1,t2,t3;
set @save_derived_optimizer_switch=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
select * from (select 2 from DUAL) b;
diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test
index beb361fd5b7..f4477ce8550 100644
--- a/mysql-test/main/derived.test
+++ b/mysql-test/main/derived.test
@@ -1,4 +1,9 @@
# Initialize
+--source include/default_optimizer_switch.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3;
+--enable_warnings
set @save_derived_optimizer_switch=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
@@ -106,6 +111,7 @@ create user mysqltest_1;
create table t1 select 1 as a;
connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK);
connection con1;
+--source include/default_optimizer_switch.inc
set optimizer_switch='derived_merge=off,derived_with_keys=off';
--error 1046
select 2 as a from (select * from t1) b;
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index 5133b63f011..c044b79d953 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -1,3 +1,4 @@
+set @@join_buffer_size=256*1024;
create table t1 (a int, b int, c int);
create table t2 (a int, b int, c int, d decimal);
insert into t1 values
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test
index 05bc00dc28d..6d81d2ad80b 100644
--- a/mysql-test/main/derived_cond_pushdown.test
+++ b/mysql-test/main/derived_cond_pushdown.test
@@ -1,4 +1,6 @@
+--source include/default_optimizer_switch.inc
let $no_pushdown= set statement optimizer_switch='condition_pushdown_for_derived=off' for;
+set @@join_buffer_size=256*1024;
create table t1 (a int, b int, c int);
create table t2 (a int, b int, c int, d decimal);
diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test
index 1bf70cd8114..4f9d2e970f7 100644
--- a/mysql-test/main/derived_split_innodb.test
+++ b/mysql-test/main/derived_split_innodb.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
--echo #
--echo # MDEV-16917: do not use splitting for derived with join cache
diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result
index c4ba604d5c4..00940d88805 100644
--- a/mysql-test/main/derived_view.result
+++ b/mysql-test/main/derived_view.result
@@ -2,6 +2,7 @@ drop table if exists t1,t2;
drop view if exists v1,v2,v3,v4;
set @exit_optimizer_switch=@@optimizer_switch;
set @exit_join_cache_level=@@join_cache_level;
+set @exit_join_buffer_size=@@join_buffer_size;
set optimizer_switch='derived_merge=on,derived_with_keys=on';
set @save_optimizer_switch=@@optimizer_switch;
set join_cache_level=1;
@@ -1995,8 +1996,8 @@ e
e
e
e
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level = @exit_join_cache_level;
+SET SESSION join_buffer_size = @exit_join_buffer_size;
DROP VIEW v3;
DROP TABLE t1,t2,t3,t4,t5;
#
@@ -2111,7 +2112,7 @@ a b
8 x
5 r
9 y
-SET SESSION join_cache_level = default;
+SET SESSION join_cache_level = @exit_join_cache_level;
SET optimizer_switch=@save_optimizer_switch;
DROP VIEW v2;
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test
index 8adbcc8dfd4..76b15fa8787 100644
--- a/mysql-test/main/derived_view.test
+++ b/mysql-test/main/derived_view.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
--disable_warnings
drop table if exists t1,t2;
drop view if exists v1,v2,v3,v4;
@@ -5,6 +7,7 @@ drop view if exists v1,v2,v3,v4;
set @exit_optimizer_switch=@@optimizer_switch;
set @exit_join_cache_level=@@join_cache_level;
+set @exit_join_buffer_size=@@join_buffer_size;
set optimizer_switch='derived_merge=on,derived_with_keys=on';
# The 'default' value within the scope of this test:
set @save_optimizer_switch=@@optimizer_switch;
@@ -1077,8 +1080,8 @@ EXPLAIN
SELECT t2.d FROM t1,t2,v3 WHERE v3.e = t2.d AND v3.i < 3;
SELECT t2.d FROM t1,t2,v3 WHERE v3.e = t2.d AND v3.i < 3;
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level = @exit_join_cache_level;
+SET SESSION join_buffer_size = @exit_join_buffer_size;
DROP VIEW v3;
DROP TABLE t1,t2,t3,t4,t5;
@@ -1167,7 +1170,7 @@ SELECT * FROM t3
SELECT * FROM t3
WHERE t3.b <> ANY (SELECT t1.b FROM t1 LEFT JOIN v2 ON v2.a = t1.a);
-SET SESSION join_cache_level = default;
+SET SESSION join_cache_level = @exit_join_cache_level;
SET optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/main/distinct.test b/mysql-test/main/distinct.test
index d41340c29fd..da12c7273b2 100644
--- a/mysql-test/main/distinct.test
+++ b/mysql-test/main/distinct.test
@@ -3,6 +3,7 @@
# Bug with group by and not used fields
#
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result
index 5eff4a0a18a..4660cdc72e1 100644
--- a/mysql-test/main/dyncol.result
+++ b/mysql-test/main/dyncol.result
@@ -1483,7 +1483,7 @@ hex(column_create("1212", 2, 3, 3))
select hex(column_create("1212", 2, "адын", 1, 3, 3));
hex(column_create("1212", 2, "адын", 1, 3, 3))
0403000D000000000001001000050020003331323132D0B0D0B4D18BD0BD060402
-set names default;
+set names latin1;
# fetching column test (names)
set names utf8;
select column_get(column_create("адын", 1212), "адын" as int);
@@ -1507,7 +1507,7 @@ NULL
select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int);
column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int)
NULL
-set names default;
+set names latin1;
# column existance test (names)
set names utf8;
select column_exists(column_create("адын", 1212), "адын");
@@ -1534,7 +1534,7 @@ column_exists(column_create("1212", 2, "адын", 1, 3, 3), 4)
select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "4");
column_exists(column_create("1212", 2, "адын", 1, 3, 3), "4")
0
-set names default;
+set names latin1;
# column changing test (names)
select hex(column_add(column_create(1, "AAA"), "b", "BBB"));
hex(column_add(column_create(1, "AAA"), "b", "BBB"))
diff --git a/mysql-test/main/dyncol.test b/mysql-test/main/dyncol.test
index f2c0a31c898..c0835de8c44 100644
--- a/mysql-test/main/dyncol.test
+++ b/mysql-test/main/dyncol.test
@@ -2,6 +2,8 @@
# Dynamic column function test
#
+--source include/default_charset.inc
+
--echo #
--echo # column create
--echo #
@@ -674,7 +676,7 @@ select hex(column_create(1212, 2, "www", 3));
select hex(column_create("1212", 2, "www", 3));
select hex(column_create("1212", 2, 3, 3));
select hex(column_create("1212", 2, "адын", 1, 3, 3));
-set names default;
+set names latin1;
--echo # fetching column test (names)
set names utf8;
@@ -685,7 +687,7 @@ select column_get(column_create("1212", 2, "адын", 1, 3, 3), "3" as int);
select column_get(column_create("1212", 2, "адын", 1, 3, 3), 3 as int);
select column_get(column_create("1212", 2, "адын", 1, 3, 3), 4 as int);
select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int);
-set names default;
+set names latin1;
--echo # column existance test (names)
set names utf8;
@@ -697,7 +699,7 @@ select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "3");
select column_exists(column_create("1212", 2, "адын", 1, 3, 3), 3);
select column_exists(column_create("1212", 2, "адын", 1, 3, 3), 4);
select column_exists(column_create("1212", 2, "адын", 1, 3, 3), "4");
-set names default;
+set names latin1;
--echo # column changing test (names)
select hex(column_add(column_create(1, "AAA"), "b", "BBB"));
diff --git a/mysql-test/main/events_1.test b/mysql-test/main/events_1.test
index 58c151bc86e..33b82730783 100644
--- a/mysql-test/main/events_1.test
+++ b/mysql-test/main/events_1.test
@@ -5,6 +5,7 @@
-- source include/not_embedded.inc
set sql_mode="";
+--source include/default_charset.inc
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
diff --git a/mysql-test/main/events_2.test b/mysql-test/main/events_2.test
index 12ce9210b0a..2012f94e9f2 100644
--- a/mysql-test/main/events_2.test
+++ b/mysql-test/main/events_2.test
@@ -4,6 +4,7 @@
-- source include/not_embedded.inc
set sql_mode="";
+--source include/default_charset.inc
--disable_warnings
drop database if exists events_test;
diff --git a/mysql-test/main/events_bugs.result b/mysql-test/main/events_bugs.result
index 008d4db7dae..cb8850112a5 100644
--- a/mysql-test/main/events_bugs.result
+++ b/mysql-test/main/events_bugs.result
@@ -2,6 +2,7 @@ SET SQL_MODE="";
drop database if exists events_test;
drop database if exists mysqltest_db1;
drop database if exists mysqltest_db2;
+set collation_server=latin1_swedish_ci;
create database events_test;
use events_test;
set @concurrent_insert= @@global.concurrent_insert;
diff --git a/mysql-test/main/events_bugs.test b/mysql-test/main/events_bugs.test
index 76288c8fbae..a0f3c5991ef 100644
--- a/mysql-test/main/events_bugs.test
+++ b/mysql-test/main/events_bugs.test
@@ -139,6 +139,7 @@ drop database if exists events_test;
drop database if exists mysqltest_db1;
drop database if exists mysqltest_db2;
--enable_warnings
+set collation_server=latin1_swedish_ci;
create database events_test;
use events_test;
# We use MyISAM tables and must avoid effects (visibility of changes might be
diff --git a/mysql-test/main/events_grant.test b/mysql-test/main/events_grant.test
index 8db4333cc03..0c89e9d1f6c 100644
--- a/mysql-test/main/events_grant.test
+++ b/mysql-test/main/events_grant.test
@@ -1,5 +1,7 @@
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
+--source include/default_charset.inc
+
CREATE DATABASE IF NOT EXISTS events_test;
use events_test;
diff --git a/mysql-test/main/events_logs_tests.result b/mysql-test/main/events_logs_tests.result
index 9cc6e44511c..ac4a43118da 100644
--- a/mysql-test/main/events_logs_tests.result
+++ b/mysql-test/main/events_logs_tests.result
@@ -1,3 +1,4 @@
+set @save_long_query_time=@@long_query_time;
drop database if exists events_test;
create database if not exists events_test;
use events_test;
@@ -68,5 +69,5 @@ user_host db sql_text
USER_HOST events_test select 'events_logs_test' as inside_event, sleep(1.5)
drop database events_test;
set global event_scheduler=off;
-set @@global.long_query_time=default;
-set @@session.long_query_time=default;
+set @@global.long_query_time=@save_long_query_time;
+set @@session.long_query_time=@save_long_query_time;
diff --git a/mysql-test/main/events_logs_tests.test b/mysql-test/main/events_logs_tests.test
index c3bbff90723..c4ef133f46b 100644
--- a/mysql-test/main/events_logs_tests.test
+++ b/mysql-test/main/events_logs_tests.test
@@ -1,6 +1,7 @@
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
+set @save_long_query_time=@@long_query_time;
--disable_warnings
drop database if exists events_test;
--enable_warnings
@@ -78,8 +79,8 @@ select user_host, db, sql_text from mysql.slow_log
drop database events_test;
set global event_scheduler=off;
-set @@global.long_query_time=default;
-set @@session.long_query_time=default;
+set @@global.long_query_time=@save_long_query_time;
+set @@session.long_query_time=@save_long_query_time;
#
# Safety
diff --git a/mysql-test/main/events_restart.test b/mysql-test/main/events_restart.test
index 7f01859e059..ca674170e96 100644
--- a/mysql-test/main/events_restart.test
+++ b/mysql-test/main/events_restart.test
@@ -3,6 +3,7 @@
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
+let $collation_server=`select @@collation_server`;
#
# Test that when the server is restarted, it checks mysql.event table,
# and disables the scheduler if it's not up to date.
@@ -92,6 +93,7 @@ set global event_scheduler=on;
select @@global.event_scheduler;
--sorted_result
--replace_column 6 # 9 # 10 #
+--replace_result $collation_server latin1_swedish_ci
show events;
--echo Now let's restart the server again
diff --git a/mysql-test/main/except.result b/mysql-test/main/except.result
index 3416ad0229a..393c918ebdf 100644
--- a/mysql-test/main/except.result
+++ b/mysql-test/main/except.result
@@ -1,3 +1,4 @@
+set @@join_buffer_size=256*1024;
create table t1 (a int, b int) engine=MyISAM;
create table t2 (c int, d int) engine=MyISAM;
insert into t1 values (1,1),(2,2);
diff --git a/mysql-test/main/except.test b/mysql-test/main/except.test
index de387cc84d7..97e4ffcc3f2 100644
--- a/mysql-test/main/except.test
+++ b/mysql-test/main/except.test
@@ -1,3 +1,7 @@
+# For explain
+--source include/default_optimizer_switch.inc
+set @@join_buffer_size=256*1024;
+
create table t1 (a int, b int) engine=MyISAM;
create table t2 (c int, d int) engine=MyISAM;
insert into t1 values (1,1),(2,2);
diff --git a/mysql-test/main/explain_json.test b/mysql-test/main/explain_json.test
index c3665b1818b..cfbc0cfa10c 100644
--- a/mysql-test/main/explain_json.test
+++ b/mysql-test/main/explain_json.test
@@ -1,6 +1,8 @@
#
# EXPLAIN FORMAT=JSON tests. These are tests developed for MariaDB.
#
+--source include/default_optimizer_switch.inc
+
--disable_warnings
drop table if exists t0,t1,t2;
--enable_warnings
diff --git a/mysql-test/main/flush2.result b/mysql-test/main/flush2.result
index a66b0d5c688..513715b1aee 100644
--- a/mysql-test/main/flush2.result
+++ b/mysql-test/main/flush2.result
@@ -1,3 +1,4 @@
+set @save_expire_logs_days=@@global.expire_logs_days;
flush logs;
set global expire_logs_days = 3;
show variables like 'log_bin%';
@@ -10,9 +11,9 @@ log_bin_index
log_bin_trust_function_creators ON
show variables like 'relay_log%';
Variable_name Value
-relay_log mysqld-relay-bin
-relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin
-relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin.index
+relay_log XXX-relay-bin
+relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin
+relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin.index
relay_log_info_file relay-log.info
relay_log_purge ON
relay_log_recovery OFF
@@ -28,11 +29,11 @@ log_bin_index
log_bin_trust_function_creators ON
show variables like 'relay_log%';
Variable_name Value
-relay_log mysqld-relay-bin
-relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin
-relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin.index
+relay_log XXX-relay-bin
+relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin
+relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin.index
relay_log_info_file relay-log.info
relay_log_purge ON
relay_log_recovery OFF
relay_log_space_limit 0
-set global expire_logs_days = 0;
+set global expire_logs_days=@save_expire_logs_days;
diff --git a/mysql-test/main/flush2.test b/mysql-test/main/flush2.test
index 496b57ccea4..6c06eea0f98 100644
--- a/mysql-test/main/flush2.test
+++ b/mysql-test/main/flush2.test
@@ -4,13 +4,16 @@
--source include/not_embedded.inc
+set @save_expire_logs_days=@@global.expire_logs_days;
+
flush logs;
set global expire_logs_days = 3;
+let $relay_prefix=`select concat(substring_index(@@relay_log,"-",1),"-")`;
show variables like 'log_bin%';
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
show variables like 'relay_log%';
flush logs;
show variables like 'log_bin%';
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
show variables like 'relay_log%';
-set global expire_logs_days = 0;
+set global expire_logs_days=@save_expire_logs_days;
diff --git a/mysql-test/main/func_compress.result b/mysql-test/main/func_compress.result
index 60ddd866507..065b68b4979 100644
--- a/mysql-test/main/func_compress.result
+++ b/mysql-test/main/func_compress.result
@@ -1,3 +1,4 @@
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1048576;
connect conn1,localhost,root,,;
connection conn1;
@@ -81,7 +82,7 @@ Warning 1292 Truncated incorrect DOUBLE value: XXX
Warning 1292 Truncated incorrect DOUBLE value: XXX
disconnect newconn;
connection default;
-set @@global.max_allowed_packet=default;
+set @@global.max_allowed_packet=@save_max_allowed_packet;
create table t1(a blob);
insert into t1 values(NULL), (compress('a'));
select uncompress(a), uncompressed_length(a) from t1;
@@ -163,7 +164,7 @@ Warnings:
Warning 1259 ZLIB: Input data corrupted
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
#
# End of 5.5 tests
#
diff --git a/mysql-test/main/func_compress.test b/mysql-test/main/func_compress.test
index 3fd9cad467b..983b792f4c4 100644
--- a/mysql-test/main/func_compress.test
+++ b/mysql-test/main/func_compress.test
@@ -5,6 +5,7 @@
# Note that this test gives error in the gzip library when running under
# valgrind, but these warnings can be ignored
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1048576;
connect (conn1,localhost,root,,);
connection conn1;
@@ -56,7 +57,7 @@ eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is n
disconnect newconn;
--source include/wait_until_disconnected.inc
connection default;
-set @@global.max_allowed_packet=default;
+set @@global.max_allowed_packet=@save_max_allowed_packet;
#
# Bug #18643: problem with null values
@@ -116,7 +117,7 @@ DROP TABLE t1;
--echo End of 5.0 tests
--disable_result_log
--disable_query_log
-set @@global.max_allowed_packet=default;
+set @@global.max_allowed_packet=@save_max_allowed_packet;
--enable_result_log
--enable_query_log
@@ -148,7 +149,7 @@ SELECT UNCOMPRESS(CAST(0 AS BINARY(5)));
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/main/func_isnull.test b/mysql-test/main/func_isnull.test
index 7d1a7e83a1a..f4cf5a5b88b 100644
--- a/mysql-test/main/func_isnull.test
+++ b/mysql-test/main/func_isnull.test
@@ -1,6 +1,7 @@
#
# test of ISNULL()
#
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index 4fc52e1960f..13922ed95f1 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -619,6 +619,8 @@ JSON_search( '{"x": "\\""}', "one", '"')
SELECT JSON_search( '{"x": "\\""}', "one", '\\"');
JSON_search( '{"x": "\\""}', "one", '\\"')
"$.x"
+set @save_max_allowed_packet=@@max_allowed_packet;
+set @save_net_buffer_length=@@net_buffer_length;
set @@global.net_buffer_length=1024;
set @@global.max_allowed_packet=2048;
connect newconn, localhost, root,,;
@@ -639,8 +641,8 @@ NULL
Warnings:
Warning 1301 Result of json_object() was larger than max_allowed_packet (2048) - truncated
connection default;
-set @@global.max_allowed_packet = default;
-set @@global.net_buffer_length = default;
+set @@global.max_allowed_packet = @save_max_allowed_packet;
+set @@global.net_buffer_length = @save_net_buffer_length;
disconnect newconn;
create table t1(j longtext, p longtext);
insert into t1 values
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 55879e4f910..55f3fbae9ef 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -265,6 +265,9 @@ SELECT JSON_search( '{"x": "\\""}', "one", '\\"');
#
# MDEV-11833 JSON functions don't seem to respect max_allowed_packet.
#
+set @save_max_allowed_packet=@@max_allowed_packet;
+set @save_net_buffer_length=@@net_buffer_length;
+
set @@global.net_buffer_length=1024;
set @@global.max_allowed_packet=2048;
--connect (newconn, localhost, root,,)
@@ -275,8 +278,8 @@ select json_array(repeat('a',1024),repeat('a',1024));
select json_object("a", repeat('a',1024),"b", repeat('a',1024));
--connection default
-set @@global.max_allowed_packet = default;
-set @@global.net_buffer_length = default;
+set @@global.max_allowed_packet = @save_max_allowed_packet;
+set @@global.net_buffer_length = @save_net_buffer_length;
--disconnect newconn
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index db9b16f5507..44c8622b522 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -296,7 +296,7 @@ format(t2.f2-t2.f1+1,0)
10,000
10,000
drop table t1, t2;
-set names default;
+set names latin1;
select cast(-2 as unsigned), 18446744073709551614, -2;
cast(-2 as unsigned) 18446744073709551614 -2
18446744073709551614 18446744073709551614 -2
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index 1e8e6cfbb70..6d28d99006a 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -2,6 +2,8 @@
# Test of math functions
#
+--source include/default_charset.inc
+
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -193,7 +195,7 @@ insert into t2 values (16777216,16787215,1),(33554432,33564431,2);
select format(t2.f2-t2.f1+1,0) from t1,t2
where t1.f2 = t2.f3 order by t1.f1;
drop table t1, t2;
-set names default;
+set names latin1;
# Bug 24912 -- misc functions have trouble with unsigned
diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test
index 331293a9c95..a2805f0438b 100644
--- a/mysql-test/main/func_misc.test
+++ b/mysql-test/main/func_misc.test
@@ -2,6 +2,7 @@
# Testing of misc functions
#
+--source include/default_optimizer_switch.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index c637274e3cc..5fca53def04 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2;
+set @save_max_allowed_packet=@@global.max_allowed_packet;
set global max_allowed_packet=1048576;
connect conn1,localhost,root,,;
connection conn1;
@@ -4800,7 +4801,7 @@ COLLATION(space(2))
latin2_general_ci
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
#
# End of 5.6 tests
#
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index bc4ab2396f6..a01b3942209 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -6,6 +6,7 @@
drop table if exists t1,t2;
--enable_warnings
+set @save_max_allowed_packet=@@global.max_allowed_packet;
set global max_allowed_packet=1048576;
connect (conn1,localhost,root,,);
connection conn1;
@@ -1848,7 +1849,7 @@ EXECUTE stmt;
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
--echo #
--echo # End of 5.6 tests
diff --git a/mysql-test/main/func_weight_string.result b/mysql-test/main/func_weight_string.result
index 5fa78c861a9..3b72cdafa32 100644
--- a/mysql-test/main/func_weight_string.result
+++ b/mysql-test/main/func_weight_string.result
@@ -1,4 +1,5 @@
drop table if exists t1;
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1048576;
connect conn1,localhost,root,,;
connection conn1;
@@ -95,7 +96,7 @@ Warning 1301 Result of cast_as_binary() was larger than max_allowed_packet (1048
Warning 1301 Result of weight_string() was larger than max_allowed_packet (1048576) - truncated
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
#
# Start of 10.1 tests
#
diff --git a/mysql-test/main/func_weight_string.test b/mysql-test/main/func_weight_string.test
index b376b996556..528aa5d4f0f 100644
--- a/mysql-test/main/func_weight_string.test
+++ b/mysql-test/main/func_weight_string.test
@@ -2,7 +2,7 @@
drop table if exists t1;
--enable_warnings
-
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1048576;
connect (conn1,localhost,root,,);
connection conn1;
@@ -118,7 +118,7 @@ SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000)));
disconnect conn1;
connection default;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
--echo #
--echo # Start of 10.1 tests
diff --git a/mysql-test/main/function_defaults.result b/mysql-test/main/function_defaults.result
index 62422752e17..4a8f64df352 100644
--- a/mysql-test/main/function_defaults.result
+++ b/mysql-test/main/function_defaults.result
@@ -3093,3 +3093,55 @@ a b
1999-12-01 11:22:33.000000 1999-12-01 11:22:33.000000
2001-09-09 04:46:40.000000 2001-09-09 04:46:40.000000
DROP TABLE t1;
+create table t1 (t timestamp, i int, v timestamp as (t) virtual, key(v));
+insert t1 (t,i) values ('2006-03-01 23:59:59',1);
+update t1 set i = 2;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+create table t1 (t timestamp, i int);
+create trigger tr1 before update on t1 for each row set @new:=new.t;
+insert t1 (t,i) values ('2006-03-01 23:59:59', 1);
+update t1 set i = 2;
+select if(@new = t, 'correct', 'wrong') from t1;
+if(@new = t, 'correct', 'wrong')
+correct
+drop table t1;
+create table t1 (i int, j int as (i));
+create trigger tr1 before update on t1 for each row set @new:=new.j;
+insert t1 (i) values (1);
+update t1, t1 as t2 set t1.i = 2;
+select if(@new = j, 'correct', 'wrong') from t1;
+if(@new = j, 'correct', 'wrong')
+correct
+drop table t1;
+create table t1 (a int, b varchar(20) default 'foo');
+insert t1 values (1,'bla'),(2, 'bar');
+select * from t1;
+a b
+1 bla
+2 bar
+update t1 set b=default where a=1;
+select * from t1;
+a b
+1 foo
+2 bar
+drop table t1;
+create table t1 (
+a int,
+b timestamp default '2010-10-10 10:10:10' on update now(),
+c varchar(100) default 'x');
+insert t1 (a) values (1),(2);
+select * from t1;
+a b c
+1 2010-10-10 10:10:10 x
+2 2010-10-10 10:10:10 x
+set timestamp=unix_timestamp('2011-11-11 11-11-11');
+update t1 set b=default, c=default(b) where a=1;
+select * from t1;
+a b c
+1 2010-10-10 10:10:10 2010-10-10 10:10:10
+2 2010-10-10 10:10:10 x
+drop table t1;
+set timestamp=default;
diff --git a/mysql-test/main/function_defaults.test b/mysql-test/main/function_defaults.test
index f8b23d0eda8..dd3ba109b2a 100644
--- a/mysql-test/main/function_defaults.test
+++ b/mysql-test/main/function_defaults.test
@@ -19,3 +19,51 @@ let $now=NOW(6);
let $timestamp=TIMESTAMP(6);
let $datetime=DATETIME(6);
source 'include/function_defaults.inc';
+
+#
+# MDEV-20403 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIMESTAMP..ON UPDATE
+#
+
+# ON UPDATE NOW and indexed virtual columns
+create table t1 (t timestamp, i int, v timestamp as (t) virtual, key(v));
+insert t1 (t,i) values ('2006-03-01 23:59:59',1);
+update t1 set i = 2;
+check table t1;
+drop table t1;
+
+# ON UPDATE NOW and triggers
+create table t1 (t timestamp, i int);
+create trigger tr1 before update on t1 for each row set @new:=new.t;
+insert t1 (t,i) values ('2006-03-01 23:59:59', 1);
+update t1 set i = 2;
+select if(@new = t, 'correct', 'wrong') from t1;
+drop table t1;
+
+# triggers, virtual columns, multi-update
+create table t1 (i int, j int as (i));
+create trigger tr1 before update on t1 for each row set @new:=new.j;
+insert t1 (i) values (1);
+update t1, t1 as t2 set t1.i = 2;
+select if(@new = j, 'correct', 'wrong') from t1;
+drop table t1;
+
+# SET xxx=DEFAULT
+create table t1 (a int, b varchar(20) default 'foo');
+insert t1 values (1,'bla'),(2, 'bar');
+select * from t1;
+update t1 set b=default where a=1;
+select * from t1;
+drop table t1;
+
+# ON UPDATE NOW and SET xxx=DEFAULT
+create table t1 (
+ a int,
+ b timestamp default '2010-10-10 10:10:10' on update now(),
+ c varchar(100) default 'x');
+insert t1 (a) values (1),(2);
+select * from t1;
+set timestamp=unix_timestamp('2011-11-11 11-11-11');
+update t1 set b=default, c=default(b) where a=1;
+select * from t1;
+drop table t1;
+set timestamp=default;
diff --git a/mysql-test/main/grant.opt b/mysql-test/main/grant.opt
new file mode 100644
index 00000000000..afe4f848260
--- /dev/null
+++ b/mysql-test/main/grant.opt
@@ -0,0 +1 @@
+--disable-skip-name-resolve --character_set_server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/grant2.opt b/mysql-test/main/grant2.opt
new file mode 100644
index 00000000000..afe4f848260
--- /dev/null
+++ b/mysql-test/main/grant2.opt
@@ -0,0 +1 @@
+--disable-skip-name-resolve --character_set_server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/grant4.opt b/mysql-test/main/grant4.opt
new file mode 100644
index 00000000000..afe4f848260
--- /dev/null
+++ b/mysql-test/main/grant4.opt
@@ -0,0 +1 @@
+--disable-skip-name-resolve --character_set_server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/grant_cache_no_prot.result b/mysql-test/main/grant_cache_no_prot.result
index f1adb3ae839..04eb2469732 100644
--- a/mysql-test/main/grant_cache_no_prot.result
+++ b/mysql-test/main/grant_cache_no_prot.result
@@ -1,3 +1,6 @@
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_sql_mode=@@global.sql_mode;
+set @save_query_cache_type=@@global.query_cache_type;
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
@@ -242,8 +245,8 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
flush privileges;
drop table test.t1,mysqltest.t1,mysqltest.t2;
drop database mysqltest;
-set GLOBAL query_cache_size=default;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
-set GLOBAL sql_mode=default;
-set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+set GLOBAL sql_mode=@save_sql_mode;
+set GLOBAL query_cache_type=@save_query_cache_type;
diff --git a/mysql-test/main/grant_cache_ps_prot.result b/mysql-test/main/grant_cache_ps_prot.result
index 56a98cc076d..3bc51430fd0 100644
--- a/mysql-test/main/grant_cache_ps_prot.result
+++ b/mysql-test/main/grant_cache_ps_prot.result
@@ -1,3 +1,6 @@
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_sql_mode=@@global.sql_mode;
+set @save_query_cache_type=@@global.query_cache_type;
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
@@ -242,8 +245,8 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
flush privileges;
drop table test.t1,mysqltest.t1,mysqltest.t2;
drop database mysqltest;
-set GLOBAL query_cache_size=default;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
-set GLOBAL sql_mode=default;
-set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+set GLOBAL sql_mode=@save_sql_mode;
+set GLOBAL query_cache_type=@save_query_cache_type;
diff --git a/mysql-test/main/grant_explain_non_select.test b/mysql-test/main/grant_explain_non_select.test
index 701586be325..2bde3bed17c 100644
--- a/mysql-test/main/grant_explain_non_select.test
+++ b/mysql-test/main/grant_explain_non_select.test
@@ -7,6 +7,7 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
+--source include/default_optimizer_switch.inc
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
@@ -22,6 +23,7 @@ GRANT SELECT ON privtest_db.t2 TO 'privtest'@'localhost';
connect(con1,localhost,privtest,,);
connection con1;
+--source include/default_optimizer_switch.inc
USE privtest_db;
diff --git a/mysql-test/main/greedy_optimizer.result b/mysql-test/main/greedy_optimizer.result
index de9db45cb15..d7c7e603c68 100644
--- a/mysql-test/main/greedy_optimizer.result
+++ b/mysql-test/main/greedy_optimizer.result
@@ -110,13 +110,7 @@ insert into t7 values (18,2,3,4,5,6);
insert into t7 values (19,2,3,4,5,6);
insert into t7 values (20,2,3,4,5,6);
insert into t7 values (21,2,3,4,5,6);
-select @@optimizer_search_depth;
-@@optimizer_search_depth
-62
-select @@optimizer_prune_level;
-@@optimizer_prune_level
-1
-set optimizer_search_depth=63;
+set optimizer_search_depth=63, optimizer_prune_level=1;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '63'
select @@optimizer_search_depth;
diff --git a/mysql-test/main/greedy_optimizer.test b/mysql-test/main/greedy_optimizer.test
index dcd0587d76e..cac262bca64 100644
--- a/mysql-test/main/greedy_optimizer.test
+++ b/mysql-test/main/greedy_optimizer.test
@@ -138,11 +138,6 @@ insert into t7 values (21,2,3,4,5,6);
# The actual test begins here
#
-# Check the default values for the optimizer parameters
-
-select @@optimizer_search_depth;
-select @@optimizer_prune_level;
-
# This value swithes back to the old implementation of 'find_best()'
# set optimizer_search_depth=63; - old (independent of the optimizer_prune_level)
#
@@ -170,7 +165,7 @@ select @@optimizer_prune_level;
# procedure 'find_best'. Notice that 'find_best' does not depend on the
# choice of heuristic.
-set optimizer_search_depth=63;
+set optimizer_search_depth=63, optimizer_prune_level=1;
select @@optimizer_search_depth;
# 6-table join, chain
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index 44ebce66b22..d1b0898e6b2 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -523,6 +523,8 @@ NULL 9
b 1
drop table t1;
set big_tables=0;
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(1,2),(3,1),(3,2),(2,2),(2,1);
create table t2 (a int not null, b int not null, key(a));
@@ -535,10 +537,10 @@ a b
3 1
select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
a b
-1 3
1 1
-3 1
+1 3
2 2
+3 1
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary; Using filesort
@@ -548,6 +550,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
+SET @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
create table t1 (a int, b int);
insert into t1 values (1, 4),(10, 40),(1, 4),(10, 43),(1, 4),(10, 41),(1, 4),(10, 43),(1, 4);
select a, MAX(b), INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) from t1 group by a;
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index 6686166e00e..f9242b5b4ff 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -400,15 +400,20 @@ set big_tables=0;
# Test of GROUP BY ... ORDER BY NULL optimization
#
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(1,2),(3,1),(3,2),(2,2),(2,1);
create table t2 (a int not null, b int not null, key(a));
insert into t2 values (1,3),(3,1),(2,2),(1,1);
select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
+--sorted_result
select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
drop table t1,t2;
+SET @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
+
#
# group function arguments in some functions
diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test
index b32a39b1988..0dc7ea2fee7 100644
--- a/mysql-test/main/group_min_max.test
+++ b/mysql-test/main/group_min_max.test
@@ -3,6 +3,8 @@
# The queries in this file test query execution via QUICK_GROUP_MIN_MAX_SELECT.
#
+--source include/default_optimizer_switch.inc
+
#
# TODO:
# Add queries with:
diff --git a/mysql-test/main/handlersocket.opt b/mysql-test/main/handlersocket.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/handlersocket.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/host_cache_size_functionality.result b/mysql-test/main/host_cache_size_functionality.result
index 069cf61bcad..f5d7e7ee109 100644
--- a/mysql-test/main/host_cache_size_functionality.result
+++ b/mysql-test/main/host_cache_size_functionality.result
@@ -4,12 +4,7 @@ echo '##'
####################################################################
# Checking default value #
####################################################################
-SELECT COUNT(@@GLOBAL.Host_Cache_Size)
-1 Expected
-set @Default_host_cache_size=279;
-select @@global.Host_Cache_Size=@Default_host_cache_size;
-@@global.Host_Cache_Size=@Default_host_cache_size
-1
+select @@global.Host_Cache_Size > 0
1 Expected
'#---------------------WL6372_VAR_6_02----------------------#'
# Restart server with Host_Cache_Size 1
diff --git a/mysql-test/main/host_cache_size_functionality.test b/mysql-test/main/host_cache_size_functionality.test
index 5a7376cc5eb..db4f64fd493 100644
--- a/mysql-test/main/host_cache_size_functionality.test
+++ b/mysql-test/main/host_cache_size_functionality.test
@@ -31,13 +31,8 @@ echo '##'
####################################################################
# Checking default value #
####################################################################
-SELECT COUNT(@@GLOBAL.Host_Cache_Size);
---echo 1 Expected
-#set @Default_host_cache_size=(select if(if(@@global.max_connections<500,128+@@global.max_connections,128+@@global.max_connections+floor((@@global.max_connections-500)/20))>2000,2000,if(@@global.max_connections<500,128+@@global.max_connections,128+@@global.max_connections+floor((@@global.max_connections-500)/20))));
-set @Default_host_cache_size=279;
-
-select @@global.Host_Cache_Size=@Default_host_cache_size;
+select @@global.Host_Cache_Size > 0;
--echo 1 Expected
diff --git a/mysql-test/main/huge_frm-6224.result b/mysql-test/main/huge_frm-6224.result
index bbb650bc5b4..4c97bf3837c 100644
--- a/mysql-test/main/huge_frm-6224.result
+++ b/mysql-test/main/huge_frm-6224.result
@@ -1,6 +1,7 @@
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1024*1024*10;
connect con1,localhost,root;
ERROR HY000: The definition for table `t1` is too big
connection default;
disconnect con1;
-set global max_allowed_packet=default;
+set global max_allowed_packet=@save_max_allowed_packet;
diff --git a/mysql-test/main/huge_frm-6224.test b/mysql-test/main/huge_frm-6224.test
index 322abd01738..e53c0a4c6e3 100644
--- a/mysql-test/main/huge_frm-6224.test
+++ b/mysql-test/main/huge_frm-6224.test
@@ -4,6 +4,7 @@
# verify that huge frms are rejected during creation, not on opening
#
--source include/have_partition.inc
+set @save_max_allowed_packet=@@max_allowed_packet;
set global max_allowed_packet=1024*1024*10;
connect con1,localhost,root;
@@ -23,5 +24,4 @@ eval $a partition foo);
connection default;
disconnect con1;
-set global max_allowed_packet=default;
-
+set global max_allowed_packet=@save_max_allowed_packet;
diff --git a/mysql-test/main/index_intersect.test b/mysql-test/main/index_intersect.test
index c77eccc6335..a3fbe0de8b9 100644
--- a/mysql-test/main/index_intersect.test
+++ b/mysql-test/main/index_intersect.test
@@ -1,3 +1,6 @@
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3,t4;
DROP DATABASE IF EXISTS world;
diff --git a/mysql-test/main/information_schema-big.result b/mysql-test/main/information_schema-big.result
index b135621acb7..0ed74d113ea 100644
--- a/mysql-test/main/information_schema-big.result
+++ b/mysql-test/main/information_schema-big.result
@@ -15,7 +15,7 @@ WHERE c2.table_schema = t.table_schema AND
c2.table_name = t.table_name AND
c2.column_name LIKE '%SCHEMA%'
)
-AND t.table_name NOT LIKE 'innodb%';
+AND t.table_name NOT LIKE 'innodb%' and t.table_name NOT LIKE "OPTIMIZER_TRACE%";
table_name column_name
ALL_PLUGINS PLUGIN_NAME
APPLICABLE_ROLES GRANTEE
@@ -36,7 +36,6 @@ GLOBAL_VARIABLES VARIABLE_NAME
INDEX_STATISTICS TABLE_SCHEMA
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
-OPTIMIZER_TRACE QUERY
PARAMETERS SPECIFIC_SCHEMA
PARTITIONS TABLE_SCHEMA
PLUGINS PLUGIN_NAME
@@ -74,7 +73,7 @@ WHERE c2.table_schema = 'information_schema' AND
c2.table_name = t.table_name AND
c2.column_name LIKE '%SCHEMA%'
)
-AND t.table_name NOT LIKE 'innodb%';
+AND t.table_name NOT LIKE 'innodb%' and t.table_name NOT LIKE "OPTIMIZER_TRACE%";
table_name column_name
ALL_PLUGINS PLUGIN_NAME
APPLICABLE_ROLES GRANTEE
@@ -95,7 +94,6 @@ GLOBAL_VARIABLES VARIABLE_NAME
INDEX_STATISTICS TABLE_SCHEMA
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
-OPTIMIZER_TRACE QUERY
PARAMETERS SPECIFIC_SCHEMA
PARTITIONS TABLE_SCHEMA
PLUGINS PLUGIN_NAME
diff --git a/mysql-test/main/information_schema-big.test b/mysql-test/main/information_schema-big.test
index 9212348649e..3a82bbf6dcb 100644
--- a/mysql-test/main/information_schema-big.test
+++ b/mysql-test/main/information_schema-big.test
@@ -26,7 +26,7 @@ SELECT t.table_name, c1.column_name
c2.table_name = t.table_name AND
c2.column_name LIKE '%SCHEMA%'
)
- AND t.table_name NOT LIKE 'innodb%';
+ AND t.table_name NOT LIKE 'innodb%' and t.table_name NOT LIKE "OPTIMIZER_TRACE%";
--sorted_result
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
@@ -42,4 +42,4 @@ SELECT t.table_name, c1.column_name
c2.table_name = t.table_name AND
c2.column_name LIKE '%SCHEMA%'
)
- AND t.table_name NOT LIKE 'innodb%';
+ AND t.table_name NOT LIKE 'innodb%' and t.table_name NOT LIKE "OPTIMIZER_TRACE%";
diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test
index 95b6f253058..dc0ad5cff59 100644
--- a/mysql-test/main/information_schema.test
+++ b/mysql-test/main/information_schema.test
@@ -17,6 +17,9 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
set global sql_mode="";
set local sql_mode="";
diff --git a/mysql-test/main/information_schema_parameters.test b/mysql-test/main/information_schema_parameters.test
index 8ce6af478b6..81aef66bfcd 100644
--- a/mysql-test/main/information_schema_parameters.test
+++ b/mysql-test/main/information_schema_parameters.test
@@ -7,6 +7,8 @@
# Last modified: 2007-12-03
#------------------------------------------------------------------------------
+--source include/default_charset.inc
+
###############################################################################
# Testcase parameters.1: Verify INFORMATION_SCHEMA.PARAMETERS view has the
# following structure:
diff --git a/mysql-test/main/information_schema_routines.test b/mysql-test/main/information_schema_routines.test
index 190410c2b82..a07e54cd70b 100644
--- a/mysql-test/main/information_schema_routines.test
+++ b/mysql-test/main/information_schema_routines.test
@@ -56,6 +56,8 @@
################################################################################
set sql_mode="";
set sql_mode="";
+--source include/default_charset.inc
+
-- echo # ========== routines.1 ==========
USE INFORMATION_SCHEMA;
--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
diff --git a/mysql-test/main/information_schema_stats.result b/mysql-test/main/information_schema_stats.result
index bc2ce9f0294..8e044bc9f96 100644
--- a/mysql-test/main/information_schema_stats.result
+++ b/mysql-test/main/information_schema_stats.result
@@ -1,3 +1,4 @@
+set @save_userstat=@@global.userstat;
set global userstat=1;
create table just_a_test(id int,first_name varchar(10),last_name varchar(10),address varchar(100),phone bigint,email varchar(30), state varchar(30));
insert into just_a_test values(1,'fa','la','china_a',11111111,'fa_la@163.com','California'),
@@ -67,4 +68,4 @@ select * from information_schema.index_statistics where table_schema='test' and
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
-set global userstat=0;
+set global userstat=@save_userstat;
diff --git a/mysql-test/main/information_schema_stats.test b/mysql-test/main/information_schema_stats.test
index c7f39894ce7..49d46ee437d 100644
--- a/mysql-test/main/information_schema_stats.test
+++ b/mysql-test/main/information_schema_stats.test
@@ -1,6 +1,7 @@
#
# MDEV-8633: information_schema.index_statistics doesn't delete item when drop table indexes or drop table;
#
+set @save_userstat=@@global.userstat;
set global userstat=1;
create table just_a_test(id int,first_name varchar(10),last_name varchar(10),address varchar(100),phone bigint,email varchar(30), state varchar(30));
insert into just_a_test values(1,'fa','la','china_a',11111111,'fa_la@163.com','California'),
@@ -43,4 +44,4 @@ select * from information_schema.table_statistics where table_schema='test' and
drop table just_a_test;
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
-set global userstat=0;
+set global userstat=@save_userstat;
diff --git a/mysql-test/main/init_connection_query_cache.result b/mysql-test/main/init_connection_query_cache.result
index eacc06c05f6..df27327e93b 100644
--- a/mysql-test/main/init_connection_query_cache.result
+++ b/mysql-test/main/init_connection_query_cache.result
@@ -2,6 +2,7 @@
# MDEV-4520: Assertion `0' fails in Query_cache::end_of_result on
# concurrent drop event and event execution
#
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
create user mysqltest1@localhost;
grant SELECT on test.* to mysqltest1@localhost;
@@ -20,4 +21,4 @@ disconnect con1;
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
drop table t1;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/init_connection_query_cache.test b/mysql-test/main/init_connection_query_cache.test
index 4d83304163e..5a5c7dcef4b 100644
--- a/mysql-test/main/init_connection_query_cache.test
+++ b/mysql-test/main/init_connection_query_cache.test
@@ -4,6 +4,7 @@
--echo # MDEV-4520: Assertion `0' fails in Query_cache::end_of_result on
--echo # concurrent drop event and event execution
--echo #
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
create user mysqltest1@localhost;
@@ -23,4 +24,4 @@ drop user mysqltest1@localhost;
drop table t1;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result
index 2ec3a9ae951..e0fa55735d8 100644
--- a/mysql-test/main/innodb_ext_key.result
+++ b/mysql-test/main/innodb_ext_key.result
@@ -1150,6 +1150,7 @@ drop table t0,t1,t2;
#
# MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
# was corrupted, server crashes in opt_sum_query
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity, @@optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (
pk INT,
f1 VARCHAR(3),
@@ -1222,6 +1223,7 @@ EXPLAIN
}
}
drop table t1;
+SET optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test
index d2f426662b4..bb02bdf4615 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -795,6 +795,8 @@ drop table t0,t1,t2;
--echo # MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
--echo # was corrupted, server crashes in opt_sum_query
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity, @@optimizer_use_condition_selectivity=4;
+
CREATE TABLE t1 (
pk INT,
f1 VARCHAR(3),
@@ -834,6 +836,7 @@ explain format= json
select * from t1 force index(k1) where f2 <= 5 and pk2 <=5 and pk1 = 'abc' and f1 <= '3';
drop table t1;
+SET optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/innodb_icp.test b/mysql-test/main/innodb_icp.test
index d192ce044df..9081b886224 100644
--- a/mysql-test/main/innodb_icp.test
+++ b/mysql-test/main/innodb_icp.test
@@ -3,6 +3,7 @@
#
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
set @save_storage_engine= @@storage_engine;
set storage_engine=InnoDB;
diff --git a/mysql-test/main/intersect.result b/mysql-test/main/intersect.result
index 034018de2e2..7ad10265f0f 100644
--- a/mysql-test/main/intersect.result
+++ b/mysql-test/main/intersect.result
@@ -1,3 +1,5 @@
+set @@join_buffer_size=256*1024;
+set @save_optimizer_switch=@@optimizer_switch;
create table t1 (a int, b int);
create table t2 (c int, d int);
insert into t1 values (1,1),(2,2);
@@ -279,6 +281,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `a`.`a` AS `a`,`a`.`b` AS `b` from (/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect (/* select#3 */ select `test`.`t2`.`c` AS `c`,`test`.`t3`.`e` AS `e` from `test`.`t2` join `test`.`t3`)) `a`
+set @@optimizer_switch='optimize_join_buffer_size=off';
EXPLAIN format=json (select a,b from t1) intersect (select c,e from t2,t3);
EXPLAIN
{
@@ -316,7 +319,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "65",
+ "buffer_size": "256Kb",
"join_type": "BNL"
}
}
@@ -380,7 +383,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "65",
+ "buffer_size": "256Kb",
"join_type": "BNL",
"r_filtered": 100
}
@@ -459,7 +462,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "65",
+ "buffer_size": "256Kb",
"join_type": "BNL",
"r_filtered": 100
}
@@ -472,6 +475,7 @@ ANALYZE
}
}
}
+set @@optimizer_switch=@save_optimizer_switch;
select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
a b
2 2
diff --git a/mysql-test/main/intersect.test b/mysql-test/main/intersect.test
index a99aa9271cd..e42c0d007b5 100644
--- a/mysql-test/main/intersect.test
+++ b/mysql-test/main/intersect.test
@@ -1,3 +1,7 @@
+# For explain
+set @@join_buffer_size=256*1024;
+set @save_optimizer_switch=@@optimizer_switch;
+
create table t1 (a int, b int);
create table t2 (c int, d int);
insert into t1 values (1,1),(2,2);
@@ -38,11 +42,13 @@ execute stmt;
EXPLAIN (select a,b from t1) intersect (select c,e from t2,t3);
EXPLAIN extended (select a,b from t1) intersect (select c,e from t2,t3);
EXPLAIN extended select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
+set @@optimizer_switch='optimize_join_buffer_size=off';
EXPLAIN format=json (select a,b from t1) intersect (select c,e from t2,t3);
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
ANALYZE format=json (select a,b from t1) intersect (select c,e from t2,t3);
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
+set @@optimizer_switch=@save_optimizer_switch;
select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
prepare stmt from "(select a,b from t1) intersect (select c,e from t2,t3);";
diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result
index 87c2b940c7e..0b3ec037613 100644
--- a/mysql-test/main/invisible_field.result
+++ b/mysql-test/main/invisible_field.result
@@ -538,7 +538,7 @@ a b
insert into t2 values(1);
select a,b from t2;
a b
-12 1
+NULL 1
drop table t1,t2;
create table t1 (a int invisible, b int, c int);
create table t2 (a int, b int, d int);
diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test
index cf24fb04e4a..35d148d0114 100644
--- a/mysql-test/main/join.test
+++ b/mysql-test/main/join.test
@@ -1,5 +1,6 @@
#
# Initialization
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2,t3;
drop view if exists v1,v2;
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index 0aad061f299..ce0855602cc 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -1,17 +1,21 @@
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
-set @save_optimizer_switch=@@optimizer_switch;
+set @org_optimizer_switch=@@optimizer_switch;
+set @save_join_cache_level=@@join_cache_level;
+set @save_join_buffer_space_limit=@@join_buffer_space_limit;
+set @save_join_buffer_size=@@join_buffer_size;
+set @save_expensive_subquery_limit=@@expensive_subquery_limit;
set @@optimizer_switch='optimize_join_buffer_size=on';
-set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
+set @@optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @local_optimizer_switch=@@optimizer_switch;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
set global innodb_stats_persistent= 1;
set global innodb_stats_persistent_sample_pages=100;
-set @local_join_cache_test_optimizer_switch_default=@@optimizer_switch;
set names utf8;
CREATE DATABASE world;
use world;
@@ -775,14 +779,8 @@ Ludwigshafen am Rhein Germany German
Lungtan Taiwan Min
L´Hospitalet de Llobregat Spain Spanish
Lázaro Cárdenas Mexico Spanish
-set join_cache_level=default;
-set join_buffer_size=default;
-show variables like 'join_buffer_size';
-Variable_name Value
-join_buffer_size 262144
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
DROP DATABASE world;
CREATE DATABASE world;
use world;
@@ -2689,14 +2687,8 @@ Kaunas
Klaipeda
?iauliai
Panevezys
-set join_cache_level=default;
-set join_buffer_size=default;
-show variables like 'join_buffer_size';
-Variable_name Value
-join_buffer_size 262144
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
set join_cache_level=1;
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
@@ -2804,7 +2796,7 @@ Teheran Iran
Tianjin China
Tokyo Japan
Wuhan China
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
set join_cache_level=6;
ALTER TABLE Country MODIFY Name varchar(52) NOT NULL default '';
SELECT City.Name, Country.Name FROM City,Country
@@ -2888,8 +2880,8 @@ Tripoli Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Tripoli Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Vientiane Laos xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Vilnius Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
#
# MDEV-17752: Plan changes from hash_index_merge to index_merge with new optimizer defaults
#
@@ -2920,7 +2912,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City hash_index_merge Population,Country,City_Name #hash#Country:Population,City_Name 3:4,35 world.Country.Code 96 Using sort_union(Population,City_Name); Using where; Using join buffer (flat, BNLH join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set @@use_stat_tables=@save_use_stat_tables;
-set join_cache_level=default;
+set @@join_cache_level=@save_join_cache_level;
DROP DATABASE world;
use test;
CREATE TABLE t1(
@@ -3211,8 +3203,8 @@ DROP TABLE t1,t2;
#
# Bug #40134: outer join with not exists optimization and join buffer
#
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
CREATE TABLE t1 (a int NOT NULL);
INSERT INTO t1 VALUES (2), (4), (3), (5), (1);
CREATE TABLE t2 (a int NOT NULL, b int NOT NULL, INDEX i_a(a));
@@ -3240,8 +3232,8 @@ a a b
5 NULL NULL
1 NULL NULL
DROP TABLE t1, t2;
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
#
# BUG#40136: Group by is ignored when join buffer is used for an outer join
#
@@ -3293,7 +3285,7 @@ a b a b a b
4 2 1 2 4 2
3 3 NULL NULL NULL NULL
5 3 NULL NULL NULL NULL
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t2, t3, t4;
#
# Bug #40192: outer join with where clause when using BNL
@@ -3317,7 +3309,7 @@ select * from t1 left join t2 on t1.a=t2.a where t2.c=102 or t2.c is null;
a b a c
3 30 3 102
2 20 NULL NULL
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1, t2;
#
# Bug #40317: outer join with with constant on expression equal to FALSE
@@ -3344,7 +3336,7 @@ explain select * from t1 left join t2 on (1=0);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1, t2;
#
# Bug #41204: small buffer with big rec_per_key for ref access
@@ -3383,8 +3375,8 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
AVG(c)
5.0000
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1, t2;
#
# Bug #41894: big join buffer of level 7 used to join records
@@ -3426,8 +3418,8 @@ WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
COUNT(*)
16384
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
#
# Bug #42020: join buffer is used for outer join with fields of
@@ -3526,8 +3518,8 @@ a a a b b val
2 2 2 60 60 0
2 2 2 70 70 0
2 2 2 80 80 0
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
create table t1(f1 int, f2 int);
insert into t1 values (1,1),(2,2),(3,3);
@@ -3614,7 +3606,7 @@ Variable_name Value
Handler_icp_attempts 80
Handler_icp_match 16
drop table t1,t2;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
#
# Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
#
@@ -3658,7 +3650,7 @@ id1
20
30
30
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2;
#
# Bug #44019: star-like multi-join query executed join_cache_level=6
@@ -3722,7 +3714,7 @@ select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
3 30 300 3000 bbb ddd ccc
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2,t3,t4;
#
# Bug #44250: Corruption of linked join buffers when using BKA
@@ -3806,8 +3798,8 @@ id1 num3 text1 id4 id3 dummy
228808822 3 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2381969632 2482416112 0
228808822 28 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2381969632 2482416112 0
228808822 62 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2381969632 2482416112 0
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
#
# Bug#45267: Incomplete check caused wrong result.
@@ -3869,7 +3861,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL int_key 4 NULL 2 Using index; Using join buffer (flat, BNL join)
DROP TABLE t1,t2;
-SET join_cache_level=default;
+SET join_cache_level=@save_join_cache_level;
#
# Regression test for
# Bug#46733 - NULL value not returned for aggregate on empty result
@@ -3922,7 +3914,7 @@ SELECT t1.*, t2.*, LENGTH(t2.c1), LENGTH(t2.c2) FROM t1,t2
WHERE t1.c2=LENGTH(t2.c2) and t1.c1=LENGTH(t2.c1);
c1 c2 c1 c2 LENGTH(t2.c1) LENGTH(t2.c2)
2 2 tt uu 2 2
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #51092: linked join buffer is used for a 3-way cross join query
@@ -3966,7 +3958,7 @@ a b
2 2
1 1
2 2
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2,t3;
#
# Bug #52394: using join buffer for 3 table join with ref access
@@ -3995,7 +3987,7 @@ a
27
27
DROP TABLE t1,t2,t3;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
#
# Bug #51084: Batched key access crashes for SELECT with
# derived table and LEFT JOIN
@@ -4035,7 +4027,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.carrier 1 Using where
1 SIMPLE t4 ref carrier_id carrier_id 5 test.t3.id 2 Using index
-SET join_cache_level=default;
+SET join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
#
# Bug #52636: allowing JOINs on NULL values w/ join_cache_level = 5-8
@@ -4099,7 +4091,7 @@ SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b = t1.b;
a
NULL
NULL
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #54359: Extra rows with join_cache_level=7,8 and two joins
@@ -4126,7 +4118,7 @@ WHERE s.pk AND s.a >= t.pk AND s.b = t.c;
a
9
9
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1;
#
# Bug #54235: Extra rows with join_cache_level=6,8 and two LEFT JOINs
@@ -4166,7 +4158,7 @@ WHERE t1.a OR t4.a;
a
2
1
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
#
# Bug #663840: Memory overwrite causing crash with hash join
@@ -4301,8 +4293,8 @@ i d v i d t v
8 2009-01-13 z 5 1900-01-01 22:45:53 a
8 2009-01-13 z 5 1900-01-01 22:45:53 a
DROP TABLE t1,t2,t3;
-SET SESSION join_cache_level=DEFAULT;
-SET SESSION join_buffer_size=DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
#
# Bug #664508: 'Simple' GROUP BY + ORDER BY
# when join buffers are used
@@ -4447,7 +4439,7 @@ n
v
p
DROP TABLE t1,t2,t3;
-SET SESSION join_cache_level=DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
#
# Bug #668290: hash join with non-binary collations
#
@@ -4493,7 +4485,7 @@ SELECT t2.i FROM t1,t2 WHERE t1.cu = t2.cl ;
i
6
6
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #669382: hash join using a ref with constant key parts
@@ -4518,8 +4510,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 hash_ALL NULL #hash#$hj 5 test.t2.a 36 Using where; Using join buffer (flat, BNLH join)
SELECT t1.a, t2.c FROM t1,t2 WHERE t1.a=t2.a AND t2.b=99;
a c
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2;
#
# Bug #671901: hash join using a ref to a varchar field
@@ -4587,7 +4579,7 @@ SELECT t1.v,t2.i FROM t1,t2 WHERE t2.v = concat(t1.v, t1.v);
v i
f 5
f 5
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
# Bug #672497: 3 way join with tiny incremental join buffer with
# and a ref access from the first table
@@ -4656,8 +4648,8 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT t3.i FROM t1,t2,t3
WHERE t1.v = t2.v AND t3.v = t1.v AND t2.i <> 0;
i
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2,t3;
#
# Bug #672551: hash join over a long varchar field
@@ -4711,7 +4703,7 @@ pk a pk a
2 aa 131 aa
3 bb 132 bb
2 aa 142 aa
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #674431: nested outer join when join_cache_level is set to 7
@@ -4732,8 +4724,8 @@ a
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'h'
Warning 1292 Truncated incorrect INTEGER value: 'j'
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
#
# Bug #52540: nested outer join when join_cache_level is set to 3
@@ -4753,8 +4745,8 @@ FROM t2 LEFT JOIN
a a pk a
f 2 2 NULL
x 2 2 NULL
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
#
# Bug #674423: outer join with ON expression over only outer tables
@@ -4782,8 +4774,8 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t2 LEFT JOIN t1 ON t2.a <> 0 WHERE t1.a <> 0 OR t2.pk < 9;
pk a a
1 NULL NULL
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #675095: nested outer join using join buffer
@@ -4868,8 +4860,8 @@ pk a1 pk a2 c2 d2 pk a3 c3 d3 pk a4 pk a5
2 NULL 9 0 0 2 9 0 0 2 NULL NULL 8 0
2 NULL 9 0 0 2 1 0 0 7 NULL NULL 8 0
8 0 NULL NULL NULL NULL NULL NULL NULL NULL 8 0 NULL NULL
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
#
# Bug #675516: nested outer join with 3 tables in the nest
@@ -4916,8 +4908,8 @@ t1 LEFT JOIN
((t2 JOIN t3 ON t2.a2 = t3.b3) JOIN t4 ON t4.b4 <> 0) ON t1.c1 = t3.c3
WHERE t3.a3 IS NULL;
a1 b1 c1 a2 a3 b3 c3 a4 b4 c4
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
#
# Bug #660963: nested outer join with join_cache_level set to 5
@@ -4951,8 +4943,8 @@ SELECT * FROM t1 LEFT JOIN t2 JOIN t3 ON t3.a3 = t2.a2 ON t3.b3 <> 0;
a1 a2 b2 a3 b3
0 2 1 2 1
0 2 1 2 1
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
#
# Bug #675922: incremental buffer for BKA with access from previous
@@ -5003,8 +4995,8 @@ LEFT JOIN t4 ON t4.a4 <> 0) LEFT JOIN t5 ON t5.a5 = t2.a2;
a4 b5
9 0
9 NULL
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
#
# Bug #670380: hash join for non-binary collation
@@ -5048,7 +5040,7 @@ pk a pk a
40 DD 112 dd
50 ee 113 EE
50 ee 114 ee
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #694092: incorrect detection of index only pushdown conditions
@@ -5082,8 +5074,8 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
f1 f3 f3 f2 f4
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
CREATE TABLE t1 (f1 int, f2 varchar(10), KEY (f1), KEY (f2)) ;
INSERT INTO t1 VALUES
@@ -5105,7 +5097,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
f1 f2 f3
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION optimizer_switch=@local_optimizer_switch;
SET SESSION optimizer_switch = 'index_condition_pushdown=on';
EXPLAIN SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
@@ -5115,7 +5107,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
f1 f2 f3
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
#
# Bug #694443: hash join using IS NULL the an equi-join condition
@@ -5161,7 +5153,7 @@ a a b
2 NULL 41
1 NULL 42
2 NULL 42
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #697557: hash join on a varchar field
@@ -5183,7 +5175,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 hash_ALL f1 #hash#f1 13 test.t1.f1 20 Using join buffer (flat, BNLH join)
SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1;
f1 f2 f1 f2
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# Bug #707827: hash join on varchar column with NULLs
@@ -5217,8 +5209,8 @@ SELECT a FROM t1,t2 WHERE t2.v = t1.v ;
a
11
18
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2;
#
# Bug #802860: crash on join cache + derived + duplicate_weedout
@@ -5253,8 +5245,8 @@ SELECT * FROM (SELECT DISTINCT * FROM t1) t
WHERE t.a IN (SELECT t2.a FROM t2);
a
0
-SET SESSION join_cache_level = DEFAULT;
DROP TABLE t1, t2;
+SET SESSION join_cache_level=@save_join_cache_level;
#
# Bug #887479: join_cache_level=3 + semijoin=on
#
@@ -5262,7 +5254,7 @@ CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (3914,17), (3710,5), (3888,20);
CREATE TABLE t2 (c int, KEY (c));
INSERT INTO t2 VALUES (27), (17), (33), (20), (3), (7), (18), (2);
-SET @tmp887479_optimizer_switch=@@optimizer_switch;
+SET @tmp_optimizer_switch=@@optimizer_switch;
SET SESSION optimizer_switch='semijoin=on';
SET SESSION optimizer_switch='semijoin_with_cache=on';
SET SESSION join_cache_level=1;
@@ -5285,8 +5277,8 @@ SELECT * FROM t1 WHERE (t1.b) IN (SELECT c FROM t2);
a b
3914 17
3888 20
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp887479_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1,t2;
#
# Bug #899777: join_cache_level=4 + semijoin=on
@@ -5332,8 +5324,8 @@ WHERE (t1.b,t2.b) IN (SELECT t3.b,t4.b FROM t3,t4 WHERE t4.c=t3.b)
AND t1.a = 1;
a b c
1 8 6
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
#
# Bug #899509: an attempt to use hash join with join_cache_level=0
@@ -5344,11 +5336,9 @@ CREATE TABLE t2 (a int);
INSERT INTO t2 VALUES (8), (7);
CREATE TABLE t3 (a int);
INSERT INTO t3 VALUES (8), (7);
-SET @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch=default;
set @@optimizer_switch='semijoin_with_cache=off';
set @@optimizer_switch='outer_join_with_cache=off';
-SET optimizer_switch='derived_merge=off,derived_with_keys=off';
+set @@optimizer_switch='derived_merge=off,derived_with_keys=off';
SET join_cache_level=0;
EXPLAIN
SELECT * FROM (SELECT t1.* FROM t1, t2) t WHERE t.a IN (SELECT * FROM t3);
@@ -5370,8 +5360,8 @@ a
8
7
7
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# Bug #900469: semijoin + BNLH + ORDER BY
@@ -5384,8 +5374,8 @@ INSERT INTO t2 VALUES (9,11);
CREATE TABLE t3 (c int, d int);
INSERT INTO t3 VALUES (8,10);
INSERT INTO t3 VALUES (9,11);
-SET @tmp_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch='semijoin_with_cache=on';
+set @@optimizer_switch='firstmatch=off';
SET join_cache_level=1;
EXPLAIN
SELECT * FROM t1,t2 WHERE b IN (SELECT d FROM t3 WHERE c <= t2.c) ORDER BY a,d;
@@ -5419,8 +5409,8 @@ SELECT * FROM t1,t2 WHERE b IN (SELECT d FROM t3 WHERE c <= t2.c) ORDER BY a,d;
a b c d
8 10 8 10
8 10 9 11
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# Bug #901478: semijoin + ORDER BY + join_cache_level=4|6
@@ -5438,7 +5428,6 @@ INSERT INTO t4 VALUES
INSERT INTO t4 VALUES
(19,11,10), (17,12,18), (12,13,15), (14,12,19),
(18,13,18), (13,14,11), (15,15,14);
-SET @tmp_optimizer_switch=@@optimizer_switch;
SET @@optimizer_switch='semijoin=on';
SET @@optimizer_switch='firstmatch=off';
SET @@optimizer_switch='mrr=off';
@@ -5498,8 +5487,8 @@ ORDER BY t2.b;
a a b c
x 4 2 9
x 5 5 4
-SET join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
#
# Bug#53305 Duplicate weedout + join buffer (join cache --level=7,8)
@@ -5518,11 +5507,10 @@ insert into t3 values
(1,1), (1,2), (1,3),(1,4),
(2,5), (2,6), (2,7), (2,8),
(3,1), (3,2), (3,9);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch='semijoin=on';
-set optimizer_switch='materialization=off';
-set optimizer_switch='loosescan=off,firstmatch=off';
-set optimizer_switch='mrr_sort_keys=off';
+set @@optimizer_switch='semijoin=on';
+set @@optimizer_switch='materialization=off';
+set @@optimizer_switch='loosescan=off,firstmatch=off';
+set @@optimizer_switch='mrr_sort_keys=off';
set join_cache_level=7;
create table t4 (uid int primary key, name varchar(128), index(name));
insert into t4 values
@@ -5551,8 +5539,8 @@ F
G
H
I
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
drop table t1,t2,t3,t4;
#
# Bug#50358 - semijoin execution of subquery with outerjoin
@@ -5564,9 +5552,8 @@ CREATE TABLE t3 (i int);
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (6);
INSERT INTO t3 VALUES (1), (2);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch='semijoin=on';
-set optimizer_switch='materialization=on';
+set @@optimizer_switch='semijoin=on';
+set @@optimizer_switch='materialization=on';
set join_cache_level=0;
EXPLAIN
SELECT * FROM t1 WHERE t1.i IN
@@ -5595,8 +5582,8 @@ SELECT * FROM t1 WHERE t1.i IN
i
1
2
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# Bug #12546542: missing row with semijoin=off + join cache
@@ -5610,9 +5597,8 @@ a varchar(1024) CHARACTER SET utf8 DEFAULT NULL, b int, c int
INSERT INTO t2 VALUES ('we',4,NULL), ('v',1305673728,6);
CREATE TABLE t3 (b int, c int);
INSERT INTO t3 VALUES (4,4);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='semijoin=off';
-set optimizer_switch='materialization=off';
+set @@optimizer_switch='semijoin=off';
+set @@optimizer_switch='materialization=off';
set join_cache_level=0;
EXPLAIN
SELECT * FROM t1
@@ -5643,8 +5629,8 @@ WHERE t2.c < 10 OR t3.c > 1);
a
v
we
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# lp:925985 LEFT JOIN with optimize_join_buffer_size=off +
@@ -5659,12 +5645,11 @@ INSERT INTO t2 VALUES
(3,32), (1,12), (7,72), (2,22);
CREATE TABLE t3 (b int, c int);
INSERT INTO t3 VALUES (32, 302), (42,400), (30,300);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='optimize_join_buffer_size=off';
+set @@optimizer_switch='optimize_join_buffer_size=off';
+set @@optimizer_switch='outer_join_with_cache=on';
set join_buffer_space_limit=4096;
set join_buffer_size=4096*2;
set join_cache_level=2;
-set optimizer_switch='outer_join_with_cache=on';
EXPLAIN
SELECT * FROM t1, t2 LEFT JOIN t3 ON t2.b=t3.b WHERE t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5676,10 +5661,10 @@ a a b b c
3 3 30 30 300
3 3 31 NULL NULL
3 3 32 32 302
-set join_buffer_space_limit=default;
-set join_buffer_size=default;
-set join_cache_level=default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_buffer_space_limit=@save_join_buffer_space_limit;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# Bug #1058071: LEFT JOIN using blobs
@@ -5712,8 +5697,7 @@ CREATE TABLE t2 (b int) ENGINE=Aria;
INSERT INTO t2 VALUES (NULL);
CREATE TABLE t3 (c int) ENGINE=Aria;
INSERT INTO t3 VALUES (NULL);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch = 'outer_join_with_cache=on,join_cache_incremental=on';
+set @@optimizer_switch = 'outer_join_with_cache=on,join_cache_incremental=on';
set join_buffer_size=128;
EXPLAIN
SELECT 1 AS c FROM t1 NATURAL LEFT JOIN t2 LEFT OUTER JOIN t3 ON 1
@@ -5726,11 +5710,9 @@ SELECT 1 AS c FROM t1 NATURAL LEFT JOIN t2 LEFT OUTER JOIN t3 ON 1
GROUP BY elt(t1.col282,1,t1.col280);
c
1
-set join_buffer_size=default;
-set optimizer_switch=@tmp_optimizer_switch;
DROP table t1,t2,t3;
-set join_buffer_size= default;
-set @@optimizer_switch=@save_optimizer_switch;
+set join_buffer_size=@save_join_buffer_size;
+set @@optimizer_switch=@org_optimizer_switch,@local_optimizer_switch= @org_optimizer_switch;
#
# MDEV-5293: outer join, join buffering, and order by - invalid query plan
#
@@ -5901,8 +5883,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE c25 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c26 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c27 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
-set join_buffer_size=default;
-set join_cache_level = default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
# MDEV-14960: BNLH used for materialized semi-join
@@ -5920,11 +5902,10 @@ INSERT INTO t1 SELECT i1+64 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t4 SELECT * FROM t1;
INSERT INTO t5 SELECT * FROM t1;
-set @save_optimizer_switch= @@optimizer_switch;
SET join_cache_level = 6;
SET join_buffer_size=4096;
SET join_buffer_space_limit=4096;
-SET optimizer_switch = 'join_cache_hashed=on,optimize_join_buffer_size=on';
+set @@optimizer_switch = 'join_cache_hashed=on,optimize_join_buffer_size=on';
EXPLAIN SELECT * FROM t1
WHERE
i1 < 10 AND
@@ -5957,10 +5938,10 @@ i1
7
8
9
-SET join_cache_level = default;
-SET join_buffer_size = default;
-SET join_buffer_space_limit= default;
-set optimizer_switch=@save_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+SET join_buffer_size=@save_join_buffer_size;
+SET join_buffer_space_limit=@save_join_buffer_space_limit;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t4,t5,t2;
#
# MDEV-16603: BNLH for query with materialized semi-join
@@ -6000,11 +5981,10 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`temp`.`f1` AS `f1`,`test`.`temp`.`f2` AS `f2` from `test`.`temp` semi join (`test`.`t2` join `test`.`t1`) where `test`.`temp`.`f1` = `test`.`t1`.`i1` and `test`.`t2`.`v1` = `test`.`t1`.`v1` and `test`.`temp`.`f2` = `test`.`t1`.`v1`
DROP TABLE t1,t2,temp;
-SET join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
#
# MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins.
#
-set join_cache_level=default;
set expensive_subquery_limit=0;
create table t1 (c1 int);
create table t2 (c2 int);
@@ -6047,7 +6027,7 @@ select @counter;
@counter
2
drop table t1,t2,t3;
-set expensive_subquery_limit=default;
+set expensive_subquery_limit=@save_expensive_subquery_limit;
#
# MDEV-6071: EXPLAIN chooses to use join buffer while execution turns it down
#
@@ -6059,17 +6039,11 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 11
1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
set join_buffer_space_limit=1024*8;
-select @@join_buffer_space_limit;
-@@join_buffer_space_limit
-8192
-select @@join_buffer_size;
-@@join_buffer_size
-262144
explain select count(*) from t1, t1 t2 where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 11
1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
-set join_buffer_space_limit=default;
+set join_buffer_space_limit=@save_join_buffer_space_limit;
drop table t1;
#
# MDEV-6687: Assertion `0' failed in Protocol::end_statement on query
@@ -6083,7 +6057,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FA
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where
1 SIMPLE db hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 2 Using where; Using join buffer (flat, BNLH join)
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
create table t1 (c1 date not null, key (c1)) engine=innodb;
insert t1 values ('2017-12-27');
create table t2 (pk int, f1 int, f2 int);
@@ -6092,7 +6066,7 @@ set join_buffer_size = 222222208;
select f2 from t2,t1 where f2 = 0;
f2
drop table t1, t2;
-set join_buffer_size = default;
+set join_buffer_size=@save_join_buffer_size;
set @@optimizer_switch=@save_optimizer_switch;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index 97f660e7e0d..f831c442a3e 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -2,13 +2,21 @@
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
--enable_warnings
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
+set @org_optimizer_switch=@@optimizer_switch;
+set @save_join_cache_level=@@join_cache_level;
+set @save_join_buffer_space_limit=@@join_buffer_space_limit;
+set @save_join_buffer_size=@@join_buffer_size;
+set @save_expensive_subquery_limit=@@expensive_subquery_limit;
-set @save_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch='optimize_join_buffer_size=on';
-set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
+set @@optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @local_optimizer_switch=@@optimizer_switch;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@ -17,7 +25,6 @@ set @innodb_stats_persistent_sample_pages_save=
set global innodb_stats_persistent= 1;
set global innodb_stats_persistent_sample_pages=100;
-set @local_join_cache_test_optimizer_switch_default=@@optimizer_switch;
set names utf8;
CREATE DATABASE world;
@@ -341,11 +348,8 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
-set join_cache_level=default;
-set join_buffer_size=default;
-
-show variables like 'join_buffer_size';
-show variables like 'join_cache_level';
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
DROP DATABASE world;
@@ -958,11 +962,8 @@ SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
-set join_cache_level=default;
-set join_buffer_size=default;
-
-show variables like 'join_buffer_size';
-show variables like 'join_cache_level';
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
set join_cache_level=1;
@@ -982,7 +983,7 @@ SELECT City.Name, Country.Name FROM City,Country
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
set join_cache_level=6;
@@ -1016,8 +1017,8 @@ SELECT City.Name, Country.Name, Country.PopulationBar FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
--echo #
@@ -1051,7 +1052,7 @@ SELECT Country.Name, Country.Population, City.Name, City.Population
WHERE Country.Name LIKE 'C%' AND Country.Population > 10000000;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set @@use_stat_tables=@save_use_stat_tables;
-set join_cache_level=default;
+set @@join_cache_level=@save_join_cache_level;
DROP DATABASE world;
@@ -1324,8 +1325,8 @@ DROP TABLE t1,t2;
--echo # Bug #40134: outer join with not exists optimization and join buffer
--echo #
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
CREATE TABLE t1 (a int NOT NULL);
INSERT INTO t1 VALUES (2), (4), (3), (5), (1);
@@ -1344,8 +1345,8 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t2.b IS NULL;
DROP TABLE t1, t2;
-set join_cache_level=default;
-set join_buffer_size=default;
+set join_cache_level=@save_join_cache_level;
+set join_buffer_size=@save_join_buffer_size;
--echo #
--echo # BUG#40136: Group by is ignored when join buffer is used for an outer join
@@ -1387,7 +1388,7 @@ SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
FROM t2 LEFT JOIN (t3, t4) ON t2.b=t4.b
WHERE t3.a+2<t2.a OR t3.c IS NULL;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t2, t3, t4;
--echo #
@@ -1405,7 +1406,7 @@ select * from t1 left join t2 on t1.a=t2.a;
explain select * from t1 left join t2 on t1.a=t2.a where t2.c=102 or t2.c is null;
select * from t1 left join t2 on t1.a=t2.a where t2.c=102 or t2.c is null;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1, t2;
--echo #
@@ -1426,7 +1427,7 @@ select * from t1 left join t2 on (1=0) where a=40;
set join_cache_level=0;
explain select * from t1 left join t2 on (1=0);
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1, t2;
--echo #
@@ -1470,8 +1471,8 @@ set join_buffer_size=1024;
EXPLAIN SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1, t2;
@@ -1517,8 +1518,8 @@ SELECT COUNT(*) FROM t1,t2,t3
WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
@@ -1588,8 +1589,8 @@ SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val
FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b)
WHERE t1.a=t2.a;
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
@@ -1646,7 +1647,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
show status like "Handler_icp%";
drop table t1,t2;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
--echo #
--echo # Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
@@ -1680,7 +1681,7 @@ select t1.id1 from t1 join t2 on t1.id1=t2.id1
select t1.id1 from t1 join t2 on t1.id1=t2.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2;
@@ -1744,7 +1745,7 @@ select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2,t3,t4;
@@ -2133,8 +2134,8 @@ SELECT STRAIGHT_JOIN t1.id1, t1.num3, t3.text1, t3.id4, t2.id3, t4.dummy
WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 and t4.id2=t1.id2 AND
t5.enum2='Active' AND t3.id4=t2.id4 AND t2.id3=t1.id3 AND t3.text1<'D';
-set join_buffer_size=default;
-set join_cache_level=default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
@@ -2205,7 +2206,7 @@ ORDER BY t1.int_key;
DROP TABLE t1,t2;
-SET join_cache_level=default;
+SET join_cache_level=@save_join_cache_level;
--echo #
--echo # Regression test for
@@ -2268,7 +2269,7 @@ set join_cache_level=6;
SELECT t1.*, t2.*, LENGTH(t2.c1), LENGTH(t2.c2) FROM t1,t2
WHERE t1.c2=LENGTH(t2.c2) and t1.c1=LENGTH(t2.c1);
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -2294,7 +2295,7 @@ set join_cache_level=2;
explain select t1.* from t1,t2,t3;
select t1.* from t1,t2,t3;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
drop table t1,t2,t3;
@@ -2323,7 +2324,7 @@ SELECT t3.a FROM t1,t2,t3 WHERE t1.a = t3.a AND t1.b = t3.b;
DROP TABLE t1,t2,t3;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
--echo #
--echo # Bug #51084: Batched key access crashes for SELECT with
@@ -2365,7 +2366,7 @@ SELECT COUNT(*)
FROM (t2 JOIN t1) LEFT JOIN (t3 JOIN t4 ON t3.id = t4.carrier_id)
ON t3.carrier = t1.carrier;
-SET join_cache_level=default;
+SET join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
@@ -2419,7 +2420,7 @@ explain SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b = t1.b;
--sorted_result
SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b = t1.b;
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
--echo #
@@ -2447,7 +2448,7 @@ SELECT t.a FROM t1 t, t1 s FORCE INDEX(idx)
SELECT t.a FROM t1 t, t1 s FORCE INDEX(idx)
WHERE s.pk AND s.a >= t.pk AND s.b = t.c;
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1;
--echo #
@@ -2478,7 +2479,7 @@ SELECT t1.a
FROM t1 LEFT JOIN (t2 LEFT JOIN (t3 LEFT JOIN t4 ON 1) ON t2.a) ON 0
WHERE t1.a OR t4.a;
-set join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
--echo #
@@ -2536,8 +2537,8 @@ SELECT t1.i, t1.d, t1.v, t2.i, t2.d, t2.t, t2.v FROM t1,t2,t3
DROP TABLE t1,t2,t3;
-SET SESSION join_cache_level=DEFAULT;
-SET SESSION join_buffer_size=DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
--echo #
@@ -2645,7 +2646,7 @@ WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100
DROP TABLE t1,t2,t3;
-SET SESSION join_cache_level=DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
--echo #
--echo # Bug #668290: hash join with non-binary collations
@@ -2686,7 +2687,7 @@ EXPLAIN
SELECT t2.i FROM t1,t2 WHERE t1.cu = t2.cl ;
SELECT t2.i FROM t1,t2 WHERE t1.cu = t2.cl ;
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -2714,8 +2715,8 @@ EXPLAIN
SELECT t1.a, t2.c FROM t1,t2 WHERE t1.a=t2.a AND t2.b=99;
SELECT t1.a, t2.c FROM t1,t2 WHERE t1.a=t2.a AND t2.b=99;
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2;
@@ -2764,7 +2765,7 @@ EXPLAIN
SELECT t1.v,t2.i FROM t1,t2 WHERE t2.v = concat(t1.v, t1.v);
SELECT t1.v,t2.i FROM t1,t2 WHERE t2.v = concat(t1.v, t1.v);
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -2837,8 +2838,8 @@ SELECT t3.i FROM t1,t2,t3
SELECT t3.i FROM t1,t2,t3
WHERE t1.v = t2.v AND t3.v = t1.v AND t2.i <> 0;
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2,t3;
@@ -2874,7 +2875,7 @@ EXPLAIN
SELECT * FROM t1,t2 WHERE t2.a=t1.a;
SELECT * FROM t1,t2 WHERE t2.a=t1.a;
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -2896,8 +2897,8 @@ SELECT t3.a
(t2 LEFT OUTER JOIN t3 ON t2.b = t3.b) ON t2.a = t1.b
WHERE t3.a BETWEEN 3 AND 11 OR t1.a <= t2.c;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
@@ -2920,8 +2921,8 @@ SELECT *
FROM t2 LEFT JOIN
((t1 JOIN t3 ON t1.a = t3.pk) LEFT JOIN t4 ON 1) ON 1;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
@@ -2947,8 +2948,8 @@ EXPLAIN
SELECT * FROM t2 LEFT JOIN t1 ON t2.a <> 0 WHERE t1.a <> 0 OR t2.pk < 9;
SELECT * FROM t2 LEFT JOIN t1 ON t2.a <> 0 WHERE t1.a <> 0 OR t2.pk < 9;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -3007,8 +3008,8 @@ SELECT *
FROM ((t1 LEFT JOIN (t2 JOIN t3 ON t2.c2 = t3.a3) ON t1.pk = t2.d2)
LEFT JOIN t4 ON t1.a1 = t4.a4) LEFT JOIN t5 ON t3.a3 = t5.a5;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
@@ -3053,8 +3054,8 @@ SELECT * FROM
((t2 JOIN t3 ON t2.a2 = t3.b3) JOIN t4 ON t4.b4 <> 0) ON t1.c1 = t3.c3
WHERE t3.a3 IS NULL;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
@@ -3083,8 +3084,8 @@ EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 JOIN t3 ON t3.a3 = t2.a2 ON t3.b3 <> 0;
SELECT * FROM t1 LEFT JOIN t2 JOIN t3 ON t3.a3 = t2.a2 ON t3.b3 <> 0;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3;
@@ -3128,8 +3129,8 @@ SELECT t4.a4, t5.b5
FROM ((t1 LEFT JOIN (t2 JOIN t3 ON t2.a2 = t3.a3) ON t2.b2 = t1.a1)
LEFT JOIN t4 ON t4.a4 <> 0) LEFT JOIN t5 ON t5.a5 = t2.a2;
-SET SESSION optimizer_switch = 'outer_join_with_cache=off';
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION optimizer_switch=@local_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2,t3,t4,t5;
@@ -3156,7 +3157,7 @@ EXPLAIN
SELECT * FROM t1,t2 WHERE t1.a=t2.a;
SELECT * FROM t1,t2 WHERE t1.a=t2.a;
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -3190,8 +3191,8 @@ SELECT * FROM t1,t2
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
@@ -3217,7 +3218,7 @@ EXPLAIN SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0, 100) ORDER BY t1.f2 LIMIT 1;
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION optimizer_switch=@local_optimizer_switch;
SET SESSION optimizer_switch = 'index_condition_pushdown=on';
EXPLAIN SELECT * FROM t1,t2
@@ -3225,7 +3226,7 @@ EXPLAIN SELECT * FROM t1,t2
SELECT * FROM t1,t2
WHERE t2.f3 = t1.f2 AND t1.f1 IN (9, 0 ,100) ORDER BY t1.f2 LIMIT 1;
-SET SESSION optimizer_switch = @local_join_cache_test_optimizer_switch_default;
+SET SESSION optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
@@ -3254,8 +3255,7 @@ EXPLAIN
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
-
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -3281,7 +3281,7 @@ EXPLAIN
SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1;
SELECT * FROM t1,t2 WHERE t2.f1 = t1.f1;
-SET SESSION join_cache_level = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -3311,8 +3311,8 @@ EXPLAIN
SELECT a FROM t1,t2 WHERE t2.v = t1.v ;
SELECT a FROM t1,t2 WHERE t2.v = t1.v ;
-SET SESSION join_cache_level = DEFAULT;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_cache_level=@save_join_cache_level;
+SET SESSION join_buffer_size=@save_join_buffer_size;
DROP TABLE t1,t2;
@@ -3345,10 +3345,12 @@ SELECT * FROM (SELECT DISTINCT * FROM t1) t
SELECT * FROM (SELECT DISTINCT * FROM t1) t
WHERE t.a IN (SELECT t2.a FROM t2);
-SET SESSION join_cache_level = DEFAULT;
-
DROP TABLE t1, t2;
+SET SESSION join_cache_level=@save_join_cache_level;
+
+# Note that next tests are run with same optimizer_switch as previous one!
+
--echo #
--echo # Bug #887479: join_cache_level=3 + semijoin=on
--echo #
@@ -3359,7 +3361,7 @@ INSERT INTO t1 VALUES (3914,17), (3710,5), (3888,20);
CREATE TABLE t2 (c int, KEY (c));
INSERT INTO t2 VALUES (27), (17), (33), (20), (3), (7), (18), (2);
-SET @tmp887479_optimizer_switch=@@optimizer_switch;
+SET @tmp_optimizer_switch=@@optimizer_switch;
SET SESSION optimizer_switch='semijoin=on';
SET SESSION optimizer_switch='semijoin_with_cache=on';
@@ -3373,8 +3375,8 @@ EXPLAIN
SELECT * FROM t1 WHERE (t1.b) IN (SELECT c FROM t2);
SELECT * FROM t1 WHERE (t1.b) IN (SELECT c FROM t2);
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp887479_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1,t2;
@@ -3413,8 +3415,8 @@ SELECT t1.* FROM t1,t2
WHERE (t1.b,t2.b) IN (SELECT t3.b,t4.b FROM t3,t4 WHERE t4.c=t3.b)
AND t1.a = 1;
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
@@ -3429,11 +3431,9 @@ INSERT INTO t2 VALUES (8), (7);
CREATE TABLE t3 (a int);
INSERT INTO t3 VALUES (8), (7);
-SET @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch=default;
set @@optimizer_switch='semijoin_with_cache=off';
set @@optimizer_switch='outer_join_with_cache=off';
-SET optimizer_switch='derived_merge=off,derived_with_keys=off';
+set @@optimizer_switch='derived_merge=off,derived_with_keys=off';
SET join_cache_level=0;
EXPLAIN
@@ -3442,8 +3442,8 @@ SELECT * FROM (SELECT t1.* FROM t1, t2) t WHERE t.a IN (SELECT * FROM t3);
SELECT * FROM ( SELECT ta.* FROM t1 AS ta, t1 ) tb WHERE a IN ( SELECT * FROM t1 );
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -3462,8 +3462,8 @@ CREATE TABLE t3 (c int, d int);
INSERT INTO t3 VALUES (8,10);
INSERT INTO t3 VALUES (9,11);
-SET @tmp_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch='semijoin_with_cache=on';
+set @@optimizer_switch='firstmatch=off';
SET join_cache_level=1;
EXPLAIN
@@ -3480,8 +3480,8 @@ EXPLAIN
SELECT * FROM t1,t2 WHERE b IN (SELECT d FROM t3 WHERE c <= t2.c) ORDER BY a,d;
SELECT * FROM t1,t2 WHERE b IN (SELECT d FROM t3 WHERE c <= t2.c) ORDER BY a,d;
-SET SESSION join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+SET SESSION join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -3503,7 +3503,6 @@ INSERT INTO t4 VALUES
(19,11,10), (17,12,18), (12,13,15), (14,12,19),
(18,13,18), (13,14,11), (15,15,14);
-SET @tmp_optimizer_switch=@@optimizer_switch;
SET @@optimizer_switch='semijoin=on';
SET @@optimizer_switch='firstmatch=off';
SET @@optimizer_switch='mrr=off';
@@ -3543,8 +3542,8 @@ SELECT * FROM t1,t2
t2.a BETWEEN 4 and 5
ORDER BY t2.b;
-SET join_cache_level = DEFAULT;
-SET optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
@@ -3569,11 +3568,10 @@ insert into t3 values
(2,5), (2,6), (2,7), (2,8),
(3,1), (3,2), (3,9);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch='semijoin=on';
-set optimizer_switch='materialization=off';
-set optimizer_switch='loosescan=off,firstmatch=off';
-set optimizer_switch='mrr_sort_keys=off';
+set @@optimizer_switch='semijoin=on';
+set @@optimizer_switch='materialization=off';
+set @@optimizer_switch='loosescan=off,firstmatch=off';
+set @@optimizer_switch='mrr_sort_keys=off';
set join_cache_level=7;
create table t4 (uid int primary key, name varchar(128), index(name));
@@ -3590,8 +3588,8 @@ select name from t2, t1
where t1.uid in (select t4.uid from t4, t3 where t3.uid=1 and t4.uid=t3.fid)
and t2.uid=t1.fid;
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
drop table t1,t2,t3,t4;
@@ -3607,9 +3605,8 @@ INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (6);
INSERT INTO t3 VALUES (1), (2);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch='semijoin=on';
-set optimizer_switch='materialization=on';
+set @@optimizer_switch='semijoin=on';
+set @@optimizer_switch='materialization=on';
set join_cache_level=0;
EXPLAIN
@@ -3625,8 +3622,8 @@ SELECT * FROM t1 WHERE t1.i IN
SELECT * FROM t1 WHERE t1.i IN
(SELECT t3.i FROM t3 LEFT JOIN t2 ON t2.i=t3.i);
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -3644,9 +3641,8 @@ INSERT INTO t2 VALUES ('we',4,NULL), ('v',1305673728,6);
CREATE TABLE t3 (b int, c int);
INSERT INTO t3 VALUES (4,4);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='semijoin=off';
-set optimizer_switch='materialization=off';
+set @@optimizer_switch='semijoin=off';
+set @@optimizer_switch='materialization=off';
set join_cache_level=0;
EXPLAIN
@@ -3667,8 +3663,8 @@ SELECT * FROM t1
WHERE a IN (SELECT t2.a FROM t2 LEFT JOIN t3 ON t2.b = t3.b
WHERE t2.c < 10 OR t3.c > 1);
-set join_cache_level = default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -3689,21 +3685,20 @@ INSERT INTO t2 VALUES
CREATE TABLE t3 (b int, c int);
INSERT INTO t3 VALUES (32, 302), (42,400), (30,300);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='optimize_join_buffer_size=off';
+set @@optimizer_switch='optimize_join_buffer_size=off';
+set @@optimizer_switch='outer_join_with_cache=on';
set join_buffer_space_limit=4096;
set join_buffer_size=4096*2;
set join_cache_level=2;
-set optimizer_switch='outer_join_with_cache=on';
EXPLAIN
SELECT * FROM t1, t2 LEFT JOIN t3 ON t2.b=t3.b WHERE t1.a=t2.a;
SELECT * FROM t1, t2 LEFT JOIN t3 ON t2.b=t3.b WHERE t1.a=t2.a;
-set join_buffer_space_limit=default;
-set join_buffer_size=default;
-set join_cache_level=default;
-set optimizer_switch=@tmp_optimizer_switch;
+set join_buffer_space_limit=@save_join_buffer_space_limit;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -3740,8 +3735,7 @@ INSERT INTO t2 VALUES (NULL);
CREATE TABLE t3 (c int) ENGINE=Aria;
INSERT INTO t3 VALUES (NULL);
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch = 'outer_join_with_cache=on,join_cache_incremental=on';
+set @@optimizer_switch = 'outer_join_with_cache=on,join_cache_incremental=on';
set join_buffer_size=128;
EXPLAIN
@@ -3751,12 +3745,14 @@ SELECT 1 AS c FROM t1 NATURAL LEFT JOIN t2 LEFT OUTER JOIN t3 ON 1
SELECT 1 AS c FROM t1 NATURAL LEFT JOIN t2 LEFT OUTER JOIN t3 ON 1
GROUP BY elt(t1.col282,1,t1.col280);
-set join_buffer_size=default;
-set optimizer_switch=@tmp_optimizer_switch;
-
DROP table t1,t2,t3;
-set join_buffer_size= default;
-set @@optimizer_switch=@save_optimizer_switch;
+set join_buffer_size=@save_join_buffer_size;
+
+#
+# --echo switch to use orginal test suite optimizer switch
+#
+
+set @@optimizer_switch=@org_optimizer_switch,@local_optimizer_switch= @org_optimizer_switch;
--echo #
@@ -3905,8 +3901,8 @@ FROM
ORDER BY
col1;
-set join_buffer_size=default;
-set join_cache_level = default;
+set join_buffer_size=@save_join_buffer_size;
+set join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -3929,11 +3925,10 @@ INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t4 SELECT * FROM t1;
INSERT INTO t5 SELECT * FROM t1;
-set @save_optimizer_switch= @@optimizer_switch;
SET join_cache_level = 6;
SET join_buffer_size=4096;
SET join_buffer_space_limit=4096;
-SET optimizer_switch = 'join_cache_hashed=on,optimize_join_buffer_size=on';
+set @@optimizer_switch = 'join_cache_hashed=on,optimize_join_buffer_size=on';
let $q=
SELECT * FROM t1
@@ -3948,10 +3943,10 @@ WHERE
eval EXPLAIN $q;
eval $q;
-SET join_cache_level = default;
-SET join_buffer_size = default;
-SET join_buffer_space_limit= default;
-set optimizer_switch=@save_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+SET join_buffer_size=@save_join_buffer_size;
+SET join_buffer_space_limit=@save_join_buffer_space_limit;
+set @@optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t4,t5,t2;
@@ -3986,13 +3981,12 @@ eval EXPLAIN EXTENDED $q;
DROP TABLE t1,t2,temp;
-SET join_cache_level = default;
+set join_cache_level=@save_join_cache_level;
--echo #
--echo # MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins.
--echo #
-set join_cache_level=default;
set expensive_subquery_limit=0;
create table t1 (c1 int);
@@ -4030,7 +4024,7 @@ where c1 = c2-0 and
select @counter;
drop table t1,t2,t3;
-set expensive_subquery_limit=default;
+set expensive_subquery_limit=@save_expensive_subquery_limit;
--echo #
--echo # MDEV-6071: EXPLAIN chooses to use join buffer while execution turns it down
@@ -4043,12 +4037,10 @@ insert into t1 values
explain select count(*) from t1, t1 t2 where t1.a=t2.a;
set join_buffer_space_limit=1024*8;
-select @@join_buffer_space_limit;
-select @@join_buffer_size;
explain select count(*) from t1, t1 t2 where t1.a=t2.a;
-set join_buffer_space_limit=default;
+set join_buffer_space_limit=@save_join_buffer_space_limit;
drop table t1;
@@ -4062,7 +4054,7 @@ SET join_cache_level = 3;
explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
-set join_cache_level=default;
+set join_cache_level=@save_join_cache_level;
#
# MDEV-12580 Wrong query result in join when using an index (Version > "10.2.3")
@@ -4074,9 +4066,9 @@ insert t2 values (4,1,1), (6,1,1);
set join_buffer_size = 222222208;
select f2 from t2,t1 where f2 = 0;
drop table t1, t2;
-set join_buffer_size = default;
+set join_buffer_size=@save_join_buffer_size;
-# The following command must be the last one the file
+# The following command must be the last one in the file
set @@optimizer_switch=@save_optimizer_switch;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
diff --git a/mysql-test/main/join_nested_jcl6.result b/mysql-test/main/join_nested_jcl6.result
index d39bf7f373f..3293f20aa17 100644
--- a/mysql-test/main/join_nested_jcl6.result
+++ b/mysql-test/main/join_nested_jcl6.result
@@ -4,9 +4,7 @@ set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set join_cache_level=6;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 6
+set optimizer_search_depth=62;
set @optimizer_switch_for_join_nested_test=@@optimizer_switch;
set @join_cache_level_for_join_nested_test=@@join_cache_level;
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
@@ -2116,9 +2114,6 @@ a b a b a b a b
3 2 NULL NULL NULL NULL NULL NULL
DROP TABLE t5,t6,t7,t8;
set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_join_nested_test=NULL;
set @join_cache_level_for_join_nested_test=NULL;
diff --git a/mysql-test/main/join_nested_jcl6.test b/mysql-test/main/join_nested_jcl6.test
index 838427e85e6..504510ff055 100644
--- a/mysql-test/main/join_nested_jcl6.test
+++ b/mysql-test/main/join_nested_jcl6.test
@@ -9,7 +9,7 @@ set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set join_cache_level=6;
-show variables like 'join_cache_level';
+set optimizer_search_depth=62;
set @optimizer_switch_for_join_nested_test=@@optimizer_switch;
set @join_cache_level_for_join_nested_test=@@join_cache_level;
@@ -104,7 +104,6 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
DROP TABLE t5,t6,t7,t8;
set join_cache_level=default;
-show variables like 'join_cache_level';
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_join_nested_test=NULL;
diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result
index 96de74dd6aa..676eb53f830 100644
--- a/mysql-test/main/join_outer.result
+++ b/mysql-test/main/join_outer.result
@@ -1,5 +1,5 @@
drop table if exists t0,t1,t2,t3,t4,t5;
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @org_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_join_outer_test,'outer_join_with_cache=off');
set join_cache_level=1;
CREATE TABLE t1 (
@@ -2754,4 +2754,4 @@ WHERE t3.pk IN (2);
1
drop view v4;
drop table t1,t2,t3,t4;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@org_optimizer_switch;
diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test
index c02b2e32580..2e5fc65ebb6 100644
--- a/mysql-test/main/join_outer.test
+++ b/mysql-test/main/join_outer.test
@@ -8,7 +8,7 @@
drop table if exists t0,t1,t2,t3,t4,t5;
--enable_warnings
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @org_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_join_outer_test,'outer_join_with_cache=off');
if (`select @join_cache_level_for_join_outer_test is null`)
{
@@ -2251,4 +2251,4 @@ WHERE t3.pk IN (2);
drop view v4;
drop table t1,t2,t3,t4;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@org_optimizer_switch;
diff --git a/mysql-test/main/join_outer_innodb.test b/mysql-test/main/join_outer_innodb.test
index 67e9965a475..c26cd62fbc7 100644
--- a/mysql-test/main/join_outer_innodb.test
+++ b/mysql-test/main/join_outer_innodb.test
@@ -3,6 +3,7 @@
#
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
#
# Test for bug #17164: ORed FALSE blocked conversion of outer join into join
diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result
index 8151231839f..f34078ceeb2 100644
--- a/mysql-test/main/join_outer_jcl6.result
+++ b/mysql-test/main/join_outer_jcl6.result
@@ -1,16 +1,12 @@
-set @save_optimizer_switch_jcl6=@@optimizer_switch;
set @@optimizer_switch='optimize_join_buffer_size=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-set join_cache_level=6;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 6
+set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @@join_cache_level=6;
set @optimizer_switch_for_join_outer_test=@@optimizer_switch;
set @join_cache_level_for_join_outer_test=@@join_cache_level;
drop table if exists t0,t1,t2,t3,t4,t5;
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @org_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_join_outer_test,'outer_join_with_cache=off');
set join_cache_level=@join_cache_level_for_join_outer_test;
CREATE TABLE t1 (
@@ -2765,11 +2761,4 @@ WHERE t3.pk IN (2);
1
drop view v4;
drop table t1,t2,t3,t4;
-SET optimizer_switch=@save_optimizer_switch;
-set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
-set @@optimizer_switch=@save_optimizer_switch_jcl6;
-set @optimizer_switch_for_join_outer_test=NULL;
-set @join_cache_level_for_join_outer_test=NULL;
+SET optimizer_switch=@org_optimizer_switch;
diff --git a/mysql-test/main/join_outer_jcl6.test b/mysql-test/main/join_outer_jcl6.test
index 9db06c783bd..46839cb1065 100644
--- a/mysql-test/main/join_outer_jcl6.test
+++ b/mysql-test/main/join_outer_jcl6.test
@@ -2,23 +2,15 @@
# Run join_outer.test with BKA enabled
#
-set @save_optimizer_switch_jcl6=@@optimizer_switch;
+--source include/default_optimizer_switch.inc
+
set @@optimizer_switch='optimize_join_buffer_size=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-
-set join_cache_level=6;
-show variables like 'join_cache_level';
+set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @@join_cache_level=6;
set @optimizer_switch_for_join_outer_test=@@optimizer_switch;
set @join_cache_level_for_join_outer_test=@@join_cache_level;
--source join_outer.test
-
-set join_cache_level=default;
-show variables like 'join_cache_level';
-
-set @@optimizer_switch=@save_optimizer_switch_jcl6;
-set @optimizer_switch_for_join_outer_test=NULL;
-set @join_cache_level_for_join_outer_test=NULL;
diff --git a/mysql-test/main/limit_rows_examined.test b/mysql-test/main/limit_rows_examined.test
index 528bb8c7b3d..2bac49f0dda 100644
--- a/mysql-test/main/limit_rows_examined.test
+++ b/mysql-test/main/limit_rows_examined.test
@@ -2,6 +2,7 @@
# Tests for LIMIT ROWS EXAMINED, MDEV-28
#
+--source include/default_optimizer_switch.inc
call mtr.add_suppression("Sort aborted.*");
set @save_join_cache_level = @@join_cache_level;
diff --git a/mysql-test/main/log_slow.result b/mysql-test/main/log_slow.result
index a7172af59d5..31d52ff0323 100644
--- a/mysql-test/main/log_slow.result
+++ b/mysql-test/main/log_slow.result
@@ -1,3 +1,4 @@
+set @@log_slow_verbosity="";
select @@log_slow_filter;
@@log_slow_filter
admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
diff --git a/mysql-test/main/log_slow.test b/mysql-test/main/log_slow.test
index edb1865b5ae..64fd8202985 100644
--- a/mysql-test/main/log_slow.test
+++ b/mysql-test/main/log_slow.test
@@ -2,6 +2,8 @@
# Testing of slow log query options
#
+set @@log_slow_verbosity="";
+
select @@log_slow_filter;
select @@log_slow_rate_limit;
select @@log_slow_verbosity;
diff --git a/mysql-test/main/log_state.result b/mysql-test/main/log_state.result
index d4f98a6bde9..5e7aac81b0c 100644
--- a/mysql-test/main/log_state.result
+++ b/mysql-test/main/log_state.result
@@ -3,6 +3,7 @@ SET @old_general_log= @@global.general_log;
SET @old_general_log_file= @@global.general_log_file;
SET @old_slow_query_log= @@global.slow_query_log;
SET @old_slow_query_log_file= @@global.slow_query_log_file;
+set @save_long_query_time=@@long_query_time;
set global general_log= OFF;
truncate table mysql.general_log;
truncate table mysql.slow_log;
@@ -276,7 +277,7 @@ SELECT @@general_log_file = @my_glf;
SET GLOBAL general_log_file = @old_general_log_file;
disconnect con1;
connection default;
-SET GLOBAL long_query_time = DEFAULT;
+SET GLOBAL long_query_time = @save_long_query_time;
SET GLOBAL log_output = @old_log_output;
SET global general_log = @old_general_log;
SET global general_log_file = @old_general_log_file;
diff --git a/mysql-test/main/log_state.test b/mysql-test/main/log_state.test
index 5a08b8015f0..44a844a67b0 100644
--- a/mysql-test/main/log_state.test
+++ b/mysql-test/main/log_state.test
@@ -12,7 +12,7 @@ SET @old_general_log= @@global.general_log;
SET @old_general_log_file= @@global.general_log_file;
SET @old_slow_query_log= @@global.slow_query_log;
SET @old_slow_query_log_file= @@global.slow_query_log_file;
-
+set @save_long_query_time=@@long_query_time;
--disable_ps_protocol
@@ -330,7 +330,7 @@ disconnect con1;
connection default;
# Reset global system variables to initial values if forgotten somewhere above.
-SET GLOBAL long_query_time = DEFAULT;
+SET GLOBAL long_query_time = @save_long_query_time;
SET GLOBAL log_output = @old_log_output;
SET global general_log = @old_general_log;
SET global general_log_file = @old_general_log_file;
diff --git a/mysql-test/main/log_tables.result b/mysql-test/main/log_tables.result
index 126230a8765..aed5dbfba3d 100644
--- a/mysql-test/main/log_tables.result
+++ b/mysql-test/main/log_tables.result
@@ -9,9 +9,6 @@ SET @saved_long_query_time = @@long_query_time;
SET @saved_log_output = @@log_output;
SET @saved_general_log = @@GLOBAL.general_log;
SET @saved_slow_query_log = @@GLOBAL.slow_query_log;
-SELECT @saved_long_query_time, @saved_log_output, @saved_general_log, @saved_slow_query_log;
-@saved_long_query_time @saved_log_output @saved_general_log @saved_slow_query_log
-10 FILE,TABLE 1 1
truncate table general_log;
select * from general_log;
event_time user_host thread_id server_id command_type argument
@@ -436,9 +433,9 @@ My own slow query sleep(2)
My own slow query 0
SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3;
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id rows_affected seq
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4 0 2
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4 0 3
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4 0 4
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) THREAD_ID 0 2
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) THREAD_ID 0 3
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) THREAD_ID 0 4
SET GLOBAL slow_query_log = 0;
SET SESSION long_query_time =@saved_long_query_time;
FLUSH LOGS;
diff --git a/mysql-test/main/log_tables.test b/mysql-test/main/log_tables.test
index f822ec8d758..4ea8a7639ef 100644
--- a/mysql-test/main/log_tables.test
+++ b/mysql-test/main/log_tables.test
@@ -27,10 +27,6 @@ SET @saved_log_output = @@log_output;
SET @saved_general_log = @@GLOBAL.general_log;
SET @saved_slow_query_log = @@GLOBAL.slow_query_log;
-SELECT @saved_long_query_time, @saved_log_output, @saved_general_log, @saved_slow_query_log;
-
-
-
#
# Check that log tables work and we can do basic selects. This also
# tests truncate, which works in a special mode with the log tables
@@ -528,7 +524,7 @@ SELECT "My own slow query", sleep(2);
SELECT "My own slow query", sleep(2);
## So we look for seq 2-4
---replace_column 1 START_TIME 2 USER_HOST 3 QUERY_TIME
+--replace_column 1 START_TIME 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3;
SET GLOBAL slow_query_log = 0;
diff --git a/mysql-test/main/lowercase_table_qcache.result b/mysql-test/main/lowercase_table_qcache.result
index 9d7e1007e4c..9f8c89a41e8 100644
--- a/mysql-test/main/lowercase_table_qcache.result
+++ b/mysql-test/main/lowercase_table_qcache.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
@@ -23,5 +24,5 @@ select * from MySQL.db;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
set GLOBAL query_cache_type=default;
diff --git a/mysql-test/main/lowercase_table_qcache.test b/mysql-test/main/lowercase_table_qcache.test
index ab05755bec1..bf24c8e9a1c 100644
--- a/mysql-test/main/lowercase_table_qcache.test
+++ b/mysql-test/main/lowercase_table_qcache.test
@@ -2,6 +2,7 @@
#
# Test of query cache with --lower-case-table-names
#
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
@@ -28,7 +29,7 @@ select * from MySQL.db;
enable_result_log;
show status like "Qcache_queries_in_cache";
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
set GLOBAL query_cache_type=default;
# End of 4.1 tests
diff --git a/mysql-test/main/mdev13607.test b/mysql-test/main/mdev13607.test
index 45fdb0a74d4..2d11312cd94 100644
--- a/mysql-test/main/mdev13607.test
+++ b/mysql-test/main/mdev13607.test
@@ -3,6 +3,7 @@
--echo #
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES
diff --git a/mysql-test/main/mdev375.result b/mysql-test/main/mdev375.result
index 0ae8375ff24..3fdf97f5c24 100644
--- a/mysql-test/main/mdev375.result
+++ b/mysql-test/main/mdev375.result
@@ -1,3 +1,4 @@
+set @save_log_warnings=@@log_warnings, @save_max_connections=@@max_connections;
SET GLOBAL log_warnings=4;
SET GLOBAL max_connections=10;
connect tmp_con1,localhost,root,,;
@@ -24,5 +25,5 @@ SELECT 0;
show status like "Threads_connected";
Variable_name Value
Threads_connected 11
-SET GLOBAL log_warnings=default;
-SET GLOBAL max_connections=default;
+SET GLOBAL log_warnings=@save_log_warnings;
+SET GLOBAL max_connections=@save_max_connections;
diff --git a/mysql-test/main/mdev375.test b/mysql-test/main/mdev375.test
index 759f7bd31f0..9e35190b927 100644
--- a/mysql-test/main/mdev375.test
+++ b/mysql-test/main/mdev375.test
@@ -3,6 +3,7 @@
#
--source include/not_embedded.inc
+set @save_log_warnings=@@log_warnings, @save_max_connections=@@max_connections;
SET GLOBAL log_warnings=4;
SET GLOBAL max_connections=10;
@@ -28,5 +29,5 @@ SELECT 2;
SELECT 0;
show status like "Threads_connected";
-SET GLOBAL log_warnings=default;
-SET GLOBAL max_connections=default;
+SET GLOBAL log_warnings=@save_log_warnings;
+SET GLOBAL max_connections=@save_max_connections;
diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result
index 7891ffa1723..075152da1c7 100644
--- a/mysql-test/main/merge.result
+++ b/mysql-test/main/merge.result
@@ -1,5 +1,6 @@
-set global storage_engine=myisam;
-set session storage_engine=myisam;
+set @save_default_storage_engine=@@global.storage_engine;
+set global default_storage_engine=myisam;
+set session default_storage_engine=myisam;
drop table if exists t1,t2,t3,t4,t5,t6;
drop database if exists mysqltest;
create table t1 (a int not null primary key auto_increment, message char(20));
@@ -2583,11 +2584,8 @@ prepare stmt from @a;
execute stmt;
prepare stmt from "select * from t_parent";
execute stmt;
-ERROR HY000: Prepared statement needs to be re-prepared
execute stmt;
-ERROR HY000: Prepared statement needs to be re-prepared
execute stmt;
-ERROR HY000: Prepared statement needs to be re-prepared
deallocate prepare stmt;
#
# Create merge parent
diff --git a/mysql-test/main/merge.test b/mysql-test/main/merge.test
index edc4a364ad9..c22cf3950c1 100644
--- a/mysql-test/main/merge.test
+++ b/mysql-test/main/merge.test
@@ -6,9 +6,12 @@
--source include/count_sessions.inc
# MERGE tables require MyISAM tables
-let $default=`select @@global.storage_engine`;
-set global storage_engine=myisam;
-set session storage_engine=myisam;
+set @save_default_storage_engine=@@global.storage_engine;
+set global default_storage_engine=myisam;
+set session default_storage_engine=myisam;
+
+# This test assumes a stable character set
+--source include/default_charset.inc
# Clean up resources used in this test case.
--disable_warnings
@@ -17,7 +20,6 @@ drop database if exists mysqltest;
--enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
-
create table t1 (a int not null primary key auto_increment, message char(20));
create table t2 (a int not null primary key auto_increment, message char(20));
INSERT INTO t1 (message) VALUES ("Testing"),("table"),("t1");
@@ -1921,13 +1923,16 @@ set @a=concat("create table t_parent (a int) union(", @a,
prepare stmt from @a;
execute stmt;
prepare stmt from "select * from t_parent";
---error ER_NEED_REPREPARE
+--disable_result_log
+--error 0,ER_NEED_REPREPARE
execute stmt;
---error ER_NEED_REPREPARE
+--error 0,ER_NEED_REPREPARE
execute stmt;
---error ER_NEED_REPREPARE
+--error 0,ER_NEED_REPREPARE
execute stmt;
deallocate prepare stmt;
+--enable_result_log
+
--echo #
--echo # Create merge parent
--echo #
@@ -2907,7 +2912,7 @@ DROP TABLE m1;
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default;
+set global default_storage_engine=@save_default_storage_engine;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/main/mrr_icp_extra.test b/mysql-test/main/mrr_icp_extra.test
index 38306f54ed5..c8c5e6b3af3 100644
--- a/mysql-test/main/mrr_icp_extra.test
+++ b/mysql-test/main/mrr_icp_extra.test
@@ -1,5 +1,8 @@
-
# Generated by an ALTER TABLE in include/varchar.inc
+
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
call mtr.add_suppression("Can't find record in .*");
set @mrr_icp_extra_tmp=@@optimizer_switch;
diff --git a/mysql-test/main/multi_update.test b/mysql-test/main/multi_update.test
index 49799a45255..b09d02cb5aa 100644
--- a/mysql-test/main/multi_update.test
+++ b/mysql-test/main/multi_update.test
@@ -976,6 +976,8 @@ drop table t1, t2;
# MDEV-14551 Can't find record in table on multi-table update with ORDER BY
#
+--source include/default_optimizer_switch.inc
+
# simple test with multi-update and Using temporary:
create table t1 (i int) engine=memory;
insert t1 values (1),(2);
diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test
index f58aee6795c..f21136d4613 100644
--- a/mysql-test/main/myisam.test
+++ b/mysql-test/main/myisam.test
@@ -2,6 +2,8 @@
# Test bugs in the MyISAM code
#
+--source include/default_optimizer_switch.inc
+
call mtr.add_suppression("Can't find record in '.*'");
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
diff --git a/mysql-test/main/myisam_explain_non_select_all.test b/mysql-test/main/myisam_explain_non_select_all.test
index ccd4ebd6297..8b79a6bd3ca 100644
--- a/mysql-test/main/myisam_explain_non_select_all.test
+++ b/mysql-test/main/myisam_explain_non_select_all.test
@@ -2,6 +2,8 @@
# Run explain_non_select.inc on MyISAM with all of the so-called 6.0 features.
#
+--source include/default_optimizer_switch.inc
+
#--source include/have_semijoin.inc
#--source include/have_materialization.inc
#--source include/have_firstmatch.inc
diff --git a/mysql-test/main/myisam_icp.test b/mysql-test/main/myisam_icp.test
index b6d35968b1c..a115d0f7caa 100644
--- a/mysql-test/main/myisam_icp.test
+++ b/mysql-test/main/myisam_icp.test
@@ -2,6 +2,7 @@
# ICP/MyISAM tests (Index Condition Pushdown)
#
+--source include/default_optimizer_switch.inc
set @myisam_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
diff --git a/mysql-test/main/myisam_mrr.result b/mysql-test/main/myisam_mrr.result
index 873260bbc3a..0cd2873c282 100644
--- a/mysql-test/main/myisam_mrr.result
+++ b/mysql-test/main/myisam_mrr.result
@@ -1,6 +1,7 @@
drop table if exists t0, t1, t2, t3;
set @myisam_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set optimizer_switch='optimize_join_buffer_size=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=79;
Warnings:
diff --git a/mysql-test/main/myisam_mrr.test b/mysql-test/main/myisam_mrr.test
index 60d96c602ef..11c9aa64ef1 100644
--- a/mysql-test/main/myisam_mrr.test
+++ b/mysql-test/main/myisam_mrr.test
@@ -8,6 +8,7 @@ drop table if exists t0, t1, t2, t3;
set @myisam_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set optimizer_switch='optimize_join_buffer_size=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=79;
diff --git a/mysql-test/main/myisam_recover.result b/mysql-test/main/myisam_recover.result
index 3a2c424c8b2..da96682186c 100644
--- a/mysql-test/main/myisam_recover.result
+++ b/mysql-test/main/myisam_recover.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
+set @save_table_definition_cache=@@table_definition_cache;
#
# Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted
# children..
@@ -97,10 +98,10 @@ unlock tables;
prepare stmt from @drop_table_stmt;
execute stmt;
deallocate prepare stmt;
-set @@global.table_definition_cache=default;
set @@global.table_open_cache=@save_table_open_cache;
disconnect con1;
connection default;
+set @@global.table_definition_cache=@save_table_definition_cache;
#
# 18075170 - sql node restart required to avoid deadlock after
# restore
diff --git a/mysql-test/main/myisam_recover.test b/mysql-test/main/myisam_recover.test
index 316be56609b..9056b219148 100644
--- a/mysql-test/main/myisam_recover.test
+++ b/mysql-test/main/myisam_recover.test
@@ -2,6 +2,8 @@
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
+set @save_table_definition_cache=@@table_definition_cache;
+
--echo #
--echo # Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted
--echo # children..
@@ -104,11 +106,11 @@ unlock tables;
prepare stmt from @drop_table_stmt;
execute stmt;
deallocate prepare stmt;
-set @@global.table_definition_cache=default;
set @@global.table_open_cache=@save_table_open_cache;
disconnect con1;
connection default;
--enable_ps_protocol
+set @@global.table_definition_cache=@save_table_definition_cache;
--echo #
--echo # 18075170 - sql node restart required to avoid deadlock after
diff --git a/mysql-test/main/mysql.test b/mysql-test/main/mysql.test
index fbc5bd20842..1cb4977a32d 100644
--- a/mysql-test/main/mysql.test
+++ b/mysql-test/main/mysql.test
@@ -694,7 +694,7 @@ select count(*) from t1; truncate table t1;
--exec $MYSQL --disable-local-infile -e "$ldli"
select count(*) from t1; truncate table t1;
--error 1
---exec $MYSQL -e "/*q*/$ldli"
+--exec $MYSQL --local-infile=0 -e "/*q*/$ldli"
select count(*) from t1; truncate table t1;
--exec $MYSQL --enable-local-infile -e "/*q*/$ldli"
select count(*) from t1; truncate table t1;
diff --git a/mysql-test/main/mysql_client_test.result b/mysql-test/main/mysql_client_test.result
index 06794a0e5ec..420e2fc8e3c 100644
--- a/mysql-test/main/mysql_client_test.result
+++ b/mysql-test/main/mysql_client_test.result
@@ -1,3 +1,9 @@
+SET @save_character_set_client= @@global.character_set_client;
+SET @save_collation_connection= @@global.collation_connection;
+SET @@global.character_set_server= @@character_set_server;
+SET @@global.collation_server= @@collation_server;
+SET @@global.character_set_client= @@character_set_server;
+SET @@global.collation_connection= @@collation_server;
SET @old_general_log= @@global.general_log;
SET @old_slow_query_log= @@global.slow_query_log;
call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'");
@@ -246,3 +252,7 @@ ANALYZE JSON DELETE number of fields: 1
SET @@global.general_log= @old_general_log;
SET @@global.slow_query_log= @old_slow_query_log;
+SET @@global.character_set_server= @save_character_set_server;
+SET @@global.collation_server= @save_collation_server;
+SET @@global.character_set_client= @save_character_set_client;
+SET @@global.collation_connection= @save_collation_connection;
diff --git a/mysql-test/main/mysql_client_test.test b/mysql-test/main/mysql_client_test.test
index 69d89272221..7efb4dadd72 100644
--- a/mysql-test/main/mysql_client_test.test
+++ b/mysql-test/main/mysql_client_test.test
@@ -5,6 +5,15 @@
# This test is slow on buildbot.
--source include/big_test.inc
+# Run test with default character set
+--source include/default_charset.inc
+SET @save_character_set_client= @@global.character_set_client;
+SET @save_collation_connection= @@global.collation_connection;
+SET @@global.character_set_server= @@character_set_server;
+SET @@global.collation_server= @@collation_server;
+SET @@global.character_set_client= @@character_set_server;
+SET @@global.collation_connection= @@collation_server;
+
SET @old_general_log= @@global.general_log;
SET @old_slow_query_log= @@global.slow_query_log;
@@ -44,3 +53,7 @@ echo ok;
SET @@global.general_log= @old_general_log;
SET @@global.slow_query_log= @old_slow_query_log;
+SET @@global.character_set_server= @save_character_set_server;
+SET @@global.collation_server= @save_collation_server;
+SET @@global.character_set_client= @save_character_set_client;
+SET @@global.collation_connection= @save_collation_connection;
diff --git a/mysql-test/main/mysql_client_test_nonblock.test b/mysql-test/main/mysql_client_test_nonblock.test
index 768a0590c30..19489bf9e0e 100644
--- a/mysql-test/main/mysql_client_test_nonblock.test
+++ b/mysql-test/main/mysql_client_test_nonblock.test
@@ -1,3 +1,4 @@
+
# This runs the mysql_client_test using the non-blocking API.
# The non-blocking API is not supported in the embedded server.
diff --git a/mysql-test/main/mysql_comments.test b/mysql-test/main/mysql_comments.test
index 338fe8dc6b9..1ee88553a8f 100644
--- a/mysql-test/main/mysql_comments.test
+++ b/mysql-test/main/mysql_comments.test
@@ -1,5 +1,6 @@
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
+
###################### mysql_comments.test #############################
# #
# Testing of comments handling by the command line client (mysql) #
@@ -31,13 +32,12 @@ drop trigger if exists t1_bi;
# Test without comments
--echo "Pass 1 : --disable-comments"
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
---exec $MYSQL --disable-comments test 2>&1 < "./main/mysql_comments.sql"
+--exec $MYSQL --default-character-set=latin1 --disable-comments test 2>&1 < "./main/mysql_comments.sql"
# Test with comments
--echo "Pass 2 : --enable-comments"
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
---exec $MYSQL --enable-comments test 2>&1 < "./main/mysql_comments.sql"
-
+--exec $MYSQL --default-character-set=latin1 --enable-comments test 2>&1 < "./main/mysql_comments.sql"
set global sql_mode=default;
--echo End of 5.0 tests
diff --git a/mysql-test/main/mysqlbinlog-innodb.result b/mysql-test/main/mysqlbinlog-innodb.result
index 2971a69fb4d..f9f48299f41 100644
--- a/mysql-test/main/mysqlbinlog-innodb.result
+++ b/mysql-test/main/mysqlbinlog-innodb.result
@@ -30,10 +30,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
INSERT INTO t1 VALUES (1)
@@ -61,10 +61,10 @@ use `foo`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
INSERT INTO t1 VALUES (1)
diff --git a/mysql-test/main/mysqlbinlog-innodb.test b/mysql-test/main/mysqlbinlog-innodb.test
index c8bf8095705..559fe785c00 100644
--- a/mysql-test/main/mysqlbinlog-innodb.test
+++ b/mysql-test/main/mysqlbinlog-innodb.test
@@ -24,7 +24,9 @@ COMMIT;
USE test;
SELECT * FROM t1 ORDER BY a;
FLUSH LOGS;
+--replace_regex /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 --short-form
+--replace_regex /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 --short-form --rewrite-db="test->foo" --rewrite-db="test2->bar"
DROP DATABASE test2;
DROP TABLE t1;
diff --git a/mysql-test/main/mysqlbinlog.result b/mysql-test/main/mysqlbinlog.result
index 8d7f6337c05..c4d95dc6ff7 100644
--- a/mysql-test/main/mysqlbinlog.result
+++ b/mysql-test/main/mysqlbinlog.result
@@ -23,10 +23,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
DROP TABLE IF EXISTS `t1`,`t2`,`t3`,`t4`,`t5`,`t03`,`t04` /* generated by server */
@@ -103,10 +103,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
@@ -139,10 +139,10 @@ BEGIN
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
@@ -190,10 +190,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values ("Alas")
@@ -217,10 +217,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
DROP TABLE IF EXISTS `t1`,`t2`,`t3`,`t4`,`t5`,`t03`,`t04` /* generated by server */
@@ -297,10 +297,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
@@ -333,10 +333,10 @@ BEGIN
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
@@ -384,10 +384,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values ("Alas")
@@ -493,10 +493,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
@@ -545,10 +545,10 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a varchar(64) character set utf8)
diff --git a/mysql-test/main/mysqlbinlog.test b/mysql-test/main/mysqlbinlog.test
index 6988b2a8e9b..e0503402bd6 100644
--- a/mysql-test/main/mysqlbinlog.test
+++ b/mysql-test/main/mysqlbinlog.test
@@ -54,7 +54,7 @@ select "--- Local --" as "";
#
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000001
# this should not fail but shouldn't produce any working statements
@@ -62,7 +62,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
select "--- Broken LOAD DATA --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000002 2> /dev/null
# this should show almost nothing
@@ -70,7 +70,7 @@ select "--- Broken LOAD DATA --" as "";
select "--- --database --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLD_DATADIR/master-bin.000001 2> /dev/null
# this test for start-position option
@@ -78,7 +78,7 @@ select "--- --database --" as "";
select "--- --start-position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=$binlog_start_pos $MYSQLD_DATADIR/master-bin.000002
# These are tests for remote binlog.
@@ -90,7 +90,7 @@ select "--- Remote --" as "";
# This is broken now
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
# This is broken too
@@ -98,7 +98,7 @@ select "--- Remote --" as "";
select "--- Broken LOAD DATA --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 2> /dev/null
# And this too ! (altough it is documented)
@@ -106,7 +106,7 @@ select "--- Broken LOAD DATA --" as "";
select "--- --database --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 2> /dev/null
# Strangely but this works
@@ -114,7 +114,7 @@ select "--- --database --" as "";
select "--- --start-position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --start-position=$binlog_start_pos --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
# Bug#7853 mysqlbinlog does not accept input from stdin
@@ -122,11 +122,11 @@ select "--- --start-position --" as "";
select "--- reading stdin --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
# postion is constant to correspond to an event in pre-recorded binlog
--let $binlog_start_pos=79
--exec $MYSQL_BINLOG --short-form --start-position=$binlog_start_pos - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
@@ -214,7 +214,7 @@ call p1();
drop procedure p1;
--error ER_SP_DOES_NOT_EXIST
call p1();
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 | $MYSQL
call p1();
@@ -255,7 +255,7 @@ drop table t1;
flush logs;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/
+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000010
#
diff --git a/mysql-test/main/mysqlbinlog_row_big.result b/mysql-test/main/mysqlbinlog_row_big.result
index a90ba9d79b6..ecbb9df2be1 100644
--- a/mysql-test/main/mysqlbinlog_row_big.result
+++ b/mysql-test/main/mysqlbinlog_row_big.result
@@ -96,6 +96,5 @@ FLUSH LOGS;
# Cleanup.
#
# reset variable value to pass testcase checks
-SET @@global.max_allowed_packet = 16777216;
DROP TABLE t1;
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
diff --git a/mysql-test/main/mysqlbinlog_row_big.test b/mysql-test/main/mysqlbinlog_row_big.test
index 229cc8a31fc..fd6517a7a9a 100644
--- a/mysql-test/main/mysqlbinlog_row_big.test
+++ b/mysql-test/main/mysqlbinlog_row_big.test
@@ -138,7 +138,9 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # Cleanup.
--echo #
--echo # reset variable value to pass testcase checks
+--disable_query_log
eval SET @@global.max_allowed_packet = $orig_max_allowed_packet;
+--enable_query_log
DROP TABLE t1;
--echo remove_file \$MYSQLTEST_VARDIR/$mysqlbinlog_output
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result
index 8cf52f5b826..94125352654 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.result
+++ b/mysql-test/main/mysqlbinlog_row_compressed.result
@@ -34,10 +34,10 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.test b/mysql-test/main/mysqlbinlog_row_compressed.test
index 1a7ce093986..6b62a42c449 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.test
+++ b/mysql-test/main/mysqlbinlog_row_compressed.test
@@ -29,7 +29,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
--echo
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result
index b3cee345428..6f3dbab55a8 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.result
+++ b/mysql-test/main/mysqlbinlog_row_minimal.result
@@ -32,10 +32,10 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
@@ -380,10 +380,10 @@ BEGIN
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.test b/mysql-test/main/mysqlbinlog_row_minimal.test
index 85b816e1be5..b69aa6da14b 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.test
+++ b/mysql-test/main/mysqlbinlog_row_minimal.test
@@ -28,7 +28,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;
@@ -67,7 +67,7 @@ UPDATE t1 t1 INNER JOIN t2 t2 ON t1.ref_id = t2.id
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /@3=\d*/@3=X/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /@3=\d*/@3=X/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog --start-position=$binlog_pos
DROP TABLE t1,t2;
diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result
index cd8e98c1ee3..42717bccd01 100644
--- a/mysql-test/main/mysqlbinlog_stmt_compressed.result
+++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result
@@ -34,10 +34,10 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.test b/mysql-test/main/mysqlbinlog_stmt_compressed.test
index c4331ddf229..613a820d3ea 100644
--- a/mysql-test/main/mysqlbinlog_stmt_compressed.test
+++ b/mysql-test/main/mysqlbinlog_stmt_compressed.test
@@ -29,7 +29,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
--echo
diff --git a/mysql-test/main/mysqlcheck.opt b/mysql-test/main/mysqlcheck.opt
new file mode 100644
index 00000000000..35db081c15b
--- /dev/null
+++ b/mysql-test/main/mysqlcheck.opt
@@ -0,0 +1 @@
+--character-set-server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/mysqlcheck.result b/mysql-test/main/mysqlcheck.result
index 02ab2af9fc1..8b6a19b5270 100644
--- a/mysql-test/main/mysqlcheck.result
+++ b/mysql-test/main/mysqlcheck.result
@@ -1,4 +1,6 @@
call mtr.add_suppression("Invalid .old.. table or database name");
+set @save_character_set_client=@@character_set_client;
+set @save_collation_connection=@@collation_connection;
DROP TABLE IF EXISTS t1, `t``1`, `t 1`, test.`t.1`, v1;
drop view if exists t1, `t``1`, `t 1`, test.`t.1`, v1;
drop database if exists client_test_db;
@@ -218,7 +220,9 @@ CREATE TABLE `#mysql50#@` (a INT) engine=myisam;
SHOW TABLES;
Tables_in_test
#mysql50#@
-SET NAMES DEFAULT;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
mysqlcheck --fix-table-names --databases test
SET NAMES utf8;
SHOW TABLES;
@@ -226,7 +230,9 @@ Tables_in_test
@
DROP TABLE `@`;
CREATE TABLE `Ñ` (a INT) engine=myisam;
-SET NAMES DEFAULT;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
call mtr.add_suppression("@003f.frm' \\(errno: 22\\)");
mysqlcheck --default-character-set="latin1" --databases test
call mtr.add_suppression("Can't find file: '..test.@003f.frm'");
@@ -237,7 +243,9 @@ mysqlcheck --default-character-set="utf8" --databases test
test.Ñ OK
SET NAMES utf8;
DROP TABLE `Ñ`;
-SET NAMES DEFAULT;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
CREATE DATABASE `#mysql50#a@b`;
USE `#mysql50#a@b`;
CREATE TABLE `#mysql50#c@d` (a INT) engine=myisam;
@@ -468,11 +476,11 @@ drop database mysqltest1;
#
create table t1(a int);
insert into t1 (a) values (1), (2), (3);
-select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats order by db_name,table_name;
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats order by db_name,table_name;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test.t1 Engine-independent statistics collected
status : OK
-select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type
-test t1 a 1 3 0.0000 4.0000 1.0000 254 DOUBLE_PREC_HB
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
+test t1 a 1 3 0.0000 4.0000 1.0000
drop table t1;
diff --git a/mysql-test/main/mysqlcheck.test b/mysql-test/main/mysqlcheck.test
index d1d57023b5a..502c90b0d89 100644
--- a/mysql-test/main/mysqlcheck.test
+++ b/mysql-test/main/mysqlcheck.test
@@ -2,8 +2,11 @@ call mtr.add_suppression("Invalid .old.. table or database name");
# Embedded server doesn't support external clients
--source include/not_embedded.inc
-
--source include/have_innodb.inc
+--source include/default_charset.inc
+
+set @save_character_set_client=@@character_set_client;
+set @save_collation_connection=@@collation_connection;
# check that CSV engine was compiled in, as the result of the test
# depends on the presence of the log tables (which are CSV-based).
@@ -136,7 +139,10 @@ drop table t1;
SET NAMES utf8;
CREATE TABLE `#mysql50#@` (a INT) engine=myisam;
SHOW TABLES;
-SET NAMES DEFAULT;
+# Safer version of SET NAMES DEFAULT:
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
--echo mysqlcheck --fix-table-names --databases test
--exec $MYSQL_CHECK --fix-table-names --databases test
SET NAMES utf8;
@@ -144,7 +150,10 @@ SHOW TABLES;
DROP TABLE `@`;
CREATE TABLE `Ñ` (a INT) engine=myisam;
-SET NAMES DEFAULT;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
+
call mtr.add_suppression("@003f.frm' \\(errno: 22\\)");
--echo mysqlcheck --default-character-set="latin1" --databases test
# Error returned depends on platform, replace it with "Table doesn't exist"
@@ -155,7 +164,9 @@ call mtr.add_suppression("Can't find file: '..test.@003f.frm'");
--exec $MYSQL_CHECK --default-character-set="utf8" --databases test
SET NAMES utf8;
DROP TABLE `Ñ`;
-SET NAMES DEFAULT;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
+set @@collation_connection=@save_collation_connection;
CREATE DATABASE `#mysql50#a@b`;
USE `#mysql50#a@b`;
@@ -403,7 +414,7 @@ drop database mysqltest1;
--echo #
create table t1(a int);
insert into t1 (a) values (1), (2), (3);
-select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats order by db_name,table_name;
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats order by db_name,table_name;
--exec $MYSQL_CHECK --analyze test t1 --persistent
-select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
drop table t1;
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 056614bf791..2bcabd83d0a 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -370,6 +370,10 @@ The following specify which files/extra groups are read (specified before remain
Specifies a directory to add to the ignore list when
collecting database names from the datadir. Put a blank
argument to reset the list accumulated so far.
+ --in-predicate-conversion-threshold=#
+ The minimum number of scalar elements in the value list
+ of IN predicate that triggers its conversion to IN
+ subquery. Set to 0 to disable the conversion.
--init-connect=name Command(s) that are executed for each new connection
(unless the user has SUPER privilege)
--init-file=name Read SQL commands from this file at startup
@@ -1498,6 +1502,7 @@ idle-transaction-timeout 0
idle-write-transaction-timeout 0
ignore-builtin-innodb FALSE
ignore-db-dirs
+in-predicate-conversion-threshold 1000
init-connect
init-file (No default value)
init-rpl-role MASTER
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index 846d3abf3e4..dcca6a75bca 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -30,7 +30,7 @@ perl;
feedback debug temp-pool ssl des-key-file xtradb sequence
thread-concurrency super-large-pages mutex-deadlock-detector
connect null-audit aria oqgraph sphinx thread-handling
- test-sql-discovery query-cache-info in-predicate-conversion-threshold
+ test-sql-discovery query-cache-info
query-response-time metadata-lock-info locales unix-socket
wsrep file-key-management cracklib-password-check user-variables
thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/;
diff --git a/mysql-test/main/mysqldump-compat-102.test b/mysql-test/main/mysqldump-compat-102.test
index 27c1dfcb6ce..518779e951d 100644
--- a/mysql-test/main/mysqldump-compat-102.test
+++ b/mysql-test/main/mysqldump-compat-102.test
@@ -77,7 +77,7 @@ DELIMITER ;$$
# mysqldump output is expected to have standalone PROCEDURE/FUNCTION, but not PACKAGE/PACKAGE BODY.
--replace_regex /-- MariaDB dump.*[^\n]/-- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS/ / on [0-9 :-]+/ on TIMESTAMP/
---exec $MYSQL_DUMP --quick --routines --triggers --no-create-info --skip-lock-tables --no-data --compress -uroot db1_mdev17429
+--exec $MYSQL_DUMP --quick --routines --triggers --no-create-info --skip-lock-tables --no-data --compress --default-character-set=utf8mb4 -uroot db1_mdev17429
DROP DATABASE db1_mdev17429;
SET sql_mode=DEFAULT;
diff --git a/mysql-test/main/mysqldump-max.test b/mysql-test/main/mysqldump-max.test
index 4aadb09de53..a989fd28135 100644
--- a/mysql-test/main/mysqldump-max.test
+++ b/mysql-test/main/mysqldump-max.test
@@ -60,7 +60,9 @@ select * from t4;
select * from t5;
select * from t6;
+--replace_result "NAMES utf8mb4" "NAMES utf8mb4" "NAMES utf8" "NAMES utf8mb4"
--exec $MYSQL_DUMP --skip-comments --delayed-insert --insert-ignore --databases test
+--replace_result "NAMES utf8mb4" "NAMES utf8mb4" "NAMES utf8" "NAMES utf8mb4"
--exec $MYSQL_DUMP --skip-comments --delayed-insert --databases test
drop table t1;
diff --git a/mysql-test/main/mysqldump-nl.test b/mysql-test/main/mysqldump-nl.test
index 4513fb2c637..863c846b9a6 100644
--- a/mysql-test/main/mysqldump-nl.test
+++ b/mysql-test/main/mysqldump-nl.test
@@ -6,6 +6,7 @@
--source include/not_embedded.inc
# cmd.exe doesn't like new lines on the command line
--source include/not_windows.inc
+--source include/default_charset.inc
create database `mysqltest1
1tsetlqsym`;
diff --git a/mysql-test/main/mysqldump-utf8mb4.test b/mysql-test/main/mysqldump-utf8mb4.test
index f8512c9bd7b..38b7527c5d6 100644
--- a/mysql-test/main/mysqldump-utf8mb4.test
+++ b/mysql-test/main/mysqldump-utf8mb4.test
@@ -1,5 +1,6 @@
--source include/have_utf8mb4.inc
--source include/not_embedded.inc
+--source include/default_charset.inc
SET NAMES utf8mb4;
@@ -18,14 +19,14 @@ INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE');
--echo Testing XML format output
--echo ----
---exec $MYSQL_DUMP --skip-create-options --skip-comments -X test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments -X test t1
--echo ----
--echo Testing text format output
--echo ----
---exec $MYSQL_DUMP --skip-create-options --skip-comments test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments test t1
DROP TABLE t1;
@@ -42,7 +43,7 @@ CREATE TABLE t1 (
) CHARACTER SET utf8mb4;
INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE');
---exec $MYSQL_DUMP test t1 > $file
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 test t1 > $file
DROP TABLE t1;
--exec $MYSQL test < $file
SELECT * FROM t1;
diff --git a/mysql-test/main/mysqldump.opt b/mysql-test/main/mysqldump.opt
new file mode 100644
index 00000000000..0833e0abd4c
--- /dev/null
+++ b/mysql-test/main/mysqldump.opt
@@ -0,0 +1 @@
+--character_set_server=latin1 --collation_server=latin1_swedish_ci --sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test
index b9504637d82..3b06bd0d923 100644
--- a/mysql-test/main/mysqldump.test
+++ b/mysql-test/main/mysqldump.test
@@ -87,10 +87,10 @@ INSERT INTO t1 VALUES ("1.2345", 2.3456);
SET SQL_MODE=@OLD_SQL_MODE;
# check how mysqldump make quoting
---exec $MYSQL_DUMP --compact test t1
---exec $MYSQL_DUMP --compact --skip-create-options test t1
---exec $MYSQL_DUMP --skip-create-options --skip-comments test t1
---exec $MYSQL_DUMP --skip-opt --extended-insert --skip-comments test t1
+--exec $MYSQL_DUMP --compact --default-character-set=utf8mb4 test t1
+--exec $MYSQL_DUMP --compact --skip-create-options --default-character-set=utf8mb4 test t1
+--exec $MYSQL_DUMP --skip-create-options --skip-comments --default-character-set=utf8mb4 test t1
+--exec $MYSQL_DUMP --skip-opt --extended-insert --skip-comments --default-character-set=utf8mb4 test t1
DROP TABLE t1;
CREATE TABLE t1(a int, b text, c varchar(3));
@@ -114,7 +114,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
---exec $MYSQL_DUMP --skip-comments --skip-extended-insert test t1
+--exec $MYSQL_DUMP --skip-comments --skip-extended-insert --default-character-set=utf8mb4 test t1
DROP TABLE t1;
--echo #
@@ -123,8 +123,8 @@ DROP TABLE t1;
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2);
---exec $MYSQL_DUMP --skip-comments --compatible=mysql40 test t1
---exec $MYSQL_DUMP --skip-comments --compatible=mysql323 test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --compatible=mysql40 test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --compatible=mysql323 test t1
DROP TABLE t1;
--echo #
@@ -140,11 +140,11 @@ drop table ```a`;
--echo #
create table t1(a int);
---exec $MYSQL_DUMP --comments=0 test
---exec $MYSQL_DUMP --comments=0 --compatible=ansi test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --comments=0 test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --comments=0 --compatible=ansi test
set global sql_mode='ANSI_QUOTES';
---exec $MYSQL_DUMP --comments=0 test
---exec $MYSQL_DUMP --comments=0 --compatible=ansi test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --comments=0 test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --comments=0 --compatible=ansi test
set global sql_mode=default;
drop table t1;
@@ -154,12 +154,12 @@ drop table t1;
create table t1(a int);
insert into t1 values (1),(2),(3);
---exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ test
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
drop table t1;
@@ -168,10 +168,10 @@ drop table t1;
--echo # Bug#6101 create database problem
--echo #
---exec $MYSQL_DUMP --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test
create database mysqldump_test_db character set latin2 collate latin2_bin;
---exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases mysqldump_test_db
drop database mysqldump_test_db;
--echo #
@@ -183,7 +183,7 @@ drop database mysqldump_test_db;
CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
---exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments test t1
--echo #
--echo # Bug#8063 make test mysqldump [ fail ]
@@ -193,7 +193,7 @@ INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
--echo # checking that "mysqldump" is compiled with "latin1"
--echo #
-#--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 test t1
+#--exec $MYSQL_DUMP --default-character-set=utf8mb4 --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 test t1
--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
@@ -207,7 +207,7 @@ CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (4),(5),(6);
---exec $MYSQL_DUMP --skip-comments --ignore-table=test.t1 test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --ignore-table=test.t1 test
DROP TABLE t1;
DROP TABLE t2;
@@ -217,7 +217,7 @@ DROP TABLE t2;
CREATE TABLE t1 (`b` blob);
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
---exec $MYSQL_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-extended-insert --hex-blob test --skip-comments t1
DROP TABLE t1;
--echo #
@@ -227,8 +227,8 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t1 VALUES (4),(5),(6);
---exec $MYSQL_DUMP --skip-comments --insert-ignore test t1
---exec $MYSQL_DUMP --skip-comments --insert-ignore --delayed-insert test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --insert-ignore test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --insert-ignore --delayed-insert test t1
DROP TABLE t1;
--echo #
@@ -567,7 +567,7 @@ create table t1 (
F_6faa8040da20ef399b63a72d0e4ab575 int,
F_fe73f687e5bc5280214e0486b273a5f9 int);
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
---exec $MYSQL_DUMP --skip-comments -c test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments -c test
drop table t1;
--echo #
@@ -576,7 +576,7 @@ drop table t1;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
---exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --add-drop-database --skip-comments --databases test
DROP TABLE t1;
--echo #
@@ -589,10 +589,10 @@ CREATE TABLE t1 ( a INT );
CREATE TABLE t2 ( a INT );
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2);
---exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db
---exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
---exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db
---exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db t1 t2
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --no-data mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --no-data mysqldump_test_db t1 t2
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --skip-create-options --xml --no-data mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --skip-create-options --xml --no-data mysqldump_test_db t1 t2
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;
@@ -683,11 +683,11 @@ create table t2 (pk int primary key auto_increment,
a int(10), b varchar(30), c datetime, d blob, e text);
insert into t1 values (NULL), (10), (20);
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
---exec $MYSQL_DUMP --skip-comments --xml --no-create-info test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --xml --no-create-info test
# Test if UNIQUE_CHECK is done correctly
---exec $MYSQL_DUMP --skip-comments --no-create-info test
---exec $MYSQL_DUMP --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --no-create-info test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments test
drop table t1, t2;
@@ -698,7 +698,7 @@ drop table t1, t2;
create table t1 (a text character set utf8, b text character set latin1);
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
select * from t1;
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
+--exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ test
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
--exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/t1.txt
select * from t1;
@@ -731,7 +731,7 @@ select * from t1;
show create table `t1`;
---exec $MYSQL_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
DROP TABLE `t1`;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
@@ -753,7 +753,7 @@ create table t2(a int);
create table t3(a int);
--replace_result mysqldump.exe mysqldump
--error 6
---exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --force --no-data test t3 t1 non_existing t2
drop table t1, t2, t3;
@@ -764,7 +764,7 @@ drop table t1, t2, t3;
create table t1 (a int);
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
drop table t1;
@@ -782,8 +782,8 @@ CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
insert into t1 values (0815, 4711, 2006);
---exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
---exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --compatible=ansi --order-by-primary test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --order-by-primary test t1
DROP TABLE `t1`;
--enable_warnings
@@ -808,7 +808,7 @@ INSERT INTO t2 VALUES ('bingo');
INSERT INTO t2 VALUES ('waffle');
INSERT INTO t2 VALUES ('lemon');
create view v2 as select * from t2 where a like 'a%' with check option;
---exec $MYSQL_DUMP --skip-comments db1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments db1
drop table t2;
drop view v2;
drop database db1;
@@ -858,7 +858,7 @@ use test;
create table t1(a int);
create view v1 as select * from t1;
---exec $MYSQL_DUMP --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments test
drop view v1;
drop table t1;
@@ -881,7 +881,7 @@ INSERT INTO t2 VALUES ('bingo');
INSERT INTO t2 VALUES ('waffle');
INSERT INTO t2 VALUES ('lemon');
create view v2 as select * from t2 where a like 'a%' with check option;
---exec $MYSQL_DUMP --skip-comments mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments mysqldump_test_db
drop table t2;
drop view v2;
drop database mysqldump_test_db;
@@ -893,7 +893,7 @@ use test;
CREATE TABLE t1 (a char(10));
INSERT INTO t1 VALUES ('\'');
---exec $MYSQL_DUMP --skip-comments test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments test t1
DROP TABLE t1;
--echo #
@@ -913,7 +913,7 @@ select * from v3 where b in (1, 2, 3, 4, 5, 6, 7);
create view v2 as
select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
---exec $MYSQL_DUMP --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments test
drop view v1, v2, v3;
drop table t1;
@@ -955,11 +955,11 @@ show triggers like "t1";
INSERT INTO t1 (a) VALUES (1),(2),(3),(22);
update t1 set a = 4 where a=3;
# Triggers should be dumped by default
---exec $MYSQL_DUMP --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test
# Skip dumping triggers
---exec $MYSQL_DUMP --skip-comments --databases --skip-triggers test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases --skip-triggers test
# Dump and reload...
---exec $MYSQL_DUMP --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql
drop table t1;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqldump.sql
# Check that tables have been reloaded
@@ -1005,7 +1005,7 @@ INSERT INTO `test1` VALUES (1);
SELECT * FROM `test2`;
# dump
---exec $MYSQL_DUMP --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql
#DROP TRIGGER testref;
#DROP TABLE test1;
@@ -1062,7 +1062,7 @@ create procedure `a'b` () select 1; # to fix syntax highlighting :')
set sql_mode='';
# Dump the DB and ROUTINES
---exec $MYSQL_DUMP --skip-comments --routines --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --routines --databases test
# ok, now blow it all away
DROP FUNCTION bug9056_func1;
@@ -1090,8 +1090,8 @@ set time_zone='Europe/Moscow';
# results should show two same time values, despite unique
select * from t1;
set global time_zone='Europe/Moscow';
---exec $MYSQL_DUMP --skip-comments --databases test
---exec $MYSQL_DUMP --skip-tz-utc --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-tz-utc --skip-comments --databases test
drop table t1;
set global time_zone=default;
set time_zone=default;
@@ -1124,7 +1124,7 @@ INSERT INTO `t1 test` VALUES (3);
SELECT * FROM `t2 test`;
# dump with compatible=ansi. Everything except triggers should be double
# quoted
---exec $MYSQL_DUMP --skip-comments --compatible=ansi --triggers test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --compatible=ansi --triggers test
DROP TRIGGER `test trig`;
DROP TABLE `t1 test`;
@@ -1147,7 +1147,7 @@ create view v0 as select * from v1;
create view v2 as select * from v0;
select * from v2;
---exec $MYSQL_DUMP -x --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 -x --skip-comments --databases test
drop view v2;
drop view v0;
@@ -1173,7 +1173,7 @@ DELIMITER ;|
SET SQL_MODE = @old_sql_mode;
---exec $MYSQL_DUMP --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --databases test
DROP TRIGGER tr1;
DROP TABLE t1;
@@ -1184,8 +1184,8 @@ DROP TABLE t1;
create table t1 (a binary(1), b blob);
insert into t1 values ('','');
---exec $MYSQL_DUMP --skip-comments --skip-extended-insert --hex-blob test t1
---exec $MYSQL_DUMP --skip-comments --hex-blob test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --skip-extended-insert --hex-blob test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --hex-blob test t1
drop table t1;
--echo #
@@ -1201,7 +1201,7 @@ create algorithm=merge view v4 as select * from t1 with cascaded check option;
create algorithm =temptable view v5 as select * from t1;
# dump tables and views
---exec $MYSQL_DUMP test > $MYSQLTEST_VARDIR/tmp/bug14871.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 test > $MYSQLTEST_VARDIR/tmp/bug14871.sql
# drop the db, tables and views
drop table t1;
@@ -1236,7 +1236,7 @@ end|
delimiter ;|
# dump table and trigger
---exec $MYSQL_DUMP test > $MYSQLTEST_VARDIR/tmp/bug16878.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 test > $MYSQLTEST_VARDIR/tmp/bug16878.sql
drop trigger tr1;
drop trigger tr2;
drop table t1, t2;
@@ -1261,7 +1261,7 @@ insert into t values(5, 51);
create view v1 as select qty, price, qty*price as value from t;
create view v2 as select qty from v1;
--echo mysqldump {
---exec $MYSQL_DUMP --compact -F --tab $MYSQLTEST_VARDIR/tmp test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact -F --tab $MYSQLTEST_VARDIR/tmp test
--cat_file $MYSQLTEST_VARDIR/tmp/v1.sql
--echo } mysqldump {
--cat_file $MYSQLTEST_VARDIR/tmp/v2.sql
@@ -1302,7 +1302,7 @@ drop table t1;
--echo mysqldump {
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --force -N --compact --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --force -N --compact --skip-comments test
--echo } mysqldump
drop view v1;
@@ -1319,7 +1319,7 @@ insert into t1 values (1232131);
insert into t1 values (4711);
insert into t1 values (3231);
insert into t1 values (0815);
---exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --add-drop-database --databases mysqldump_test_db
drop view v1;
drop table t1;
drop database mysqldump_test_db;
@@ -1337,7 +1337,7 @@ create database mysqldump_views;
use mysqldump_views;
create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_tables.basetable;
---exec $MYSQL_DUMP --skip-comments --compact --databases mysqldump_tables mysqldump_views
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --compact --databases mysqldump_tables mysqldump_views
drop view nasishnasifu;
drop database mysqldump_views;
@@ -1360,7 +1360,7 @@ create table t1 (f1 int, f2 int);
insert into t1 values (2,2);
create view v1 as select f1, f2 from t1;
---exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_dba mysqldump_dbb > $MYSQLTEST_VARDIR/tmp/bug20221_backup
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --add-drop-database --databases mysqldump_dba mysqldump_dbb > $MYSQLTEST_VARDIR/tmp/bug20221_backup
drop view v1;
drop table t1;
@@ -1400,13 +1400,13 @@ reset master;
# Execute mysqldump, will fail on FLUSH TABLES
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --master-data -u mysqltest_1 test 2>&1
# Execute mysqldump, will fail on FLUSH TABLES
# use --force, should no affect behaviour
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --compact --force --master-data -u mysqltest_1 test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --force --master-data -u mysqltest_1 test 2>&1
# Add RELOAD grants
grant RELOAD on *.* to mysqltest_1@localhost;
@@ -1414,20 +1414,20 @@ grant RELOAD on *.* to mysqltest_1@localhost;
# Execute mysqldump, will fail on SHOW MASTER STATUS
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --master-data -u mysqltest_1 test 2>&1
# Execute mysqldump, will fail on SHOW MASTER STATUS.
# use --force, should not alter behaviour
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --compact --force --master-data -u mysqltest_1 test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --force --master-data -u mysqltest_1 test 2>&1
# Add REPLICATION CLIENT grants
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
# Execute mysqldump, should now succeed
--disable_result_log
---exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --master-data -u mysqltest_1 test 2>&1
--enable_result_log
# Clean up
@@ -1458,7 +1458,7 @@ insert into u1 values (4);
create view v1 (c1) as select * from t1;
# Backup should not fail for Bug#21527. Flush priviliges test begins.
---exec $MYSQL_DUMP --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --ignore-table=mysql.transaction_registry --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --ignore-table=mysql.transaction_registry --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql
# Clean up
connection root;
@@ -1507,7 +1507,7 @@ use test;
--echo #
--echo # Bug #33762: mysqldump can not dump INFORMATION_SCHEMA
--echo #
---exec $MYSQL_DUMP --compact --opt -d information_schema TABLES
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compact --opt -d information_schema TABLES
--echo #
--echo # Bug#19745 mysqldump --xml produces invalid xml
@@ -1520,7 +1520,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB);
INSERT INTO t1 VALUES(1,0xff00fef0);
---exec $MYSQL_DUMP --xml --hex-blob --skip-create-options test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --xml --hex-blob --skip-create-options test t1
DROP TABLE t1;
@@ -1535,19 +1535,19 @@ INSERT INTO t1 VALUES (1), (2);
# too long a file path causes an error
--replace_result mysqldump.exe mysqldump
--error 1
---exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --lines-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ --lines-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
@@ -1561,7 +1561,7 @@ DROP TABLE t1;
CREATE TABLE t2 (a INT) ENGINE=MyISAM;
CREATE TABLE t3 (a INT) ENGINE=MyISAM;
CREATE TABLE t1 (a INT) ENGINE=merge UNION=(t2, t3);
---exec $MYSQL_DUMP --skip-comments -c test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments -c test
DROP TABLE t1, t2, t3;
@@ -1582,7 +1582,7 @@ create function f2() returns int return f1();
create view v3 as select bug23491_original.f1();
# Backup.
---exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql
# Restore.
--exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql
@@ -1648,7 +1648,7 @@ DROP TABLE t1;
--echo #
CREATE VIEW v1 AS SELECT 1;
---exec $MYSQL_DUMP --skip-add-drop-table test > $MYSQLTEST_VARDIR/tmp/bug28524.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-add-drop-table test > $MYSQLTEST_VARDIR/tmp/bug28524.sql
DROP VIEW v1;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug28524.sql
@@ -1673,7 +1673,7 @@ INSERT INTO t2 VALUES (0), (1), (2);
SET SQL_MODE = @TMP_SQL_MODE;
SELECT * FROM t2;
---exec $MYSQL_DUMP --routines test >$MYSQLTEST_VARDIR/tmp/bug29788.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --routines test >$MYSQLTEST_VARDIR/tmp/bug29788.sql
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug29788.sql
SELECT * FROM t2;
@@ -1688,15 +1688,15 @@ DROP TABLE t1,t2;
--echo # --skip-dump-date:
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*//
---exec $MYSQL_DUMP --skip-dump-date test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-dump-date test
--echo # --dump-date:
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
---exec $MYSQL_DUMP --dump-date test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --dump-date test
--echo # --dump-date (default):
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
---exec $MYSQL_DUMP test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 test
--echo #
--echo # Bug #42635: mysqldump includes views that were excluded using
@@ -1708,7 +1708,7 @@ use db42635;
create table t1 (id int);
create view db42635.v1 (c) as select * from db42635.t1;
create view db42635.v2 (c) as select * from db42635.t1;
---exec $MYSQL_DUMP --skip-comments --ignore-table=db42635.v1 db42635
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --ignore-table=db42635.v1 db42635
use test;
drop database db42635;
@@ -1744,7 +1744,7 @@ CREATE TABLE t1(a int, b int);
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,3);
INSERT INTO t1 VALUES (3,4), (4,5);
---exec $MYSQL_DUMP --replace --skip-comments test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --replace --skip-comments test t1
DROP TABLE t1;
#
@@ -1759,7 +1759,7 @@ insert t2 values ("We the people", "in order to perform");
insert t2 values ("a more perfect", "union");
select * from t1;
select * from t2;
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ test
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
# The first load tests the pausing code
@@ -1801,7 +1801,7 @@ set time_zone = 'UTC';
create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5;
show events;
show create event ee1;
---exec $MYSQL_DUMP --events first > $MYSQLTEST_VARDIR/tmp/bug16853-1.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --events first > $MYSQLTEST_VARDIR/tmp/bug16853-1.sql
drop database first;
create database second;
@@ -1816,7 +1816,7 @@ show create event ee1;
create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5;
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
show events;
---exec $MYSQL_DUMP --events second > $MYSQLTEST_VARDIR/tmp/bug16853-2.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --events second > $MYSQLTEST_VARDIR/tmp/bug16853-2.sql
drop database second;
create database third;
@@ -1844,7 +1844,7 @@ insert into t1 values (1232131);
insert into t1 values (4711);
insert into t1 values (3231);
insert into t1 values (0815);
---exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_test_db
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --add-drop-database --databases mysqldump_test_db
drop view v1;
drop table t1;
drop database mysqldump_test_db;
@@ -1852,7 +1852,7 @@ drop database mysqldump_test_db;
#
# Bug#26121 mysqldump includes LOCK TABLES general_log WRITE
#
---exec $MYSQL_DUMP --all-databases > $MYSQLTEST_VARDIR/tmp/bug26121.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --all-databases > $MYSQLTEST_VARDIR/tmp/bug26121.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug26121.sql
--remove_file $MYSQLTEST_VARDIR/tmp/bug26121.sql
@@ -1924,7 +1924,7 @@ TRUNCATE mysql.event;
USE test;
CREATE event e29938 ON SCHEDULE AT '2035-12-31 20:01:23' DO SET @bug29938=29938;
SHOW EVENTS;
---exec $MYSQL_DUMP --skip-events --all-databases > $MYSQLTEST_VARDIR/tmp/bug29938.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-events --all-databases > $MYSQLTEST_VARDIR/tmp/bug29938.sql
TRUNCATE mysql.event;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29938.sql
@@ -1935,7 +1935,7 @@ SHOW EVENTS;
--echo # MDEV-13336: add ignore-database option
--echo # with --all-databases
--echo #
---exec $MYSQL_DUMP --ignore-database test --all-databases > $MYSQLTEST_VARDIR/tmp/mysqldump-MDEV-13336.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --ignore-database test --all-databases > $MYSQLTEST_VARDIR/tmp/mysqldump-MDEV-13336.sql
DROP DATABASE test;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/mysqldump-MDEV-13336.sql
SHOW DATABASES LIKE 'test';
@@ -1979,7 +1979,7 @@ WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1';
--echo
--echo ---> Dumping mysqldump_test_db to bug30217.sql
---exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql
--echo
@@ -2013,7 +2013,7 @@ DROP DATABASE mysqldump_test_db;
create table t1 (a int);
create view v1 as select a from t1;
---exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test t1 v1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test t1 v1
drop view v1;
drop table t1;
@@ -2133,17 +2133,17 @@ INSERT INTO t1 VALUES (1, 'ABC-ÐБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1
+--exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1
--remove_file $file
--replace_result mysqldump.exe mysqldump
--error 2
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1
+--exec $MYSQL_DUMP --disable-default-character-set --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1
--remove_file $file
--echo # default '--default-charset' (binary):
---exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --disable-default-character-set --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
@@ -2367,7 +2367,7 @@ CREATE FUNCTION `straße` ( c1 CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
RETURN CONCAT(']]>, ', c1, '!');
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 -R -X BUG52792
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 -R -X BUG52792
DROP DATABASE BUG52792;
@@ -2384,7 +2384,7 @@ USE test;
--echo #
CREATE TABLE t1 (a INT);
# no_t = no_table_options; no_f = no_field_options
---exec $MYSQL_DUMP --compatible=no_t,no_f --skip-comments test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --compatible=no_t,no_f --skip-comments test
DROP TABLE t1;
--echo #
@@ -2415,7 +2415,7 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
# mixing of normal (stdout) and --verbose (stderr) output will happen in random
# order depending on stdio internal buffer size.
--replace_regex /-- Server version.*// /-- MySQL dump .*// /-- Dump completed on .*/-- Dump completed/
---exec $MYSQL_DUMP --verbose --single-transaction --flush-logs b12809202_db 2>&1 > $MYSQLTEST_VARDIR/tmp/bug61854.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --verbose --single-transaction --flush-logs b12809202_db 2>&1 > $MYSQLTEST_VARDIR/tmp/bug61854.sql
--echo
--echo #### Dump ends here ####
@@ -2440,7 +2440,7 @@ SET @old_general_log_state= @@global.general_log;
SET @old_slow_query_log_state= @@global.slow_query_log;
call mtr.add_suppression("Failed to write to mysql.general_log");
---exec $MYSQL_DUMP -uroot --all-databases > $MYSQLTEST_VARDIR/tmp/bug45740.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 -uroot --all-databases > $MYSQLTEST_VARDIR/tmp/bug45740.sql
# Make log_output as table and disabling general_log and slow_log
SET @@global.log_output="TABLE";
SET @@global.general_log='OFF';
@@ -2460,7 +2460,7 @@ SET @@global.general_log= @old_general_log_state;
create table t1 (g GEOMETRY) CHARSET koi8r;
create table t2 (g GEOMETRY) CHARSET koi8r;
insert into t1 values (point(1,1)), (point(2,2));
---exec $MYSQL_DUMP --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --disable-default-character-set --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
@@ -2488,7 +2488,7 @@ INSERT INTO t2 VALUES (3), (4);
SELECT * FROM t1;
SELECT * FROM t2;
---exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ db_20772273
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --tab=$MYSQLTEST_VARDIR/tmp/ db_20772273
--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t1.sql
--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t2.sql
@@ -2543,7 +2543,7 @@ SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
ORDER BY ROUTINE_NAME;
---exec $MYSQL_DUMP --triggers --events --routines --add-drop-database --databases bug25717383 > $MYSQLTEST_VARDIR/tmp/bug25717383.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --triggers --events --routines --add-drop-database --databases bug25717383 > $MYSQLTEST_VARDIR/tmp/bug25717383.sql
SHOW TABLES FROM bug25717383;
--replace_column 6 #
@@ -2561,14 +2561,14 @@ DROP DATABASE bug25717383;
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
#
--error 2
---exec $MYSQL_DUMP -hunknownhost --dump-slave nulldb
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 -hunknownhost --dump-slave nulldb
#
# MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly requested
#
--replace_result mysqldump.exe mysqldump
--error 1
---exec $MYSQL_DUMP --user=foo 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --user=foo 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
--exec $MYSQL_DUMP --help > $MYSQLTEST_VARDIR/tmp/bug6056.out
--echo #
@@ -2596,8 +2596,8 @@ use test;
create table t1 (a int);
insert into t1 values (1);
---exec $MYSQL_DUMP --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
---exec $MYSQL_DUMP --disable-log-queries --skip-comments test t1 >$MYSQLTEST_VARDIR/tmp/mysqldump-test.out
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --disable-log-queries --skip-comments test t1 >$MYSQLTEST_VARDIR/tmp/mysqldump-test.out
drop table t1;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqldump-test.out
@@ -2658,7 +2658,7 @@ CREATE FUNCTION f() RETURNS INT RETURN 1;
CREATE VIEW v1 AS SELECT f();
--echo # Running mysqldump -uroot test --routines --tables v1 > **vardir**/test.dmp
---exec $MYSQL_DUMP -uroot test --routines --tables v1 > $MYSQLTEST_VARDIR/test.dmp
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 -uroot test --routines --tables v1 > $MYSQLTEST_VARDIR/test.dmp
DROP VIEW v1;
DROP FUNCTION f;
@@ -2709,7 +2709,7 @@ CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW
SET NEW.b=NEW.a + 10;
INSERT INTO t1 (a) VALUES (1),(2),(3);
---exec $MYSQL_DUMP --triggers --no-data --no-create-info --add-drop-trigger --skip-comments --databases test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --triggers --no-data --no-create-info --add-drop-trigger --skip-comments --databases test
DROP TABLE t1;
--echo #
--echo # Test for Invisible columns
@@ -2740,10 +2740,10 @@ insert into t4 values(1);
--echo #Check side effect on --complete insert
--exec $MYSQL_DUMP --compact --complete-insert d
--echo #Check xml
---exec $MYSQL_DUMP --skip-create-options --skip-comments -X d
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments -X d
#import data
---exec $MYSQL_DUMP --skip-comments d > $MYSQLTEST_VARDIR/tmp/invisible_dump.sql
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-comments d > $MYSQLTEST_VARDIR/tmp/invisible_dump.sql
DROP table t1,t2,t3;
--exec $MYSQL d < $MYSQLTEST_VARDIR/tmp/invisible_dump.sql
diff --git a/mysql-test/main/named_pipe.result b/mysql-test/main/named_pipe.result
index 66da9a874b4..f8c2acf98a0 100644
--- a/mysql-test/main/named_pipe.result
+++ b/mysql-test/main/named_pipe.result
@@ -1348,8 +1348,10 @@ fld1 fld1
250503 250505
250504 250505
250505 250505
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
companynr companyname
@@ -1425,7 +1427,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
companynr companynr
37 36
@@ -1434,6 +1436,7 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
+SET @@join_cache_level=@local_join_cache_level;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
fld1 companynr fld3 period
038008 37 reporters 1008
diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test
index 40b79c47486..fff65624b12 100644
--- a/mysql-test/main/openssl_1.test
+++ b/mysql-test/main/openssl_1.test
@@ -167,17 +167,17 @@ CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
# Run mysqldump
---exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test t1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test t1
---exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
---exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
# With wrong parameters
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
--replace_regex /SSL connection error.*/SSL connection error: xxxx/
--error 2
---exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
+--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
--echo
DROP TABLE t1;
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
diff --git a/mysql-test/main/opt_tvc.test b/mysql-test/main/opt_tvc.test
index 733ee0792fe..7319dbdc9e8 100644
--- a/mysql-test/main/opt_tvc.test
+++ b/mysql-test/main/opt_tvc.test
@@ -2,6 +2,7 @@
# MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery
#
source include/have_debug.inc;
+source include/default_optimizer_switch.inc;
create table t1 (a int, b int);
diff --git a/mysql-test/main/partition_example.opt b/mysql-test/main/partition_example.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/partition_example.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index f663c6381d3..3b44cf4db85 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -1,6 +1,7 @@
--source include/not_embedded.inc
--source include/have_partition.inc
--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
diff --git a/mysql-test/main/partition_key_cache.result b/mysql-test/main/partition_key_cache.result
index f1b174ca249..fae7639d9bb 100644
--- a/mysql-test/main/partition_key_cache.result
+++ b/mysql-test/main/partition_key_cache.result
@@ -1,9 +1,7 @@
DROP TABLE IF EXISTS t1, t2, v, x;
# Actual test of key caches
# Verifing that reads/writes use the key cache correctly
-SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size;
-@org_key_cache_buffer_size:= @@global.default.key_buffer_size
-1048576
+SET @org_key_cache_buffer_size= @@global.default.key_buffer_size;
# Minimize default key cache (almost disabled).
SET @@global.default.key_buffer_size = 4096;
CREATE TABLE t1 (
diff --git a/mysql-test/main/partition_key_cache.test b/mysql-test/main/partition_key_cache.test
index 067eb7fae59..365a571ae92 100644
--- a/mysql-test/main/partition_key_cache.test
+++ b/mysql-test/main/partition_key_cache.test
@@ -7,7 +7,7 @@ DROP TABLE IF EXISTS t1, t2, v, x;
--echo # Actual test of key caches
--echo # Verifing that reads/writes use the key cache correctly
-SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size;
+SET @org_key_cache_buffer_size= @@global.default.key_buffer_size;
--echo # Minimize default key cache (almost disabled).
SET @@global.default.key_buffer_size = 4096;
CREATE TABLE t1 (
diff --git a/mysql-test/main/partition_pruning.test b/mysql-test/main/partition_pruning.test
index ecf794ca214..aea61a941f7 100644
--- a/mysql-test/main/partition_pruning.test
+++ b/mysql-test/main/partition_pruning.test
@@ -3,6 +3,7 @@
# prune, so the test is EXPLAINs.
#
-- source include/have_partition.inc
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
diff --git a/mysql-test/main/plugin.opt b/mysql-test/main/plugin.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/plugin.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/plugin_innodb.opt b/mysql-test/main/plugin_innodb.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/plugin_innodb.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/plugin_load.opt b/mysql-test/main/plugin_load.opt
index aeeb2e4eb7d..4e8881b1b32 100644
--- a/mysql-test/main/plugin_load.opt
+++ b/mysql-test/main/plugin_load.opt
@@ -1,3 +1,4 @@
+--plugin-maturity=unknown
--plugin-load-add=$DIALOG_EXAMPLES_SO
--plugin-load=$LIBDAEMON_EXAMPLE_SO
--plugin-load-add=EXAMPLE=$HA_EXAMPLE_SO
diff --git a/mysql-test/main/plugin_load_option.opt b/mysql-test/main/plugin_load_option.opt
index be9bc9d5487..bd9843c7d11 100644
--- a/mysql-test/main/plugin_load_option.opt
+++ b/mysql-test/main/plugin_load_option.opt
@@ -1,2 +1,3 @@
+--plugin-maturity=unknown
--plugin-load-add=EXAMPLE=$HA_EXAMPLE_SO
--loose-plugin-example=FORCE_PLUS_PERMANENT
diff --git a/mysql-test/main/plugin_not_embedded.opt b/mysql-test/main/plugin_not_embedded.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/plugin_not_embedded.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/pool_of_threads.result b/mysql-test/main/pool_of_threads.result
index b25d8d1e50e..9c02dfac9cd 100644
--- a/mysql-test/main/pool_of_threads.result
+++ b/mysql-test/main/pool_of_threads.result
@@ -1,4 +1,3 @@
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='outer_join_with_cache=off';
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
@@ -1349,8 +1348,10 @@ fld1 fld1
250503 250505
250504 250505
250505 250505
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
companynr companyname
@@ -1426,7 +1427,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
companynr companynr
37 36
@@ -1435,6 +1436,7 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
+SET @@join_cache_level=@local_join_cache_level;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
fld1 companynr fld3 period
038008 37 reporters 1008
@@ -2156,7 +2158,7 @@ Privat (Private Nutzung) Mobilfunk
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=default;
connection default;
SELECT sleep(50);
connect con2,localhost,root,,;
diff --git a/mysql-test/main/pool_of_threads.test b/mysql-test/main/pool_of_threads.test
index f13a096985c..cb62a27faeb 100644
--- a/mysql-test/main/pool_of_threads.test
+++ b/mysql-test/main/pool_of_threads.test
@@ -2,13 +2,14 @@
# and run a number of tests
-- source include/have_pool_of_threads.inc
-SET @save_optimizer_switch=@@optimizer_switch;
+-- source include/default_optimizer_switch.inc
+
SET optimizer_switch='outer_join_with_cache=off';
# Slow test, don't run during staging part
-- source include/not_staging.inc
-- source include/long_test.inc
-- source include/common-tests.inc
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=default;
# Test that we cannot have more simultaneous connections than
# --thread-pool-size on the standard port, but _can_ have additional
diff --git a/mysql-test/main/ps-master.opt b/mysql-test/main/ps-master.opt
index 2ae67eedad8..0fa6f43b7ef 100644
--- a/mysql-test/main/ps-master.opt
+++ b/mysql-test/main/ps-master.opt
@@ -1 +1 @@
---log-output=table,file --slow-query-log --log-queries-not-using-indexes --general-log
+--log-output=table,file --slow-query-log --log-queries-not-using-indexes --general-log --character-set-server=latin1 --collation_server=latin1_swedish_ci --sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test
index a9d588a02c0..b13cf667aef 100644
--- a/mysql-test/main/ps.test
+++ b/mysql-test/main/ps.test
@@ -1814,7 +1814,6 @@ drop database mysqltest_1;
deallocate prepare stmt;
set @@character_set_server= @old_character_set_server;
-
#
# BUG#24491 "using alias from source table in insert ... on duplicate key"
#
diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result
index f5d8b5eb461..4ba2568c3d9 100644
--- a/mysql-test/main/query_cache.result
+++ b/mysql-test/main/query_cache.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@query_cache_size;
SET GLOBAL query_cache_type= Off;
SET LOCAL query_cache_type= Off;
SET LOCAL query_cache_type= 0;
@@ -1640,7 +1641,7 @@ show status like 'Qcache_queries_in_cache';
Variable_name Value
Qcache_queries_in_cache 0
drop database db2;
-set global query_cache_size=default;
+set global query_cache_size=@save_query_cache_size;
drop database if exists db1;
drop database if exists db3;
set GLOBAL query_cache_size=15*1024*1024;
@@ -1675,7 +1676,7 @@ drop database db3;
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
set local query_cache_type=default;
set GLOBAL query_cache_type=on;
set local query_cache_type=on;
@@ -1955,6 +1956,7 @@ select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
# MDEV-4981: Account for queries handled by query-cache in
# USER_STATISTICS (and in HOST_STATISTICS)
#
+set @save_userstat=@@global.userstat;
SET GLOBAL userstat=1;
set GLOBAL query_cache_size=1355776;
FLUSH USER_STATISTICS;
@@ -2095,7 +2097,7 @@ Qcache_hits 0
drop procedure p1;
drop table t1;
set GLOBAL query_cache_size=1355776;
-SET GLOBAL userstat=default;
+SET GLOBAL userstat=@save_userstat;
End of 5.5 tests
#
# Bug#12977203: SERVER CRASH ON A DERIVED TABLE WITH QUERY CACHE ENABLED
@@ -2195,5 +2197,4 @@ DROP FUNCTION foo;
drop table t1;
restore defaults
SET GLOBAL query_cache_type= default;
-SET GLOBAL query_cache_size= default;
-SET LOCAL query_cache_type= default;
+SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index 389aa0de2fa..3bf905d624c 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1,6 +1,7 @@
-- source include/have_query_cache.inc
-- source include/long_test.inc
+set @save_query_cache_size=@@query_cache_size;
#
# Tests with query cache
#
@@ -1236,7 +1237,7 @@ set session query_cache_type=on;
drop database db1;
show status like 'Qcache_queries_in_cache';
drop database db2;
- set global query_cache_size=default;
+ set global query_cache_size=@save_query_cache_size;
--disable_warnings
drop database if exists db1;
@@ -1266,7 +1267,7 @@ set session query_cache_type=on;
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
set local query_cache_type=default;
set GLOBAL query_cache_type=on;
set local query_cache_type=on;
@@ -1631,6 +1632,7 @@ select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type;
--echo # USER_STATISTICS (and in HOST_STATISTICS)
--echo #
+set @save_userstat=@@global.userstat;
SET GLOBAL userstat=1;
set GLOBAL query_cache_size=1355776;
FLUSH USER_STATISTICS;
@@ -1715,7 +1717,7 @@ show status like "Qcache_hits";
drop procedure p1;
drop table t1;
set GLOBAL query_cache_size=1355776;
-SET GLOBAL userstat=default;
+SET GLOBAL userstat=@save_userstat;
--echo End of 5.5 tests
@@ -1783,5 +1785,4 @@ drop table t1;
--echo restore defaults
SET GLOBAL query_cache_type= default;
-SET GLOBAL query_cache_size= default;
-SET LOCAL query_cache_type= default;
+SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/query_cache_debug.result b/mysql-test/main/query_cache_debug.result
index 2a54f073974..e365984986a 100644
--- a/mysql-test/main/query_cache_debug.result
+++ b/mysql-test/main/query_cache_debug.result
@@ -1,4 +1,6 @@
set global query_cache_type= ON;
+set @save_query_cache_size=@@global.query_cache_size;
+SET @save_concurrent_insert= @@GLOBAL.concurrent_insert;
flush status;
set query_cache_type=DEMAND;
set global query_cache_size= 1024*768;
@@ -37,8 +39,6 @@ set debug_sync= 'RESET';
set global query_cache_size= 0;
use test;
drop table t1;
-SET @old_concurrent_insert= @@GLOBAL.concurrent_insert;
-SET @old_query_cache_size= @@GLOBAL.query_cache_size;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
@@ -214,7 +214,6 @@ SET GLOBAL query_cache_type= DEFAULT;
#
# Bug#56822: Add a thread state for sessions waiting on the query cache lock
#
-SET @old_query_cache_size= @@GLOBAL.query_cache_size;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
@@ -246,7 +245,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
RESET QUERY CACHE;
DROP TABLE t1;
-SET GLOBAL query_cache_size= DEFAULT;
+SET GLOBAL query_cache_size= @save_query_cache_size;
SET GLOBAL query_cache_type= DEFAULT;
#
# MDEV-14526: MariaDB keeps crashing under load when
@@ -270,7 +269,7 @@ SELECT DISTINCT id FROM t1 WHERE id BETWEEN 5603 AND 16218 ORDER BY k;
connection default;
set debug_sync="now WAIT_FOR parked";
connection con2;
-SET GLOBAL query_cache_type= 0;
+SET GLOBAL query_cache_type= 0;;
connection default;
set debug_sync="now SIGNAL go";
connection con1;
@@ -281,6 +280,7 @@ disconnect con2;
connection default;
set debug_sync= 'RESET';
DROP TABLE t1;
-SEt GLOBAL query_cache_size= DEFAULT;
-SEt GLOBAL query_cache_type= DEFAULT;
+SET GLOBAL query_cache_size=@save_query_cache_size;
+SET GLOBAL query_cache_type= DEFAULT;
+SET @@GLOBAL.concurrent_insert=@save_concurrent_insert;
# End of 5.5 tests
diff --git a/mysql-test/main/query_cache_debug.test b/mysql-test/main/query_cache_debug.test
index 22ff1d45e63..90b76077cac 100644
--- a/mysql-test/main/query_cache_debug.test
+++ b/mysql-test/main/query_cache_debug.test
@@ -4,6 +4,9 @@
--source include/long_test.inc
set global query_cache_type= ON;
+set @save_query_cache_size=@@global.query_cache_size;
+SET @save_concurrent_insert= @@GLOBAL.concurrent_insert;
+
#
# Bug #30887 Server crashes on SET GLOBAL query_cache_size=0
#
@@ -53,9 +56,6 @@ drop table t1;
# Bug#41098: Query Cache returns wrong result with concurrent insert
#
-SET @old_concurrent_insert= @@GLOBAL.concurrent_insert;
-SET @old_query_cache_size= @@GLOBAL.query_cache_size;
-
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
@@ -247,8 +247,6 @@ SET GLOBAL query_cache_type= DEFAULT;
--echo # Bug#56822: Add a thread state for sessions waiting on the query cache lock
--echo #
-SET @old_query_cache_size= @@GLOBAL.query_cache_size;
-
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -297,7 +295,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
RESET QUERY CACHE;
DROP TABLE t1;
-SET GLOBAL query_cache_size= DEFAULT;
+SET GLOBAL query_cache_size= @save_query_cache_size;
SET GLOBAL query_cache_type= DEFAULT;
--echo #
@@ -322,16 +320,13 @@ SET GLOBAL query_cache_type= 1;
--connect (con2,localhost,root,,test)
--connect (con1,localhost,root,,test)
set debug_sync="wait_in_query_cache_store_query SIGNAL parked WAIT_FOR go";
---send
-
- SELECT DISTINCT id FROM t1 WHERE id BETWEEN 5603 AND 16218 ORDER BY k;
+--send SELECT DISTINCT id FROM t1 WHERE id BETWEEN 5603 AND 16218 ORDER BY k
--connection default
set debug_sync="now WAIT_FOR parked";
--connection con2
---send
- SET GLOBAL query_cache_type= 0;
+--send SET GLOBAL query_cache_type= 0;
--connection default
set debug_sync="now SIGNAL go";
@@ -347,7 +342,8 @@ set debug_sync="now SIGNAL go";
--connection default
set debug_sync= 'RESET';
DROP TABLE t1;
-SEt GLOBAL query_cache_size= DEFAULT;
-SEt GLOBAL query_cache_type= DEFAULT;
+SET GLOBAL query_cache_size=@save_query_cache_size;
+SET GLOBAL query_cache_type= DEFAULT;
+SET @@GLOBAL.concurrent_insert=@save_concurrent_insert;
--echo # End of 5.5 tests
diff --git a/mysql-test/main/query_cache_innodb.result b/mysql-test/main/query_cache_innodb.result
index 146a6fbc289..62424ac362b 100644
--- a/mysql-test/main/query_cache_innodb.result
+++ b/mysql-test/main/query_cache_innodb.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@query_cache_size;
#
# MDEV-12485: foreign key on delete cascade stale entries with
# query cache enabled
@@ -86,5 +87,5 @@ drop database `#mysql50#-`;
SET NAMES default;
FOUND 8 /\[ERROR\] Invalid \(old\?\) table or database name/ in mysqld.1.err
set global query_cache_type=DEFAULT;
-set global query_cache_size=DEFAULT;
+set global query_cache_size=@save_query_cache_size;
End of 10.2 tests
diff --git a/mysql-test/main/query_cache_innodb.test b/mysql-test/main/query_cache_innodb.test
index ba62ec36c16..72ae891e331 100644
--- a/mysql-test/main/query_cache_innodb.test
+++ b/mysql-test/main/query_cache_innodb.test
@@ -2,6 +2,8 @@
--source include/have_query_cache.inc
--source include/not_embedded.inc
+set @save_query_cache_size=@@query_cache_size;
+
--echo #
--echo # MDEV-12485: foreign key on delete cascade stale entries with
--echo # query cache enabled
@@ -81,5 +83,5 @@ call mtr.add_suppression("\\[ERROR\\] Invalid \\(old\\?\\) table or database nam
--source include/search_pattern_in_file.inc
set global query_cache_type=DEFAULT;
-set global query_cache_size=DEFAULT;
+set global query_cache_size=@save_query_cache_size;
--echo End of 10.2 tests
diff --git a/mysql-test/main/query_cache_merge.result b/mysql-test/main/query_cache_merge.result
index e31ab05b396..39e70abb51f 100644
--- a/mysql-test/main/query_cache_merge.result
+++ b/mysql-test/main/query_cache_merge.result
@@ -1,3 +1,5 @@
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_query_cache_type=@@global.query_cache_type;
SET GLOBAL query_cache_type=ON;
SET LOCAL query_cache_type=ON;
SET @@global.query_cache_size=1355776;
@@ -1692,7 +1694,7 @@ DROP TABLE t4;
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
-SET @@global.query_cache_size = default;
+SET @@global.query_cache_size = @save_query_cache_size;
SET @@global.table_definition_cache = @save_table_definition_cache;
-SET GLOBAL query_cache_type=default;
+SET @@global.query_cache_type = @save_query_cache_type;
End of 5.1 tests
diff --git a/mysql-test/main/query_cache_merge.test b/mysql-test/main/query_cache_merge.test
index 3046c4ecbfe..6212ff624e0 100644
--- a/mysql-test/main/query_cache_merge.test
+++ b/mysql-test/main/query_cache_merge.test
@@ -1,5 +1,8 @@
# Test query cache with many tables
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_query_cache_type=@@global.query_cache_type;
+
SET GLOBAL query_cache_type=ON;
SET LOCAL query_cache_type=ON;
@@ -105,8 +108,7 @@ while ($c)
dec $c;
}
-SET @@global.query_cache_size = default;
+SET @@global.query_cache_size = @save_query_cache_size;
SET @@global.table_definition_cache = @save_table_definition_cache;
-
-SET GLOBAL query_cache_type=default;
+SET @@global.query_cache_type = @save_query_cache_type;
--echo End of 5.1 tests
diff --git a/mysql-test/main/query_cache_notembedded.result b/mysql-test/main/query_cache_notembedded.result
index bfb8f4d1ff7..29a091b68c1 100644
--- a/mysql-test/main/query_cache_notembedded.result
+++ b/mysql-test/main/query_cache_notembedded.result
@@ -409,9 +409,7 @@ disconnect bug30269;
DROP USER 'bug30269'@'localhost';
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
-set GLOBAL query_cache_limit=default;
-set GLOBAL query_cache_min_res_unit=default;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@query_cache_size_save;
drop table if exists t1|
create table t1 (
id char(16) not null default '',
diff --git a/mysql-test/main/query_cache_notembedded.test b/mysql-test/main/query_cache_notembedded.test
index dff6c2a139b..03c9d9e4cd4 100644
--- a/mysql-test/main/query_cache_notembedded.test
+++ b/mysql-test/main/query_cache_notembedded.test
@@ -4,7 +4,6 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
-
#
# Tests with query cache
#
@@ -277,9 +276,7 @@ DROP USER 'bug30269'@'localhost';
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
-set GLOBAL query_cache_limit=default;
-set GLOBAL query_cache_min_res_unit=default;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@query_cache_size_save;
#
# Bug#3583 query cache doesn't work for stored procedures
@@ -333,4 +330,3 @@ delimiter ;|
SET GLOBAL query_cache_size=@query_cache_size_save;
SET GLOBAL query_cache_type=@query_cache_type_save;
set GLOBAL sql_mode=@sql_mode_save;
-
diff --git a/mysql-test/main/query_cache_ps_no_prot.test b/mysql-test/main/query_cache_ps_no_prot.test
index 4b2bb842e34..61388b0f97a 100644
--- a/mysql-test/main/query_cache_ps_no_prot.test
+++ b/mysql-test/main/query_cache_ps_no_prot.test
@@ -12,6 +12,8 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
--source include/have_query_cache.inc
+--source include/default_charset.inc
+
let collation=utf8_unicode_ci;
--source include/have_collation.inc
diff --git a/mysql-test/main/query_cache_with_views.result b/mysql-test/main/query_cache_with_views.result
index 763113dbac3..8cb3d8cb297 100644
--- a/mysql-test/main/query_cache_with_views.result
+++ b/mysql-test/main/query_cache_with_views.result
@@ -1,5 +1,7 @@
drop table if exists t1,t2,v1,v2,v3;
drop view if exists t1,t2,v1,v2,v3;
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_query_cache_type=@@global.query_cache_type;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
set GLOBAL query_cache_size=1355776;
@@ -208,5 +210,5 @@ DROP TABLE t1;
DROP TABLE t2;
DROP VIEW t1_view;
SET AUTOCOMMIT=DEFAULT;
-set GLOBAL query_cache_size=default;
-set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+set GLOBAL query_cache_type=@save_query_cache_type;
diff --git a/mysql-test/main/query_cache_with_views.test b/mysql-test/main/query_cache_with_views.test
index 9b03d0e99d0..c55327e3d0a 100644
--- a/mysql-test/main/query_cache_with_views.test
+++ b/mysql-test/main/query_cache_with_views.test
@@ -6,6 +6,9 @@
drop table if exists t1,t2,v1,v2,v3;
drop view if exists t1,t2,v1,v2,v3;
--enable_warnings
+
+set @save_query_cache_size=@@global.query_cache_size;
+set @save_query_cache_type=@@global.query_cache_type;
set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON;
set GLOBAL query_cache_size=1355776;
@@ -145,5 +148,5 @@ DROP VIEW t1_view;
SET AUTOCOMMIT=DEFAULT;
# Reset default environment.
-set GLOBAL query_cache_size=default;
-set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+set GLOBAL query_cache_type=@save_query_cache_type;
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result
index ae0a788bd76..1505afdfb82 100644
--- a/mysql-test/main/range.result
+++ b/mysql-test/main/range.result
@@ -1,3 +1,4 @@
+SET optimizer_use_condition_selectivity=4;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test
index c064b7a31bd..ce2d2e7b44f 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -2,6 +2,7 @@
# Problem with range optimizer
#
--source include/have_innodb.inc
+SET optimizer_use_condition_selectivity=4;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
diff --git a/mysql-test/main/range_interrupted-13751.test b/mysql-test/main/range_interrupted-13751.test
index 000a46383e8..8b2c1834ee5 100644
--- a/mysql-test/main/range_interrupted-13751.test
+++ b/mysql-test/main/range_interrupted-13751.test
@@ -1,4 +1,6 @@
-source include/have_debug.inc;
+-- source include/have_debug.inc
+--source include/default_optimizer_switch.inc
+
#
# MDEV-13751 Interrupted SELECT fails with 1030: 'Got error 1 "Operation not permitted" from storage engine MyISAM'
#
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index f0a9798f86f..170df14dcba 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -1,6 +1,7 @@
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set optimizer_switch='rowid_filter=off';
+SET optimizer_use_condition_selectivity=4;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
diff --git a/mysql-test/main/range_mrr_icp.test b/mysql-test/main/range_mrr_icp.test
index 4c6983c742f..7e62cb6a8aa 100644
--- a/mysql-test/main/range_mrr_icp.test
+++ b/mysql-test/main/range_mrr_icp.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set optimizer_switch='rowid_filter=off';
diff --git a/mysql-test/main/range_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test
index 2c43027d757..f4d9024fe08 100644
--- a/mysql-test/main/range_vs_index_merge.test
+++ b/mysql-test/main/range_vs_index_merge.test
@@ -1,3 +1,6 @@
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3,t4;
DROP DATABASE IF EXISTS world;
diff --git a/mysql-test/main/repair.result b/mysql-test/main/repair.result
index da634e61432..84773449e92 100644
--- a/mysql-test/main/repair.result
+++ b/mysql-test/main/repair.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("character set is multi-byte");
drop table if exists t1;
create table t1 SELECT 1,"table 1";
repair table t1 use_frm;
@@ -188,6 +189,8 @@ drop tables t1, t2;
# .frm file from MySQL 3.23
#
# Test with a saved table from 3.23
+SET @save_global_character_set_server= @@global.character_set_server;
+set @@global.character_set_server=@@character_set_server;
select count(*) from t1;
ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
check table t1;
@@ -208,6 +211,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+set @@global.character_set_server=@save_global_character_set_server;
create table t1 (a blob);
create view v1 as select * from t1;
repair view v1;
diff --git a/mysql-test/main/repair.test b/mysql-test/main/repair.test
index 5494e370133..75978ac482b 100644
--- a/mysql-test/main/repair.test
+++ b/mysql-test/main/repair.test
@@ -1,6 +1,9 @@
#
# Test of repair table
#
+--source include/default_charset.inc
+
+call mtr.add_suppression("character set is multi-byte");
--disable_warnings
drop table if exists t1;
@@ -199,6 +202,9 @@ drop tables t1, t2;
--echo # Test with a saved table from 3.23
let $MYSQLD_DATADIR= `select @@datadir`;
+
+SET @save_global_character_set_server= @@global.character_set_server;
+set @@global.character_set_server=@@character_set_server;
--copy_file std_data/host_old.frm $MYSQLD_DATADIR/test/t1.frm
--copy_file std_data/host_old.MYD $MYSQLD_DATADIR/test/t1.MYD
--copy_file std_data/host_old.MYI $MYSQLD_DATADIR/test/t1.MYI
@@ -212,6 +218,8 @@ select count(*) from t1;
check table t1;
drop table t1;
+set @@global.character_set_server=@save_global_character_set_server;
+
#
# MDEV-8115 mysql_upgrade crashes the server with REPAIR VIEW
#
diff --git a/mysql-test/main/schema.test b/mysql-test/main/schema.test
index 8f9047e2e3f..e8ab4e406c0 100644
--- a/mysql-test/main/schema.test
+++ b/mysql-test/main/schema.test
@@ -6,6 +6,7 @@
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
+--source include/default_charset.inc
--disable_warnings
drop database if exists mysqltest1;
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index f4fd91233b5..0f84ed684da 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -1,7 +1,6 @@
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=1;
CREATE TABLE t1 (
@@ -4941,7 +4940,7 @@ CREATE TABLE t5 (f1 int) ;
INSERT INTO t5 VALUES (20),(5);
CREATE TABLE t6(f1 int);
INSERT INTO t6 VALUES (9),(7);
-SET SESSION join_buffer_size = 2176;
+SET @save_join_buffer_size=@@join_buffer_size,@@join_buffer_size = 2176;
EXPLAIN
SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5001,7 +5000,7 @@ f1 f1 f1 f1 f2 f1 f1
3 9 NULL NULL NULL 5 7
7 9 NULL NULL NULL 5 7
18 9 NULL NULL NULL 5 7
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_buffer_size = @save_join_buffer_size;
DROP TABLE t1,t2,t3,t4,t5,t6;
#
# Bug #698882: best equality substitution not applied to ref
@@ -5381,7 +5380,7 @@ SELECT a, COUNT(*) FROM t1 WHERE 0;
a COUNT(*)
NULL 0
DROP TABLE t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@save_optimizer_switch;
#
# LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed
# in add_not_null_conds(JOIN*) with JOIN, ZEROFILL column, PK
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 0d43dfd55b9..43984810c66 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -13,7 +13,8 @@ drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
--enable_warnings
-SET @save_optimizer_switch=@@optimizer_switch;
+--source include/default_optimizer_switch.inc
+
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
if (`select @join_cache_level_for_select_test is null`)
{
@@ -4178,13 +4179,13 @@ INSERT INTO t5 VALUES (20),(5);
CREATE TABLE t6(f1 int);
INSERT INTO t6 VALUES (9),(7);
-SET SESSION join_buffer_size = 2176;
+SET @save_join_buffer_size=@@join_buffer_size,@@join_buffer_size = 2176;
EXPLAIN
SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_buffer_size = @save_join_buffer_size;
DROP TABLE t1,t2,t3,t4,t5,t6;
@@ -4483,7 +4484,7 @@ CREATE TABLE t1 (a TINYBLOB NOT NULL);
SELECT a, COUNT(*) FROM t1 WHERE 0;
DROP TABLE t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@save_optimizer_switch;
--echo #
--echo # LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index a3544f6be21..7276814114f 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -12,7 +12,6 @@ set @join_cache_level_for_select_test=@@join_cache_level;
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=@join_cache_level_for_select_test;
CREATE TABLE t1 (
@@ -4952,7 +4951,7 @@ CREATE TABLE t5 (f1 int) ;
INSERT INTO t5 VALUES (20),(5);
CREATE TABLE t6(f1 int);
INSERT INTO t6 VALUES (9),(7);
-SET SESSION join_buffer_size = 2176;
+SET @save_join_buffer_size=@@join_buffer_size,@@join_buffer_size = 2176;
EXPLAIN
SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5012,7 +5011,7 @@ f1 f1 f1 f1 f2 f1 f1
3 9 NULL NULL NULL 5 7
7 9 NULL NULL NULL 5 7
18 9 NULL NULL NULL 5 7
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_buffer_size = @save_join_buffer_size;
DROP TABLE t1,t2,t3,t4,t5,t6;
#
# Bug #698882: best equality substitution not applied to ref
@@ -5392,7 +5391,7 @@ SELECT a, COUNT(*) FROM t1 WHERE 0;
a COUNT(*)
NULL 0
DROP TABLE t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@save_optimizer_switch;
#
# LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed
# in add_not_null_conds(JOIN*) with JOIN, ZEROFILL column, PK
@@ -5607,9 +5606,6 @@ NULL
drop table t1;
End of 10.0 tests
set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_select_test=NULL;
set @join_cache_level_for_select_test=NULL;
diff --git a/mysql-test/main/select_jcl6.test b/mysql-test/main/select_jcl6.test
index 120752fe12c..c1c82a8f46e 100644
--- a/mysql-test/main/select_jcl6.test
+++ b/mysql-test/main/select_jcl6.test
@@ -17,7 +17,6 @@ set @join_cache_level_for_select_test=@@join_cache_level;
--source select.test
set join_cache_level=default;
-show variables like 'join_cache_level';
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_select_test=NULL;
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index f4fd91233b5..0f84ed684da 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -1,7 +1,6 @@
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=1;
CREATE TABLE t1 (
@@ -4941,7 +4940,7 @@ CREATE TABLE t5 (f1 int) ;
INSERT INTO t5 VALUES (20),(5);
CREATE TABLE t6(f1 int);
INSERT INTO t6 VALUES (9),(7);
-SET SESSION join_buffer_size = 2176;
+SET @save_join_buffer_size=@@join_buffer_size,@@join_buffer_size = 2176;
EXPLAIN
SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5001,7 +5000,7 @@ f1 f1 f1 f1 f2 f1 f1
3 9 NULL NULL NULL 5 7
7 9 NULL NULL NULL 5 7
18 9 NULL NULL NULL 5 7
-SET SESSION join_buffer_size = DEFAULT;
+SET SESSION join_buffer_size = @save_join_buffer_size;
DROP TABLE t1,t2,t3,t4,t5,t6;
#
# Bug #698882: best equality substitution not applied to ref
@@ -5381,7 +5380,7 @@ SELECT a, COUNT(*) FROM t1 WHERE 0;
a COUNT(*)
NULL 0
DROP TABLE t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@save_optimizer_switch;
#
# LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed
# in add_not_null_conds(JOIN*) with JOIN, ZEROFILL column, PK
diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result
index 7db951ccafe..aca19a7f4a9 100644
--- a/mysql-test/main/selectivity.result
+++ b/mysql-test/main/selectivity.result
@@ -10,7 +10,8 @@ set use_stat_tables='preferably';
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
-set histogram_size=0;
+set join_cache_level=2;
+set @@global.histogram_size=0,@@local.histogram_size=0;
set histogram_type='single_prec_hb';
set optimizer_use_condition_selectivity=3;
create table t1 (a int);
@@ -1640,8 +1641,6 @@ drop function f1;
#
# MDEV-19834 Selectivity of an equality condition discounted twice
#
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
@@ -1669,5 +1668,7 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5)
drop table t1;
set use_stat_tables= @save_use_stat_tables;
+set @@histogram_size=@save_histogram_size;
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
# End of 10.1 tests
+set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test
index d911957ddc7..6e40d8dc69d 100644
--- a/mysql-test/main/selectivity.test
+++ b/mysql-test/main/selectivity.test
@@ -1,5 +1,6 @@
--source include/have_stat_tables.inc
--source include/have_sequence.inc
+--source include/default_charset.inc
--disable_warnings
drop table if exists t0,t1,t2,t3;
@@ -9,13 +10,14 @@ select @@global.use_stat_tables;
select @@session.use_stat_tables;
set @save_use_stat_tables=@@use_stat_tables;
-
set use_stat_tables='preferably';
+--source include/default_optimizer_switch.inc
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
-set histogram_size=0;
+set join_cache_level=2;
+set @@global.histogram_size=0,@@local.histogram_size=0;
set histogram_type='single_prec_hb';
# check that statistics on nulls is used
@@ -1108,8 +1110,6 @@ drop function f1;
--echo #
--echo # MDEV-19834 Selectivity of an equality condition discounted twice
--echo #
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
@@ -1125,6 +1125,12 @@ explain extended select * from t1 where a in (17,51,5) and b=2;
drop table t1;
set use_stat_tables= @save_use_stat_tables;
+set @@histogram_size=@save_histogram_size;
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
--echo # End of 10.1 tests
+#
+# Clean up
+#
+--source include/restore_charset.inc
+set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result
index 16f84ff3402..450f9fb9f5c 100644
--- a/mysql-test/main/selectivity_innodb.result
+++ b/mysql-test/main/selectivity_innodb.result
@@ -13,7 +13,8 @@ set use_stat_tables='preferably';
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
-set histogram_size=0;
+set join_cache_level=2;
+set @@global.histogram_size=0,@@local.histogram_size=0;
set histogram_type='single_prec_hb';
set optimizer_use_condition_selectivity=3;
create table t1 (a int);
@@ -1650,8 +1651,6 @@ drop function f1;
#
# MDEV-19834 Selectivity of an equality condition discounted twice
#
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
@@ -1662,25 +1661,27 @@ test.t1 analyze status OK
# Check what info the optimizer has about selectivities
explain extended select * from t1 use index () where a in (17,51,5);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 3.90 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 3.83 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`a` in (17,51,5)
explain extended select * from t1 use index () where b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 5.47 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 5.47 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`b` = 2
# Now, the equality is used for ref access, while the range condition
# gives selectivity data
explain extended select * from t1 where a in (17,51,5) and b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.90 Using where; Using rowid filter
+1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.66 Using where; Using rowid filter
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5)
drop table t1;
set use_stat_tables= @save_use_stat_tables;
+set @@histogram_size=@save_histogram_size;
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
# End of 10.1 tests
+set @@global.histogram_size=@save_histogram_size;
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
set @tmp_ust= @@use_stat_tables;
set @tmp_oucs= @@optimizer_use_condition_selectivity;
@@ -1830,4 +1831,5 @@ drop view v1;
#
set use_stat_tables= @tmp_ust;
set optimizer_use_condition_selectivity= @tmp_oucs;
+set @@global.histogram_size=@save_histogram_size;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/selectivity_innodb.test b/mysql-test/main/selectivity_innodb.test
index f407eb052fe..6c457e2848b 100644
--- a/mysql-test/main/selectivity_innodb.test
+++ b/mysql-test/main/selectivity_innodb.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
# This test is slow on buildbot.
--source include/big_test.inc
+--source include/default_optimizer_switch.inc
SET SESSION STORAGE_ENGINE='InnoDB';
@@ -175,4 +176,5 @@ drop view v1;
set use_stat_tables= @tmp_ust;
set optimizer_use_condition_selectivity= @tmp_oucs;
+set @@global.histogram_size=@save_histogram_size;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/selectivity_no_engine.test b/mysql-test/main/selectivity_no_engine.test
index 270e719e74c..c0f41ca7fb2 100644
--- a/mysql-test/main/selectivity_no_engine.test
+++ b/mysql-test/main/selectivity_no_engine.test
@@ -1,4 +1,5 @@
--source include/have_stat_tables.inc
+--source include/default_optimizer_switch.inc
--echo #
--echo # Engine-agnostic tests for statistics-based selectivity calculations.
diff --git a/mysql-test/main/set_statement.result b/mysql-test/main/set_statement.result
index f3dc0b35ea6..511ecf77357 100644
--- a/mysql-test/main/set_statement.result
+++ b/mysql-test/main/set_statement.result
@@ -1044,19 +1044,11 @@ set @save_slow_query_log= @@slow_query_log;
set @save_log_output= @@log_output;
set statement long_query_time=default for select @@long_query_time;
@@long_query_time
-10.000000
+DEFAULT
set statement log_slow_filter=default for select @@log_slow_filter;
-@@log_slow_filter
-admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
set statement log_slow_verbosity=default for select @@log_slow_verbosity;
-@@log_slow_verbosity
-
set statement log_slow_rate_limit=default for select @@log_slow_rate_limit;
-@@log_slow_rate_limit
-1
set statement slow_query_log=default for select @@slow_query_log;
-@@slow_query_log
-1
truncate table mysql.slow_log;
set slow_query_log= 1;
set global log_output='TABLE';
diff --git a/mysql-test/main/set_statement.test b/mysql-test/main/set_statement.test
index 0687644abc6..12a6ccad8f9 100644
--- a/mysql-test/main/set_statement.test
+++ b/mysql-test/main/set_statement.test
@@ -991,11 +991,17 @@ set @save_long_query_time= @@long_query_time;
set @save_slow_query_log= @@slow_query_log;
set @save_log_output= @@log_output;
+let $long_query_time=`select @@long_query_time`;
+--replace_result $long_query_time DEFAULT
set statement long_query_time=default for select @@long_query_time;
+
+# Disable result log as the results depends on the values of the variables
+--disable_result_log
set statement log_slow_filter=default for select @@log_slow_filter;
set statement log_slow_verbosity=default for select @@log_slow_verbosity;
set statement log_slow_rate_limit=default for select @@log_slow_rate_limit;
set statement slow_query_log=default for select @@slow_query_log;
+--enable_result_log
truncate table mysql.slow_log;
set slow_query_log= 1;
diff --git a/mysql-test/main/show_bad_definer-5553.test b/mysql-test/main/show_bad_definer-5553.test
index 7c7f253ae7d..38b6134826d 100644
--- a/mysql-test/main/show_bad_definer-5553.test
+++ b/mysql-test/main/show_bad_definer-5553.test
@@ -1,4 +1,6 @@
--source include/not_embedded.inc
+--source include/default_charset.inc
+
#
# MDEV-5553 A view or procedure with a non existing definer can block "SHOW TABLE STATUS" with an unclear error message
#
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index 2cc275d9c26..d031c792922 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -1,3 +1,5 @@
+SET @@global.character_set_server= @@session.character_set_server;
+set @@sql_mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
drop table if exists t1,t2;
drop table if exists t1aa,t2aa;
drop database if exists mysqltest;
@@ -444,9 +446,7 @@ table CREATE TABLE `table` (
DROP TABLE `table`;
SET sql_quote_show_create= @old_sql_quote_show_create;
SET sql_mode= @old_sql_mode;
-select @@max_heap_table_size;
-@@max_heap_table_size
-1048576
+set @@max_heap_table_size=1048576;
CREATE TABLE t1 (
a int(11) default NULL,
KEY a USING BTREE (a)
@@ -1583,3 +1583,4 @@ Level Code Message
SHOW CONTRIBUTORS;
SHOW WARNINGS;
Level Code Message
+SET @@global.character_set_server=@save_character_set_server;
diff --git a/mysql-test/main/show_check.test b/mysql-test/main/show_check.test
index 18826f31fed..38bcb5f14e7 100644
--- a/mysql-test/main/show_check.test
+++ b/mysql-test/main/show_check.test
@@ -17,6 +17,11 @@
# depends on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc
+# Test results assumes we are using latin1
+--source include/default_charset.inc
+SET @@global.character_set_server= @@session.character_set_server;
+set @@sql_mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
+
#
# Test of some show commands
#
@@ -261,7 +266,7 @@ SET sql_mode= @old_sql_mode;
# Test for Bug#2719 Heap tables status shows wrong or missing data.
#
-select @@max_heap_table_size;
+set @@max_heap_table_size=1048576;
CREATE TABLE t1 (
a int(11) default NULL,
@@ -1406,3 +1411,5 @@ SHOW WARNINGS;
SHOW CONTRIBUTORS;
--enable_result_log
SHOW WARNINGS;
+
+SET @@global.character_set_server=@save_character_set_server;
diff --git a/mysql-test/main/sp-anchor-type.test b/mysql-test/main/sp-anchor-type.test
index 7f952d626e0..b340cf776c5 100644
--- a/mysql-test/main/sp-anchor-type.test
+++ b/mysql-test/main/sp-anchor-type.test
@@ -1,3 +1,4 @@
+--source include/default_charset.inc
--echo #
--echo # Start of 10.3 tests
diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test
index 475d677b820..95a7372a6f2 100644
--- a/mysql-test/main/sp-error.test
+++ b/mysql-test/main/sp-error.test
@@ -2,6 +2,8 @@
# Stored PROCEDURE error tests
#
+--source include/default_charset.inc
+
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result
index 662d52902d0..217fae0538e 100644
--- a/mysql-test/main/sp-security.result
+++ b/mysql-test/main/sp-security.result
@@ -1,3 +1,4 @@
+set @@global.character_set_server=@@session.character_set_server;
connect con1root,localhost,root,,;
connection con1root;
use test;
@@ -800,3 +801,4 @@ disconnect u1;
connection default;
DROP DATABASE u1;
DROP USER u1@localhost;
+set @@global.character_set_server=@save_character_set_server;
diff --git a/mysql-test/main/sp-security.test b/mysql-test/main/sp-security.test
index 7a87fae4097..3219f6ef21d 100644
--- a/mysql-test/main/sp-security.test
+++ b/mysql-test/main/sp-security.test
@@ -3,7 +3,9 @@
#
# Can't test with embedded server that doesn't support grants
--- source include/not_embedded.inc
+--source include/not_embedded.inc
+--source include/default_charset.inc
+set @@global.character_set_server=@@session.character_set_server;
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
@@ -1074,3 +1076,5 @@ disconnect u1;
connection default;
DROP DATABASE u1;
DROP USER u1@localhost;
+
+set @@global.character_set_server=@save_character_set_server;
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 62da6359e40..35e58f3ad62 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -1,3 +1,5 @@
+set @save_character_set_client=@@character_set_client;
+set @save_userstat=@@global.userstat, @@global.userstat= 0;
use test;
drop table if exists t1,t2,t3,t4;
drop view if exists v1;
@@ -3346,7 +3348,8 @@ läbel1: begin end|
call bug6063()|
call bug7088_1()|
call bug7088_2()|
-set character set default|
+set @@character_set_client=@save_character_set_client|
+set @@character_set_results=@save_character_set_client|
show create procedure bug6063|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
bug6063 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug6063`()
@@ -6229,7 +6232,8 @@ END|
CALL p1();
áâä
NULL
-SET NAMES default;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
DROP PROCEDURE p1;
drop procedure if exists proc_25411_a;
drop procedure if exists proc_25411_b;
@@ -7622,6 +7626,7 @@ c1 c2 count(c3)
2012-03-01 02:00:00 3 1
DROP PROCEDURE p1;
# End of 5.5 test
+FLUSH USER_STATISTICS;
CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
CALL sp;
Table Op Msg_type Msg_text
@@ -8805,6 +8810,7 @@ Note 1050 Table 't1' already exists
drop procedure p4;
drop table t1;
set @@sql_mode=@save_sql_mode;
+set @@global.userstat= @save_userstat;
#
# MDEV-17363 Compressed columns cannot be restored from dump
# COMPRESSED conflicted between data type and SP label,
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 3e4b3418a2d..9aec4627c2c 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -14,6 +14,11 @@
# Tests that require --with-geometry go into sp_gis.test
# Tests that require multibyte character sets, which are not always available,
# go into separate files (e.g. sp-ucs2.test)
+
+--source include/default_charset.inc
+set @save_character_set_client=@@character_set_client;
+set @save_userstat=@@global.userstat, @@global.userstat= 0;
+
use test;
# Test tables
@@ -4087,7 +4092,8 @@ call bug6063()|
call bug7088_1()|
call bug7088_2()|
-set character set default|
+set @@character_set_client=@save_character_set_client|
+set @@character_set_results=@save_character_set_client|
show create procedure bug6063|
show create procedure bug7088_1|
@@ -7352,7 +7358,8 @@ DELIMITER ;|
CALL p1();
-SET NAMES default;
+set @@character_set_client=@save_character_set_client;
+set @@character_set_results=@save_character_set_client;
DROP PROCEDURE p1;
#
@@ -8228,6 +8235,7 @@ drop procedure p;
#
# Bug#43962 "Packets out of order" calling a SHOW TABLE STATUS
#
+
DELIMITER //;
CREATE DEFINER = 'root'@'localhost' PROCEDURE p1()
NOT DETERMINISTIC
@@ -9057,6 +9065,7 @@ DROP PROCEDURE p1;
--echo # End of 5.5 test
#MDEV-17610
+FLUSH USER_STATISTICS;
CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
CALL sp;
SELECT 1;
@@ -10341,6 +10350,7 @@ call p4();
drop procedure p4;
drop table t1;
set @@sql_mode=@save_sql_mode;
+set @@global.userstat= @save_userstat;
--echo #
--echo # MDEV-17363 Compressed columns cannot be restored from dump
diff --git a/mysql-test/main/ssl-big.test b/mysql-test/main/ssl-big.test
index 59825a148a4..367cbcba2d7 100644
--- a/mysql-test/main/ssl-big.test
+++ b/mysql-test/main/ssl-big.test
@@ -3,6 +3,7 @@
-- source include/have_ssl_communication.inc
-- source include/big_test.inc
+-- source include/have_64bit.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/mysql-test/main/ssl.result b/mysql-test/main/ssl.result
index 8de36f55ecf..00faea58fd2 100644
--- a/mysql-test/main/ssl.result
+++ b/mysql-test/main/ssl.result
@@ -1357,8 +1357,10 @@ fld1 fld1
250503 250505
250504 250505
250505 250505
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
companynr companyname
@@ -1434,7 +1436,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
companynr companynr
37 36
@@ -1443,6 +1445,7 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
+SET @@join_cache_level=@local_join_cache_level;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
fld1 companynr fld3 period
038008 37 reporters 1008
diff --git a/mysql-test/main/ssl.test b/mysql-test/main/ssl.test
index 67db668a1c2..45c903d43d2 100644
--- a/mysql-test/main/ssl.test
+++ b/mysql-test/main/ssl.test
@@ -8,6 +8,8 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
+--source include/default_charset.inc
+
connect (ssl_con,localhost,root,,,,,SSL);
# Check ssl turned on
diff --git a/mysql-test/main/ssl_compress.result b/mysql-test/main/ssl_compress.result
index 4e37cc68a24..d298f8ec6e4 100644
--- a/mysql-test/main/ssl_compress.result
+++ b/mysql-test/main/ssl_compress.result
@@ -1354,8 +1354,10 @@ fld1 fld1
250503 250505
250504 250505
250505 250505
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
companynr companyname
@@ -1431,7 +1433,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
companynr companynr
37 36
@@ -1440,6 +1442,7 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
+SET @@join_cache_level=@local_join_cache_level;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
fld1 companynr fld3 period
038008 37 reporters 1008
diff --git a/mysql-test/main/ssl_compress.test b/mysql-test/main/ssl_compress.test
index 588d4555db8..4e17beb0fba 100644
--- a/mysql-test/main/ssl_compress.test
+++ b/mysql-test/main/ssl_compress.test
@@ -4,6 +4,7 @@
-- source include/have_ssl_communication.inc
-- source include/have_compress.inc
-- source include/not_staging.inc
+--source include/default_optimizer_switch.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/mysql-test/main/stat_tables-enospc.result b/mysql-test/main/stat_tables-enospc.result
index f0d76f04eee..943cbca6bc5 100644
--- a/mysql-test/main/stat_tables-enospc.result
+++ b/mysql-test/main/stat_tables-enospc.result
@@ -2,6 +2,7 @@ call mtr.add_suppression("No space left on device");
create table t1 (a varchar(255), b varchar(255), c varchar(255));
set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
set debug_dbug='+d,simulate_file_write_error';
+set @@max_heap_table_size=128*1024;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device")
diff --git a/mysql-test/main/stat_tables-enospc.test b/mysql-test/main/stat_tables-enospc.test
index 12e42f6adc0..932b2bde302 100644
--- a/mysql-test/main/stat_tables-enospc.test
+++ b/mysql-test/main/stat_tables-enospc.test
@@ -3,6 +3,7 @@
#
# test that ANALYZE TABLE is immediately aborted when going out of disk space
--source include/have_debug.inc
+
call mtr.add_suppression("No space left on device");
create table t1 (a varchar(255), b varchar(255), c varchar(255));
--disable_query_log
@@ -16,8 +17,8 @@ while ($i) {
--enable_query_log
set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
set debug_dbug='+d,simulate_file_write_error';
+set @@max_heap_table_size=128*1024;
--replace_regex /'.*'/'tmp-file'/
analyze table t1;
set debug_dbug='';
drop table t1;
-
diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result
index bbfb3c15b91..161a04478fb 100644
--- a/mysql-test/main/stat_tables.result
+++ b/mysql-test/main/stat_tables.result
@@ -5,9 +5,12 @@ select @@session.use_stat_tables;
@@session.use_stat_tables
COMPLEMENTARY
set @save_use_stat_tables=@@use_stat_tables;
+set @save_histogram_size=@@global.histogram_size;
+set @@global.histogram_size=0,@@local.histogram_size=0;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
-set @tmp_stt_hs=@@histogram_size, @tmp_stt_ht=@@histogram_type;
-set histogram_size=0, histogram_type='single_prec_hb';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -752,7 +755,6 @@ set names utf8;
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=4;
set use_stat_tables=preferably;
-set @save_histogram_size= @@histogram_size;
set histogram_size=255;
create table t1 ( a varchar(255) character set utf8);
insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
@@ -799,10 +801,7 @@ col1
2004-02-29
0000-10-31
drop table t1;
-set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
-set @@histogram_size= @save_histogram_size;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set histogram_size=0;
#
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
#
@@ -858,4 +857,9 @@ select * from t1 where a=1 and b=3;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
drop table t1;
-set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
+set @@global.histogram_size=@save_histogram_size;
+set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@sql_mode= @save_sql_mode;
+set @@use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index b5a804598a4..8dd9c361cd8 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -4,10 +4,13 @@ select @@global.use_stat_tables;
select @@session.use_stat_tables;
set @save_use_stat_tables=@@use_stat_tables;
+set @save_histogram_size=@@global.histogram_size;
+set @@global.histogram_size=0,@@local.histogram_size=0;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
-set @tmp_stt_hs=@@histogram_size, @tmp_stt_ht=@@histogram_type;
-set histogram_size=0, histogram_type='single_prec_hb';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
--disable_warnings
DROP DATABASE IF EXISTS dbt3_s001;
@@ -515,7 +518,6 @@ set names utf8;
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=4;
set use_stat_tables=preferably;
-set @save_histogram_size= @@histogram_size;
set histogram_size=255;
create table t1 ( a varchar(255) character set utf8);
@@ -543,11 +545,7 @@ update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and
select min_value from mysql.column_stats where db_name='test' and table_name='t1';
select * from t1;
drop table t1;
-
-set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
-set @@histogram_size= @save_histogram_size;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set histogram_size=0;
--echo #
--echo # MDEV-17255: New optimizer defaults and ANALYZE TABLE
@@ -590,4 +588,11 @@ select * from mysql.column_stats;
analyze
select * from t1 where a=1 and b=3;
drop table t1;
-set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
+
+set @@global.histogram_size=@save_histogram_size;
+set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@sql_mode= @save_sql_mode;
+set @@use_stat_tables=@save_use_stat_tables;
+
diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result
index c6c0ccad60c..c2f6981fa16 100644
--- a/mysql-test/main/stat_tables_innodb.result
+++ b/mysql-test/main/stat_tables_innodb.result
@@ -13,9 +13,12 @@ select @@session.use_stat_tables;
@@session.use_stat_tables
COMPLEMENTARY
set @save_use_stat_tables=@@use_stat_tables;
+set @save_histogram_size=@@global.histogram_size;
+set @@global.histogram_size=0,@@local.histogram_size=0;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
-set @tmp_stt_hs=@@histogram_size, @tmp_stt_ht=@@histogram_type;
-set histogram_size=0, histogram_type='single_prec_hb';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -784,7 +787,6 @@ set names utf8;
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=4;
set use_stat_tables=preferably;
-set @save_histogram_size= @@histogram_size;
set histogram_size=255;
create table t1 ( a varchar(255) character set utf8);
insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
@@ -831,10 +833,7 @@ col1
2004-02-29
0000-10-31
drop table t1;
-set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
-set @@histogram_size= @save_histogram_size;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set histogram_size=0;
#
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
#
@@ -890,7 +889,12 @@ select * from t1 where a=1 and b=3;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
drop table t1;
-set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
+set @@global.histogram_size=@save_histogram_size;
+set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@sql_mode= @save_sql_mode;
+set @@use_stat_tables=@save_use_stat_tables;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/statistics.result b/mysql-test/main/statistics.result
index bda178214b8..1ba087dd7a1 100644
--- a/mysql-test/main/statistics.result
+++ b/mysql-test/main/statistics.result
@@ -1,7 +1,9 @@
drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables;
-set @save_hist_size=@@histogram_size, @save_hist_type=@@histogram_type;
-set histogram_size=0, histogram_type='single_prec_hb';
+set @save_histogram_size=@@global.histogram_size;
+set @@global.histogram_size=0,@@local.histogram_size=0;
+set @save_hist_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
@@ -1773,7 +1775,7 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
-set histogram_size=@save_hist_size, histogram_type=@save_hist_type;
+set histogram_size=@save_histogram_size, histogram_type=@save_hist_type;
#
# Start of 10.4 tests
#
@@ -1782,7 +1784,6 @@ set histogram_size=@save_hist_size, histogram_type=@save_hist_type;
#
set @save_use_stat_tables=@@use_stat_tables;
set @save_analyze_sample_percentage=@@analyze_sample_percentage;
-set @save_hist_size=@@histogram_size;
set session rand_seed1=42;
set session rand_seed2=62;
set use_stat_tables=PREFERABLY;
@@ -1879,5 +1880,6 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 229376
drop table t1;
set analyze_sample_percentage=@save_analyze_sample_percentage;
-set histogram_size=@save_hist_size;
+set histogram_size=@save_histogram_size;
set use_stat_tables=@save_use_stat_tables;
+set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test
index d1546be6bf5..1f99aaa33e5 100644
--- a/mysql-test/main/statistics.test
+++ b/mysql-test/main/statistics.test
@@ -5,8 +5,11 @@ drop table if exists t1,t2;
--enable_warnings
set @save_use_stat_tables=@@use_stat_tables;
-set @save_hist_size=@@histogram_size, @save_hist_type=@@histogram_type;
-set histogram_size=0, histogram_type='single_prec_hb';
+set @save_histogram_size=@@global.histogram_size;
+set @@global.histogram_size=0,@@local.histogram_size=0;
+set @save_hist_type=@@histogram_type;
+set histogram_type='single_prec_hb';
+
DELETE FROM mysql.table_stats;
--sorted_result
DELETE FROM mysql.column_stats;
@@ -914,7 +917,7 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
-set histogram_size=@save_hist_size, histogram_type=@save_hist_type;
+set histogram_size=@save_histogram_size, histogram_type=@save_hist_type;
@@ -927,7 +930,6 @@ set histogram_size=@save_hist_size, histogram_type=@save_hist_type;
--echo #
set @save_use_stat_tables=@@use_stat_tables;
set @save_analyze_sample_percentage=@@analyze_sample_percentage;
-set @save_hist_size=@@histogram_size;
set session rand_seed1=42;
set session rand_seed2=62;
@@ -1005,5 +1007,6 @@ explain select * from t1;
drop table t1;
set analyze_sample_percentage=@save_analyze_sample_percentage;
-set histogram_size=@save_hist_size;
+set histogram_size=@save_histogram_size;
set use_stat_tables=@save_use_stat_tables;
+set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
index 5e446a171fe..ae75f5f354e 100644
--- a/mysql-test/main/subselect.result
+++ b/mysql-test/main/subselect.result
@@ -5,7 +5,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=1;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index 7ed423edf96..5389e5da5cd 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -26,7 +26,8 @@ if (`select @join_cache_level_for_subselect_test is not null`)
{
set join_cache_level=@join_cache_level_for_subselect_test;
}
- set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
explain extended select (select 2);
diff --git a/mysql-test/main/subselect2.result b/mysql-test/main/subselect2.result
index 0e71f22e52e..a3d7fda7abc 100644
--- a/mysql-test/main/subselect2.result
+++ b/mysql-test/main/subselect2.result
@@ -383,7 +383,7 @@ key_code value_string
DEALLOCATE PREPARE stmt;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
-set optimizer_switch=@subselect2_test_tmp;
+set optimizer_switch=@save_optimizer_switch;
create table t1 (a int);
create table t2 (a int);
create table t3(a int);
diff --git a/mysql-test/main/subselect2.test b/mysql-test/main/subselect2.test
index 5f7e5f80626..3b982b8b7d0 100644
--- a/mysql-test/main/subselect2.test
+++ b/mysql-test/main/subselect2.test
@@ -7,6 +7,7 @@
--disable_warnings
drop table if exists t1, t2, t3, t4;
--enable_warnings
+--source include/default_optimizer_switch.inc
set @subselect2_test_tmp=@@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
@@ -396,7 +397,7 @@ DEALLOCATE PREPARE stmt;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
-set optimizer_switch=@subselect2_test_tmp;
+set optimizer_switch=@save_optimizer_switch;
#
# Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS
diff --git a/mysql-test/main/subselect3.inc b/mysql-test/main/subselect3.inc
new file mode 100644
index 00000000000..8ed1c9ee210
--- /dev/null
+++ b/mysql-test/main/subselect3.inc
@@ -0,0 +1,1306 @@
+--disable_warnings
+drop table if exists t0, t1, t2, t3, t4, t5, t11, t12, t21, t22;
+--enable_warnings
+
+set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on';
+
+#
+# 1. Subquery with GROUP/HAVING
+#
+create table t1 (oref int, grp int, ie int) ;
+insert into t1 (oref, grp, ie) values
+ (1, 1, 1),
+ (1, 1, 1),
+ (1, 2, NULL),
+
+ (2, 1, 3),
+
+ (3, 1, 4),
+ (3, 2, NULL);
+
+# Ok, for
+# select max(ie) from t1 where oref=PARAM group by grp
+# we'll have:
+# PARAM subquery result
+# 1 -> {(1), (NULL)} matching + NULL
+# 2 -> {(3)} non-matching
+# 3 -> {(3), (NULL)} non-matching + NULL
+# 4 -> {} empty set
+
+create table t2 (oref int, a int);
+insert into t2 values
+ (1, 1),
+ (2, 2),
+ (3, 3),
+ (4, NULL),
+ (2, NULL);
+
+# true, false, null, false, null
+select a, oref, a in (select max(ie)
+ from t1 where oref=t2.oref group by grp) Z from t2;
+
+# This must have a trigcond
+explain extended
+select a, oref, a in (select max(ie)
+ from t1 where oref=t2.oref group by grp) Z from t2;
+
+# This must not have a trigcond:
+explain extended
+select a, oref from t2
+where a in (select max(ie) from t1 where oref=t2.oref group by grp);
+select a, oref, a in (
+ select max(ie) from t1 where oref=t2.oref group by grp union
+ select max(ie) from t1 where oref=t2.oref group by grp
+ ) Z from t2;
+
+# Non-correlated subquery, 2 NULL evaluations
+create table t3 (a int);
+insert into t3 values (NULL), (NULL);
+flush status;
+select a in (select max(ie) from t1 where oref=4 group by grp) from t3;
+show status like 'Handler_read_rnd_next';
+select ' ^ This must show 11' Z;
+
+set @save_optimizer_switch=@@optimizer_switch;
+set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off";
+
+# This must show trigcond:
+explain extended select a in (select max(ie) from t1 where oref=4 group by grp) from t3;
+
+set @@optimizer_switch=@save_optimizer_switch;
+drop table t1, t2, t3;
+
+#
+# 2. Subquery handled with 'index_subquery':
+#
+create table t1 (a int, oref int, key(a));
+insert into t1 values
+ (1, 1),
+ (1, NULL),
+ (2, 3),
+ (2, NULL),
+ (3, NULL);
+insert into t1 values (5, 7), (8, 9), (4, 1);
+
+create table t2 (a int, oref int);
+insert into t2 values (1, 1), (2,2), (NULL, 3), (NULL, 4);
+
+select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
+
+# The next explain shows "using index" but that is just incorrect display
+# (there is a bug filed about this).
+explain extended
+select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
+
+flush status;
+select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
+# This will only show access to t2:
+show status like '%Handler_read_rnd_next';
+
+# Check that repeated NULL-scans are not cached (subq. is not correlated):
+delete from t2;
+insert into t2 values (NULL, 0),(NULL, 0), (NULL, 0), (NULL, 0);
+
+set optimizer_switch='subquery_cache=off';
+flush status;
+select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
+show status like '%Handler_read%';
+select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z;
+set @@optimizer_switch=@save_optimizer_switch;
+
+drop table t1, t2;
+
+#
+# 3. Subquery handled with 'unique_index_subquery':
+#
+create table t1 (a int, b int, primary key (a));
+insert into t1 values (1,1), (3,1),(100,1);
+
+create table t2 (a int, b int);
+insert into t2 values (1,1),(2,1),(NULL,1),(NULL,0);
+
+select a,b, a in (select a from t1 where t1.b = t2.b) Z from t2 ;
+
+drop table t1, t2;
+
+#
+# 4. Subquery that is a join, with ref access
+#
+create table t1 (a int, b int, key(a));
+insert into t1 values
+ (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+
+create table t2 like t1;
+insert into t2 select * from t1;
+update t2 set b=1;
+
+create table t3 (a int, oref int);
+insert into t3 values (1, 1), (NULL,1), (NULL,0);
+select a, oref,
+ t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
+from t3;
+
+# This must have trigcond in WHERE and HAVING:
+explain extended
+select a, oref,
+ t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
+from t3;
+
+drop table t1, t2, t3;
+
+
+#
+# BUG#24085: Wrong query result for "NULL IN (SELECT ... UNION SELECT ...)"
+#
+
+# case 1: NULL IN (SELECT not_null_val FROM ...) w/o HAVING/GROUP-BY/etc
+create table t1 (a int NOT NULL, b int NOT NULL, key(a));
+insert into t1 values
+ (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+
+create table t2 like t1;
+insert into t2 select * from t1;
+update t2 set b=1;
+
+create table t3 (a int, oref int);
+insert into t3 values (1, 1), (NULL,1), (NULL,0);
+select a, oref,
+ t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
+from t3;
+
+--echo This must show a trig_cond:
+explain extended
+select a, oref,
+ t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
+from t3;
+drop table t1,t2,t3;
+
+
+# case 2: NULL IN (SELECT not_null_val FROM) where SELECT has GROUP BY
+create table t1 (oref int, grp int);
+insert into t1 (oref, grp) values
+ (1, 1),
+ (1, 1);
+
+# Ok, for
+# select count(*) from t1 group by grp having grp=PARAM
+# we'll have:
+# PARAM subuqery result
+# 1 -> {(2)}
+# 2 -> {} - empty set
+create table t2 (oref int, a int);
+insert into t2 values
+ (1, NULL),
+ (2, NULL);
+
+select a, oref,
+ a in (select count(*) from t1 group by grp having grp=t2.oref) Z from t2;
+
+--echo This must show a trig_cond:
+explain extended
+select a, oref,
+ a in (select count(*) from t1 group by grp having grp=t2.oref) Z from t2;
+
+drop table t1, t2;
+
+create table t1 (a int, b int, primary key (a));
+insert into t1 values (1,1), (3,1),(100,1);
+create table t2 (a int, b int);
+insert into t2 values (1,1),(2,1),(NULL,1),(NULL,0);
+
+select a,b, a in (select a from t1 where t1.b = t2.b union select a from
+t1 where t1.b = t2.b) Z from t2 ;
+select a,b, a in (select a from t1 where t1.b = t2.b) Z from t2 ;
+drop table t1, t2;
+
+
+#
+# BUG#24127: Incorrect results of row-based subqueries with NULLs on the left side.
+#
+create table t3 (a int);
+insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 (a int, b int, oref int);
+insert into t2 values (NULL,1, 100), (NULL,2, 100);
+
+create table t1 (a int, b int, c int, key(a,b));
+insert into t1 select 2*A, 2*A, 100 from t3;
+
+# First test index subquery engine
+explain extended select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2;
+select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2;
+
+# Then check that we do turn off 'ref' scans in the subquery
+create table t4 (x int);
+insert into t4 select A.a + 10*B.a from t1 A, t1 B;
+explain extended
+ select a,b, oref,
+ (a,b) in (select a,b from t1,t4 where c=t2.oref) Z
+ from t2;
+select a,b, oref,
+ (a,b) in (select a,b from t1,t4 where c=t2.oref) Z
+from t2;
+
+drop table t1,t2,t3,t4;
+
+# More tests for tricky multi-column cases, where some of pushed-down
+# equalities are used for index lookups and some arent.
+create table t1 (oref char(4), grp int, ie1 int, ie2 int);
+insert into t1 (oref, grp, ie1, ie2) values
+ ('aa', 10, 2, 1),
+ ('aa', 10, 1, 1),
+ ('aa', 20, 2, 1),
+ ('bb', 10, 3, 1),
+ ('cc', 10, 4, 2),
+ ('cc', 20, 3, 2),
+
+ ('ee', 10, 2, 1),
+ ('ee', 10, 1, 2),
+
+ ('ff', 20, 2, 2),
+ ('ff', 20, 1, 2);
+create table t2 (oref char(4), a int, b int);
+insert into t2 values
+ ('ee', NULL, 1),
+ ('bb', 2, 1),
+ ('ff', 2, 2),
+ ('cc', 3, NULL),
+ ('bb', NULL, NULL),
+ ('aa', 1, 1),
+ ('dd', 1, NULL);
+alter table t1 add index idx(ie1,ie2);
+
+# cc 3 NULL NULL
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=3 and b is null ;
+insert into t2 values ('new1', 10,10);
+insert into t1 values ('new1', 1234, 10, NULL);
+# new1, 10, 10, NULL,
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10;
+explain extended
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10;
+drop table t1, t2;
+
+# Now test different column types:
+create table t1 (oref char(4), grp int, ie int);
+insert into t1 (oref, grp, ie) values
+ ('aa', 10, 2),
+ ('aa', 10, 1),
+ ('aa', 20, NULL),
+
+ ('bb', 10, 3),
+
+ ('cc', 10, 4),
+ ('cc', 20, NULL),
+
+ ('ee', 10, NULL),
+ ('ee', 10, NULL),
+
+ ('ff', 20, 2),
+ ('ff', 20, 1);
+
+create table t2 (oref char(4), a int);
+insert into t2 values
+ ('ee', NULL),
+ ('bb', 2),
+ ('ff', 2),
+ ('cc', 3),
+ ('aa', 1),
+ ('dd', NULL),
+ ('bb', NULL);
+
+select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
+
+select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
+
+
+select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
+
+select oref, a from t2 where
+ a in (select min(ie) from t1 where oref=t2.oref group by grp);
+
+select oref, a from t2 where
+ a not in (select min(ie) from t1 where oref=t2.oref group by grp);
+
+#
+update t1 set ie=3 where oref='ff' and ie=1;
+
+select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by
+grp) Z from t2;
+
+
+select oref, a from t2 where a in (select min(ie) from t1 where
+oref=t2.oref group by grp);
+
+select oref, a from t2 where a not in (select min(ie) from t1 where
+oref=t2.oref group by grp);
+
+select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by
+grp having min(ie) > 1) Z from t2;
+
+select oref, a from t2 where a in (select min(ie) from t1 where
+oref=t2.oref group by grp having min(ie) > 1);
+
+select oref, a from t2 where a not in (select min(ie) from t1 where
+oref=t2.oref group by grp having min(ie) > 1);
+
+#
+alter table t1 add index idx(ie);
+
+explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
+
+select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
+
+
+alter table t1 drop index idx;
+alter table t1 add index idx(oref,ie);
+
+explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
+
+select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
+
+explain
+select oref, a,
+ a in (select min(ie) from t1 where oref=t2.oref
+ group by grp having min(ie) > 1) Z
+from t2;
+
+select oref, a,
+ a in (select min(ie) from t1 where oref=t2.oref
+ group by grp having min(ie) > 1) Z
+from t2;
+
+select oref, a from t2 where a in (select min(ie) from t1 where oref=t2.oref
+ group by grp having min(ie) > 1);
+
+select oref, a from t2 where a not in (select min(ie) from t1 where oref=t2.oref
+ group by grp having min(ie) > 1);
+
+drop table t1,t2;
+
+create table t1 (oref char(4), grp int, ie1 int, ie2 int);
+insert into t1 (oref, grp, ie1, ie2) values
+ ('aa', 10, 2, 1),
+ ('aa', 10, 1, 1),
+ ('aa', 20, 2, 1),
+
+ ('bb', 10, 3, 1),
+
+ ('cc', 10, 4, 2),
+ ('cc', 20, 3, 2),
+
+ ('ee', 10, 2, 1),
+ ('ee', 10, 1, 2),
+
+ ('ff', 20, 2, 2),
+ ('ff', 20, 1, 2);
+
+create table t2 (oref char(4), a int, b int);
+insert into t2 values
+ ('ee', NULL, 1),
+ ('bb', 2, 1),
+ ('ff', 2, 2),
+ ('cc', 3, NULL),
+ ('bb', NULL, NULL),
+ ('aa', 1, 1),
+ ('dd', 1, NULL);
+
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
+
+select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
+
+select oref, a, b,
+ (a,b) in (select min(ie1),max(ie2) from t1
+ where oref=t2.oref group by grp) Z
+from t2;
+
+select oref, a, b from t2 where
+ (a,b) in (select min(ie1), max(ie2) from t1 where oref=t2.oref group by grp);
+
+select oref, a, b from t2 where
+ (a,b) not in (select min(ie1), max(ie2) from t1 where oref=t2.oref group by grp);
+
+alter table t1 add index idx(ie1,ie2);
+
+explain select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
+
+select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
+
+explain extended
+select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
+
+drop table t1,t2;
+
+create table t1 (oref char(4), grp int, ie int primary key);
+insert into t1 (oref, grp, ie) values
+ ('aa', 10, 2),
+ ('aa', 10, 1),
+
+ ('bb', 10, 3),
+
+ ('cc', 10, 4),
+ ('cc', 20, 5),
+ ('cc', 10, 6);
+
+create table t2 (oref char(4), a int);
+insert into t2 values
+ ('ee', NULL),
+ ('bb', 2),
+ ('cc', 5),
+ ('cc', 2),
+ ('cc', NULL),
+ ('aa', 1),
+ ('bb', NULL);
+
+explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
+
+select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
+
+select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
+
+explain
+select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
+
+select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
+
+drop table t1,t2;
+
+#
+# BUG#24420: row-based IN suqueries with aggregation when the left operand
+# of the subquery predicate may contain NULL values
+#
+
+create table t1 (a int, b int);
+insert into t1 values (0,0), (2,2), (3,3);
+create table t2 (a int, b int);
+insert into t2 values (1,1), (3,3);
+
+select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1;
+
+insert into t2 values (NULL,4);
+select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1;
+
+drop table t1,t2;
+
+#
+# Bug #24484: Aggregate function used in column list subquery gives erroneous
+# error
+#
+CREATE TABLE t1 (a int, b INT, c CHAR(10) NOT NULL, PRIMARY KEY (a, b));
+INSERT INTO t1 VALUES (1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'),
+ (2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'),(3,3,'j'), (3,2,'k'), (3,1,'l'),
+ (1,9,'m');
+CREATE TABLE t2 (a int, b INT, c CHAR(10) NOT NULL, PRIMARY KEY (a, b));
+INSERT INTO t2 SELECT * FROM t1;
+
+# Gives error, but should work since it is (a, b) is the PK so only one
+# given match possible
+SELECT a, MAX(b), (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b))
+ as test FROM t1 GROUP BY a;
+SELECT * FROM t1 GROUP by t1.a
+ HAVING (MAX(t1.b) > (SELECT MAX(t2.b) FROM t2 WHERE t2.c < t1.c
+ HAVING MAX(t2.b+t1.a) < 10));
+
+SELECT a,b,c FROM t1 WHERE b in (9,3,4) ORDER BY b,c;
+
+SELECT a, MAX(b),
+ (SELECT COUNT(DISTINCT t.c) FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)
+ LIMIT 1)
+ as cnt,
+ (SELECT t.b FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1)
+ as t_b,
+ (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1)
+ as t_b,
+ (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) ORDER BY t.c LIMIT 1)
+ as t_b
+ FROM t1 GROUP BY a;
+
+SELECT a, MAX(b),
+ (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1) as test
+ FROM t1 GROUP BY a;
+
+
+DROP TABLE t1, t2;
+
+# The next three test cases must be executed with the IN=>EXISTS strategy
+set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off";
+
+#
+# Bug #27870: crash of an equijoin query with WHERE condition containing
+# a subquery predicate of the form <join attr> NOT IN (SELECT ...)
+#
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int, PRIMARY KEY(b));
+INSERT INTO t1 VALUES (1), (NULL), (4);
+INSERT INTO t2 VALUES (3), (1),(2), (5), (4), (7), (6);
+
+EXPLAIN EXTENDED
+SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1));
+SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1));
+SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1 WHERE a > 4));
+
+DROP TABLE t1,t2;
+
+#
+# Bug #28375: crash for NOT IN subquery predicate when left operand becomes NULL
+#
+
+CREATE TABLE t1 (id int);
+CREATE TABLE t2 (id int PRIMARY KEY);
+CREATE TABLE t3 (id int PRIMARY KEY, name varchar(10));
+INSERT INTO t1 VALUES (2), (NULL), (3), (1);
+INSERT INTO t2 VALUES (234), (345), (457);
+INSERT INTO t3 VALUES (222,'bbb'), (333,'ccc'), (111,'aaa');
+
+EXPLAIN
+SELECT * FROM t1
+ WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3
+ WHERE t3.name='xxx' AND t2.id=t3.id);
+SELECT * FROM t1
+ WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3
+ WHERE t3.name='xxx' AND t2.id=t3.id);
+
+SELECT (t1.id IN (SELECT t2.id FROM t2,t3
+ WHERE t3.name='xxx' AND t2.id=t3.id)) AS x
+ FROM t1;
+
+DROP TABLE t1,t2,t3;
+
+#
+# Bug #22855: Optimizer doesn't rewrite NOT IN subselects to a correlated
+# subquery
+#
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (1),(-1), (65),(66);
+
+CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
+INSERT INTO t2 VALUES (65),(66);
+
+SELECT a FROM t1 WHERE a NOT IN (65,66);
+SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+
+DROP TABLE t1, t2;
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+#
+# Bug #34763: item_subselect.cc:1235:Item_in_subselect::row_value_transformer:
+# Assertion failed, unexpected error message:
+# ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
+# reference in item list)
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES(1);
+
+CREATE TABLE t2 (placeholder CHAR(11));
+INSERT INTO t2 VALUES("placeholder");
+
+SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a;
+SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a;
+
+DROP TABLE t1, t2;
+
+#
+# Bug #36005: crash in subselect with single row
+# (subselect_single_select_engine::exec)
+#
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 SELECT * FROM t1;
+
+SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0);
+
+DROP TABLE t1, t2;
+
+#
+# Bug 2198
+#
+
+create table t1 (a int, b decimal(13, 3));
+insert into t1 values (1, 0.123);
+select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
+delete from t1;
+load data infile "subselect.out.file.1" into table t1;
+select * from t1;
+drop table t1;
+let $datadir=`select @@datadir`;
+--remove_file $datadir/test/subselect.out.file.1
+
+#
+# Bug #37894: Assertion in init_read_record_seq in handler.h line 1444
+#
+
+CREATE TABLE t1 (
+ pk INT PRIMARY KEY,
+ int_key INT,
+ varchar_key VARCHAR(5) UNIQUE,
+ varchar_nokey VARCHAR(5)
+);
+INSERT INTO t1 VALUES (9, 7,NULL,NULL), (10,8,'p' ,'p');
+
+SELECT varchar_nokey
+FROM t1
+WHERE NULL NOT IN (
+ SELECT INNR.pk FROM t1 AS INNR2
+ LEFT JOIN t1 AS INNR ON ( INNR2.int_key = INNR.int_key )
+ WHERE INNR.varchar_key > 'n{'
+);
+
+DROP TABLE t1;
+
+#
+# Bug #39069: <row constructor> IN <table-subquery> seriously messed up
+#
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (11);
+
+--echo # 2nd and 3rd columns should be same
+SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1 GROUP BY t1.a;
+SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1 GROUP BY t1.a;
+SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1;
+SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1;
+
+# The x alias is used below to workaround bug #40674.
+# Regression tests for sum function on outer column in subselect from dual:
+SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 22), ROW(11, 12) IN (SELECT MAX(x), 22) FROM t1;
+--echo # 2nd and 3rd columns should be same
+EXPLAIN SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1;
+SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1;
+
+DROP TABLE t1;
+
+--echo # both columns should be same
+SELECT ROW(1,2) = (SELECT NULL, NULL), ROW(1,2) IN (SELECT NULL, NULL);
+SELECT ROW(1,2) = (SELECT 1, NULL), ROW(1,2) IN (SELECT 1, NULL);
+SELECT ROW(1,2) = (SELECT NULL, 2), ROW(1,2) IN (SELECT NULL, 2);
+SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1);
+SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1);
+SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2);
+
+#
+# Bug #37362 Crash in do_field_eq
+#
+# Note that currently this test produces wrong output, see MBug#430669.
+#
+CREATE TABLE t1 (a INT, b INT, c INT);
+INSERT INTO t1 VALUES (1,1,1), (1,1,1);
+
+--error 1054
+EXPLAIN EXTENDED
+ SELECT c FROM
+ ( SELECT
+ (SELECT COUNT(a) FROM
+ (SELECT COUNT(b) FROM t1) AS x GROUP BY c
+ ) FROM t1 GROUP BY b
+ ) AS y;
+SHOW WARNINGS;
+
+DROP TABLE t1;
+
+
+--echo End of 5.0 tests
+
+--echo #
+--echo # BUG#36896: Server crash on SELECT FROM DUAL
+--echo #
+create table t1 (a int);
+select 1 as res from dual where (1) in (select * from t1);
+drop table t1;
+
+#
+# BUG#36135 "void Diagnostics_area::set_eof_status(THD*): Assertion `!is_set()' failed."
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (
+ a int(11) default null,
+ b int(11) default null,
+ key (a)
+);
+# produce numbers 0..999
+insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
+
+create table t2 (a int(11) default null);
+insert into t2 values (0),(1);
+
+create table t3 (a int(11) default null);
+insert into t3 values (0),(1);
+
+create table t4 (a int(11) default null);
+insert into t4 values (0),(1);
+
+create table t5 (a int(11) default null);
+insert into t5 values (0),(1),(0),(1);
+
+# this must not fail assertion
+--error 1242
+select * from t2, t3
+where
+ t2.a < 10 and
+ t3.a+1 = 2 and
+ t3.a in (select t1.b from t1
+ where t1.a+1=t1.a+1 and
+ t1.a < (select t4.a+10
+ from t4, t5 limit 2));
+
+drop table t0, t1, t2, t3, t4, t5;
+
+--echo #
+--echo # BUG#48177 - SELECTs with NOT IN subqueries containing NULL
+--echo # values return too many records
+--echo #
+
+CREATE TABLE t1 (
+ i1 int DEFAULT NULL,
+ i2 int DEFAULT NULL
+) ;
+
+INSERT INTO t1 VALUES (1, NULL);
+INSERT INTO t1 VALUES (2, 3);
+INSERT INTO t1 VALUES (4, NULL);
+INSERT INTO t1 VALUES (4, 0);
+INSERT INTO t1 VALUES (NULL, NULL);
+
+CREATE TABLE t2 (
+ i1 int DEFAULT NULL,
+ i2 int DEFAULT NULL
+) ;
+
+INSERT INTO t2 VALUES (4, NULL);
+INSERT INTO t2 VALUES (5, 0);
+
+--echo
+--echo Data in t1
+SELECT i1, i2 FROM t1;
+
+--echo
+--echo Data in subquery (should be filtered out)
+SELECT i1, i2 FROM t2 ORDER BY i1;
+
+FLUSH STATUS;
+set @save_optimizer_switch2=@@optimizer_switch;
+set optimizer_switch='subquery_cache=off';
+
+--echo
+SELECT i1, i2
+FROM t1
+WHERE (i1, i2)
+ NOT IN (SELECT i1, i2 FROM t2);
+
+--echo
+--echo # Check that the subquery only has to be evaluated once
+--echo # for all-NULL values even though there are two (NULL,NULL) records
+--echo # Baseline:
+SHOW STATUS LIKE '%Handler_read_rnd_next';
+
+--echo
+INSERT INTO t1 VALUES (NULL, NULL);
+FLUSH STATUS;
+
+--echo
+SELECT i1, i2
+FROM t1
+WHERE (i1, i2)
+ NOT IN (SELECT i1, i2 FROM t2);
+
+--echo
+--echo # Handler_read_rnd_next should be one more than baseline
+--echo # (read record from t1, but do not read from t2)
+SHOW STATUS LIKE '%Handler_read_rnd_next';
+
+set @@optimizer_switch=@save_optimizer_switch2;
+DROP TABLE t1,t2;
+
+--echo End of 5.1 tests
+
+#
+# Test for the problem with using sj-materialization when subquery's select
+# list element SCOL is covered by equality propagation and has preceding equal
+# column PCOL which belongs to a table within the the semi-join nest: SJM-Scan
+# process should unpack column value not to SCOL but rather to PCOL, as
+# substitute_best_equal has made all conditions to refer to PCOL.
+#
+CREATE TABLE t1 (
+ a int(11) NOT NULL,
+ b int(11) NOT NULL,
+ c datetime default NULL,
+ PRIMARY KEY (a),
+ KEY idx_bc (b,c)
+);
+
+INSERT INTO t1 VALUES
+(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'),
+(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'),
+(406994,67,'2006-02-27 11:26:46'), (256,67,NULL),
+(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL),
+(406988,67,'2006-02-23 17:07:22'), (255,67,NULL),
+(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'),
+(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'),
+(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'),
+(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'),
+(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'),
+(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'),
+(223456,67,NULL),(4101,67,NULL),(1133,67,NULL),
+(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'),
+(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'),
+(154503,67,'2005-10-28 11:52:38');
+
+create table t11 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc;
+create table t12 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc;
+create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc;
+create table t22 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc;
+
+set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch='materialization=off';
+
+update t22 set c = '2005-12-08 15:58:27' where a = 255;
+explain select t21.* from t21,t22 where t21.a = t22.a and
+t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
+select t21.* from t21,t22 where t21.a = t22.a and
+t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+drop table t1, t11, t12, t21, t22;
+
+#
+# Test sj-materialization re-execution. The test isn't meaningful (materialized
+# table stays the same across all executions) because it's hard to create a
+# dataset that would verify correct re-execution without hitting BUG#31480
+#
+create table t1(a int);
+insert into t1 values (0),(1);
+
+set @@optimizer_switch='firstmatch=off,materialization=off';
+explain
+select (select max(Y.a) from t1 Y where a in (select a from t1 Z) and a < X.a) as subq from t1 X;
+select (select max(Y.a) from t1 Y where a in (select a from t1 Z) and a < X.a) as subq from t1 X;
+set @@optimizer_switch=@save_optimizer_switch;
+
+drop table t1;
+
+#
+# Test confluent duplicate weedout
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 as select * from t0;
+insert into t1 select a+10 from t0;
+set @@optimizer_switch='firstmatch=off,materialization=off';
+insert into t0 values(2);
+explain select * from t1 where 2 in (select a from t0);
+select * from t1 where 2 in (select a from t0);
+set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch='materialization=off';
+explain select * from t1 where 2 in (select a from t0);
+select * from t1 where 2 in (select a from t0);
+set @@optimizer_switch=@save_optimizer_switch;
+
+
+set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch='materialization=off';
+
+#
+# FirstMatch referring to a derived table
+#
+set @tmp_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='derived_merge=off,derived_with_keys=off';
+explain select * from (select a from t0) X where a in (select a from t1);
+drop table t0, t1;
+set optimizer_switch=@tmp_optimizer_switch;
+
+#
+# LooseScan: Check if we can pick it together with range access
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (kp1 int, kp2 int, c int, filler char(100), key(kp1, kp2));
+insert into t1 select A.a+10*(B.a+10*C.a), 0, 0, 'filler' from t0 A, t0 B, t0 C;
+insert into t1 select * from t1 where kp1 < 20;
+
+create table t3 (a int);
+insert into t3 select A.a + 10*B.a from t0 A, t0 B;
+
+explain select * from t3 where a in (select kp1 from t1 where kp1<20);
+
+create table t4 (pk int primary key);
+insert into t4 select a from t3;
+
+explain select * from t3 where a in (select t1.kp1 from t1,t4 where kp1<20
+and t4.pk=t1.c);
+
+drop table t1, t3, t4;
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+#
+# Test if we handle duplicate elimination temptable overflowing to disk
+#
+create table t1 (a int) as select * from t0 where a < 5;
+
+set @save_max_heap_table_size=@@max_heap_table_size;
+set @@optimizer_switch='firstmatch=off,materialization=off';
+set @@max_heap_table_size= 16384;
+
+explain select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
+flush status;
+select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
+show status like 'Created_tmp_disk_tables';
+set @save_max_heap_table_size=@@max_heap_table_size;
+set @@optimizer_switch=@save_optimizer_switch;
+drop table t0, t1;
+
+#
+# Materialize + Scan + ref access to the subsequent table based on scanned
+# value
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2(a int);
+insert into t2 values (1),(2);
+create table t3 ( a int , filler char(100), key(a));
+insert into t3 select A.a + 10*B.a, 'filler' from t0 A, t0 B;
+explain select * from t3 where a in (select a from t2) and (a > 5 or a < 10);
+select * from t3 where a in (select a from t2);
+
+drop table t0, t2, t3;
+
+#
+# DATETIME type checks
+#
+set @@optimizer_switch='firstmatch=off,materialization=off';
+create table t1 (a date);
+insert into t1 values ('2008-01-01'),('2008-01-01'),('2008-02-01'),('2008-02-01');
+create table t2 (a int);
+insert into t2 values (1),(2);
+create table t3 (a char(10));
+insert into t3 select * from t1;
+insert into t3 values (1),(2);
+explain select * from t2 where a in (select a from t1);
+explain select * from t2 where a in (select a from t2);
+explain select * from t2 where a in (select a from t3);
+explain select * from t1 where a in (select a from t3);
+drop table t1, t2, t3;
+create table t1 (a decimal);
+insert into t1 values (1),(2);
+explain select * from t1 where a in (select a from t1);
+drop table t1;
+set @@optimizer_switch=@save_optimizer_switch;
+
+set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch='materialization=off';
+
+#
+# SJ-Materialization-scan for non-first table
+#
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 as select * from t1;
+create table t3 (a int, b int, filler char(100), key(a));
+insert into t3 select A.a + 10*B.a, A.a + 10*B.a, 'filler' from t1 A, t1 B, t1 C;
+explain select * from t1, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30) and t1.a =3;
+
+#
+# Verify that straight_join modifier in parent or child prevents flattening
+#
+explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
+explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
+explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
+explain select straight_join * from t2 X, t2 Y
+where X.a in (select straight_join A.a from t1 A, t1 B);
+
+#
+# SJ-Materialization scan + first table being system const table
+#
+create table t0 (a int, b int);
+insert into t0 values(1,1);
+explain select * from t0, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30);
+create table t4 as select a as x, a as y from t1;
+explain select * from t0, t3 where (t3.a, t3.b) in (select x,y from t4) and (t3.a < 10 or t3.a >30);
+drop table t0,t1,t2,t3,t4;
+
+#
+# LooseScan with ref access
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, b int, filler char(100), key(a,b));
+insert into t1 select A.a, B.a, 'filler' from t0 A, t0 B;
+create table t2 as select * from t1;
+
+explain select * from t2 where a in (select b from t1 where a=3);
+explain select * from t2 where (b,a) in (select a,b from t1 where a=3);
+
+drop table t1,t2;
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+#
+# Multi-column sj-materialization with lookups
+#
+create table t1 (a int, b int);
+insert into t1 select a,a from t0;
+create table t2 (a int, b int);
+insert into t2 select A.a + 10*B.a, A.a + 10*B.a from t0 A, t0 B;
+
+set @@optimizer_switch='firstmatch=off,materialization=off';
+explain select * from t1 where (a,b) in (select a,b from t2);
+
+# A smallish test if find_best() still works for semi-join optimization:
+set @save_optimizer_search_depth=@@optimizer_search_depth;
+set @@optimizer_search_depth=63;
+explain select * from t1 where (a,b) in (select a,b from t2);
+set @@optimizer_search_depth=@save_optimizer_search_depth;
+set @@optimizer_switch=@save_optimizer_switch;
+
+drop table t0, t1, t2;
+
+set @@optimizer_switch='materialization=off';
+
+#
+# Primitive SJ-Materialization tests for DECIMAL and DATE
+#
+create table t0 (a decimal(4,2));
+insert into t0 values (10.24), (22.11);
+create table t1 as select * from t0;
+insert into t1 select * from t0;
+explain select * from t0 where a in (select a from t1);
+select * from t0 where a in (select a from t1);
+drop table t0, t1;
+
+create table t0(a date);
+insert into t0 values ('2008-01-01'),('2008-02-02');
+create table t1 as select * from t0;
+insert into t1 select * from t0;
+explain select * from t0 where a in (select a from t1);
+select * from t0 where a in (select a from t1);
+drop table t0, t1;
+
+#
+# Fix a trivial crash with SJ-Materialization lookup, multiple tables in the
+# subquery, and a condition on some of inner tables but not others
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 as select a as a, a as b, a as c from t0 where a < 3;
+create table t2 as select a as a, a as b from t0 where a < 3;
+insert into t2 select * from t2;
+
+explain select * from t1 where (a,b,c) in (select X.a, Y.a, Z.a from t2 X, t2 Y, t2 Z where X.b=33);
+
+drop table t0,t1,t2;
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+--echo
+--echo BUG#37842: Assertion in DsMrr_impl::dsmrr_init, at handler.cc:4307
+--echo
+CREATE TABLE t1 (
+ `pk` int(11) NOT NULL AUTO_INCREMENT,
+ `int_key` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `int_key` (`int_key`)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,9),(2,3),(3,8),(4,6),(5,9),(6,5),(7,5),(8,9),(9,1),(10,10);
+SELECT `pk` FROM t1 AS OUTR WHERE `int_key` = ALL (
+ SELECT `int_key` FROM t1 AS INNR WHERE INNR . `pk` >= 9
+);
+DROP TABLE t1;
+
+--echo
+--echo BUG#40118 Crash when running Batched Key Access and requiring one match for each key
+--echo
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, key(a));
+insert into t1 select * from t0;
+alter table t1 add b int not null, add filler char(200);
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+
+set @save_join_cache_level=@@join_cache_level;
+set join_cache_level=6;
+select * from t0 where t0.a in (select t1.a from t1 where t1.b=0);
+set join_cache_level=@save_join_cache_level;
+drop table t0, t1;
+
+--echo #
+--echo # BUG#32665 Query with dependent subquery is too slow
+--echo #
+create table t1 (
+ idIndividual int primary key
+);
+insert into t1 values (1),(2);
+
+create table t2 (
+ idContact int primary key,
+ contactType int,
+ idObj int
+);
+insert into t2 values (1,1,1),(2,2,2),(3,3,3);
+
+create table t3 (
+ idAddress int primary key,
+ idContact int,
+ postalStripped varchar(100)
+);
+
+insert into t3 values (1,1, 'foo'), (2,2,'bar');
+
+--echo The following must be converted to a semi-join:
+set @save_optimizer_switch=@@optimizer_switch;
+set @@optimizer_switch='materialization=off';
+explain extended SELECT a.idIndividual FROM t1 a
+WHERE a.idIndividual IN
+ ( SELECT c.idObj FROM t3 cona
+ INNER JOIN t2 c ON c.idContact=cona.idContact
+ WHERE cona.postalStripped='T2H3B2'
+ );
+set @@optimizer_switch=@save_optimizer_switch;
+drop table t1,t2,t3;
+
+--echo #
+--echo # BUG#47367 Crash in Name_resolution_context::process_error
+--echo #
+
+SET SESSION optimizer_switch = 'semijoin=off';
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t2 LIKE t1;
+delimiter |;
+CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t1 WHERE f1 IN (SELECT f1 FROM t2); END|
+delimiter ;|
+CALL p1;
+ALTER TABLE t2 CHANGE COLUMN f1 my_column INT;
+CALL p1;
+DROP PROCEDURE p1;
+--echo # Restore the original column list of table t2:
+ALTER TABLE t2 CHANGE COLUMN my_column f1 INT;
+
+SET SESSION optimizer_switch = 'semijoin=on';
+delimiter |;
+--echo # Recreate procedure so that we eliminate any caching effects
+CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t1 WHERE f1 IN (SELECT f1 FROM t2); END|
+delimiter ;|
+CALL p1;
+ALTER TABLE t2 CHANGE COLUMN f1 my_column INT;
+--error ER_BAD_FIELD_ERROR
+CALL p1;
+DROP PROCEDURE p1;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # fix of lp:824425 (prohibiting subqueries in row in
+--echo # left part of IN/ALL/ANY)
+--echo #
+
+CREATE TABLE t1 ( a int) ;
+INSERT INTO t1 VALUES (20),(30);
+
+CREATE TABLE t2 (a int) ;
+INSERT INTO t2 VALUES (3),(9);
+
+CREATE TABLE t3 ( a int, b int) ;
+INSERT INTO t3 VALUES (20,5),(30,6);
+
+set @optimizer_switch_save=@@optimizer_switch;
+SET SESSION optimizer_switch='semijoin=OFF,in_to_exists=OFF,materialization=ON,partial_match_rowid_merge=ON,partial_match_table_scan=OFF';
+
+SELECT * FROM t1
+WHERE (
+ ( SELECT a FROM t2 WHERE a = 9 )
+) NOT IN (
+ SELECT b
+ FROM t3
+);
+explain extended
+SELECT * FROM t1
+WHERE (
+ ( SELECT a FROM t2 WHERE a = 9 )
+) NOT IN (
+ SELECT b
+ FROM t3
+);
+
+--error ER_NOT_SUPPORTED_YET
+SELECT * FROM t1
+WHERE (
+ ( SELECT a FROM t2 WHERE a = 9 ),
+ ( SELECT a FROM t2 WHERE a = 3 )
+) NOT IN (
+ SELECT b , a
+ FROM t3
+);
+set optimizer_switch=@optimizer_switch_save;
+
+drop table t1,t2,t3;
+
+--echo End of 5.3 tests
+
+--echo #
+--echo # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery
+--echo # in the select list
+--echo #
+
+--echo
+CREATE TABLE t1 (
+ i int(11) DEFAULT NULL,
+ v varchar(1) DEFAULT NULL
+);
+
+--echo
+INSERT INTO t1 VALUES (8,'v');
+INSERT INTO t1 VALUES (9,'r');
+INSERT INTO t1 VALUES (NULL,'y');
+
+--echo
+CREATE TABLE t2 (
+ i int(11) DEFAULT NULL,
+ v varchar(1) DEFAULT NULL,
+ KEY i_key (i)
+);
+
+--echo
+INSERT INTO t2 VALUES (NULL,'r');
+INSERT INTO t2 VALUES (0,'c');
+INSERT INTO t2 VALUES (0,'o');
+INSERT INTO t2 VALUES (2,'v');
+INSERT INTO t2 VALUES (7,'c');
+
+--echo
+SELECT i, v, (SELECT COUNT(DISTINCT i)
+ FROM t1
+ WHERE v = t2.v) as subsel
+FROM t2;
+
+--echo
+EXPLAIN EXTENDED
+SELECT i, v, (SELECT COUNT(DISTINCT i)
+ FROM t1
+ WHERE v = t2.v) as subsel
+FROM t2;
+
+DROP TABLE t1,t2;
+
+--echo End of 5.6 tests
diff --git a/mysql-test/main/subselect3.result b/mysql-test/main/subselect3.result
index 3c33182b3ef..5c4544a1b05 100644
--- a/mysql-test/main/subselect3.result
+++ b/mysql-test/main/subselect3.result
@@ -1,7 +1,7 @@
drop table if exists t0, t1, t2, t3, t4, t5, t11, t12, t21, t22;
-set @subselect3_tmp= @@optimizer_switch;
-set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on';
set join_cache_level=1;
+drop table if exists t0, t1, t2, t3, t4, t5, t11, t12, t21, t22;
+set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on';
create table t1 (oref int, grp int, ie int) ;
insert into t1 (oref, grp, ie) values
(1, 1, 1),
@@ -1544,4 +1544,4 @@ Note 1276 Field or reference 'test.t2.v' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`i` AS `i`,`test`.`t2`.`v` AS `v`,<expr_cache><`test`.`t2`.`v`>((/* select#2 */ select count(distinct `test`.`t1`.`i`) from `test`.`t1` where `test`.`t1`.`v` = `test`.`t2`.`v`)) AS `subsel` from `test`.`t2`
DROP TABLE t1,t2;
End of 5.6 tests
-set @@optimizer_switch=@subselect3_tmp;
+# end of 10.2 test
diff --git a/mysql-test/main/subselect3.test b/mysql-test/main/subselect3.test
index 0221315eb35..79034f976a8 100644
--- a/mysql-test/main/subselect3.test
+++ b/mysql-test/main/subselect3.test
@@ -1,1318 +1,10 @@
--disable_warnings
drop table if exists t0, t1, t2, t3, t4, t5, t11, t12, t21, t22;
--enable_warnings
+--source include/default_optimizer_switch.inc
-set @subselect3_tmp= @@optimizer_switch;
-set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on';
-if (`select @join_cache_level_for_subselect3_test is null`)
-{
- set join_cache_level=1;
-}
-if (`select @join_cache_level_for_subselect3_test is not null`)
-{
- set join_cache_level=@join_cache_level_for_subselect3_test;
-}
+set join_cache_level=1;
-#
-# 1. Subquery with GROUP/HAVING
-#
-create table t1 (oref int, grp int, ie int) ;
-insert into t1 (oref, grp, ie) values
- (1, 1, 1),
- (1, 1, 1),
- (1, 2, NULL),
+--source subselect3.inc
- (2, 1, 3),
-
- (3, 1, 4),
- (3, 2, NULL);
-
-# Ok, for
-# select max(ie) from t1 where oref=PARAM group by grp
-# we'll have:
-# PARAM subquery result
-# 1 -> {(1), (NULL)} matching + NULL
-# 2 -> {(3)} non-matching
-# 3 -> {(3), (NULL)} non-matching + NULL
-# 4 -> {} empty set
-
-create table t2 (oref int, a int);
-insert into t2 values
- (1, 1),
- (2, 2),
- (3, 3),
- (4, NULL),
- (2, NULL);
-
-# true, false, null, false, null
-select a, oref, a in (select max(ie)
- from t1 where oref=t2.oref group by grp) Z from t2;
-
-# This must have a trigcond
-explain extended
-select a, oref, a in (select max(ie)
- from t1 where oref=t2.oref group by grp) Z from t2;
-
-# This must not have a trigcond:
-explain extended
-select a, oref from t2
-where a in (select max(ie) from t1 where oref=t2.oref group by grp);
-select a, oref, a in (
- select max(ie) from t1 where oref=t2.oref group by grp union
- select max(ie) from t1 where oref=t2.oref group by grp
- ) Z from t2;
-
-# Non-correlated subquery, 2 NULL evaluations
-create table t3 (a int);
-insert into t3 values (NULL), (NULL);
-flush status;
-select a in (select max(ie) from t1 where oref=4 group by grp) from t3;
-show status like 'Handler_read_rnd_next';
-select ' ^ This must show 11' Z;
-
-set @save_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off";
-
-# This must show trigcond:
-explain extended select a in (select max(ie) from t1 where oref=4 group by grp) from t3;
-
-set @@optimizer_switch=@save_optimizer_switch;
-drop table t1, t2, t3;
-
-#
-# 2. Subquery handled with 'index_subquery':
-#
-create table t1 (a int, oref int, key(a));
-insert into t1 values
- (1, 1),
- (1, NULL),
- (2, 3),
- (2, NULL),
- (3, NULL);
-insert into t1 values (5, 7), (8, 9), (4, 1);
-
-create table t2 (a int, oref int);
-insert into t2 values (1, 1), (2,2), (NULL, 3), (NULL, 4);
-
-select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
-
-# The next explain shows "using index" but that is just incorrect display
-# (there is a bug filed about this).
-explain extended
-select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
-
-flush status;
-select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
-# This will only show access to t2:
-show status like '%Handler_read_rnd_next';
-
-# Check that repeated NULL-scans are not cached (subq. is not correlated):
-delete from t2;
-insert into t2 values (NULL, 0),(NULL, 0), (NULL, 0), (NULL, 0);
-
-set optimizer_switch='subquery_cache=off';
-flush status;
-select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
-show status like '%Handler_read%';
-select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z;
-set @@optimizer_switch=@save_optimizer_switch;
-
-drop table t1, t2;
-
-#
-# 3. Subquery handled with 'unique_index_subquery':
-#
-create table t1 (a int, b int, primary key (a));
-insert into t1 values (1,1), (3,1),(100,1);
-
-create table t2 (a int, b int);
-insert into t2 values (1,1),(2,1),(NULL,1),(NULL,0);
-
-select a,b, a in (select a from t1 where t1.b = t2.b) Z from t2 ;
-
-drop table t1, t2;
-
-#
-# 4. Subquery that is a join, with ref access
-#
-create table t1 (a int, b int, key(a));
-insert into t1 values
- (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-
-create table t2 like t1;
-insert into t2 select * from t1;
-update t2 set b=1;
-
-create table t3 (a int, oref int);
-insert into t3 values (1, 1), (NULL,1), (NULL,0);
-select a, oref,
- t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
-from t3;
-
-# This must have trigcond in WHERE and HAVING:
-explain extended
-select a, oref,
- t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
-from t3;
-
-drop table t1, t2, t3;
-
-
-#
-# BUG#24085: Wrong query result for "NULL IN (SELECT ... UNION SELECT ...)"
-#
-
-# case 1: NULL IN (SELECT not_null_val FROM ...) w/o HAVING/GROUP-BY/etc
-create table t1 (a int NOT NULL, b int NOT NULL, key(a));
-insert into t1 values
- (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-
-create table t2 like t1;
-insert into t2 select * from t1;
-update t2 set b=1;
-
-create table t3 (a int, oref int);
-insert into t3 values (1, 1), (NULL,1), (NULL,0);
-select a, oref,
- t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
-from t3;
-
---echo This must show a trig_cond:
-explain extended
-select a, oref,
- t3.a in (select t1.a from t1, t2 where t1.b=t2.a and t2.b=t3.oref) Z
-from t3;
-drop table t1,t2,t3;
-
-
-# case 2: NULL IN (SELECT not_null_val FROM) where SELECT has GROUP BY
-create table t1 (oref int, grp int);
-insert into t1 (oref, grp) values
- (1, 1),
- (1, 1);
-
-# Ok, for
-# select count(*) from t1 group by grp having grp=PARAM
-# we'll have:
-# PARAM subuqery result
-# 1 -> {(2)}
-# 2 -> {} - empty set
-create table t2 (oref int, a int);
-insert into t2 values
- (1, NULL),
- (2, NULL);
-
-select a, oref,
- a in (select count(*) from t1 group by grp having grp=t2.oref) Z from t2;
-
---echo This must show a trig_cond:
-explain extended
-select a, oref,
- a in (select count(*) from t1 group by grp having grp=t2.oref) Z from t2;
-
-drop table t1, t2;
-
-create table t1 (a int, b int, primary key (a));
-insert into t1 values (1,1), (3,1),(100,1);
-create table t2 (a int, b int);
-insert into t2 values (1,1),(2,1),(NULL,1),(NULL,0);
-
-select a,b, a in (select a from t1 where t1.b = t2.b union select a from
-t1 where t1.b = t2.b) Z from t2 ;
-select a,b, a in (select a from t1 where t1.b = t2.b) Z from t2 ;
-drop table t1, t2;
-
-
-#
-# BUG#24127: Incorrect results of row-based subqueries with NULLs on the left side.
-#
-create table t3 (a int);
-insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t2 (a int, b int, oref int);
-insert into t2 values (NULL,1, 100), (NULL,2, 100);
-
-create table t1 (a int, b int, c int, key(a,b));
-insert into t1 select 2*A, 2*A, 100 from t3;
-
-# First test index subquery engine
-explain extended select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2;
-select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2;
-
-# Then check that we do turn off 'ref' scans in the subquery
-create table t4 (x int);
-insert into t4 select A.a + 10*B.a from t1 A, t1 B;
-explain extended
- select a,b, oref,
- (a,b) in (select a,b from t1,t4 where c=t2.oref) Z
- from t2;
-select a,b, oref,
- (a,b) in (select a,b from t1,t4 where c=t2.oref) Z
-from t2;
-
-drop table t1,t2,t3,t4;
-
-# More tests for tricky multi-column cases, where some of pushed-down
-# equalities are used for index lookups and some arent.
-create table t1 (oref char(4), grp int, ie1 int, ie2 int);
-insert into t1 (oref, grp, ie1, ie2) values
- ('aa', 10, 2, 1),
- ('aa', 10, 1, 1),
- ('aa', 20, 2, 1),
- ('bb', 10, 3, 1),
- ('cc', 10, 4, 2),
- ('cc', 20, 3, 2),
-
- ('ee', 10, 2, 1),
- ('ee', 10, 1, 2),
-
- ('ff', 20, 2, 2),
- ('ff', 20, 1, 2);
-create table t2 (oref char(4), a int, b int);
-insert into t2 values
- ('ee', NULL, 1),
- ('bb', 2, 1),
- ('ff', 2, 2),
- ('cc', 3, NULL),
- ('bb', NULL, NULL),
- ('aa', 1, 1),
- ('dd', 1, NULL);
-alter table t1 add index idx(ie1,ie2);
-
-# cc 3 NULL NULL
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=3 and b is null ;
-insert into t2 values ('new1', 10,10);
-insert into t1 values ('new1', 1234, 10, NULL);
-# new1, 10, 10, NULL,
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10;
-explain extended
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10;
-drop table t1, t2;
-
-# Now test different column types:
-create table t1 (oref char(4), grp int, ie int);
-insert into t1 (oref, grp, ie) values
- ('aa', 10, 2),
- ('aa', 10, 1),
- ('aa', 20, NULL),
-
- ('bb', 10, 3),
-
- ('cc', 10, 4),
- ('cc', 20, NULL),
-
- ('ee', 10, NULL),
- ('ee', 10, NULL),
-
- ('ff', 20, 2),
- ('ff', 20, 1);
-
-create table t2 (oref char(4), a int);
-insert into t2 values
- ('ee', NULL),
- ('bb', 2),
- ('ff', 2),
- ('cc', 3),
- ('aa', 1),
- ('dd', NULL),
- ('bb', NULL);
-
-select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
-
-select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
-
-
-select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
-
-select oref, a from t2 where
- a in (select min(ie) from t1 where oref=t2.oref group by grp);
-
-select oref, a from t2 where
- a not in (select min(ie) from t1 where oref=t2.oref group by grp);
-
-#
-update t1 set ie=3 where oref='ff' and ie=1;
-
-select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by
-grp) Z from t2;
-
-
-select oref, a from t2 where a in (select min(ie) from t1 where
-oref=t2.oref group by grp);
-
-select oref, a from t2 where a not in (select min(ie) from t1 where
-oref=t2.oref group by grp);
-
-select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by
-grp having min(ie) > 1) Z from t2;
-
-select oref, a from t2 where a in (select min(ie) from t1 where
-oref=t2.oref group by grp having min(ie) > 1);
-
-select oref, a from t2 where a not in (select min(ie) from t1 where
-oref=t2.oref group by grp having min(ie) > 1);
-
-#
-alter table t1 add index idx(ie);
-
-explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
-
-select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
-
-
-alter table t1 drop index idx;
-alter table t1 add index idx(oref,ie);
-
-explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
-
-select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
-
-explain
-select oref, a,
- a in (select min(ie) from t1 where oref=t2.oref
- group by grp having min(ie) > 1) Z
-from t2;
-
-select oref, a,
- a in (select min(ie) from t1 where oref=t2.oref
- group by grp having min(ie) > 1) Z
-from t2;
-
-select oref, a from t2 where a in (select min(ie) from t1 where oref=t2.oref
- group by grp having min(ie) > 1);
-
-select oref, a from t2 where a not in (select min(ie) from t1 where oref=t2.oref
- group by grp having min(ie) > 1);
-
-drop table t1,t2;
-
-create table t1 (oref char(4), grp int, ie1 int, ie2 int);
-insert into t1 (oref, grp, ie1, ie2) values
- ('aa', 10, 2, 1),
- ('aa', 10, 1, 1),
- ('aa', 20, 2, 1),
-
- ('bb', 10, 3, 1),
-
- ('cc', 10, 4, 2),
- ('cc', 20, 3, 2),
-
- ('ee', 10, 2, 1),
- ('ee', 10, 1, 2),
-
- ('ff', 20, 2, 2),
- ('ff', 20, 1, 2);
-
-create table t2 (oref char(4), a int, b int);
-insert into t2 values
- ('ee', NULL, 1),
- ('bb', 2, 1),
- ('ff', 2, 2),
- ('cc', 3, NULL),
- ('bb', NULL, NULL),
- ('aa', 1, 1),
- ('dd', 1, NULL);
-
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
-
-select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
-
-select oref, a, b,
- (a,b) in (select min(ie1),max(ie2) from t1
- where oref=t2.oref group by grp) Z
-from t2;
-
-select oref, a, b from t2 where
- (a,b) in (select min(ie1), max(ie2) from t1 where oref=t2.oref group by grp);
-
-select oref, a, b from t2 where
- (a,b) not in (select min(ie1), max(ie2) from t1 where oref=t2.oref group by grp);
-
-alter table t1 add index idx(ie1,ie2);
-
-explain select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, b from t2 where (a,b) in (select ie1,ie2 from t1 where oref=t2.oref);
-
-select oref, a, b from t2 where (a,b) not in (select ie1,ie2 from t1 where oref=t2.oref);
-
-explain extended
-select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2;
-
-drop table t1,t2;
-
-create table t1 (oref char(4), grp int, ie int primary key);
-insert into t1 (oref, grp, ie) values
- ('aa', 10, 2),
- ('aa', 10, 1),
-
- ('bb', 10, 3),
-
- ('cc', 10, 4),
- ('cc', 20, 5),
- ('cc', 10, 6);
-
-create table t2 (oref char(4), a int);
-insert into t2 values
- ('ee', NULL),
- ('bb', 2),
- ('cc', 5),
- ('cc', 2),
- ('cc', NULL),
- ('aa', 1),
- ('bb', NULL);
-
-explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
-
-select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
-
-select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
-
-explain
-select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
-
-select oref, a, a in (select min(ie) from t1 where oref=t2.oref group by grp) Z from t2;
-
-drop table t1,t2;
-
-#
-# BUG#24420: row-based IN suqueries with aggregation when the left operand
-# of the subquery predicate may contain NULL values
-#
-
-create table t1 (a int, b int);
-insert into t1 values (0,0), (2,2), (3,3);
-create table t2 (a int, b int);
-insert into t2 values (1,1), (3,3);
-
-select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1;
-
-insert into t2 values (NULL,4);
-select a, b, (a,b) in (select a, min(b) from t2 group by a) Z from t1;
-
-drop table t1,t2;
-
-#
-# Bug #24484: Aggregate function used in column list subquery gives erroneous
-# error
-#
-CREATE TABLE t1 (a int, b INT, c CHAR(10) NOT NULL, PRIMARY KEY (a, b));
-INSERT INTO t1 VALUES (1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'),
- (2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'),(3,3,'j'), (3,2,'k'), (3,1,'l'),
- (1,9,'m');
-CREATE TABLE t2 (a int, b INT, c CHAR(10) NOT NULL, PRIMARY KEY (a, b));
-INSERT INTO t2 SELECT * FROM t1;
-
-# Gives error, but should work since it is (a, b) is the PK so only one
-# given match possible
-SELECT a, MAX(b), (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b))
- as test FROM t1 GROUP BY a;
-SELECT * FROM t1 GROUP by t1.a
- HAVING (MAX(t1.b) > (SELECT MAX(t2.b) FROM t2 WHERE t2.c < t1.c
- HAVING MAX(t2.b+t1.a) < 10));
-
-SELECT a,b,c FROM t1 WHERE b in (9,3,4) ORDER BY b,c;
-
-SELECT a, MAX(b),
- (SELECT COUNT(DISTINCT t.c) FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)
- LIMIT 1)
- as cnt,
- (SELECT t.b FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1)
- as t_b,
- (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1)
- as t_b,
- (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) ORDER BY t.c LIMIT 1)
- as t_b
- FROM t1 GROUP BY a;
-
-SELECT a, MAX(b),
- (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b) LIMIT 1) as test
- FROM t1 GROUP BY a;
-
-
-DROP TABLE t1, t2;
-
-# The next three test cases must be executed with the IN=>EXISTS strategy
-set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off";
-
-#
-# Bug #27870: crash of an equijoin query with WHERE condition containing
-# a subquery predicate of the form <join attr> NOT IN (SELECT ...)
-#
-
-CREATE TABLE t1 (a int);
-CREATE TABLE t2 (b int, PRIMARY KEY(b));
-INSERT INTO t1 VALUES (1), (NULL), (4);
-INSERT INTO t2 VALUES (3), (1),(2), (5), (4), (7), (6);
-
-EXPLAIN EXTENDED
-SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1));
-SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1));
-SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1 WHERE a > 4));
-
-DROP TABLE t1,t2;
-
-#
-# Bug #28375: crash for NOT IN subquery predicate when left operand becomes NULL
-#
-
-CREATE TABLE t1 (id int);
-CREATE TABLE t2 (id int PRIMARY KEY);
-CREATE TABLE t3 (id int PRIMARY KEY, name varchar(10));
-INSERT INTO t1 VALUES (2), (NULL), (3), (1);
-INSERT INTO t2 VALUES (234), (345), (457);
-INSERT INTO t3 VALUES (222,'bbb'), (333,'ccc'), (111,'aaa');
-
-EXPLAIN
-SELECT * FROM t1
- WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3
- WHERE t3.name='xxx' AND t2.id=t3.id);
-SELECT * FROM t1
- WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3
- WHERE t3.name='xxx' AND t2.id=t3.id);
-
-SELECT (t1.id IN (SELECT t2.id FROM t2,t3
- WHERE t3.name='xxx' AND t2.id=t3.id)) AS x
- FROM t1;
-
-DROP TABLE t1,t2,t3;
-
-#
-# Bug #22855: Optimizer doesn't rewrite NOT IN subselects to a correlated
-# subquery
-#
-CREATE TABLE t1 (a INT NOT NULL);
-INSERT INTO t1 VALUES (1),(-1), (65),(66);
-
-CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
-INSERT INTO t2 VALUES (65),(66);
-
-SELECT a FROM t1 WHERE a NOT IN (65,66);
-SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
-EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
-
-DROP TABLE t1, t2;
-
-set @@optimizer_switch=@save_optimizer_switch;
-
-#
-# Bug #34763: item_subselect.cc:1235:Item_in_subselect::row_value_transformer:
-# Assertion failed, unexpected error message:
-# ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
-# reference in item list)
-#
-CREATE TABLE t1 (a INT);
-INSERT INTO t1 VALUES(1);
-
-CREATE TABLE t2 (placeholder CHAR(11));
-INSERT INTO t2 VALUES("placeholder");
-
-SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a;
-SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a;
-
-DROP TABLE t1, t2;
-
-#
-# Bug #36005: crash in subselect with single row
-# (subselect_single_select_engine::exec)
-#
-
-CREATE TABLE t1 (a INT);
-INSERT INTO t1 VALUES (1),(2),(3);
-CREATE TABLE t2 SELECT * FROM t1;
-
-SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0);
-
-DROP TABLE t1, t2;
-
-#
-# Bug 2198
-#
-
-create table t1 (a int, b decimal(13, 3));
-insert into t1 values (1, 0.123);
-select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
-delete from t1;
-load data infile "subselect.out.file.1" into table t1;
-select * from t1;
-drop table t1;
-let $datadir=`select @@datadir`;
---remove_file $datadir/test/subselect.out.file.1
-
-#
-# Bug #37894: Assertion in init_read_record_seq in handler.h line 1444
-#
-
-CREATE TABLE t1 (
- pk INT PRIMARY KEY,
- int_key INT,
- varchar_key VARCHAR(5) UNIQUE,
- varchar_nokey VARCHAR(5)
-);
-INSERT INTO t1 VALUES (9, 7,NULL,NULL), (10,8,'p' ,'p');
-
-SELECT varchar_nokey
-FROM t1
-WHERE NULL NOT IN (
- SELECT INNR.pk FROM t1 AS INNR2
- LEFT JOIN t1 AS INNR ON ( INNR2.int_key = INNR.int_key )
- WHERE INNR.varchar_key > 'n{'
-);
-
-DROP TABLE t1;
-
-#
-# Bug #39069: <row constructor> IN <table-subquery> seriously messed up
-#
-
-CREATE TABLE t1 (a INT);
-INSERT INTO t1 VALUES (1), (2), (11);
-
---echo # 2nd and 3rd columns should be same
-SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1 GROUP BY t1.a;
-SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1 GROUP BY t1.a;
-SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1;
-SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1;
-
-# The x alias is used below to workaround bug #40674.
-# Regression tests for sum function on outer column in subselect from dual:
-SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 22), ROW(11, 12) IN (SELECT MAX(x), 22) FROM t1;
---echo # 2nd and 3rd columns should be same
-EXPLAIN SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1;
-SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1;
-
-DROP TABLE t1;
-
---echo # both columns should be same
-SELECT ROW(1,2) = (SELECT NULL, NULL), ROW(1,2) IN (SELECT NULL, NULL);
-SELECT ROW(1,2) = (SELECT 1, NULL), ROW(1,2) IN (SELECT 1, NULL);
-SELECT ROW(1,2) = (SELECT NULL, 2), ROW(1,2) IN (SELECT NULL, 2);
-SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1);
-SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1);
-SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2);
-
-#
-# Bug #37362 Crash in do_field_eq
-#
-# Note that currently this test produces wrong output, see MBug#430669.
-#
-CREATE TABLE t1 (a INT, b INT, c INT);
-INSERT INTO t1 VALUES (1,1,1), (1,1,1);
-
---error 1054
-EXPLAIN EXTENDED
- SELECT c FROM
- ( SELECT
- (SELECT COUNT(a) FROM
- (SELECT COUNT(b) FROM t1) AS x GROUP BY c
- ) FROM t1 GROUP BY b
- ) AS y;
-SHOW WARNINGS;
-
-DROP TABLE t1;
-
-
---echo End of 5.0 tests
-
---echo #
---echo # BUG#36896: Server crash on SELECT FROM DUAL
---echo #
-create table t1 (a int);
-select 1 as res from dual where (1) in (select * from t1);
-drop table t1;
-
-#
-# BUG#36135 "void Diagnostics_area::set_eof_status(THD*): Assertion `!is_set()' failed."
-#
-create table t0 (a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-
-create table t1 (
- a int(11) default null,
- b int(11) default null,
- key (a)
-);
-# produce numbers 0..999
-insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
-
-create table t2 (a int(11) default null);
-insert into t2 values (0),(1);
-
-create table t3 (a int(11) default null);
-insert into t3 values (0),(1);
-
-create table t4 (a int(11) default null);
-insert into t4 values (0),(1);
-
-create table t5 (a int(11) default null);
-insert into t5 values (0),(1),(0),(1);
-
-# this must not fail assertion
---error 1242
-select * from t2, t3
-where
- t2.a < 10 and
- t3.a+1 = 2 and
- t3.a in (select t1.b from t1
- where t1.a+1=t1.a+1 and
- t1.a < (select t4.a+10
- from t4, t5 limit 2));
-
-drop table t0, t1, t2, t3, t4, t5;
-
---echo #
---echo # BUG#48177 - SELECTs with NOT IN subqueries containing NULL
---echo # values return too many records
---echo #
-
-CREATE TABLE t1 (
- i1 int DEFAULT NULL,
- i2 int DEFAULT NULL
-) ;
-
-INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (2, 3);
-INSERT INTO t1 VALUES (4, NULL);
-INSERT INTO t1 VALUES (4, 0);
-INSERT INTO t1 VALUES (NULL, NULL);
-
-CREATE TABLE t2 (
- i1 int DEFAULT NULL,
- i2 int DEFAULT NULL
-) ;
-
-INSERT INTO t2 VALUES (4, NULL);
-INSERT INTO t2 VALUES (5, 0);
-
---echo
---echo Data in t1
-SELECT i1, i2 FROM t1;
-
---echo
---echo Data in subquery (should be filtered out)
-SELECT i1, i2 FROM t2 ORDER BY i1;
-
-FLUSH STATUS;
-set @save_optimizer_switch2=@@optimizer_switch;
-set optimizer_switch='subquery_cache=off';
-
---echo
-SELECT i1, i2
-FROM t1
-WHERE (i1, i2)
- NOT IN (SELECT i1, i2 FROM t2);
-
---echo
---echo # Check that the subquery only has to be evaluated once
---echo # for all-NULL values even though there are two (NULL,NULL) records
---echo # Baseline:
-SHOW STATUS LIKE '%Handler_read_rnd_next';
-
---echo
-INSERT INTO t1 VALUES (NULL, NULL);
-FLUSH STATUS;
-
---echo
-SELECT i1, i2
-FROM t1
-WHERE (i1, i2)
- NOT IN (SELECT i1, i2 FROM t2);
-
---echo
---echo # Handler_read_rnd_next should be one more than baseline
---echo # (read record from t1, but do not read from t2)
-SHOW STATUS LIKE '%Handler_read_rnd_next';
-
-set @@optimizer_switch=@save_optimizer_switch2;
-DROP TABLE t1,t2;
-
---echo End of 5.1 tests
-
-#
-# Test for the problem with using sj-materialization when subquery's select
-# list element SCOL is covered by equality propagation and has preceding equal
-# column PCOL which belongs to a table within the the semi-join nest: SJM-Scan
-# process should unpack column value not to SCOL but rather to PCOL, as
-# substitute_best_equal has made all conditions to refer to PCOL.
-#
-CREATE TABLE t1 (
- a int(11) NOT NULL,
- b int(11) NOT NULL,
- c datetime default NULL,
- PRIMARY KEY (a),
- KEY idx_bc (b,c)
-);
-
-INSERT INTO t1 VALUES
-(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'),
-(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'),
-(406994,67,'2006-02-27 11:26:46'), (256,67,NULL),
-(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL),
-(406988,67,'2006-02-23 17:07:22'), (255,67,NULL),
-(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'),
-(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'),
-(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'),
-(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'),
-(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'),
-(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'),
-(223456,67,NULL),(4101,67,NULL),(1133,67,NULL),
-(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'),
-(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'),
-(154503,67,'2005-10-28 11:52:38');
-
-create table t11 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc;
-create table t12 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc;
-create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc;
-create table t22 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc;
-
-set @@optimizer_switch=@save_optimizer_switch;
-set @@optimizer_switch='materialization=off';
-
-update t22 set c = '2005-12-08 15:58:27' where a = 255;
-explain select t21.* from t21,t22 where t21.a = t22.a and
-t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
-select t21.* from t21,t22 where t21.a = t22.a and
-t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
-
-set @@optimizer_switch=@save_optimizer_switch;
-
-drop table t1, t11, t12, t21, t22;
-
-#
-# Test sj-materialization re-execution. The test isn't meaningful (materialized
-# table stays the same across all executions) because it's hard to create a
-# dataset that would verify correct re-execution without hitting BUG#31480
-#
-create table t1(a int);
-insert into t1 values (0),(1);
-
-set @@optimizer_switch='firstmatch=off,materialization=off';
-explain
-select (select max(Y.a) from t1 Y where a in (select a from t1 Z) and a < X.a) as subq from t1 X;
-select (select max(Y.a) from t1 Y where a in (select a from t1 Z) and a < X.a) as subq from t1 X;
-set @@optimizer_switch=@save_optimizer_switch;
-
-drop table t1;
-
-#
-# Test confluent duplicate weedout
-#
-create table t0 (a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t1 as select * from t0;
-insert into t1 select a+10 from t0;
-set @@optimizer_switch='firstmatch=off,materialization=off';
-insert into t0 values(2);
-explain select * from t1 where 2 in (select a from t0);
-select * from t1 where 2 in (select a from t0);
-set @@optimizer_switch=@save_optimizer_switch;
-set @@optimizer_switch='materialization=off';
-explain select * from t1 where 2 in (select a from t0);
-select * from t1 where 2 in (select a from t0);
-set @@optimizer_switch=@save_optimizer_switch;
-
-
-set @@optimizer_switch=@save_optimizer_switch;
-set @@optimizer_switch='materialization=off';
-
-#
-# FirstMatch referring to a derived table
-#
-set @tmp_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='derived_merge=off,derived_with_keys=off';
-explain select * from (select a from t0) X where a in (select a from t1);
-drop table t0, t1;
-set optimizer_switch=@tmp_optimizer_switch;
-
-#
-# LooseScan: Check if we can pick it together with range access
-#
-create table t0 (a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-
-create table t1 (kp1 int, kp2 int, c int, filler char(100), key(kp1, kp2));
-insert into t1 select A.a+10*(B.a+10*C.a), 0, 0, 'filler' from t0 A, t0 B, t0 C;
-insert into t1 select * from t1 where kp1 < 20;
-
-create table t3 (a int);
-insert into t3 select A.a + 10*B.a from t0 A, t0 B;
-
-explain select * from t3 where a in (select kp1 from t1 where kp1<20);
-
-create table t4 (pk int primary key);
-insert into t4 select a from t3;
-
-explain select * from t3 where a in (select t1.kp1 from t1,t4 where kp1<20
-and t4.pk=t1.c);
-
-drop table t1, t3, t4;
-
-set @@optimizer_switch=@save_optimizer_switch;
-
-#
-# Test if we handle duplicate elimination temptable overflowing to disk
-#
-create table t1 (a int) as select * from t0 where a < 5;
-
-set @save_max_heap_table_size=@@max_heap_table_size;
-set @@optimizer_switch='firstmatch=off,materialization=off';
-set @@max_heap_table_size= 16384;
-
-explain select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
-flush status;
-select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
-show status like 'Created_tmp_disk_tables';
-set @save_max_heap_table_size=@@max_heap_table_size;
-set @@optimizer_switch=@save_optimizer_switch;
-drop table t0, t1;
-
-#
-# Materialize + Scan + ref access to the subsequent table based on scanned
-# value
-#
-create table t0 (a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t2(a int);
-insert into t2 values (1),(2);
-create table t3 ( a int , filler char(100), key(a));
-insert into t3 select A.a + 10*B.a, 'filler' from t0 A, t0 B;
-explain select * from t3 where a in (select a from t2) and (a > 5 or a < 10);
-select * from t3 where a in (select a from t2);
-
-drop table t0, t2, t3;
-
-#
-# DATETIME type checks
-#
-set @@optimizer_switch='firstmatch=off,materialization=off';
-create table t1 (a date);
-insert into t1 values ('2008-01-01'),('2008-01-01'),('2008-02-01'),('2008-02-01');
-create table t2 (a int);
-insert into t2 values (1),(2);
-create table t3 (a char(10));
-insert into t3 select * from t1;
-insert into t3 values (1),(2);
-explain select * from t2 where a in (select a from t1);
-explain select * from t2 where a in (select a from t2);
-explain select * from t2 where a in (select a from t3);
-explain select * from t1 where a in (select a from t3);
-drop table t1, t2, t3;
-create table t1 (a decimal);
-insert into t1 values (1),(2);
-explain select * from t1 where a in (select a from t1);
-drop table t1;
-set @@optimizer_switch=@save_optimizer_switch;
-
-set @@optimizer_switch=@save_optimizer_switch;
-set @@optimizer_switch='materialization=off';
-
-#
-# SJ-Materialization-scan for non-first table
-#
-create table t1 (a int);
-insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t2 as select * from t1;
-create table t3 (a int, b int, filler char(100), key(a));
-insert into t3 select A.a + 10*B.a, A.a + 10*B.a, 'filler' from t1 A, t1 B, t1 C;
-explain select * from t1, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30) and t1.a =3;
-
-#
-# Verify that straight_join modifier in parent or child prevents flattening
-#
-explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
-explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
-explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
-explain select straight_join * from t2 X, t2 Y
-where X.a in (select straight_join A.a from t1 A, t1 B);
-
-#
-# SJ-Materialization scan + first table being system const table
-#
-create table t0 (a int, b int);
-insert into t0 values(1,1);
-explain select * from t0, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30);
-create table t4 as select a as x, a as y from t1;
-explain select * from t0, t3 where (t3.a, t3.b) in (select x,y from t4) and (t3.a < 10 or t3.a >30);
-drop table t0,t1,t2,t3,t4;
-
-#
-# LooseScan with ref access
-#
-create table t0 (a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t1 (a int, b int, filler char(100), key(a,b));
-insert into t1 select A.a, B.a, 'filler' from t0 A, t0 B;
-create table t2 as select * from t1;
-
-explain select * from t2 where a in (select b from t1 where a=3);
-explain select * from t2 where (b,a) in (select a,b from t1 where a=3);
-
-drop table t1,t2;
-
-set @@optimizer_switch=@save_optimizer_switch;
-
-#
-# Multi-column sj-materialization with lookups
-#
-create table t1 (a int, b int);
-insert into t1 select a,a from t0;
-create table t2 (a int, b int);
-insert into t2 select A.a + 10*B.a, A.a + 10*B.a from t0 A, t0 B;
-
-set @@optimizer_switch='firstmatch=off,materialization=off';
-explain select * from t1 where (a,b) in (select a,b from t2);
-
-# A smallish test if find_best() still works for semi-join optimization:
-set @save_optimizer_search_depth=@@optimizer_search_depth;
-set @@optimizer_search_depth=63;
-explain select * from t1 where (a,b) in (select a,b from t2);
-set @@optimizer_search_depth=@save_optimizer_search_depth;
-set @@optimizer_switch=@save_optimizer_switch;
-
-drop table t0, t1, t2;
-
-set @@optimizer_switch='materialization=off';
-
-#
-# Primitive SJ-Materialization tests for DECIMAL and DATE
-#
-create table t0 (a decimal(4,2));
-insert into t0 values (10.24), (22.11);
-create table t1 as select * from t0;
-insert into t1 select * from t0;
-explain select * from t0 where a in (select a from t1);
-select * from t0 where a in (select a from t1);
-drop table t0, t1;
-
-create table t0(a date);
-insert into t0 values ('2008-01-01'),('2008-02-02');
-create table t1 as select * from t0;
-insert into t1 select * from t0;
-explain select * from t0 where a in (select a from t1);
-select * from t0 where a in (select a from t1);
-drop table t0, t1;
-
-#
-# Fix a trivial crash with SJ-Materialization lookup, multiple tables in the
-# subquery, and a condition on some of inner tables but not others
-#
-create table t0(a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t1 as select a as a, a as b, a as c from t0 where a < 3;
-create table t2 as select a as a, a as b from t0 where a < 3;
-insert into t2 select * from t2;
-
-explain select * from t1 where (a,b,c) in (select X.a, Y.a, Z.a from t2 X, t2 Y, t2 Z where X.b=33);
-
-drop table t0,t1,t2;
-
-set @@optimizer_switch=@save_optimizer_switch;
-
---echo
---echo BUG#37842: Assertion in DsMrr_impl::dsmrr_init, at handler.cc:4307
---echo
-CREATE TABLE t1 (
- `pk` int(11) NOT NULL AUTO_INCREMENT,
- `int_key` int(11) DEFAULT NULL,
- PRIMARY KEY (`pk`),
- KEY `int_key` (`int_key`)
-) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (1,9),(2,3),(3,8),(4,6),(5,9),(6,5),(7,5),(8,9),(9,1),(10,10);
-SELECT `pk` FROM t1 AS OUTR WHERE `int_key` = ALL (
- SELECT `int_key` FROM t1 AS INNR WHERE INNR . `pk` >= 9
-);
-DROP TABLE t1;
-
---echo
---echo BUG#40118 Crash when running Batched Key Access and requiring one match for each key
---echo
-create table t0(a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t1 (a int, key(a));
-insert into t1 select * from t0;
-alter table t1 add b int not null, add filler char(200);
-insert into t1 select * from t1;
-insert into t1 select * from t1;
-
-set @save_join_cache_level=@@join_cache_level;
-set join_cache_level=6;
-select * from t0 where t0.a in (select t1.a from t1 where t1.b=0);
-set join_cache_level=@save_join_cache_level;
-drop table t0, t1;
-
---echo #
---echo # BUG#32665 Query with dependent subquery is too slow
---echo #
-create table t1 (
- idIndividual int primary key
-);
-insert into t1 values (1),(2);
-
-create table t2 (
- idContact int primary key,
- contactType int,
- idObj int
-);
-insert into t2 values (1,1,1),(2,2,2),(3,3,3);
-
-create table t3 (
- idAddress int primary key,
- idContact int,
- postalStripped varchar(100)
-);
-
-insert into t3 values (1,1, 'foo'), (2,2,'bar');
-
---echo The following must be converted to a semi-join:
-set @save_optimizer_switch=@@optimizer_switch;
-set @@optimizer_switch='materialization=off';
-explain extended SELECT a.idIndividual FROM t1 a
-WHERE a.idIndividual IN
- ( SELECT c.idObj FROM t3 cona
- INNER JOIN t2 c ON c.idContact=cona.idContact
- WHERE cona.postalStripped='T2H3B2'
- );
-set @@optimizer_switch=@save_optimizer_switch;
-drop table t1,t2,t3;
-
---echo #
---echo # BUG#47367 Crash in Name_resolution_context::process_error
---echo #
-
-SET SESSION optimizer_switch = 'semijoin=off';
-CREATE TABLE t1 (f1 INTEGER);
-CREATE TABLE t2 LIKE t1;
-delimiter |;
-CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t1 WHERE f1 IN (SELECT f1 FROM t2); END|
-delimiter ;|
-CALL p1;
-ALTER TABLE t2 CHANGE COLUMN f1 my_column INT;
-CALL p1;
-DROP PROCEDURE p1;
---echo # Restore the original column list of table t2:
-ALTER TABLE t2 CHANGE COLUMN my_column f1 INT;
-
-SET SESSION optimizer_switch = 'semijoin=on';
-delimiter |;
---echo # Recreate procedure so that we eliminate any caching effects
-CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t1 WHERE f1 IN (SELECT f1 FROM t2); END|
-delimiter ;|
-CALL p1;
-ALTER TABLE t2 CHANGE COLUMN f1 my_column INT;
---error ER_BAD_FIELD_ERROR
-CALL p1;
-DROP PROCEDURE p1;
-DROP TABLE t1, t2;
-
---echo #
---echo # fix of lp:824425 (prohibiting subqueries in row in
---echo # left part of IN/ALL/ANY)
---echo #
-
-CREATE TABLE t1 ( a int) ;
-INSERT INTO t1 VALUES (20),(30);
-
-CREATE TABLE t2 (a int) ;
-INSERT INTO t2 VALUES (3),(9);
-
-CREATE TABLE t3 ( a int, b int) ;
-INSERT INTO t3 VALUES (20,5),(30,6);
-
-set @optimizer_switch_save=@@optimizer_switch;
-SET SESSION optimizer_switch='semijoin=OFF,in_to_exists=OFF,materialization=ON,partial_match_rowid_merge=ON,partial_match_table_scan=OFF';
-
-SELECT * FROM t1
-WHERE (
- ( SELECT a FROM t2 WHERE a = 9 )
-) NOT IN (
- SELECT b
- FROM t3
-);
-explain extended
-SELECT * FROM t1
-WHERE (
- ( SELECT a FROM t2 WHERE a = 9 )
-) NOT IN (
- SELECT b
- FROM t3
-);
-
---error ER_NOT_SUPPORTED_YET
-SELECT * FROM t1
-WHERE (
- ( SELECT a FROM t2 WHERE a = 9 ),
- ( SELECT a FROM t2 WHERE a = 3 )
-) NOT IN (
- SELECT b , a
- FROM t3
-);
-set optimizer_switch=@optimizer_switch_save;
-
-drop table t1,t2,t3;
-
---echo End of 5.3 tests
-
---echo #
---echo # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery
---echo # in the select list
---echo #
-
---echo
-CREATE TABLE t1 (
- i int(11) DEFAULT NULL,
- v varchar(1) DEFAULT NULL
-);
-
---echo
-INSERT INTO t1 VALUES (8,'v');
-INSERT INTO t1 VALUES (9,'r');
-INSERT INTO t1 VALUES (NULL,'y');
-
---echo
-CREATE TABLE t2 (
- i int(11) DEFAULT NULL,
- v varchar(1) DEFAULT NULL,
- KEY i_key (i)
-);
-
---echo
-INSERT INTO t2 VALUES (NULL,'r');
-INSERT INTO t2 VALUES (0,'c');
-INSERT INTO t2 VALUES (0,'o');
-INSERT INTO t2 VALUES (2,'v');
-INSERT INTO t2 VALUES (7,'c');
-
---echo
-SELECT i, v, (SELECT COUNT(DISTINCT i)
- FROM t1
- WHERE v = t2.v) as subsel
-FROM t2;
-
---echo
-EXPLAIN EXTENDED
-SELECT i, v, (SELECT COUNT(DISTINCT i)
- FROM t1
- WHERE v = t2.v) as subsel
-FROM t2;
-
-DROP TABLE t1,t2;
-
---echo End of 5.6 tests
-
-# The following command must be the last one in the file
-set @@optimizer_switch=@subselect3_tmp;
+--echo # end of 10.2 test
diff --git a/mysql-test/main/subselect3_jcl6.result b/mysql-test/main/subselect3_jcl6.result
index 69f720a95b7..4260676cc37 100644
--- a/mysql-test/main/subselect3_jcl6.result
+++ b/mysql-test/main/subselect3_jcl6.result
@@ -1,17 +1,10 @@
-set @save_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch='optimize_join_buffer_size=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set join_cache_level=6;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 6
-set @join_cache_level_for_subselect3_test=@@join_cache_level;
drop table if exists t0, t1, t2, t3, t4, t5, t11, t12, t21, t22;
-set @subselect3_tmp= @@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on';
-set join_cache_level=@join_cache_level_for_subselect3_test;
create table t1 (oref int, grp int, ie int) ;
insert into t1 (oref, grp, ie) values
(1, 1, 1),
@@ -1554,10 +1547,4 @@ Note 1276 Field or reference 'test.t2.v' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`i` AS `i`,`test`.`t2`.`v` AS `v`,<expr_cache><`test`.`t2`.`v`>((/* select#2 */ select count(distinct `test`.`t1`.`i`) from `test`.`t1` where `test`.`t1`.`v` = `test`.`t2`.`v`)) AS `subsel` from `test`.`t2`
DROP TABLE t1,t2;
End of 5.6 tests
-set @@optimizer_switch=@subselect3_tmp;
-set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
-set @@optimizer_switch=@save_optimizer_switch;
-set @join_cache_level_for_subselect3_test=NULL;
+# end of 10.2 test
diff --git a/mysql-test/main/subselect3_jcl6.test b/mysql-test/main/subselect3_jcl6.test
index 6cbbf10cc2f..e367866733d 100644
--- a/mysql-test/main/subselect3_jcl6.test
+++ b/mysql-test/main/subselect3_jcl6.test
@@ -2,21 +2,14 @@
# Run subselect3.test with BKA enabled
#
-set @save_optimizer_switch=@@optimizer_switch;
+--source include/default_optimizer_switch.inc
+
set @@optimizer_switch='optimize_join_buffer_size=on';
set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-
set join_cache_level=6;
-show variables like 'join_cache_level';
-
-set @join_cache_level_for_subselect3_test=@@join_cache_level;
-
---source subselect3.test
-set join_cache_level=default;
-show variables like 'join_cache_level';
+--source subselect3.inc
-set @@optimizer_switch=@save_optimizer_switch;
-set @join_cache_level_for_subselect3_test=NULL;
+--echo # end of 10.2 test
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index 07fdbc310ff..bc8db41c505 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -1,5 +1,7 @@
# General purpose bug fix tests go here : subselect.test too large
+--source include/default_optimizer_switch.inc
+
--disable_warnings
drop table if exists t0,t1,t2,t3,t4,t5,t6;
drop view if exists v1, v2;
diff --git a/mysql-test/main/subselect_exists2in.test b/mysql-test/main/subselect_exists2in.test
index 5a8ddb3612f..1354953e972 100644
--- a/mysql-test/main/subselect_exists2in.test
+++ b/mysql-test/main/subselect_exists2in.test
@@ -1,3 +1,4 @@
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2,t3;
diff --git a/mysql-test/main/subselect_extra.test b/mysql-test/main/subselect_extra.test
index b76f3f70516..3651aed9aab 100644
--- a/mysql-test/main/subselect_extra.test
+++ b/mysql-test/main/subselect_extra.test
@@ -6,6 +6,7 @@
#
# and get as much subquery testing as possible.
#
+--source include/default_optimizer_switch.inc
--disable_warnings
drop table if exists t1,t2,t3,t4;
diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result
index ee680d40b75..34b58daa50e 100644
--- a/mysql-test/main/subselect_mat.result
+++ b/mysql-test/main/subselect_mat.result
@@ -1,5 +1,4 @@
set @subselect_mat_test_optimizer_switch_value='materialization=on,in_to_exists=off,semijoin=off';
-set @subselect_sj_mat_tmp= @@optimizer_switch;
set optimizer_switch=ifnull(@subselect_mat_test_optimizer_switch_value, 'semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on');
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @optimizer_switch_local_default= @@optimizer_switch;
@@ -218,7 +217,7 @@ a1 a2
1 - 02 2 - 02
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i limit 1,1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='semijoin=off';
prepare st1 from
@@ -251,7 +250,7 @@ execute st1;
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
-set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch=@local_optimizer_switch;
explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 order by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
@@ -1219,7 +1218,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
min(a1)
NULL
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='materialization=off,in_to_exists=on';
explain select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
@@ -1256,7 +1255,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
min(a1)
NULL
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2;
create table t1 (a char(2), b varchar(10));
insert into t1 values ('a', 'aaa');
@@ -1505,7 +1504,7 @@ INSERT INTO t1 (f1, f2) VALUES (10, 1.668);
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1, 1.789);
INSERT INTO t2 VALUES (13, 1.454);
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
@@ -1516,7 +1515,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
COUNT(*)
2
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
DROP TABLE t1, t2;
CREATE TABLE t1 (
pk int,
@@ -1529,7 +1528,7 @@ PRIMARY KEY (pk)
INSERT INTO t1 VALUES (1,'o','ffff','ffff','ffoo'),(2,'f','ffff','ffff','ffff');
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1,'i','iiii','iiii','iiii'),(2,'f','ffff','ffff','ffff');
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0);
@@ -1544,7 +1543,7 @@ SELECT pk FROM t1 WHERE (b,c,d) IN (SELECT b,c,d FROM t2 WHERE pk > 0);
pk
2
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
#
# BUG#50019: Wrong result for IN-subquery with materialization
#
@@ -1560,7 +1559,7 @@ i
2
3
4
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set session optimizer_switch='materialization=off,in_to_exists=on';
select * from t1 where t1.i in (select t2.i from t2 join t3 where t2.i + t3.i = 5);
i
@@ -1568,7 +1567,7 @@ i
2
3
4
-set session optimizer_switch=@save_optimizer_switch;
+set session optimizer_switch=@local_optimizer_switch;
drop table t1, t2, t3;
create table t0 (a int);
insert into t0 values (0),(1),(2);
@@ -1944,7 +1943,7 @@ DROP TABLE t1,t2,t3;
#
# BUG#939009: Crash with aggregate function in IN subquery
#
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on,semijoin=on';
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (7,1), (4,2), (7,7);
@@ -1973,7 +1972,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1
WHERE a IN (SELECT MAX(c) FROM t2 WHERE c < 4) AND b=7 AND (a IS NULL OR a=b);
a b
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
#
# BUG#946055: Crash with semijoin IN subquery when hash join is used
@@ -1984,8 +1983,7 @@ CREATE TABLE t2 (b int, c int, d varchar(1), e varchar(1), KEY (c), KEY (d, c));
INSERT INTO t2 VALUES
(4,2,'v','v'), (6,1,'v','v'), (0,5,'x','x'), (7,1,'x','x'),
(7,3,'i','i'), (7,1,'e','e'), (1,4,'p','p'), (1,2,'j','j');
-SET @save_optimizer_switch=@@optimizer_switch;
-SET @save_join_cache_level=@@join_cache_level;
+SET @local_optimizer_switch=@@optimizer_switch;
SET join_cache_level=2;
EXPLAIN
SELECT a, c FROM t1, t2
@@ -2023,7 +2021,7 @@ a c
7 1
7 1
7 1
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
SET join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
@@ -2076,21 +2074,21 @@ insert into t2 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 3), (6, 3), (7, 3);
delete t2 from t2 where a_id in (select * from (select t1.id from t1 limit 2) as x);
drop table t1,t2;
# This must be at the end:
-set optimizer_switch=@subselect_sj_mat_tmp;
+set optimizer_switch=@save_optimizer_switch;
set join_cache_level=@save_join_cache_level;
#
# MDEV-4908: Assertion `((Item_cond *) cond)->functype() ==
# ((Item_cond *) new_item)->functype()' fails on a query with
# IN and equal conditions, AND/OR, materialization+semijoin
#
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch = 'materialization=on,semijoin=on';
CREATE TABLE t1 (pk INT, a INT, b INT, PRIMARY KEY(pk)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,3,5),(2,4,6);
SELECT * FROM t1 WHERE 8 IN ( SELECT MIN(pk) FROM t1 ) AND ( pk = a OR pk = b );
pk a b
drop table t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
#
# MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queries
#
@@ -2236,7 +2234,7 @@ WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
f2
foo
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
EXPLAIN
SELECT sq1.f2 FROM t1 AS sq1
@@ -2254,7 +2252,7 @@ WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
f2
foo
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1;
#
# MDEV-12145: IN subquery used in WHERE of EXISTS subquery
@@ -2265,7 +2263,7 @@ CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM;
INSERT INTO t2 VALUES (8),(7),(1);
CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
SELECT * FROM t1
WHERE EXISTS ( SELECT * FROM t2, t3
@@ -2292,7 +2290,7 @@ WHERE EXISTS ( SELECT * FROM t2, t3
WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
f1
6
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# MDEV-9686: IN subquery used in WHERE of a subquery from select list
@@ -2324,7 +2322,7 @@ Warnings:
Note 1276 Field or reference 'test.t1.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache><`test`.`t1`.`pk`>((/* select#2 */ select count(0) from `test`.`t2` semi join (`test`.`t2`) where `test`.`t1`.`pk` = `test`.`t2`.`f2`)) AS `sq` from `test`.`t1`
# this checks the result set above
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch= 'materialization=off,semijoin=off';
SELECT pk, f1, ( SELECT COUNT(*) FROM t2
WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
@@ -2334,12 +2332,12 @@ pk f1 sq
3 3 5
4 6 5
5 3 5
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2;
#
# mdev-12838: scan of materialized of semi-join subquery in join
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
CREATE TABLE t1 (
dispatch_group varchar(32),
assignment_group varchar(32),
@@ -2423,7 +2421,7 @@ ec70316637232000158bbfc8bcbe5d60
7b10fd2637232000158bbfc8bcbe5d30
ebb4620037332000158bbfc8bcbe5d89
DROP TABLE t1,t2,t3;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
#
# MDEV-16751: Server crashes in st_join_table::cleanup or
# TABLE_LIST::is_with_table_recursive_reference with join_cache_level>2
@@ -2486,7 +2484,7 @@ a
4189
8732
5
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
SET optimizer_switch='materialization=off';
SELECT t1.a FROM t1
WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5;
@@ -2498,7 +2496,7 @@ WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c
a
5
drop procedure prepare_data;
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2,t3;
CREATE TABLE t1 ( id int NOT NULL, key(id));
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19);
diff --git a/mysql-test/main/subselect_mat_cost.result b/mysql-test/main/subselect_mat_cost.result
index 21ab292e7e5..083917cef7e 100644
--- a/mysql-test/main/subselect_mat_cost.result
+++ b/mysql-test/main/subselect_mat_cost.result
@@ -1,4 +1,3 @@
-set @subselect_mat_cost=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set long_query_time=0.1;
TEST GROUP 1:
@@ -566,4 +565,4 @@ TEST GROUP 2:
Tests of various combinations of optimizer switches, types of queries,
available indexes, column nullability, constness of tables/predicates.
=====================================================================
-set optimizer_switch=@subselect_mat_cost;
+set optimizer_switch=default;
diff --git a/mysql-test/main/subselect_mat_cost.test b/mysql-test/main/subselect_mat_cost.test
index 5f44d0d2bf4..73ba717a8dc 100644
--- a/mysql-test/main/subselect_mat_cost.test
+++ b/mysql-test/main/subselect_mat_cost.test
@@ -13,7 +13,9 @@
# switches, data distribution, available indexes, and typical queries.
#
-set @subselect_mat_cost=@@optimizer_switch;
+--source include/default_optimizer_switch.inc
+--source include/default_charset.inc
+
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
#
# Test logging to slow log (there was some errors in the log files about
@@ -430,4 +432,4 @@ drop database world;
# inner subqyery is materialized while the outer subquery is not (
#IN_EXIST transformation is applied to it)
-set optimizer_switch=@subselect_mat_cost;
+set optimizer_switch=default;
diff --git a/mysql-test/main/subselect_mat_cost_bugs.test b/mysql-test/main/subselect_mat_cost_bugs.test
index 67af6e3a54a..028cdced560 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.test
+++ b/mysql-test/main/subselect_mat_cost_bugs.test
@@ -2,6 +2,7 @@
# Test cases for bugs related to the implementation of
# MWL#89 cost-based choice between the materialization and in-to-exists
#
+--source include/default_optimizer_switch.inc
--echo #
--echo # LP BUG#643424 valgrind warning in choose_subquery_plan()
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index cffe195d3de..d1f3c7a64e4 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -9,7 +9,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=1;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result
index ecd973da09d..cf165182073 100644
--- a/mysql-test/main/subselect_no_mat.result
+++ b/mysql-test/main/subselect_no_mat.result
@@ -12,7 +12,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result
index b4ee1ba6287..202ba61d0e5 100644
--- a/mysql-test/main/subselect_no_opts.result
+++ b/mysql-test/main/subselect_no_opts.result
@@ -8,7 +8,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result
index 318ad02d473..2019555e237 100644
--- a/mysql-test/main/subselect_no_scache.result
+++ b/mysql-test/main/subselect_no_scache.result
@@ -11,7 +11,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result
index f4eadbf46ce..2f84f7cd5b0 100644
--- a/mysql-test/main/subselect_no_semijoin.result
+++ b/mysql-test/main/subselect_no_semijoin.result
@@ -8,7 +8,8 @@ set @subselect_tmp=@@optimizer_switch;
set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
-set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index 7c15cbf721e..3b12ced431e 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -7,7 +7,7 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
SET optimizer_switch=ifnull(@optimizer_switch_for_subselect_sj_test,'outer_join_with_cache=off');
SET optimizer_switch=ifnull(@optimizer_switch_for_subselect_sj_test,'semijoin_with_cache=off');
set join_cache_level=1;
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(a int, b int);
@@ -94,6 +94,7 @@ id select_type tABle type possiBle_keys key key_len ref rows filtered ExtrA
2 MATERIALIZED t10 index PRIMARY PRIMARY 4 NULL 10 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`A` AS `A`,`test`.`t1`.`B` AS `B`,`test`.`t2`.`A` AS `A`,`test`.`t2`.`B` AS `B` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`A` = `test`.`t1`.`A` And <in_optimizer>(`test`.`t1`.`A`,`test`.`t1`.`A` in ( <mAteriAlize> (/* select#2 */ select `test`.`t10`.`pk` from `test`.`t10` ), <primAry_index_lookup>(`test`.`t1`.`A` in <temporAry tABle> on distinct_key where `test`.`t1`.`A` = `<suBquery2>`.`pk`)))) where 1
+set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=8*1024;
we shouldn't flatten if we're going to get a join of > MAX_TABLES.
explain select * from
@@ -186,7 +187,7 @@ a b a b
0 0 0 0
1 1 1 1
2 2 2 2
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
prepare s1 from
' select * from
t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10))
@@ -333,7 +334,7 @@ INSERT INTO WORKS VALUES ('E3','P2',20);
INSERT INTO WORKS VALUES ('E4','P2',20);
INSERT INTO WORKS VALUES ('E4','P4',40);
INSERT INTO WORKS VALUES ('E4','P5',80);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
set optimizer_switch='materialization=off';
explain SELECT EMPNUM, EMPNAME
FROM STAFF
@@ -356,7 +357,7 @@ E1 Alice
E2 Betty
E3 Carmen
E4 Don
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
drop table STAFF,WORKS,PROJ;
# End of bug#45191
#
@@ -444,7 +445,7 @@ COUNT(*)
drop table t1, t2;
drop view v1;
drop procedure p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
# End of bug#46744
Bug#46797 "Crash in fix_semijoin_strategies_for_picked_join_order
@@ -595,7 +596,7 @@ v1field
DROP TABLE t1,t2;
DROP VIEW v1,v2;
DROP PROCEDURE p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
# End of BUG#48834
Bug#49097 subquery with view generates wrong result with
@@ -1076,7 +1077,7 @@ DROP TABLE t3;
# LPBUG#602574: RQG: sql_select.cc:5385: bool greedy_search(JOIN*, table_map, uint,
# uint): Assertion `join->best_read <
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
CREATE TABLE t1 (
varchar_key varchar(1) DEFAULT NULL,
@@ -1110,7 +1111,7 @@ FROM t1 RIGHT JOIN t2 ON t1.varchar_key
)
);
varchar_key
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1, t2, t3;
#
# Bug#46692 "Crash occurring on queries with nested FROM subqueries
@@ -1236,9 +1237,11 @@ DROP TABLE t1, t2, t3;
#
# BUG#53060: LooseScan semijoin strategy does not return all rows
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
+set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
CREATE TABLE t2 (i INTEGER, j INTEGER, KEY k(i, j));
@@ -1253,7 +1256,8 @@ i
1
2
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
+set @@optimizer_use_condition_selectivity=@tmp_optimizer_use_condition_selectivity;
#
# BUG#49453: re-execution of prepared statement with view
# and semijoin crashes
@@ -1296,7 +1300,7 @@ create table t3 (a int);
insert into t1 values(1),(1);
insert into t2 values(1),(1),(1),(1);
insert into t3 values(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
set optimizer_switch='semijoin=off';
explain
@@ -1320,7 +1324,7 @@ select * from t1 where t1.a in (select t2.a from t2 left join t3 on t2.a=t3.a);
a
1
1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
drop table t1,t2,t3;
#
# Bug#55955: crash in MEMORY engine with IN(LEFT JOIN (JOIN))
@@ -1331,7 +1335,7 @@ CREATE TABLE t3 (a INT);
INSERT INTO t1 VALUES(1),(1);
INSERT INTO t2 VALUES(1),(1);
INSERT INTO t3 VALUES(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=off';
EXPLAIN
SELECT * FROM t1
@@ -1380,7 +1384,7 @@ FROM t2 LEFT JOIN (t2 AS t2inner, t3) ON t2.a=t3.a);
a
1
1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2,t3;
#
# BUG#52329 - Wrong result: subquery materialization, IN,
@@ -1398,7 +1402,7 @@ INSERT INTO t2a VALUES ('1 - 11', '2 - 21'),
('1 - 13', '2 - 23');
INSERT INTO t2b SELECT * FROM t2a;
INSERT INTO t2c SELECT * FROM t2a;
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
SELECT * FROM t1
WHERE (a1, a2) IN (
@@ -1420,7 +1424,7 @@ WHERE (a1, a2) IN (
SELECT b1, b2 FROM t2c WHERE b1 > '0');
a1 a2
1 - 12 2 - 22
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2a,t2b,t2c;
#
# Bug#57623: subquery within before insert trigger causes crash (sj=on)
@@ -1433,7 +1437,7 @@ INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
INSERT INTO ot2 VALUES(0),(2),(4),(6);
INSERT INTO ot3 VALUES(0),(3),(6);
INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on';
set optimizer_switch='materialization=off';
explain SELECT *
@@ -1537,7 +1541,7 @@ a a a
6 6 6
7 NULL NULL
deallocate prepare s;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE ot1, ot2, ot3, it1;
#
# Bug#59919/11766739: Crash in tmp_table_param::init() with semijoin=on
@@ -1550,7 +1554,7 @@ INSERT INTO t2 VALUES (1,1), (2,1);
INSERT INTO t3 VALUES
(1,1), (2,1), (5,4), (7,3), (8,2), (8,1), (7,3),
(9,5), (4,3), (7,2), (7,7), (3,1), (5,8), (9,7);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
EXPLAIN
SELECT * FROM t3
@@ -1588,7 +1592,7 @@ f1 f2
2 1
8 1
3 1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1, t2, t3 ;
#
#
@@ -3043,7 +3047,7 @@ DROP TABLE t1,t2,t3;
SET @tmp_mdev5059=@@join_cache_level;
SET join_cache_level = 3;
set @tmp_os_mdev5059= @@optimizer_switch;
-set optimizer_switch=default;
+set optimizer_switch=@local_optimizer_switch;
CREATE TABLE t1 (pk1 INT PRIMARY KEY, i1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,4),(2,5);
CREATE TABLE t2 (i2 INT, c2 CHAR(1)) ENGINE=MyISAM;
diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test
index 13f6bece181..334d16e9c03 100644
--- a/mysql-test/main/subselect_sj.test
+++ b/mysql-test/main/subselect_sj.test
@@ -22,7 +22,7 @@ if (`select @join_cache_level_for_subselect_sj_test is not null`)
}
# The 'default' value within the scope of this test:
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
#
# 1. Subqueries that are converted into semi-joins
@@ -79,6 +79,7 @@ select * from t1 left join (t2 A, t2 B) on ( A.a= t1.a and B.a in (select pk fro
explain extended
select * from t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10));
+set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=8*1024;
--echo we shouldn't flatten if we're going to get a join of > MAX_TABLES.
@@ -99,7 +100,7 @@ select * from
t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10))
where t1.a < 5;
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
#
# Prepared statements
@@ -247,7 +248,7 @@ INSERT INTO WORKS VALUES ('E4','P2',20);
INSERT INTO WORKS VALUES ('E4','P4',40);
INSERT INTO WORKS VALUES ('E4','P5',80);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
set optimizer_switch='materialization=off';
explain SELECT EMPNUM, EMPNAME
@@ -264,7 +265,7 @@ WHERE EMPNUM IN
WHERE PNUM IN
(SELECT PNUM FROM PROJ));
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
drop table STAFF,WORKS,PROJ;
@@ -383,7 +384,7 @@ drop table t1, t2;
drop view v1;
drop procedure p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
--echo # End of bug#46744
@@ -550,7 +551,7 @@ DROP TABLE t1,t2;
DROP VIEW v1,v2;
DROP PROCEDURE p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
--echo # End of BUG#48834
@@ -966,7 +967,7 @@ DROP TABLE t3;
--echo # LPBUG#602574: RQG: sql_select.cc:5385: bool greedy_search(JOIN*, table_map, uint,
--echo # uint): Assertion `join->best_read <
--echo #
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
CREATE TABLE t1 (
varchar_key varchar(1) DEFAULT NULL,
@@ -1002,7 +1003,7 @@ WHERE (SELECT varchar_key FROM t3
FROM t1 RIGHT JOIN t2 ON t1.varchar_key
)
);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1, t2, t3;
--echo #
@@ -1144,9 +1145,11 @@ DROP TABLE t1, t2, t3;
--echo # BUG#53060: LooseScan semijoin strategy does not return all rows
--echo #
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
+set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
@@ -1159,7 +1162,8 @@ SELECT * FROM t1 WHERE (i) IN (SELECT i FROM t2 where j > 0);
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
+set @@optimizer_use_condition_selectivity=@tmp_optimizer_use_condition_selectivity;
--echo #
--echo # BUG#49453: re-execution of prepared statement with view
@@ -1202,7 +1206,7 @@ insert into t1 values(1),(1);
insert into t2 values(1),(1),(1),(1);
insert into t3 values(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
@@ -1216,7 +1220,7 @@ explain
select * from t1 where t1.a in (select t2.a from t2 left join t3 on t2.a=t3.a);
select * from t1 where t1.a in (select t2.a from t2 left join t3 on t2.a=t3.a);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
drop table t1,t2,t3;
@@ -1231,7 +1235,7 @@ INSERT INTO t1 VALUES(1),(1);
INSERT INTO t2 VALUES(1),(1);
INSERT INTO t3 VALUES(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=off';
EXPLAIN
@@ -1260,7 +1264,7 @@ SELECT * FROM t1
WHERE t1.a IN (SELECT t2.a
FROM t2 LEFT JOIN (t2 AS t2inner, t3) ON t2.a=t3.a);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2,t3;
@@ -1286,7 +1290,7 @@ INSERT INTO t2a VALUES ('1 - 11', '2 - 21'),
INSERT INTO t2b SELECT * FROM t2a;
INSERT INTO t2c SELECT * FROM t2a;
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
@@ -1308,7 +1312,7 @@ SELECT * FROM t1
WHERE (a1, a2) IN (
SELECT b1, b2 FROM t2c WHERE b1 > '0');
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2a,t2b,t2c;
@@ -1333,7 +1337,7 @@ FROM ot1
(ot2 JOIN ot3 on ot2.a=ot3.a)
ON ot1.a=ot2.a AND ot1.a IN (SELECT a from it1);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on';
@@ -1353,7 +1357,7 @@ execute s;
execute s;
deallocate prepare s;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE ot1, ot2, ot3, it1;
@@ -1371,7 +1375,7 @@ INSERT INTO t3 VALUES
(1,1), (2,1), (5,4), (7,3), (8,2), (8,1), (7,3),
(9,5), (4,3), (7,2), (7,7), (3,1), (5,8), (9,7);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
EXPLAIN
@@ -1391,7 +1395,7 @@ SELECT * FROM t3
WHERE f2 IN (SELECT t1.f1
FROM t1 LEFT OUTER JOIN (t2 AS b1 JOIN t2 AS b2 ON TRUE) ON TRUE);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1, t2, t3 ;
@@ -2724,7 +2728,7 @@ SET @tmp_mdev5059=@@join_cache_level;
# Any value > 2 will do
SET join_cache_level = 3;
set @tmp_os_mdev5059= @@optimizer_switch;
-set optimizer_switch=default;
+set optimizer_switch=@local_optimizer_switch;
CREATE TABLE t1 (pk1 INT PRIMARY KEY, i1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,4),(2,5);
diff --git a/mysql-test/main/subselect_sj2.result b/mysql-test/main/subselect_sj2.result
index bab21da8243..8045a810e3f 100644
--- a/mysql-test/main/subselect_sj2.result
+++ b/mysql-test/main/subselect_sj2.result
@@ -632,7 +632,7 @@ set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=1;
select * from t2 where filler1 in ( select a from t1);
a b c filler1
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
drop table t1, t2;
create table t1 (a int not null);
drop procedure if exists p1;
diff --git a/mysql-test/main/subselect_sj2.test b/mysql-test/main/subselect_sj2.test
index 8886c42eb55..be2d91571e7 100644
--- a/mysql-test/main/subselect_sj2.test
+++ b/mysql-test/main/subselect_sj2.test
@@ -803,9 +803,9 @@ set join_buffer_size=1;
--enable_warnings
select * from t2 where filler1 in ( select a from t1);
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
-drop table t1, t2;
+drop table t1, t2;
#
# BUG#33509: Server crashes with number of recursive subqueries=61
# (the query may or may not fail with an error so we're using it with SP
diff --git a/mysql-test/main/subselect_sj2_jcl6.result b/mysql-test/main/subselect_sj2_jcl6.result
index ac2d12fc5df..22310ab5361 100644
--- a/mysql-test/main/subselect_sj2_jcl6.result
+++ b/mysql-test/main/subselect_sj2_jcl6.result
@@ -645,7 +645,7 @@ set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=1;
select * from t2 where filler1 in ( select a from t1);
a b c filler1
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
drop table t1, t2;
create table t1 (a int not null);
drop procedure if exists p1;
@@ -1497,10 +1497,6 @@ v v
set optimizer_switch=@tmp_optimizer_switch;
set join_cache_level=default;
DROP TABLE t1,t2;
-set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/subselect_sj2_jcl6.test b/mysql-test/main/subselect_sj2_jcl6.test
index 9be6102a5f9..a0c8a6c0f04 100644
--- a/mysql-test/main/subselect_sj2_jcl6.test
+++ b/mysql-test/main/subselect_sj2_jcl6.test
@@ -110,10 +110,6 @@ set join_cache_level=default;
DROP TABLE t1,t2;
-
-set join_cache_level=default;
-show variables like 'join_cache_level';
-
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result
index e55025f4fa8..7ccaed50251 100644
--- a/mysql-test/main/subselect_sj2_mat.result
+++ b/mysql-test/main/subselect_sj2_mat.result
@@ -634,7 +634,7 @@ set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=1;
select * from t2 where filler1 in ( select a from t1);
a b c filler1
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
drop table t1, t2;
create table t1 (a int not null);
drop procedure if exists p1;
diff --git a/mysql-test/main/subselect_sj2_mat.test b/mysql-test/main/subselect_sj2_mat.test
index 39e03072918..96798ca0e48 100644
--- a/mysql-test/main/subselect_sj2_mat.test
+++ b/mysql-test/main/subselect_sj2_mat.test
@@ -1,6 +1,8 @@
#
# Run subselect_sj2.test with subquery materialization.
#
+--source include/default_optimizer_switch.inc
+
set optimizer_switch='materialization=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result
index 91892156e76..4f451411c2b 100644
--- a/mysql-test/main/subselect_sj_jcl6.result
+++ b/mysql-test/main/subselect_sj_jcl6.result
@@ -5,10 +5,8 @@ set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='join_cache_hashed=off';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @save_join_cache_level=@@join_cache_level;
set join_cache_level=6;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 6
set @optimizer_switch_for_subselect_sj_test=@@optimizer_switch;
set @join_cache_level_for_subselect_sj_test=@@join_cache_level;
drop table if exists t0, t1, t2, t3, t4, t5, t10, t11, t12;
@@ -20,7 +18,7 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
SET optimizer_switch=ifnull(@optimizer_switch_for_subselect_sj_test,'outer_join_with_cache=off');
SET optimizer_switch=ifnull(@optimizer_switch_for_subselect_sj_test,'semijoin_with_cache=off');
set join_cache_level=@join_cache_level_for_subselect_sj_test;
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(a int, b int);
@@ -107,6 +105,7 @@ id select_type tABle type possiBle_keys key key_len ref rows filtered ExtrA
2 MATERIALIZED t10 index PRIMARY PRIMARY 4 NULL 10 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`A` AS `A`,`test`.`t1`.`B` AS `B`,`test`.`t2`.`A` AS `A`,`test`.`t2`.`B` AS `B` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`A` = `test`.`t1`.`A` And <in_optimizer>(`test`.`t1`.`A`,`test`.`t1`.`A` in ( <mAteriAlize> (/* select#2 */ select `test`.`t10`.`pk` from `test`.`t10` ), <primAry_index_lookup>(`test`.`t1`.`A` in <temporAry tABle> on distinct_key where `test`.`t1`.`A` = `<suBquery2>`.`pk`)))) where 1
+set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size=8*1024;
we shouldn't flatten if we're going to get a join of > MAX_TABLES.
explain select * from
@@ -199,7 +198,7 @@ a b a b
0 0 0 0
1 1 1 1
2 2 2 2
-set join_buffer_size=default;
+set join_buffer_size=@save_join_buffer_size;
prepare s1 from
' select * from
t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10))
@@ -346,7 +345,7 @@ INSERT INTO WORKS VALUES ('E3','P2',20);
INSERT INTO WORKS VALUES ('E4','P2',20);
INSERT INTO WORKS VALUES ('E4','P4',40);
INSERT INTO WORKS VALUES ('E4','P5',80);
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
set optimizer_switch='materialization=off';
explain SELECT EMPNUM, EMPNAME
FROM STAFF
@@ -369,7 +368,7 @@ E1 Alice
E2 Betty
E3 Carmen
E4 Don
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
drop table STAFF,WORKS,PROJ;
# End of bug#45191
#
@@ -457,7 +456,7 @@ COUNT(*)
drop table t1, t2;
drop view v1;
drop procedure p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
# End of bug#46744
Bug#46797 "Crash in fix_semijoin_strategies_for_picked_join_order
@@ -608,7 +607,7 @@ v1field
DROP TABLE t1,t2;
DROP VIEW v1,v2;
DROP PROCEDURE p1;
-set SESSION optimizer_switch=@save_optimizer_switch;
+set SESSION optimizer_switch=@local_optimizer_switch;
# End of BUG#48834
Bug#49097 subquery with view generates wrong result with
@@ -1089,7 +1088,7 @@ DROP TABLE t3;
# LPBUG#602574: RQG: sql_select.cc:5385: bool greedy_search(JOIN*, table_map, uint,
# uint): Assertion `join->best_read <
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
CREATE TABLE t1 (
varchar_key varchar(1) DEFAULT NULL,
@@ -1123,7 +1122,7 @@ FROM t1 RIGHT JOIN t2 ON t1.varchar_key
)
);
varchar_key
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1, t2, t3;
#
# Bug#46692 "Crash occurring on queries with nested FROM subqueries
@@ -1249,9 +1248,11 @@ DROP TABLE t1, t2, t3;
#
# BUG#53060: LooseScan semijoin strategy does not return all rows
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
+set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
CREATE TABLE t2 (i INTEGER, j INTEGER, KEY k(i, j));
@@ -1266,7 +1267,8 @@ i
1
2
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
+set @@optimizer_use_condition_selectivity=@tmp_optimizer_use_condition_selectivity;
#
# BUG#49453: re-execution of prepared statement with view
# and semijoin crashes
@@ -1309,7 +1311,7 @@ create table t3 (a int);
insert into t1 values(1),(1);
insert into t2 values(1),(1),(1),(1);
insert into t3 values(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='materialization=off';
set optimizer_switch='semijoin=off';
explain
@@ -1333,7 +1335,7 @@ select * from t1 where t1.a in (select t2.a from t2 left join t3 on t2.a=t3.a);
a
1
1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimizer_switch;
drop table t1,t2,t3;
#
# Bug#55955: crash in MEMORY engine with IN(LEFT JOIN (JOIN))
@@ -1344,7 +1346,7 @@ CREATE TABLE t3 (a INT);
INSERT INTO t1 VALUES(1),(1);
INSERT INTO t2 VALUES(1),(1);
INSERT INTO t3 VALUES(2),(2);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=off';
EXPLAIN
SELECT * FROM t1
@@ -1393,7 +1395,7 @@ FROM t2 LEFT JOIN (t2 AS t2inner, t3) ON t2.a=t3.a);
a
1
1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2,t3;
#
# BUG#52329 - Wrong result: subquery materialization, IN,
@@ -1411,7 +1413,7 @@ INSERT INTO t2a VALUES ('1 - 11', '2 - 21'),
('1 - 13', '2 - 23');
INSERT INTO t2b SELECT * FROM t2a;
INSERT INTO t2c SELECT * FROM t2a;
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
SELECT * FROM t1
WHERE (a1, a2) IN (
@@ -1433,7 +1435,7 @@ WHERE (a1, a2) IN (
SELECT b1, b2 FROM t2c WHERE b1 > '0');
a1 a2
1 - 12 2 - 22
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1,t2a,t2b,t2c;
#
# Bug#57623: subquery within before insert trigger causes crash (sj=on)
@@ -1446,7 +1448,7 @@ INSERT INTO ot1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
INSERT INTO ot2 VALUES(0),(2),(4),(6);
INSERT INTO ot3 VALUES(0),(3),(6);
INSERT INTO it1 VALUES(0),(1),(2),(3),(4),(5),(6),(7);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on';
set optimizer_switch='materialization=off';
explain SELECT *
@@ -1550,7 +1552,7 @@ a a a
5 NULL NULL
7 NULL NULL
deallocate prepare s;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE ot1, ot2, ot3, it1;
#
# Bug#59919/11766739: Crash in tmp_table_param::init() with semijoin=on
@@ -1563,7 +1565,7 @@ INSERT INTO t2 VALUES (1,1), (2,1);
INSERT INTO t3 VALUES
(1,1), (2,1), (5,4), (7,3), (8,2), (8,1), (7,3),
(9,5), (4,3), (7,2), (7,7), (3,1), (5,8), (9,7);
-set @save_optimizer_switch=@@optimizer_switch;
+set @tmp_optimzer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=off,materialization=on';
EXPLAIN
SELECT * FROM t3
@@ -1601,7 +1603,7 @@ f1 f2
2 1
8 1
3 1
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@tmp_optimzer_switch;
DROP TABLE t1, t2, t3 ;
#
#
@@ -3056,7 +3058,7 @@ DROP TABLE t1,t2,t3;
SET @tmp_mdev5059=@@join_cache_level;
SET join_cache_level = 3;
set @tmp_os_mdev5059= @@optimizer_switch;
-set optimizer_switch=default;
+set optimizer_switch=@local_optimizer_switch;
CREATE TABLE t1 (pk1 INT PRIMARY KEY, i1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,4),(2,5);
CREATE TABLE t2 (i2 INT, c2 CHAR(1)) ENGINE=MyISAM;
@@ -3535,10 +3537,7 @@ set optimizer_switch=@tmp_optimizer_switch;
set join_cache_level=@tmp_join_cache_level;
DROP TABLE t1,t2;
# End
-set join_cache_level=default;
-show variables like 'join_cache_level';
-Variable_name Value
-join_cache_level 2
+set join_cache_level=@save_join_cache_level;
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_subselect_sj_test=NULL;
set @join_cache_level_subselect_sj_test=NULL;
diff --git a/mysql-test/main/subselect_sj_jcl6.test b/mysql-test/main/subselect_sj_jcl6.test
index ad4a78bdaa5..179c1aa029b 100644
--- a/mysql-test/main/subselect_sj_jcl6.test
+++ b/mysql-test/main/subselect_sj_jcl6.test
@@ -1,6 +1,7 @@
#
# Run subselect_sj.test with BKA enabled
#
+--source include/default_optimizer_switch.inc
set @save_optimizer_switch_jcl6=@@optimizer_switch;
set @@optimizer_switch='optimize_join_buffer_size=on';
@@ -9,9 +10,8 @@ set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='join_cache_hashed=off';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-
+set @save_join_cache_level=@@join_cache_level;
set join_cache_level=6;
-show variables like 'join_cache_level';
set @optimizer_switch_for_subselect_sj_test=@@optimizer_switch;
set @join_cache_level_for_subselect_sj_test=@@join_cache_level;
@@ -208,9 +208,7 @@ DROP TABLE t1,t2;
--echo # End
-set join_cache_level=default;
-show variables like 'join_cache_level';
-
+set join_cache_level=@save_join_cache_level;
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_subselect_sj_test=NULL;
set @join_cache_level_subselect_sj_test=NULL;
diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result
index 432f6c648fc..afc75a22962 100644
--- a/mysql-test/main/subselect_sj_mat.result
+++ b/mysql-test/main/subselect_sj_mat.result
@@ -1,4 +1,3 @@
-set @subselect_sj_mat_tmp= @@optimizer_switch;
set optimizer_switch=ifnull(@subselect_mat_test_optimizer_switch_value, 'semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on');
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @optimizer_switch_local_default= @@optimizer_switch;
@@ -228,7 +227,7 @@ a1 a2
1 - 02 2 - 02
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i limit 1,1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='semijoin=off';
prepare st1 from
@@ -261,7 +260,7 @@ execute st1;
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
-set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch=@local_optimizer_switch;
explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 order by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
@@ -1253,7 +1252,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
min(a1)
NULL
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='materialization=off,in_to_exists=on';
explain select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
@@ -1289,7 +1288,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
min(a1)
NULL
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2;
create table t1 (a char(2), b varchar(10));
insert into t1 values ('a', 'aaa');
@@ -1538,7 +1537,7 @@ INSERT INTO t1 (f1, f2) VALUES (10, 1.668);
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1, 1.789);
INSERT INTO t2 VALUES (13, 1.454);
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
@@ -1549,7 +1548,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
COUNT(*)
2
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
DROP TABLE t1, t2;
CREATE TABLE t1 (
pk int,
@@ -1562,7 +1561,7 @@ PRIMARY KEY (pk)
INSERT INTO t1 VALUES (1,'o','ffff','ffff','ffoo'),(2,'f','ffff','ffff','ffff');
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1,'i','iiii','iiii','iiii'),(2,'f','ffff','ffff','ffff');
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0);
@@ -1577,7 +1576,7 @@ SELECT pk FROM t1 WHERE (b,c,d) IN (SELECT b,c,d FROM t2 WHERE pk > 0);
pk
2
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
#
# BUG#50019: Wrong result for IN-subquery with materialization
#
@@ -1593,7 +1592,7 @@ i
2
3
4
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set session optimizer_switch='materialization=off,in_to_exists=on';
select * from t1 where t1.i in (select t2.i from t2 join t3 where t2.i + t3.i = 5);
i
@@ -1601,7 +1600,7 @@ i
3
2
1
-set session optimizer_switch=@save_optimizer_switch;
+set session optimizer_switch=@local_optimizer_switch;
drop table t1, t2, t3;
create table t0 (a int);
insert into t0 values (0),(1),(2);
@@ -1978,7 +1977,7 @@ DROP TABLE t1,t2,t3;
#
# BUG#939009: Crash with aggregate function in IN subquery
#
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on,semijoin=on';
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (7,1), (4,2), (7,7);
@@ -2007,7 +2006,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1
WHERE a IN (SELECT MAX(c) FROM t2 WHERE c < 4) AND b=7 AND (a IS NULL OR a=b);
a b
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
#
# BUG#946055: Crash with semijoin IN subquery when hash join is used
@@ -2018,8 +2017,7 @@ CREATE TABLE t2 (b int, c int, d varchar(1), e varchar(1), KEY (c), KEY (d, c));
INSERT INTO t2 VALUES
(4,2,'v','v'), (6,1,'v','v'), (0,5,'x','x'), (7,1,'x','x'),
(7,3,'i','i'), (7,1,'e','e'), (1,4,'p','p'), (1,2,'j','j');
-SET @save_optimizer_switch=@@optimizer_switch;
-SET @save_join_cache_level=@@join_cache_level;
+SET @local_optimizer_switch=@@optimizer_switch;
SET join_cache_level=2;
EXPLAIN
SELECT a, c FROM t1, t2
@@ -2059,7 +2057,7 @@ a c
7 1
7 1
7 1
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
SET join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
#
@@ -2112,21 +2110,21 @@ insert into t2 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 3), (6, 3), (7, 3);
delete t2 from t2 where a_id in (select * from (select t1.id from t1 limit 2) as x);
drop table t1,t2;
# This must be at the end:
-set optimizer_switch=@subselect_sj_mat_tmp;
+set optimizer_switch=@save_optimizer_switch;
set join_cache_level=@save_join_cache_level;
#
# MDEV-4908: Assertion `((Item_cond *) cond)->functype() ==
# ((Item_cond *) new_item)->functype()' fails on a query with
# IN and equal conditions, AND/OR, materialization+semijoin
#
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch = 'materialization=on,semijoin=on';
CREATE TABLE t1 (pk INT, a INT, b INT, PRIMARY KEY(pk)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,3,5),(2,4,6);
SELECT * FROM t1 WHERE 8 IN ( SELECT MIN(pk) FROM t1 ) AND ( pk = a OR pk = b );
pk a b
drop table t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
#
# MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queries
#
@@ -2272,7 +2270,7 @@ WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
f2
foo
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
EXPLAIN
SELECT sq1.f2 FROM t1 AS sq1
@@ -2290,7 +2288,7 @@ WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
f2
foo
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1;
#
# MDEV-12145: IN subquery used in WHERE of EXISTS subquery
@@ -2301,7 +2299,7 @@ CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM;
INSERT INTO t2 VALUES (8),(7),(1);
CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
SELECT * FROM t1
WHERE EXISTS ( SELECT * FROM t2, t3
@@ -2328,7 +2326,7 @@ WHERE EXISTS ( SELECT * FROM t2, t3
WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
f1
6
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2,t3;
#
# MDEV-9686: IN subquery used in WHERE of a subquery from select list
@@ -2360,7 +2358,7 @@ Warnings:
Note 1276 Field or reference 'test.t1.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache><`test`.`t1`.`pk`>((/* select#2 */ select count(0) from `test`.`t2` semi join (`test`.`t2`) where `test`.`t1`.`pk` = `test`.`t2`.`f2`)) AS `sq` from `test`.`t1`
# this checks the result set above
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch= 'materialization=off,semijoin=off';
SELECT pk, f1, ( SELECT COUNT(*) FROM t2
WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
@@ -2370,12 +2368,12 @@ pk f1 sq
3 3 5
4 6 5
5 3 5
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2;
#
# mdev-12838: scan of materialized of semi-join subquery in join
#
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
CREATE TABLE t1 (
dispatch_group varchar(32),
assignment_group varchar(32),
@@ -2459,7 +2457,7 @@ ec70316637232000158bbfc8bcbe5d60
7b10fd2637232000158bbfc8bcbe5d30
ebb4620037332000158bbfc8bcbe5d89
DROP TABLE t1,t2,t3;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
#
# MDEV-16751: Server crashes in st_join_table::cleanup or
# TABLE_LIST::is_with_table_recursive_reference with join_cache_level>2
@@ -2522,7 +2520,7 @@ a
4189
8732
5
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
SET optimizer_switch='materialization=off';
SELECT t1.a FROM t1
WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5;
@@ -2534,7 +2532,7 @@ WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c
a
5
drop procedure prepare_data;
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2,t3;
CREATE TABLE t1 ( id int NOT NULL, key(id));
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19);
diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test
index 91a67faba57..1de8701ecbb 100644
--- a/mysql-test/main/subselect_sj_mat.test
+++ b/mysql-test/main/subselect_sj_mat.test
@@ -3,7 +3,8 @@
# (WL#1110: Subquery optimization: materialization)
#
-set @subselect_sj_mat_tmp= @@optimizer_switch;
+--source include/default_optimizer_switch.inc
+
set optimizer_switch=ifnull(@subselect_mat_test_optimizer_switch_value, 'semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on');
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @optimizer_switch_local_default= @@optimizer_switch;
@@ -136,7 +137,7 @@ select * from t1 where (a1, a2) in (select b1, min(b2) from t2i limit 1,1);
# test re-optimization/re-execution with different execution methods
# prepare once, exec with different modes
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='semijoin=off';
prepare st1 from
@@ -158,7 +159,7 @@ execute st1;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='materialization=off,in_to_exists=on';
execute st1;
-set @@optimizer_switch=@save_optimizer_switch;
+set @@optimizer_switch=@local_optimizer_switch;
# materialize the result of ORDER BY
# No longer really happens as the optimizer is now smart enough not to sort in this case
@@ -848,7 +849,7 @@ insert into t1 values (5);
explain select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
# Query with group by, executed via IN=>EXISTS
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
set @@optimizer_switch='materialization=off,in_to_exists=on';
explain select min(a1) from t1 where 7 in (select max(b1) from t2 group by b1);
@@ -870,7 +871,7 @@ select min(a1) from t1 where 7 in (select b1 from t2);
-- echo # but when we go around MWL#90 code, the problem still shows up:
explain select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2;
#
@@ -1156,12 +1157,12 @@ CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1, 1.789);
INSERT INTO t2 VALUES (13, 1.454);
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
SELECT COUNT(*) FROM t1 WHERE (f1,f2) IN (SELECT f1,f2 FROM t2);
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
DROP TABLE t1, t2;
@@ -1181,14 +1182,14 @@ INSERT INTO t1 VALUES (1,'o','ffff','ffff','ffoo'),(2,'f','ffff','ffff','ffff');
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES (1,'i','iiii','iiii','iiii'),(2,'f','ffff','ffff','ffff');
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set @@optimizer_switch=@optimizer_switch_local_default;
SET @@optimizer_switch='semijoin=on,materialization=on';
EXPLAIN SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0);
SELECT pk FROM t1 WHERE (a) IN (SELECT a FROM t2 WHERE pk > 0);
SELECT pk FROM t1 WHERE (b,c,d) IN (SELECT b,c,d FROM t2 WHERE pk > 0);
DROP TABLE t1, t2;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
--echo #
--echo # BUG#50019: Wrong result for IN-subquery with materialization
@@ -1200,10 +1201,10 @@ insert into t2 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
create table t3(i int);
insert into t3 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
select * from t1 where t1.i in (select t2.i from t2 join t3 where t2.i + t3.i = 5);
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
set session optimizer_switch='materialization=off,in_to_exists=on';
select * from t1 where t1.i in (select t2.i from t2 join t3 where t2.i + t3.i = 5);
-set session optimizer_switch=@save_optimizer_switch;
+set session optimizer_switch=@local_optimizer_switch;
drop table t1, t2, t3;
#
@@ -1589,7 +1590,7 @@ DROP TABLE t1,t2,t3;
--echo # BUG#939009: Crash with aggregate function in IN subquery
--echo #
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on,semijoin=on';
CREATE TABLE t1 (a int, b int);
@@ -1610,7 +1611,7 @@ SELECT * FROM t1
SELECT * FROM t1
WHERE a IN (SELECT MAX(c) FROM t2 WHERE c < 4) AND b=7 AND (a IS NULL OR a=b);
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
DROP TABLE t1,t2;
@@ -1627,8 +1628,7 @@ INSERT INTO t2 VALUES
(4,2,'v','v'), (6,1,'v','v'), (0,5,'x','x'), (7,1,'x','x'),
(7,3,'i','i'), (7,1,'e','e'), (1,4,'p','p'), (1,2,'j','j');
-SET @save_optimizer_switch=@@optimizer_switch;
-SET @save_join_cache_level=@@join_cache_level;
+SET @local_optimizer_switch=@@optimizer_switch;
SET join_cache_level=2;
EXPLAIN
@@ -1649,7 +1649,7 @@ SELECT a, c FROM t1, t2
WHERE (a, c) IN (SELECT s1.b, s1.c FROM t2 AS s1, t2 AS s2
WHERE s2.d = s1.e AND s1.e = (SELECT MAX(e) FROM t2));
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
SET join_cache_level=@save_join_cache_level;
DROP TABLE t1,t2;
@@ -1709,7 +1709,7 @@ delete t2 from t2 where a_id in (select * from (select t1.id from t1 limit 2) as
drop table t1,t2;
--echo # This must be at the end:
-set optimizer_switch=@subselect_sj_mat_tmp;
+set optimizer_switch=@save_optimizer_switch;
set join_cache_level=@save_join_cache_level;
--echo #
@@ -1719,7 +1719,7 @@ set join_cache_level=@save_join_cache_level;
--echo #
-SET @save_optimizer_switch=@@optimizer_switch;
+SET @local_optimizer_switch=@@optimizer_switch;
SET optimizer_switch = 'materialization=on,semijoin=on';
CREATE TABLE t1 (pk INT, a INT, b INT, PRIMARY KEY(pk)) ENGINE=MyISAM;
@@ -1727,7 +1727,7 @@ INSERT INTO t1 VALUES (1,3,5),(2,4,6);
SELECT * FROM t1 WHERE 8 IN ( SELECT MIN(pk) FROM t1 ) AND ( pk = a OR pk = b );
drop table t1;
-SET optimizer_switch=@save_optimizer_switch;
+SET optimizer_switch=@local_optimizer_switch;
--echo #
--echo # MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queries
@@ -1881,7 +1881,7 @@ SELECT sq1.f2 FROM t1 AS sq1
WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
EXPLAIN
@@ -1895,7 +1895,7 @@ SELECT sq1.f2 FROM t1 AS sq1
WHERE EXISTS ( SELECT * FROM t1 AS sq2
WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1;
@@ -1912,7 +1912,7 @@ INSERT INTO t2 VALUES (8),(7),(1);
CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch='exists_to_in=off';
SELECT * FROM t1
@@ -1929,7 +1929,7 @@ SELECT * FROM t1
WHERE EXISTS ( SELECT * FROM t2, t3
WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2,t3;
@@ -1954,11 +1954,11 @@ SELECT pk, f1, ( SELECT COUNT(*) FROM t2
WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
--echo # this checks the result set above
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
set optimizer_switch= 'materialization=off,semijoin=off';
SELECT pk, f1, ( SELECT COUNT(*) FROM t2
WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
-set optimizer_switch= @save_optimizer_switch;
+set optimizer_switch= @local_optimizer_switch;
DROP TABLE t1,t2;
@@ -1966,7 +1966,7 @@ DROP TABLE t1,t2;
--echo # mdev-12838: scan of materialized of semi-join subquery in join
--echo #
-set @save_optimizer_switch=@@optimizer_switch;
+set @local_optimizer_switch=@@optimizer_switch;
CREATE TABLE t1 (
dispatch_group varchar(32),
@@ -2167,7 +2167,7 @@ eval explain $q;
eval $q;
DROP TABLE t1,t2,t3;
-set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@local_optimizer_switch;
--echo #
--echo # MDEV-16751: Server crashes in st_join_table::cleanup or
@@ -2224,7 +2224,7 @@ CALL prepare_data();
SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27);
-set @save_optimizer_switch= @@optimizer_switch;
+set @local_optimizer_switch= @@optimizer_switch;
SET optimizer_switch='materialization=off';
SELECT t1.a FROM t1
@@ -2236,7 +2236,7 @@ SELECT t1.a FROM t1
WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5;
drop procedure prepare_data;
-set @@optimizer_switch= @save_optimizer_switch;
+set @@optimizer_switch= @local_optimizer_switch;
drop table t1,t2,t3;
CREATE TABLE t1 ( id int NOT NULL, key(id));
diff --git a/mysql-test/main/subselect_sj_nonmerged.test b/mysql-test/main/subselect_sj_nonmerged.test
index e47e72ffe97..689e922ad24 100644
--- a/mysql-test/main/subselect_sj_nonmerged.test
+++ b/mysql-test/main/subselect_sj_nonmerged.test
@@ -1,6 +1,8 @@
#
# Tests for non-merged semi-joins
#
+--source include/default_optimizer_switch.inc
+
--disable_warnings
drop table if exists t0, t1, t2, t3, t4;
--enable_warnings
diff --git a/mysql-test/main/system_time_debug.result b/mysql-test/main/system_time_debug.result
new file mode 100644
index 00000000000..98266f5e9d7
--- /dev/null
+++ b/mysql-test/main/system_time_debug.result
@@ -0,0 +1,16 @@
+set @old_dbug=@@debug_dbug;
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+must be 0 must be 0
+0 0
+set @@debug_dbug='+d,system_time_plus_one_hour';
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+must be 0 must be 0
+0 0
+set @@debug_dbug='+d,system_time_minus_one_hour:-d,system_time_plus_one_hour';
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+must be 0 must be 0
+0 0
+set @@debug_dbug=@old_dbug;
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+must be 0 must be 0
+0 0
diff --git a/mysql-test/main/system_time_debug.test b/mysql-test/main/system_time_debug.test
new file mode 100644
index 00000000000..040b4c3000e
--- /dev/null
+++ b/mysql-test/main/system_time_debug.test
@@ -0,0 +1,16 @@
+source include/have_debug.inc;
+#
+# MDEV-20079 When setting back the system time while mysqld is running, NOW() and UNIX_TIMESTAMP() results get stuck
+#
+set @old_dbug=@@debug_dbug;
+
+# because NOW() is taken at the beginning of the query and sysdate() is the actual
+# time when sysdate() was evaluated, they don't necessarily have to be equal.
+# but hopefully they're less than within a minute from each other.
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+set @@debug_dbug='+d,system_time_plus_one_hour';
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+set @@debug_dbug='+d,system_time_minus_one_hour:-d,system_time_plus_one_hour';
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
+set @@debug_dbug=@old_dbug;
+select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
diff --git a/mysql-test/main/table_options-5867.opt b/mysql-test/main/table_options-5867.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/table_options-5867.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/trigger-compat.test b/mysql-test/main/trigger-compat.test
index 437df89b4b1..baf3cad11d6 100644
--- a/mysql-test/main/trigger-compat.test
+++ b/mysql-test/main/trigger-compat.test
@@ -2,7 +2,8 @@
# supported in embedded server. So, this test should not be run on embedded
# server.
--- source include/not_embedded.inc
+--source include/not_embedded.inc
+--source include/default_charset.inc
###########################################################################
#
diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test
index 2eeab16ec5a..581015a45e6 100644
--- a/mysql-test/main/trigger.test
+++ b/mysql-test/main/trigger.test
@@ -1,6 +1,6 @@
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
-
+--source include/default_charset.inc
#
# Basic triggers test
diff --git a/mysql-test/main/trigger_notembedded.test b/mysql-test/main/trigger_notembedded.test
index 051cd43f16f..9f89e66bbfe 100644
--- a/mysql-test/main/trigger_notembedded.test
+++ b/mysql-test/main/trigger_notembedded.test
@@ -2,7 +2,8 @@
# supported in embedded server. So, this test should not be run on embedded
# server.
--- source include/not_embedded.inc
+--source include/not_embedded.inc
+--source include/default_charset.inc
###########################################################################
#
diff --git a/mysql-test/main/truncate-stale-6500.result b/mysql-test/main/truncate-stale-6500.result
index b6222716953..be8d0aa7143 100644
--- a/mysql-test/main/truncate-stale-6500.result
+++ b/mysql-test/main/truncate-stale-6500.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@query_cache_size;
SET GLOBAL query_cache_size=1024*1024*8;
CREATE TABLE `test` (
`uniqueId` INT NOT NULL,
@@ -30,4 +31,4 @@ uniqueId partitionId
SELECT SQL_NO_CACHE * FROM `test`;
uniqueId partitionId
DROP TABLE test;
-SET GLOBAL query_cache_size=DEFAULT;
+SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/truncate-stale-6500.test b/mysql-test/main/truncate-stale-6500.test
index 47dffb1966d..95dc293bff9 100644
--- a/mysql-test/main/truncate-stale-6500.test
+++ b/mysql-test/main/truncate-stale-6500.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_partition.inc
+set @save_query_cache_size=@@query_cache_size;
SET GLOBAL query_cache_size=1024*1024*8;
CREATE TABLE `test` (
`uniqueId` INT NOT NULL,
@@ -29,4 +30,4 @@ SELECT SQL_CACHE * FROM `test`;
SELECT SQL_NO_CACHE * FROM `test`;
DROP TABLE test;
-SET GLOBAL query_cache_size=DEFAULT;
+SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/truncate_badse.opt b/mysql-test/main/truncate_badse.opt
new file mode 100644
index 00000000000..8374626febe
--- /dev/null
+++ b/mysql-test/main/truncate_badse.opt
@@ -0,0 +1 @@
+--plugin-maturity=unknown
diff --git a/mysql-test/main/type_time_6065.test b/mysql-test/main/type_time_6065.test
index fc91c530760..274d5db50b9 100644
--- a/mysql-test/main/type_time_6065.test
+++ b/mysql-test/main/type_time_6065.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
#
# MDEV-6065 MySQL Bug#13623473 "MISSING ROWS ON SELECT AND JOIN WITH TIME/DATETIME COMPARE"
#
diff --git a/mysql-test/main/type_varchar.opt b/mysql-test/main/type_varchar.opt
new file mode 100644
index 00000000000..35db081c15b
--- /dev/null
+++ b/mysql-test/main/type_varchar.opt
@@ -0,0 +1 @@
+--character-set-server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/udf_query_cache.result b/mysql-test/main/udf_query_cache.result
index 8c25c127012..38bb78a8007 100644
--- a/mysql-test/main/udf_query_cache.result
+++ b/mysql-test/main/udf_query_cache.result
@@ -1,6 +1,7 @@
drop table if exists t1;
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
create table t1 (a char);
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
@@ -22,4 +23,4 @@ Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
drop function metaphon;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/udf_query_cache.test b/mysql-test/main/udf_query_cache.test
index b0037973631..99cbffb1aae 100644
--- a/mysql-test/main/udf_query_cache.test
+++ b/mysql-test/main/udf_query_cache.test
@@ -18,6 +18,7 @@ drop table if exists t1;
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
create table t1 (a char);
+set @save_query_cache_size=@@query_cache_size;
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
@@ -32,5 +33,6 @@ show status like "Qcache_queries_in_cache";
drop table t1;
drop function metaphon;
-set GLOBAL query_cache_size=default;
+set GLOBAL query_cache_size=@save_query_cache_size;
+
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index af396637ab5..e3a69f54949 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -560,12 +560,15 @@ a b
2 2
3 3
4 4
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
2 UNION t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
explain (select * from t1 where a=1) union (select * from t1 where b=1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
@@ -1368,9 +1371,7 @@ t3 CREATE TABLE `t3` (
`left(a,100000000)` longtext DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop tables t1,t2,t3;
-SELECT @tmp_max:= @@global.max_allowed_packet;
-@tmp_max:= @@global.max_allowed_packet
-16777216
+SET @tmp_max= @@global.max_allowed_packet;
SET @@global.max_allowed_packet=25000000;
Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '25000000'
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index ce52ebaa6e5..a90d27e161d 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -339,7 +339,12 @@ explain extended (select * from t1 where a=1) union (select * from t2 where a=1)
(select * from t1 where a=5 and a=6) union (select * from t2 where a=1);
(select t1.a,t1.b from t1,t2 where t1.a=5) union (select * from t2 where a=1);
(select * from t1 where a=1) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a);
+
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a);
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
+
explain (select * from t1 where a=1) union (select * from t1 where b=1);
drop table t1,t2;
create table t1 ( id int not null auto_increment, primary key (id) ,user_name text );
@@ -840,7 +845,7 @@ drop tables t1,t2,t3;
# exceeds mediumtext maximum length
#
-SELECT @tmp_max:= @@global.max_allowed_packet;
+SET @tmp_max= @@global.max_allowed_packet;
SET @@global.max_allowed_packet=25000000;
# switching connection to allow the new max_allowed_packet take effect
--connect (newconn, localhost, root,,)
diff --git a/mysql-test/main/upgrade.opt b/mysql-test/main/upgrade.opt
new file mode 100644
index 00000000000..35db081c15b
--- /dev/null
+++ b/mysql-test/main/upgrade.opt
@@ -0,0 +1 @@
+--character-set-server=latin1 --collation_server=latin1_swedish_ci
diff --git a/mysql-test/main/upgrade.test b/mysql-test/main/upgrade.test
index ab9330176f8..e7a3e4d8abf 100644
--- a/mysql-test/main/upgrade.test
+++ b/mysql-test/main/upgrade.test
@@ -1,5 +1,5 @@
call mtr.add_suppression("Invalid .old.. table or database name");
--- source include/not_embedded.inc
+--source include/not_embedded.inc
--disable_warnings
drop database if exists `mysqltest1`;
diff --git a/mysql-test/main/user_var-binlog.result b/mysql-test/main/user_var-binlog.result
index 6066da2481a..0d8732399c7 100644
--- a/mysql-test/main/user_var-binlog.result
+++ b/mysql-test/main/user_var-binlog.result
@@ -33,7 +33,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=#/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
INSERT INTO t1 VALUES(@`a b`)
diff --git a/mysql-test/main/user_var-binlog.test b/mysql-test/main/user_var-binlog.test
index 0098f237de9..3f48ebbf570 100644
--- a/mysql-test/main/user_var-binlog.test
+++ b/mysql-test/main/user_var-binlog.test
@@ -18,6 +18,7 @@ source include/show_binlog_events.inc;
# escaped).
let $MYSQLD_DATADIR= `select @@datadir`;
flush logs;
+--replace_regex /collation_server=\d+/collation_server=#/
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001
drop table t1;
diff --git a/mysql-test/main/userstat-badlogin-4824.result b/mysql-test/main/userstat-badlogin-4824.result
index 6a38c2bd601..757b20e0ce0 100644
--- a/mysql-test/main/userstat-badlogin-4824.result
+++ b/mysql-test/main/userstat-badlogin-4824.result
@@ -1,3 +1,4 @@
+set @save_userstat=@@global.userstat;
create user foo@localhost identified by 'foo';
flush user_statistics;
set global userstat=1;
@@ -18,4 +19,4 @@ select user, bytes_received from information_schema.user_statistics where user =
user bytes_received
foo 18
drop user foo@localhost;
-set global userstat=0;
+set global userstat=@save_userstat;
diff --git a/mysql-test/main/userstat-badlogin-4824.test b/mysql-test/main/userstat-badlogin-4824.test
index 97370c1d081..78f2150e446 100644
--- a/mysql-test/main/userstat-badlogin-4824.test
+++ b/mysql-test/main/userstat-badlogin-4824.test
@@ -2,6 +2,7 @@
# MDEV-4824 userstats - wrong user statistics
#
--source include/not_embedded.inc
+set @save_userstat=@@global.userstat;
create user foo@localhost identified by 'foo';
flush user_statistics;
@@ -30,4 +31,4 @@ connection default;
select user, bytes_received from information_schema.user_statistics where user = 'foo';
drop user foo@localhost;
-set global userstat=0;
+set global userstat=@save_userstat;
diff --git a/mysql-test/main/userstat.opt b/mysql-test/main/userstat.opt
new file mode 100644
index 00000000000..45c618ea22e
--- /dev/null
+++ b/mysql-test/main/userstat.opt
@@ -0,0 +1 @@
+--disable-userstat
diff --git a/mysql-test/main/variables-master.opt b/mysql-test/main/variables-master.opt
index e4b213a0323..1049117752d 100644
--- a/mysql-test/main/variables-master.opt
+++ b/mysql-test/main/variables-master.opt
@@ -1 +1 @@
---max-user-connections=1
+--max-user-connections=1 --myisam_recover_options=BACKUP,QUICK
diff --git a/mysql-test/main/variables-notembedded.result b/mysql-test/main/variables-notembedded.result
index a8bf7ecc429..70a068cd802 100644
--- a/mysql-test/main/variables-notembedded.result
+++ b/mysql-test/main/variables-notembedded.result
@@ -33,12 +33,12 @@ ERROR HY000: Variable 'log_slave_updates' is a read only variable
#
SHOW VARIABLES like 'relay_log';
Variable_name Value
-relay_log mysqld-relay-bin
+relay_log XXX-relay-bin
SELECT @@session.relay_log;
ERROR HY000: Variable 'relay_log' is a GLOBAL variable
SELECT @@global.relay_log;
@@global.relay_log
-mysqld-relay-bin
+XXX-relay-bin
SET @@session.relay_log= 'x';
ERROR HY000: Variable 'relay_log' is a read only variable
SET @@global.relay_log= 'x';
@@ -46,12 +46,12 @@ ERROR HY000: Variable 'relay_log' is a read only variable
#
SHOW VARIABLES like 'relay_log_basename';
Variable_name Value
-relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin
+relay_log_basename MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin
SELECT @@session.relay_log_basename;
ERROR HY000: Variable 'relay_log_basename' is a GLOBAL variable
SELECT @@global.relay_log_basename;
@@global.relay_log_basename
-MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin
+MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin
SET @@session.relay_log_basename= 'x';
ERROR HY000: Variable 'relay_log_basename' is a read only variable
SET @@global.relay_log_basename= 'x';
@@ -72,12 +72,12 @@ ERROR HY000: Variable 'log_bin_basename' is a read only variable
#
SHOW VARIABLES like 'relay_log_index';
Variable_name Value
-relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin.index
+relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin.index
SELECT @@session.relay_log_index;
ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable
SELECT @@global.relay_log_index;
@@global.relay_log_index
-MYSQLTEST_VARDIR/mysqld.1/data/mysqld-relay-bin.index
+MYSQLTEST_VARDIR/mysqld.1/data/XXX-relay-bin.index
SET @@session.relay_log_index= 'x';
ERROR HY000: Variable 'relay_log_index' is a read only variable
SET @@global.relay_log_index= 'x';
@@ -152,6 +152,7 @@ ERROR HY000: Variable 'slave_skip_errors' is a read only variable
# ARE NOT BEING HONORED
#
CREATE TABLE t1 (a MEDIUMTEXT);
+set @save_max_allowed_packet=@@global.max_allowed_packet, @save_net_buffer_length=@@net_buffer_length;
SET GLOBAL max_allowed_packet=2048;
Warnings:
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
@@ -170,7 +171,7 @@ connection default;
disconnect con1;
SELECT LENGTH(a) FROM t1;
LENGTH(a)
-SET GLOBAL max_allowed_packet=default;
-SET GLOBAL net_buffer_length=default;
+SET GLOBAL max_allowed_packet=@save_max_allowed_packet;
+SET GLOBAL net_buffer_length=@save_net_buffer_length;
DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/main/variables-notembedded.test b/mysql-test/main/variables-notembedded.test
index 2aa77e1e254..7a1489cf392 100644
--- a/mysql-test/main/variables-notembedded.test
+++ b/mysql-test/main/variables-notembedded.test
@@ -48,9 +48,12 @@ SET @@session.log_slave_updates= true;
SET @@global.log_slave_updates= true;
#
--echo #
+let $relay_prefix=`select concat(substring_index(@@relay_log,"-",1),"-")`;
+--replace_result $relay_prefix XXX-
SHOW VARIABLES like 'relay_log';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log;
+--replace_result $relay_prefix XXX-
SELECT @@global.relay_log;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log= 'x';
@@ -58,11 +61,11 @@ SET @@session.relay_log= 'x';
SET @@global.relay_log= 'x';
#
--echo #
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
SHOW VARIABLES like 'relay_log_basename';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log_basename;
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
SELECT @@global.relay_log_basename;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log_basename= 'x';
@@ -70,9 +73,11 @@ SET @@session.relay_log_basename= 'x';
SET @@global.relay_log_basename= 'x';
#
--echo #
+--replace_result $relay_prefix XXX-
SHOW VARIABLES like 'log_bin_basename';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.log_bin_basename;
+--replace_result $relay_prefix XXX-
SELECT @@global.log_bin_basename;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.log_bin_basename= 'x';
@@ -80,11 +85,11 @@ SET @@session.log_bin_basename= 'x';
SET @@global.log_bin_basename= 'x';
#
--echo #
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
SHOW VARIABLES like 'relay_log_index';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log_index;
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_prefix XXX-
SELECT @@global.relay_log_index;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log_index= 'x';
@@ -92,9 +97,11 @@ SET @@session.relay_log_index= 'x';
SET @@global.relay_log_index= 'x';
#
--echo #
+--replace_result $relay_prefix XXX-
SHOW VARIABLES like 'log_bin_index';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.log_bin_index;
+--replace_result $relay_prefix XXX-
SELECT @@global.log_bin_index;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.log_bin_index= 'x';
@@ -151,6 +158,7 @@ SET @@global.slave_skip_errors= 7;
CREATE TABLE t1 (a MEDIUMTEXT);
+set @save_max_allowed_packet=@@global.max_allowed_packet, @save_net_buffer_length=@@net_buffer_length;
SET GLOBAL max_allowed_packet=2048;
SET GLOBAL net_buffer_length=4096;
CONNECT (con1,localhost,root,,test);
@@ -170,8 +178,8 @@ CONNECTION default;
DISCONNECT con1;
SELECT LENGTH(a) FROM t1;
-SET GLOBAL max_allowed_packet=default;
-SET GLOBAL net_buffer_length=default;
+SET GLOBAL max_allowed_packet=@save_max_allowed_packet;
+SET GLOBAL net_buffer_length=@save_net_buffer_length;
DROP TABLE t1;
--echo End of 5.1 tests
diff --git a/mysql-test/main/variables.result b/mysql-test/main/variables.result
index 9224aa82e8a..9cf751a1ee5 100644
--- a/mysql-test/main/variables.result
+++ b/mysql-test/main/variables.result
@@ -27,7 +27,8 @@ set @my_thread_cache_size =@@global.thread_cache_size;
set @my_max_allowed_packet =@@global.max_allowed_packet;
set @my_delay_key_write =@@global.delay_key_write;
set @my_join_buffer_size =@@global.join_buffer_size;
-set @my_log_warnings =@@global.log_warnings;
+set @my_log_warnings =@@global.log_warnings;
+set @my_local_infile =@@global.local_infile;
set @`test`=1;
select @test, @`test`, @TEST, @`TEST`, @"teSt";
@test @`test` @TEST @`TEST` @"teSt"
@@ -522,9 +523,6 @@ Warning 1292 Truncated incorrect max_heap_table_size value: '100'
set max_join_size=100;
set max_sort_length=100;
set global max_user_connections=100;
-select @@max_user_connections;
-@@max_user_connections
-100
set global max_write_lock_count=100;
set myisam_sort_buffer_size=100;
Warnings:
@@ -648,13 +646,14 @@ select * from information_schema.global_variables where variable_name like 'myis
VARIABLE_NAME VARIABLE_VALUE
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
set global myisam_max_sort_file_size=default;
+set @@global.max_user_connections=10, @@local.max_join_size=1000;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 100
+10 1000
set @svc=@@global.max_user_connections, @svj=@@local.max_join_size;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 100
+10 1000
set @@global.max_user_connections=111,@@local.max_join_size=222;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
@@ -666,12 +665,13 @@ select @@global.max_user_connections,@@local.max_join_size;
set @@global.max_user_connections=@svc, @@local.max_join_size=@svj;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 100
+10 1000
set @a=1, @b=2;
set @a=@b, @b=@a;
select @a, @b;
@a @b
2 1
+set @@global.max_user_connections=@my_max_user_connections;
set @@global.global.key_buffer_size= 1;
ERROR HY000: Unknown structured system variable or ROW routine variable 'global'
set GLOBAL global.key_buffer_size= 1;
@@ -1061,12 +1061,13 @@ set global net_write_timeout =@my_net_write_timeout;
set global net_read_timeout =@my_net_read_timeout;
set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time;
-set global default_storage_engine =@my_storage_engine;
+set global default_storage_engine =@my_storage_engine;
set global thread_cache_size =@my_thread_cache_size;
-set global max_allowed_packet = default;
+set global max_allowed_packet =@my_max_allowed_packet;
set global delay_key_write =@my_delay_key_write;
set global join_buffer_size =@my_join_buffer_size;
set global log_warnings =@my_log_warnings;
+set global local_infile =@my_local_infile;
show global variables where Variable_name='table_definition_cache';
Variable_name Value
table_definition_cache #
@@ -1136,12 +1137,12 @@ ERROR HY000: Variable 'ft_stopword_file' is a read only variable
#
SHOW VARIABLES like 'back_log';
Variable_name Value
-back_log 80
+back_log #
SELECT @@session.back_log;
ERROR HY000: Variable 'back_log' is a GLOBAL variable
-SELECT @@global.back_log;
-@@global.back_log
-80
+SELECT @@global.back_log > 0;
+@@global.back_log > 0
+1
SET @@session.back_log= 7;
ERROR HY000: Variable 'back_log' is a read only variable
SET @@global.back_log= 7;
@@ -1492,12 +1493,12 @@ SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size;
#
# Bug #37168 : Missing variable - skip_name_resolve
#
-SELECT @@skip_name_resolve;
-@@skip_name_resolve
-0
+SELECT @@skip_name_resolve >= 0;
+@@skip_name_resolve >= 0
+1
SHOW VARIABLES LIKE 'skip_name_resolve';
Variable_name Value
-skip_name_resolve OFF
+skip_name_resolve #
#
# Bug #43233 : Some server variables are clipped during "update,"
# not "check" stage
@@ -1531,9 +1532,9 @@ SET @@global.max_binlog_cache_size=DEFAULT;
SET @@global.max_join_size=DEFAULT;
SET @@global.key_buffer_size=@kbs;
SET @@global.key_cache_block_size=@kcbs;
-select @@max_long_data_size;
-@@max_long_data_size
-16777216
+select @@max_long_data_size > 0;
+@@max_long_data_size > 0
+1
#
# Bug#11766424 59527:
# Assert in DECIMAL_BIN_SIZE:
diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test
index fa0bdc251b5..846d2665013 100644
--- a/mysql-test/main/variables.test
+++ b/mysql-test/main/variables.test
@@ -36,7 +36,9 @@ set @my_thread_cache_size =@@global.thread_cache_size;
set @my_max_allowed_packet =@@global.max_allowed_packet;
set @my_delay_key_write =@@global.delay_key_write;
set @my_join_buffer_size =@@global.join_buffer_size;
-set @my_log_warnings =@@global.log_warnings;
+set @my_log_warnings =@@global.log_warnings;
+set @my_local_infile =@@global.local_infile;
+
# case insensitivity tests (new in 5.0)
set @`test`=1;
select @test, @`test`, @TEST, @`TEST`, @"teSt";
@@ -314,7 +316,6 @@ set max_heap_table_size=100;
set max_join_size=100;
set max_sort_length=100;
set global max_user_connections=100;
-select @@max_user_connections;
set global max_write_lock_count=100;
set myisam_sort_buffer_size=100;
set global net_buffer_length=100;
@@ -423,6 +424,10 @@ set global myisam_max_sort_file_size=default;
#
# swap
#
+
+# set some variables to play with
+set @@global.max_user_connections=10, @@local.max_join_size=1000;
+
select @@global.max_user_connections,@@local.max_join_size;
set @svc=@@global.max_user_connections, @svj=@@local.max_join_size;
select @@global.max_user_connections,@@local.max_join_size;
@@ -435,6 +440,7 @@ select @@global.max_user_connections,@@local.max_join_size;
set @a=1, @b=2;
set @a=@b, @b=@a;
select @a, @b;
+set @@global.max_user_connections=@my_max_user_connections;
#
# Bug#2586:Disallow global/session/local as structured var. instance names
@@ -814,12 +820,13 @@ set global net_write_timeout =@my_net_write_timeout;
set global net_read_timeout =@my_net_read_timeout;
set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time;
-set global default_storage_engine =@my_storage_engine;
+set global default_storage_engine =@my_storage_engine;
set global thread_cache_size =@my_thread_cache_size;
-set global max_allowed_packet = default;
+set global max_allowed_packet =@my_max_allowed_packet;
set global delay_key_write =@my_delay_key_write;
set global join_buffer_size =@my_join_buffer_size;
set global log_warnings =@my_log_warnings;
+set global local_infile =@my_local_infile;
#
# Bug#28580 Repeatation of status variables
@@ -891,10 +898,11 @@ SET @@global.ft_stopword_file= 'x';
# Additional variables fixed.
#
--echo #
+--replace_column 2 #
SHOW VARIABLES like 'back_log';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.back_log;
-SELECT @@global.back_log;
+SELECT @@global.back_log > 0;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.back_log= 7;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
@@ -1208,7 +1216,8 @@ SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size;
--echo # Bug #37168 : Missing variable - skip_name_resolve
--echo #
-SELECT @@skip_name_resolve;
+SELECT @@skip_name_resolve >= 0;
+--replace_column 2 #
SHOW VARIABLES LIKE 'skip_name_resolve';
--echo #
@@ -1258,7 +1267,7 @@ SET @@global.key_cache_block_size=@kcbs;
#
# Bug#56976: added new start-up parameter
#
-select @@max_long_data_size;
+select @@max_long_data_size > 0;
--echo #
--echo # Bug#11766424 59527:
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index fe90989f3b0..13f3761cdee 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -1,4 +1,3 @@
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='outer_join_with_cache=off';
create view v1 (c,d) as select a,b from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
@@ -3726,76 +3725,76 @@ a
2
CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
a
1
-2
1
-2
1
-2
1
2
+2
+2
+2
REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
a
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
2
+2
+2
+2
+2
+2
+2
+2
+2
+3
+3
+3
+3
+3
+3
+3
+3
3
INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
a
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
-2
-3
1
2
+2
+2
+2
+2
+2
+2
+2
+2
+3
+3
+3
+3
+3
+3
+3
+3
3
DROP VIEW v1;
DROP VIEW v2;
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index ccf9bcc8c9a..4fc87f6283c 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -1,8 +1,8 @@
--source include/have_partition.inc
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
+--source include/default_optimizer_switch.inc
-SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='outer_join_with_cache=off';
#
@@ -3664,12 +3664,12 @@ SELECT * FROM v1;
CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
-SELECT * FROM v2;
+SELECT * FROM v2 order by 1;
DROP VIEW v1;
DROP VIEW v2;
diff --git a/mysql-test/main/xtradb_mrr.result b/mysql-test/main/xtradb_mrr.result
index 383d04207af..2f18a7c287f 100644
--- a/mysql-test/main/xtradb_mrr.result
+++ b/mysql-test/main/xtradb_mrr.result
@@ -742,6 +742,7 @@ count(*) sum(table1.col_int_key*table2.pk)
drop table t1,t2;
set join_cache_level=@my_save_join_cache_level;
set join_buffer_size=@my_save_join_buffer_size;
+set optimizer_switch=@save_optimizer_switch;
#
# BUG#665669: Result differences on query re-execution
#
diff --git a/mysql-test/main/xtradb_mrr.test b/mysql-test/main/xtradb_mrr.test
index 3e84668955a..8dccd20796f 100644
--- a/mysql-test/main/xtradb_mrr.test
+++ b/mysql-test/main/xtradb_mrr.test
@@ -284,6 +284,7 @@ drop table t1;
--echo #
--echo # BUG#671340: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5
--echo #
+
CREATE TABLE t1 (
pk int(11) NOT NULL AUTO_INCREMENT,
col_int_key int(11) NOT NULL,
@@ -346,6 +347,7 @@ INSERT INTO t2 VALUES
(19,5,'h','h'),
(20,7,'w','w');
+--source include/default_optimizer_switch.inc
SELECT count(*), sum(table1.col_int_key*table2.pk)
FROM
t2 AS table1, t1 AS table2, t2 AS table3
@@ -366,6 +368,7 @@ WHERE
drop table t1,t2;
set join_cache_level=@my_save_join_cache_level;
set join_buffer_size=@my_save_join_buffer_size;
+set optimizer_switch=@save_optimizer_switch;
--echo #
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 6cd7acbe36c..c67cf55b55f 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3500,7 +3500,7 @@ sub mysql_install_db {
mtr_tofile($path_bootstrap_log,
"$exe_mysqld_bootstrap " . join(" ", @$args) . "\n");
- # Create directories mysql and test
+ # Create directories mysql
mkpath("$install_datadir/mysql");
my $realtime= gettimeofday();
@@ -4689,6 +4689,7 @@ sub extract_warning_lines ($$) {
qr/InnoDB: Dumping buffer pool.*/,
qr/InnoDB: Buffer pool.*/,
qr/InnoDB: Warning: Writer thread is waiting this semaphore:/,
+ qr/InnoDB: innodb_open_files .* should not be greater than/,
qr/Slave: Unknown table 't1' .* 1051/,
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
qr/slave SQL thread aborted/,
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD
new file mode 100644
index 00000000000..3b511e3b8fa
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD
Binary files differ
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI
new file mode 100644
index 00000000000..b039d02f2e0
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI
Binary files differ
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm
new file mode 100644
index 00000000000..85f142070e9
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm
Binary files differ
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD
new file mode 100644
index 00000000000..e770e42b6bf
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD
Binary files differ
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI
new file mode 100644
index 00000000000..aff7d10ce18
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI
Binary files differ
diff --git a/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm
new file mode 100644
index 00000000000..d7258bc4af3
--- /dev/null
+++ b/mysql-test/std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm
Binary files differ
diff --git a/mysql-test/suite/archive/discover_5438.opt b/mysql-test/suite/archive/discover_5438.opt
new file mode 100644
index 00000000000..24307596e69
--- /dev/null
+++ b/mysql-test/suite/archive/discover_5438.opt
@@ -0,0 +1 @@
+--disable-skip-name-resolve
diff --git a/mysql-test/suite/binlog/include/binlog_cache_stat.test b/mysql-test/suite/binlog/include/binlog_cache_stat.test
index a602b098201..c6287a6bad1 100644
--- a/mysql-test/suite/binlog/include/binlog_cache_stat.test
+++ b/mysql-test/suite/binlog/include/binlog_cache_stat.test
@@ -15,6 +15,10 @@ create table t2 (a int) engine=myisam;
# transactions are committed and after when they are aborted.
#
+set @save_binlog_stmt_cache_size=@@global.binlog_stmt_cache_size;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
+set @@global.binlog_stmt_cache_size=32768;
+set @@global.binlog_cache_size=32768;
#
# Checking commit.
#
@@ -249,3 +253,6 @@ if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cach
-- die
}
drop table t1, t2;
+
+set @@global.binlog_stmt_cache_size=@save_binlog_stmt_cache_size;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
diff --git a/mysql-test/suite/binlog/include/binlog_row_annotate.inc b/mysql-test/suite/binlog/include/binlog_row_annotate.inc
index a5fdba8daf2..69d9dc3cc49 100644
--- a/mysql-test/suite/binlog/include/binlog_row_annotate.inc
+++ b/mysql-test/suite/binlog/include/binlog_row_annotate.inc
@@ -42,6 +42,7 @@ set global binlog_checksum=NONE;
--source include/have_binlog_format_row.inc
set sql_mode="";
+let $collation_server=`select @@collation_server`;
# Fix timestamp to avoid varying results
SET timestamp=1000000000;
@@ -124,7 +125,7 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map)
--echo #####################################################################################
- --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+ --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $datadir/master-bin.000001
--echo #
@@ -134,7 +135,7 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE test1.t1, test2.t2 FROM <...>
--echo #####################################################################################
- --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+ --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v $datadir/master-bin.000001
--echo #
@@ -143,7 +144,7 @@ if (!$use_remote_mysqlbinlog)
--echo # No Annotates should appear in this output
--echo #####################################################################################
- --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+ --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v $datadir/master-bin.000001
--let use_remote_mysqlbinlog= 0
@@ -160,7 +161,7 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map)
--echo #####################################################################################
---replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
--echo #
@@ -170,7 +171,7 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE test1.t1, test2.t2 FROM <...>
--echo #####################################################################################
---replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
--echo #
@@ -179,7 +180,7 @@ if (!$use_remote_mysqlbinlog)
--echo # No Annotates should appear in this output
--echo #####################################################################################
---replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
# Clean-up
diff --git a/mysql-test/suite/binlog/include/ctype_ucs_binlog.test b/mysql-test/suite/binlog/include/ctype_ucs_binlog.test
index 8a4df14d4b3..11646f28bfe 100644
--- a/mysql-test/suite/binlog/include/ctype_ucs_binlog.test
+++ b/mysql-test/suite/binlog/include/ctype_ucs_binlog.test
@@ -16,6 +16,7 @@ source include/show_binlog_events.inc;
# escaped).
flush logs;
let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001
drop table t2;
@@ -53,7 +54,7 @@ SELECT * FROM t1;
DROP TABLE t1;
FLUSH LOGS;
let $MYSQLD_DATADIR= `select @@datadir`;
---replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ /(^#|created )[0-9]{6} [ 1][0-9]:[0-9]{2}:[0-9]{2}/\1YYMMDD HH:MM:SS/
+--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ /(^#|created )[0-9]{6} [ 1][0-9]:[0-9]{2}:[0-9]{2}/\1YYMMDD HH:MM:SS/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -vv $MYSQLD_DATADIR/master-bin.000003
SET TIMESTAMP=DEFAULT;
diff --git a/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc b/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc
index 8cc56caaec6..ce919550b51 100644
--- a/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc
+++ b/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc
@@ -1651,7 +1651,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1731,7 +1731,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1854,7 +1854,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1912,7 +1912,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
diff --git a/mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result b/mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
index 09cdab8414a..6e2df0c55cd 100644
--- a/mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
+++ b/mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
@@ -1,6 +1,10 @@
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=myisam;
+set @save_binlog_stmt_cache_size=@@global.binlog_stmt_cache_size;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
+set @@global.binlog_stmt_cache_size=32768;
+set @@global.binlog_cache_size=32768;
**** Preparing the enviroment to check commit and its effect on status variables.
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
@@ -64,3 +68,5 @@ rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
drop table t1, t2;
+set @@global.binlog_stmt_cache_size=@save_binlog_stmt_cache_size;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
index 8c8ba9de477..8ecd4d37b1f 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
@@ -29,7 +29,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -101,7 +101,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
@@ -167,7 +167,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -212,7 +212,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -257,7 +257,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -284,7 +284,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -329,7 +329,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -372,7 +372,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -434,7 +434,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -464,7 +464,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
@@ -520,7 +520,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -550,7 +550,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -588,7 +588,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -615,7 +615,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -691,7 +691,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -729,7 +729,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -756,7 +756,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -798,7 +798,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -870,7 +870,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
@@ -935,7 +935,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -980,7 +980,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -1024,7 +1024,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -1051,7 +1051,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -1096,7 +1096,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -1138,7 +1138,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -1200,7 +1200,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -1230,7 +1230,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
@@ -1286,7 +1286,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -1315,7 +1315,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -1353,7 +1353,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -1380,7 +1380,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -1454,7 +1454,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
@@ -1492,7 +1492,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
@@ -1519,7 +1519,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
@@ -1561,7 +1561,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index 4422a00335b..2af8b805be8 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -367,7 +367,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (c01 BIT)
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
index 3dcaad61897..22309e964be 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
@@ -2272,7 +2272,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -5281,7 +5281,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -5681,7 +5681,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -6319,7 +6319,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
index a4d929148e8..8091242dab7 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
@@ -2272,7 +2272,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -5304,7 +5304,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -5710,7 +5710,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -6358,7 +6358,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
index 6a0c6b0532f..28070fab374 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
@@ -150,7 +150,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result
index 25a9b295301..bbdfe547b18 100644
--- a/mysql-test/suite/binlog/r/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result
@@ -120,7 +120,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -358,7 +358,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -518,7 +518,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -744,7 +744,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -982,7 +982,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -1142,7 +1142,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
diff --git a/mysql-test/suite/binlog/r/binlog_row_cache_stat.result b/mysql-test/suite/binlog/r/binlog_row_cache_stat.result
index 09cdab8414a..6e2df0c55cd 100644
--- a/mysql-test/suite/binlog/r/binlog_row_cache_stat.result
+++ b/mysql-test/suite/binlog/r/binlog_row_cache_stat.result
@@ -1,6 +1,10 @@
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=myisam;
+set @save_binlog_stmt_cache_size=@@global.binlog_stmt_cache_size;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
+set @@global.binlog_stmt_cache_size=32768;
+set @@global.binlog_cache_size=32768;
**** Preparing the enviroment to check commit and its effect on status variables.
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
@@ -64,3 +68,5 @@ rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
drop table t1, t2;
+set @@global.binlog_stmt_cache_size=@save_binlog_stmt_cache_size;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
index 343b21160fd..9e95f0a365e 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
@@ -26,7 +26,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
@@ -96,7 +96,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8)
diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
index 1114902bae1..8b138c461ab 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -54,7 +54,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a INT, b INT)
@@ -295,7 +295,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a INT, b INT)
diff --git a/mysql-test/suite/binlog/r/binlog_stm_cache_stat.result b/mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
index 09cdab8414a..6e2df0c55cd 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
@@ -1,6 +1,10 @@
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=myisam;
+set @save_binlog_stmt_cache_size=@@global.binlog_stmt_cache_size;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
+set @@global.binlog_stmt_cache_size=32768;
+set @@global.binlog_cache_size=32768;
**** Preparing the enviroment to check commit and its effect on status variables.
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
@@ -64,3 +68,5 @@ rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
drop table t1, t2;
+set @@global.binlog_stmt_cache_size=@save_binlog_stmt_cache_size;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
index 6c82c5793df..00f7ce6ead0 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
@@ -25,7 +25,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t2 values (@v)
@@ -98,7 +98,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
-SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8)
diff --git a/mysql-test/suite/binlog/r/flashback-largebinlog.result b/mysql-test/suite/binlog/r/flashback-largebinlog.result
index 526204f259f..4bfa3f663b9 100644
--- a/mysql-test/suite/binlog/r/flashback-largebinlog.result
+++ b/mysql-test/suite/binlog/r/flashback-largebinlog.result
@@ -62,7 +62,6 @@ affected rows: 0
# Cleanup.
#
# reset variable value to pass testcase checks
-SET @@global.max_allowed_packet = 16777216;
affected rows: 0
DROP TABLE t1;
affected rows: 0
diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result
index 05143a98381..bdffaabd673 100644
--- a/mysql-test/suite/binlog/r/flashback.result
+++ b/mysql-test/suite/binlog/r/flashback.result
@@ -64,7 +64,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (
@@ -426,7 +426,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
diff --git a/mysql-test/suite/binlog/t/binlog_innodb.opt b/mysql-test/suite/binlog/t/binlog_innodb.opt
new file mode 100644
index 00000000000..2d4e658e44d
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_innodb.opt
@@ -0,0 +1 @@
+--binlog_cache_size=32768 --binlog_stmt_cache_size=32768
diff --git a/mysql-test/suite/binlog/t/binlog_max_extension.test b/mysql-test/suite/binlog/t/binlog_max_extension.test
index ba3ea435452..199a31ea05c 100644
--- a/mysql-test/suite/binlog/t/binlog_max_extension.test
+++ b/mysql-test/suite/binlog/t/binlog_max_extension.test
@@ -28,6 +28,8 @@ call mtr.add_suppression("Can't generate a unique log-filename");
RESET MASTER;
-- let $MYSQLD_DATADIR= `select @@datadir`
+-- let $log_bin_index=`select substring_index(@@log_bin_index,'/',-1)`
+-- let $log_bin_basename=`select substring_index(@@log_bin_basename,'/',-1)`
###############################################
# check hitting maximum file name extension:
@@ -43,9 +45,9 @@ RESET MASTER;
-- source include/wait_until_disconnected.inc
# 2. Prepare log and index file
--- copy_file $MYSQLD_DATADIR/mysqld-bin.index $MYSQLD_DATADIR/mysqld-bin.index.orig
--- copy_file $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.2147483646
--- append_file $MYSQLD_DATADIR/mysqld-bin.index
+-- copy_file $MYSQLD_DATADIR/$log_bin_index $MYSQLD_DATADIR/$log_bin_index.orig
+-- copy_file $MYSQLD_DATADIR/$log_bin_basename.000001 $MYSQLD_DATADIR/$log_bin_basename.2147483646
+-- append_file $MYSQLD_DATADIR/$log_bin_index
master-bin.2147483646
EOF
@@ -72,12 +74,12 @@ FLUSH LOGS;
-- source include/wait_until_disconnected.inc
# 2. Undo changes to index and log files
--- remove_file $MYSQLD_DATADIR/mysqld-bin.index
--- copy_file $MYSQLD_DATADIR/mysqld-bin.index.orig $MYSQLD_DATADIR/mysqld-bin.index
--- remove_file $MYSQLD_DATADIR/mysqld-bin.index.orig
+-- remove_file $MYSQLD_DATADIR/$log_bin_index
+-- copy_file $MYSQLD_DATADIR/$log_bin_index.orig $MYSQLD_DATADIR/$log_bin_index
+-- remove_file $MYSQLD_DATADIR/$log_bin_index.orig
--- remove_file $MYSQLD_DATADIR/master-bin.2147483646
--- remove_file $MYSQLD_DATADIR/master-bin.2147483647
+-- remove_file $MYSQLD_DATADIR/$log_bin_basename.2147483646
+-- remove_file $MYSQLD_DATADIR/$log_bin_basename.2147483647
# 3. Restart the server
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
diff --git a/mysql-test/suite/binlog/t/binlog_mixed_cache_stat.opt b/mysql-test/suite/binlog/t/binlog_mixed_cache_stat.opt
new file mode 100644
index 00000000000..2d4e658e44d
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mixed_cache_stat.opt
@@ -0,0 +1 @@
+--binlog_cache_size=32768 --binlog_stmt_cache_size=32768
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
index 7ef30a48ac0..f5b7e2c01d6 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
@@ -47,35 +47,42 @@ select "--- Local --" as "";
# be time dependent (the Start events). Better than nothing.
#
let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --base64-output=never $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- offset --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --offset=5 $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
let $stop_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- start and stop positions ---" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
let $stop_pos= `select @binlog_start_pos + 857`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
@@ -85,99 +92,119 @@ select "--- Local with 2 binlogs on command line --" as "";
# This is to verify that some options apply only to first, or last binlog
flush logs;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- offset --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --offset=5 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
let $stop_pos= `select @binlog_start_pos + 134`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- Remote --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- offset --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --offset=5 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
let $stop_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- start and stop positions ---" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
let $stop_pos= `select @binlog_start_pos + 812`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- Remote with 2 binlogs on command line --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- offset --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --offset=5 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
let $start_pos= `select @binlog_start_pos + 696`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
let $stop_pos= `select @binlog_start_pos + 109`;
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--start-datetime=19700121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- to-last-log --" as "";
--enable_query_log
+--replace_regex /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --to-last-log master-bin.000001
# clean up
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
index 9cc8e3f22a7..3146330f0cd 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
@@ -455,7 +455,7 @@ DROP TABLE t1dec102;
flush logs;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test
index da3183299f5..12d83e0a777 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test
@@ -150,7 +150,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
diff --git a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test
index c265c90d831..064cebef47f 100644
--- a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test
+++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test
@@ -59,7 +59,7 @@ flush logs;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
---replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -70,7 +70,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # --read-from-remote-server
--echo #
---replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
DROP DATABASE test1;
diff --git a/mysql-test/suite/binlog/t/binlog_variables_log_bin.test b/mysql-test/suite/binlog/t/binlog_variables_log_bin.test
index d94d565d004..afaea3d9977 100644
--- a/mysql-test/suite/binlog/t/binlog_variables_log_bin.test
+++ b/mysql-test/suite/binlog/t/binlog_variables_log_bin.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+let $log_bin_index=`select substring_index(@@log_bin_index,'/',-1)`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $log_bin_index mysqld-bin.index
--query_vertical SHOW VARIABLES LIKE 'log_bin%'
diff --git a/mysql-test/suite/binlog/t/binlog_variables_relay_log.test b/mysql-test/suite/binlog/t/binlog_variables_relay_log.test
index 1e987901986..27ef1d73035 100644
--- a/mysql-test/suite/binlog/t/binlog_variables_relay_log.test
+++ b/mysql-test/suite/binlog/t/binlog_variables_relay_log.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+let $relay_log_index=`select substring_index(@@relay_log_index,'/',-1)`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $relay_log_index mysqld-relay-bin.index
--query_vertical SHOW VARIABLES LIKE 'relay_log%'
diff --git a/mysql-test/suite/binlog/t/flashback-largebinlog.test b/mysql-test/suite/binlog/t/flashback-largebinlog.test
index 6ff58b706d3..fb2703dfac5 100644
--- a/mysql-test/suite/binlog/t/flashback-largebinlog.test
+++ b/mysql-test/suite/binlog/t/flashback-largebinlog.test
@@ -15,6 +15,8 @@
# This is a big test.
--source include/big_test.inc
+# Test needs more than 4G of memory
+--source include/have_64bit.inc
--echo #
--echo # Preparatory cleanup.
@@ -98,7 +100,9 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # Cleanup.
--echo #
--echo # reset variable value to pass testcase checks
+--disable_query_log
eval SET @@global.max_allowed_packet = $orig_max_allowed_packet;
+--enable_query_log
DROP TABLE t1;
drop database if exists mysqltest;
diff --git a/mysql-test/suite/binlog/t/flashback.test b/mysql-test/suite/binlog/t/flashback.test
index 9782fa4ec83..abe054e4de0 100644
--- a/mysql-test/suite/binlog/t/flashback.test
+++ b/mysql-test/suite/binlog/t/flashback.test
@@ -55,7 +55,7 @@ FLUSH LOGS;
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # < CASE 1 >
@@ -64,7 +64,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG -B --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo # < CASE 1 >
diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
index 790fe225d7a..a6054f00ebc 100644
--- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
@@ -121,7 +121,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -359,7 +359,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
@@ -519,7 +519,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.uniq
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE DATABASE test1
diff --git a/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test b/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test
index 6f3d7964521..c4e4b2a1598 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test
@@ -57,7 +57,7 @@ $$
DELIMITER ;$$
---exec $MYSQL_DUMP --skip-comments --routines test
+--exec $MYSQL_DUMP --skip-comments --routines --default-character-set=utf8mb4 test
--exec $MYSQL_DUMP --skip-comments --routines --xml test
let $dump = $MYSQLTEST_VARDIR/tmp/sp-package-mysqldump.sql;
diff --git a/mysql-test/suite/compat/oracle/t/sp-package-security.test b/mysql-test/suite/compat/oracle/t/sp-package-security.test
index e8c852ef452..583f70afe14 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package-security.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package-security.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+--source include/default_charset.inc
SET sql_mode=ORACLE;
diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test
index 04357a7487a..5eac3987982 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package.test
@@ -1,3 +1,4 @@
+--source include/default_charset.inc
SET sql_mode=ORACLE;
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index 4d046533457..4fae03b7721 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -1,3 +1,5 @@
+--source include/default_charset.inc
+
SET sql_mode=ORACLE;
--echo # Testing routines with no parameters
diff --git a/mysql-test/suite/encryption/my.cnf b/mysql-test/suite/encryption/my.cnf
new file mode 100644
index 00000000000..772daa0f545
--- /dev/null
+++ b/mysql-test/suite/encryption/my.cnf
@@ -0,0 +1 @@
+!include include/default_my.cnf
diff --git a/mysql-test/suite/encryption/r/tempfiles.result b/mysql-test/suite/encryption/r/tempfiles.result
index 45d9d379473..1c3172a185b 100644
--- a/mysql-test/suite/encryption/r/tempfiles.result
+++ b/mysql-test/suite/encryption/r/tempfiles.result
@@ -29,6 +29,7 @@ i 10
j 10
drop table t1;
reset master;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
set global binlog_cache_size=8192;
connect con1, localhost, root;
create table t1 (a text) engine=innodb;
@@ -52,7 +53,7 @@ disconnect con2;
connection default;
flush binary logs;
drop table t1, t2;
-set global binlog_cache_size=default;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
select left(a, 10) from t1;
left(a, 10)
1111111111
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt
index 8070b5a6182..ae20d676be3 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt
@@ -3,3 +3,4 @@
--loose-file-key-management
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
--file-key-management-encryption-algorithm=aes_cbc
+--innodb-log-file-size=5242880
diff --git a/mysql-test/suite/encryption/t/tempfiles.test b/mysql-test/suite/encryption/t/tempfiles.test
index e2fd356bb82..74d03f5a448 100644
--- a/mysql-test/suite/encryption/t/tempfiles.test
+++ b/mysql-test/suite/encryption/t/tempfiles.test
@@ -32,6 +32,7 @@ select sql_big_result t,count(t) from t1 group by t limit 10;
drop table t1;
reset master;
+set @save_binlog_cache_size=@@global.binlog_cache_size;
set global binlog_cache_size=8192;
connect con1, localhost, root;
@@ -74,7 +75,7 @@ flush binary logs;
drop table t1, t2;
-set global binlog_cache_size=default;
+set @@global.binlog_cache_size=@save_binlog_cache_size;
let $MYSQLD_DATADIR= `select @@datadir`;
exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL;
diff --git a/mysql-test/suite/federated/federatedx_versioning.result b/mysql-test/suite/federated/federatedx_versioning.result
index 8cb8e9191df..bdbed07f77d 100644
--- a/mysql-test/suite/federated/federatedx_versioning.result
+++ b/mysql-test/suite/federated/federatedx_versioning.result
@@ -4,14 +4,14 @@ row_start SYS_TYPE as row start invisible,
row_end SYS_TYPE as row end invisible,
period for system_time (row_start, row_end))
with system versioning;
-create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1';
+create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t1';
show create table tf;
Table Create Table
tf CREATE TABLE `tf` (
`x` int(11) DEFAULT NULL,
`row_start` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0,
`row_end` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0
-) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1'
+) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t1'
# INSERT
insert into t1 values (1);
select * from tf;
@@ -61,7 +61,7 @@ row_start SYS_TYPE as row start invisible,
row_end SYS_TYPE as row end invisible,
period for system_time (row_start, row_end))
with system versioning;
-create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t2';
+create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t2';
insert t2f (id, y) values (1, 2);
replace t2f (id, y) values (1, 3);
select *, check_row(row_start, row_end) from t2 for system_time all
@@ -102,5 +102,3 @@ order by y;
id y check_row(row_start, row_end)
2 2 HISTORICAL ROW
2 22 CURRENT ROW
-drop database test;
-create database test;
diff --git a/mysql-test/suite/federated/federatedx_versioning.test b/mysql-test/suite/federated/federatedx_versioning.test
index 6d127f006e1..591ccae03f2 100644
--- a/mysql-test/suite/federated/federatedx_versioning.test
+++ b/mysql-test/suite/federated/federatedx_versioning.test
@@ -11,7 +11,7 @@ eval create or replace table t1 (
period for system_time (row_start, row_end))
with system versioning;
--replace_result $MASTER_MYPORT MASTER_MYPORT
-eval create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
+eval create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test2/t1';
--replace_result $MASTER_MYPORT MASTER_MYPORT $sys_datatype_expl SYS_TYPE "'0000-00-00 00:00:00.000000'" 0
show create table tf;
--echo # INSERT
@@ -50,7 +50,7 @@ eval create or replace table t2 (
period for system_time (row_start, row_end))
with system versioning;
--replace_result $MASTER_MYPORT MASTER_MYPORT
-eval create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t2';
+eval create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test2/t2';
insert t2f (id, y) values (1, 2);
replace t2f (id, y) values (1, 3);
select *, check_row(row_start, row_end) from t2 for system_time all
@@ -80,5 +80,3 @@ select *, check_row(row_start, row_end) from t2 for system_time all
order by y;
--source suite/versioning/common_finish.inc
-drop database test;
-create database test;
diff --git a/mysql-test/suite/funcs_1/datadict/is_routines.inc b/mysql-test/suite/funcs_1/datadict/is_routines.inc
index a6e0931ca42..35b31c35553 100644
--- a/mysql-test/suite/funcs_1/datadict/is_routines.inc
+++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc
@@ -18,6 +18,8 @@
# 2008-06-11 mleich Move t/is_routines.test to this file and
# create variants for embedded/non embedded server.
#
+
+--source include/default_charset.inc
set sql_mode="";
let $engine_type = MEMORY;
diff --git a/mysql-test/suite/funcs_1/datadict/is_schemata.inc b/mysql-test/suite/funcs_1/datadict/is_schemata.inc
index 0a3f0e726b3..267d3c272b9 100644
--- a/mysql-test/suite/funcs_1/datadict/is_schemata.inc
+++ b/mysql-test/suite/funcs_1/datadict/is_schemata.inc
@@ -18,6 +18,7 @@
# create variants for embedded/non embedded server.
#
+--source include/default_charset.inc
let $is_table = SCHEMATA;
# The table INFORMATION_SCHEMA.SCHEMATA must exist
diff --git a/mysql-test/suite/funcs_1/datadict/is_tables.inc b/mysql-test/suite/funcs_1/datadict/is_tables.inc
index 2059917247c..b3d0ef4cca5 100644
--- a/mysql-test/suite/funcs_1/datadict/is_tables.inc
+++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc
@@ -20,6 +20,8 @@
# create variants for embedded/non embedded server.
#
+--source include/default_charset.inc
+
let $engine_type = MEMORY;
let $other_engine_type = MyISAM;
diff --git a/mysql-test/suite/funcs_1/datadict/is_triggers.inc b/mysql-test/suite/funcs_1/datadict/is_triggers.inc
index 3a449c93c4b..5dda419ab82 100644
--- a/mysql-test/suite/funcs_1/datadict/is_triggers.inc
+++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc
@@ -19,6 +19,9 @@
# 2008-06-11 mleich Move t/is_triggers.test to this file and
# create variants for embedded/non embedded server.
#
+
+--source include/default_charset.inc
+set @save_sql_mode=@@global.sql_mode;
set global sql_mode="";
let $engine_type = MEMORY;
@@ -265,4 +268,5 @@ ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
# Cleanup
DROP DATABASE db_datadict;
-set global sql_mode=default;
+set global sql_mode=@save_sql_mode;
+
diff --git a/mysql-test/suite/funcs_1/datadict/tables.inc b/mysql-test/suite/funcs_1/datadict/tables.inc
index 5c83b11eb66..ad9abc3f4d7 100644
--- a/mysql-test/suite/funcs_1/datadict/tables.inc
+++ b/mysql-test/suite/funcs_1/datadict/tables.inc
@@ -9,6 +9,8 @@
# 2008-06-04 mleich Create this script based on older scripts and new code.
#
+--source include/default_charset.inc
+
# Just have some tables within different databases.
--disable_warnings
DROP DATABASE IF EXISTS test1;
diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result
index e9b6b31451a..1127dc3ff44 100644
--- a/mysql-test/suite/funcs_1/r/is_triggers.result
+++ b/mysql-test/suite/funcs_1/r/is_triggers.result
@@ -1,3 +1,4 @@
+set @save_sql_mode=@@global.sql_mode;
set global sql_mode="";
SHOW TABLES FROM information_schema LIKE 'TRIGGERS';
Tables_in_information_schema (TRIGGERS)
@@ -234,4 +235,4 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;
-set global sql_mode=default;
+set global sql_mode=@save_sql_mode;
diff --git a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result
index 56c0e22d685..6ec9e7868ce 100644
--- a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result
@@ -1,3 +1,4 @@
+set @save_sql_mode=@@global.sql_mode;
set global sql_mode="";
SHOW TABLES FROM information_schema LIKE 'TRIGGERS';
Tables_in_information_schema (TRIGGERS)
@@ -231,4 +232,4 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;
-set global sql_mode=default;
+set global sql_mode=@save_sql_mode;
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc
index 74ef7f4fbed..ec8bd08c31e 100644
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc
@@ -1,5 +1,6 @@
#### suite/funcs_1/storedproc/storedproc_07.inc
#
+--source include/default_charset.inc
--source suite/funcs_1/storedproc/load_sp_tb.inc
# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc
index 9a693c5b96f..9f0304a34e2 100644
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc
@@ -1,5 +1,6 @@
#### suite/funcs_1/storedproc/storedproc_08.inc
#
+--source include/default_charset.inc
--source suite/funcs_1/storedproc/load_sp_tb.inc
# ==============================================================================
diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test
index 97ea74b9b55..bb6bb3d1d7e 100644
--- a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test
+++ b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test
@@ -3,6 +3,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
# InnoDB tables should be used
#
diff --git a/mysql-test/suite/funcs_1/t/is_columns.test b/mysql-test/suite/funcs_1/t/is_columns.test
index 5fb72713742..c167740b72c 100644
--- a/mysql-test/suite/funcs_1/t/is_columns.test
+++ b/mysql-test/suite/funcs_1/t/is_columns.test
@@ -19,6 +19,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
let $engine_type = MEMORY;
let $other_engine_type = MyISAM;
diff --git a/mysql-test/suite/funcs_1/t/is_columns_innodb.test b/mysql-test/suite/funcs_1/t/is_columns_innodb.test
index 7d8ca9a3a8e..275c9805871 100644
--- a/mysql-test/suite/funcs_1/t/is_columns_innodb.test
+++ b/mysql-test/suite/funcs_1/t/is_columns_innodb.test
@@ -13,8 +13,9 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
-
--source include/have_innodb.inc
+--source include/default_charset.inc
+
let $engine_type= InnoDB;
--source suite/funcs_1/datadict/datadict_load.inc
diff --git a/mysql-test/suite/funcs_1/t/is_columns_memory.test b/mysql-test/suite/funcs_1/t/is_columns_memory.test
index b76325d114a..8ec32895217 100644
--- a/mysql-test/suite/funcs_1/t/is_columns_memory.test
+++ b/mysql-test/suite/funcs_1/t/is_columns_memory.test
@@ -13,6 +13,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
let $engine_type= MEMORY;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam.test b/mysql-test/suite/funcs_1/t/is_columns_myisam.test
index 09b5b088489..9b9974044aa 100644
--- a/mysql-test/suite/funcs_1/t/is_columns_myisam.test
+++ b/mysql-test/suite/funcs_1/t/is_columns_myisam.test
@@ -13,6 +13,8 @@
#
--source include/not_embedded.inc
+--source include/default_charset.inc
+
let $engine_type= MyISAM;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
--source suite/funcs_1/datadict/datadict_load.inc
diff --git a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
index 6b515bc596a..76c0b4974d5 100644
--- a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
+++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
@@ -12,6 +12,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
--echo #################################################################################
--echo # Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03e.test b/mysql-test/suite/funcs_1/t/memory_trig_03e.test
index fee02fbb3d7..5224143aa2f 100644
--- a/mysql-test/suite/funcs_1/t/memory_trig_03e.test
+++ b/mysql-test/suite/funcs_1/t/memory_trig_03e.test
@@ -3,6 +3,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
# Memory tables should be used
#
diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test
index 9beb79c2288..280f935b4e2 100644
--- a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test
+++ b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test
@@ -3,6 +3,7 @@
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
+--source include/default_charset.inc
# MyISAM tables should be used
#
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
index 8171360b078..c36e336a2a7 100644
--- a/mysql-test/suite/funcs_1/t/storedproc.test
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -9,6 +9,8 @@
# - restore global sort_buffer_size after some subtest
#
############################################################################
+
+--source include/default_charset.inc
set sql_mode="";
# Bug#37746 - Arithmetic range ("int") is smaller than expected
diff --git a/mysql-test/suite/funcs_2/charset/charset_master.test b/mysql-test/suite/funcs_2/charset/charset_master.test
index 63cd5eb303d..8f3ac64c753 100644
--- a/mysql-test/suite/funcs_2/charset/charset_master.test
+++ b/mysql-test/suite/funcs_2/charset/charset_master.test
@@ -11,6 +11,8 @@
# Add checking of prerequisites + minor cleanup #
#################################################################################
+set @save_character_set_database= @@character_set_database;
+
#
#
#
@@ -695,5 +697,9 @@ let $coll= utf8_unicode_ci;
}
+--echo # Cleanup
+--disable_query_log
DROP database test;
-CREATE database test;
+let $tmp=`select @save_character_set_database`;
+eval CREATE database test character set $tmp;
+--enable_query_log
diff --git a/mysql-test/suite/funcs_2/r/innodb_charset.result b/mysql-test/suite/funcs_2/r/innodb_charset.result
index 814adbcd112..1ce5972eccc 100644
--- a/mysql-test/suite/funcs_2/r/innodb_charset.result
+++ b/mysql-test/suite/funcs_2/r/innodb_charset.result
@@ -1,3 +1,4 @@
+set @save_character_set_database= @@character_set_database;
DROP TABLE IF EXISTS test.t1;
SET NAMES armscii8;
CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_bin) ENGINE=InnoDB CHARACTER SET armscii8 COLLATE armscii8_bin;
@@ -119154,5 +119155,4 @@ DFBD 1
DFBE 1
DFBF 1
DROP TABLE IF EXISTS test.t1;
-DROP database test;
-CREATE database test;
+# Cleanup
diff --git a/mysql-test/suite/funcs_2/r/memory_charset.result b/mysql-test/suite/funcs_2/r/memory_charset.result
index c4562d3b5df..66cdada9b61 100644
--- a/mysql-test/suite/funcs_2/r/memory_charset.result
+++ b/mysql-test/suite/funcs_2/r/memory_charset.result
@@ -1,3 +1,4 @@
+set @save_character_set_database= @@character_set_database;
DROP TABLE IF EXISTS test.t1;
SET NAMES armscii8;
CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_bin) ENGINE=Memory CHARACTER SET armscii8 COLLATE armscii8_bin;
@@ -119154,5 +119155,4 @@ DFBD 1
DFBE 1
DFBF 1
DROP TABLE IF EXISTS test.t1;
-DROP database test;
-CREATE database test;
+# Cleanup
diff --git a/mysql-test/suite/funcs_2/r/myisam_charset.result b/mysql-test/suite/funcs_2/r/myisam_charset.result
index cf2b798de09..9950b446a63 100644
--- a/mysql-test/suite/funcs_2/r/myisam_charset.result
+++ b/mysql-test/suite/funcs_2/r/myisam_charset.result
@@ -1,3 +1,4 @@
+set @save_character_set_database= @@character_set_database;
DROP TABLE IF EXISTS test.t1;
SET NAMES armscii8;
CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_bin) ENGINE=MyISAM CHARACTER SET armscii8 COLLATE armscii8_bin;
@@ -119154,5 +119155,4 @@ DFBD 1
DFBE 1
DFBF 1
DROP TABLE IF EXISTS test.t1;
-DROP database test;
-CREATE database test;
+# Cleanup
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 6306686e53d..1ba6bfe3077 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -44,7 +44,8 @@ galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_var_reject_queries : assertion in inline_mysql_socket_send
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
galera_sst_mariabackup_encrypt_with_key : MDEV-19926 Galera SST tests fail
-galera_wan : MDEV-17259: Test failure on galera.galera_wan
+galera_var_node_address : MDEV-20485 Galera test failure on galera.galera_var_node_address
+galera_wan : MDEV-17259 Test failure on galera.galera_wan
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
partition : MDEV-19958 Galera test failure on galera.partition
-query_cache: MDEV-15805 Test failure on galera.query_cache \ No newline at end of file
+query_cache: MDEV-15805 Test failure on galera.query_cache
diff --git a/mysql-test/suite/gcol/inc/gcol_select.inc b/mysql-test/suite/gcol/inc/gcol_select.inc
index 7dcbcc79ab6..939d2f64e84 100644
--- a/mysql-test/suite/gcol/inc/gcol_select.inc
+++ b/mysql-test/suite/gcol/inc/gcol_select.inc
@@ -1,17 +1,22 @@
-################################################################################
-# inc/gcol_select.inc #
-# #
-# Purpose: #
-# Testing different SELECTs. #
-# #
-# #
-#------------------------------------------------------------------------------#
-# Original Author: Andrey Zhakov #
-# Original Date: 2008-09-18 #
-# Change Author: #
-# Change Date: #
-# Change: #
-################################################################################
+##############################################################################
+# inc/gcol_select.inc #
+# #
+# Purpose: #
+# Testing different SELECTs. #
+# #
+# #
+#----------------------------------------------------------------------------#
+# Original Author: Andrey Zhakov #
+# Original Date: 2008-09-18 #
+# Change Author: #
+# Change Date: #
+# Change: #
+##############################################################################
+
+--disable_query_log
+set @local_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='derived_merge=off,join_cache_hashed=off';
+--enable_query_log
# Table t1 is used below to test:
# - Join type of ALL (sequential scan of the entire table)
@@ -1161,3 +1166,7 @@ eval EXPLAIN $query;
eval $query;
DROP TABLE t1, t2, t3, t4;
+
+--disable_query_log
+set @@optimizer_switch=@local_optimizer_switch;
+--enable_query_log
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_basic.result b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
index d4c65f96e59..4e8adbd88e6 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_basic.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
@@ -164,7 +164,7 @@ c
connection default;
disconnect con1;
DROP TABLE t;
-CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b), h VARCHAR(10), j INT, m INT GENERATED ALWAYS AS(b + x), n VARCHAR(10), p VARCHAR(20) GENERATED ALWAYS AS(CONCAT(n, y)), x INT, y CHAR(20), z INT, INDEX idx1(c), INDEX idx2 (m), INDEX idx3(p));
+CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b), h VARCHAR(10), j INT, m INT GENERATED ALWAYS AS(b + x), n VARCHAR(10), p VARCHAR(20) GENERATED ALWAYS AS(CONCAT(n, RTRIM(y))), x INT, y CHAR(20), z INT, INDEX idx1(c), INDEX idx2 (m), INDEX idx3(p));
INSERT INTO t VALUES(1, 2, DEFAULT, "hhh", 3, DEFAULT, "nnn", DEFAULT, 4, "yyy", 5);
INSERT INTO t VALUES(2, 3, DEFAULT, "hhha", 4, DEFAULT, "nnna", DEFAULT, 5, "yyya", 6);
INSERT INTO t VALUES(12, 13, DEFAULT, "hhhb", 14, DEFAULT, "nnnb", DEFAULT, 15, "yyyb", 16);
@@ -1235,8 +1235,8 @@ c7 TIME GENERATED ALWAYS AS(ADDTIME(c5time_gckey,c6)) VIRTUAL,
c5timek DATE GENERATED ALWAYS AS(ADDTIME(c5time_gckey,c7)) VIRTUAL,
c7k TIME GENERATED ALWAYS AS(ADDTIME(c5time,c6)) VIRTUAL,
c8 CHAR(10),
-c9 CHAR(20)GENERATED ALWAYS AS (CONCAT(c8,c8)) VIRTUAL,
-c9k CHAR(15)GENERATED ALWAYS AS (CONCAT(c8,0)) VIRTUAL,
+c9 CHAR(20)GENERATED ALWAYS AS (CONCAT(RTRIM(c8),RTRIM(c8))) VIRTUAL,
+c9k CHAR(15)GENERATED ALWAYS AS (CONCAT(RTRIM(c8),0)) VIRTUAL,
PRIMARY KEY(c1),
KEY(c3),
KEY(c9(10)),
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result
index 6913ec698b4..3918cf95ae1 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_index.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result
@@ -54,7 +54,7 @@ c10 time GENERATED ALWAYS AS(addtime(c7,c8)) VIRTUAL,
c11 DATE GENERATED ALWAYS AS(addtime(c9,c8)) VIRTUAL,
c11a time GENERATED ALWAYS AS(addtime(c7,c10)) VIRTUAL,
c12 CHAR(1),
-c13 CHAR(2)GENERATED ALWAYS AS (concat(c12,c12)) VIRTUAL,
+c13 CHAR(2)GENERATED ALWAYS AS (concat(RTRIM(c12),RTRIM(c12))) VIRTUAL,
c14 CHAR(4)GENERATED ALWAYS AS (concat(c13,'x')) VIRTUAL,
PRIMARY KEY(c1),
KEY c13(c13),
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_basic.test b/mysql-test/suite/gcol/t/innodb_virtual_basic.test
index 72f4c6dc8c4..00b942739b0 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_basic.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_basic.test
@@ -151,7 +151,7 @@ disconnect con1;
DROP TABLE t;
# CREATE a more complex TABLE
-CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b), h VARCHAR(10), j INT, m INT GENERATED ALWAYS AS(b + x), n VARCHAR(10), p VARCHAR(20) GENERATED ALWAYS AS(CONCAT(n, y)), x INT, y CHAR(20), z INT, INDEX idx1(c), INDEX idx2 (m), INDEX idx3(p));
+CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b), h VARCHAR(10), j INT, m INT GENERATED ALWAYS AS(b + x), n VARCHAR(10), p VARCHAR(20) GENERATED ALWAYS AS(CONCAT(n, RTRIM(y))), x INT, y CHAR(20), z INT, INDEX idx1(c), INDEX idx2 (m), INDEX idx3(p));
INSERT INTO t VALUES(1, 2, DEFAULT, "hhh", 3, DEFAULT, "nnn", DEFAULT, 4, "yyy", 5);
@@ -1239,8 +1239,8 @@ CREATE TABLE t(
c5timek DATE GENERATED ALWAYS AS(ADDTIME(c5time_gckey,c7)) VIRTUAL,
c7k TIME GENERATED ALWAYS AS(ADDTIME(c5time,c6)) VIRTUAL,
c8 CHAR(10),
- c9 CHAR(20)GENERATED ALWAYS AS (CONCAT(c8,c8)) VIRTUAL,
- c9k CHAR(15)GENERATED ALWAYS AS (CONCAT(c8,0)) VIRTUAL,
+ c9 CHAR(20)GENERATED ALWAYS AS (CONCAT(RTRIM(c8),RTRIM(c8))) VIRTUAL,
+ c9k CHAR(15)GENERATED ALWAYS AS (CONCAT(RTRIM(c8),0)) VIRTUAL,
PRIMARY KEY(c1),
KEY(c3),
KEY(c9(10)),
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test
index a89ae813b05..c2f9cd78fe2 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_index.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test
@@ -63,7 +63,7 @@ CREATE TABLE t2(
c11 DATE GENERATED ALWAYS AS(addtime(c9,c8)) VIRTUAL,
c11a time GENERATED ALWAYS AS(addtime(c7,c10)) VIRTUAL,
c12 CHAR(1),
- c13 CHAR(2)GENERATED ALWAYS AS (concat(c12,c12)) VIRTUAL,
+ c13 CHAR(2)GENERATED ALWAYS AS (concat(RTRIM(c12),RTRIM(c12))) VIRTUAL,
c14 CHAR(4)GENERATED ALWAYS AS (concat(c13,'x')) VIRTUAL,
PRIMARY KEY(c1),
KEY c13(c13),
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 0015882690e..288b6bb835d 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -177,7 +177,7 @@ SET FOREIGN_KEY_CHECKS=1;
# MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE DATABASE best;
+CREATE DATABASE best default character set latin1;
CREATE TABLE t3 (a INT PRIMARY KEY,
CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB;
CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b),
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 56f80a4de3e..f5cb95b7cf2 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -953,6 +953,7 @@ DROP TABLE t1, parent;
#BUG#21514135 SCHEMA MISMATCH ERROR WHEN IMPORTING TABLESPACE AFTER
#DROPPING AN INDEX
#
+SET NAMES utf8mb4;
CREATE DATABASE source_db;
CREATE DATABASE dest_db;
CREATE TABLE source_db.t1 (
diff --git a/mysql-test/suite/innodb/r/innodb-mdev7046.result b/mysql-test/suite/innodb/r/innodb-mdev7046.result
index d00491fd7e5..08f0ac24f9c 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev7046.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev7046.result
@@ -1 +1,3 @@
-1
+show create database test;
+Database Create Database
+test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
diff --git a/mysql-test/suite/innodb/r/instant_alter_charset.result b/mysql-test/suite/innodb/r/instant_alter_charset.result
index be15b02a8c6..f8c21978327 100644
--- a/mysql-test/suite/innodb/r/instant_alter_charset.result
+++ b/mysql-test/suite/innodb/r/instant_alter_charset.result
@@ -50,7 +50,7 @@ drop table supported_types;
create table various_cases (
a char(150) charset ascii,
b varchar(150) as (a) virtual,
-c varchar(150) as (a) persistent
+c char(150) as (a) persistent
) engine=innodb;
alter table various_cases
change a a char(150) charset ascii collate ascii_bin,
@@ -63,7 +63,7 @@ alter table various_cases
change b b varchar(150) as (a) virtual,
algorithm=inplace;
alter table various_cases
-change c c varchar(150) as (a) persistent,
+change c c char(150) as (a) persistent,
algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
alter table various_cases
diff --git a/mysql-test/suite/innodb/r/recovery_shutdown.result b/mysql-test/suite/innodb/r/recovery_shutdown.result
index b21beecc24b..dc785d580fe 100644
--- a/mysql-test/suite/innodb/r/recovery_shutdown.result
+++ b/mysql-test/suite/innodb/r/recovery_shutdown.result
@@ -1,4 +1,5 @@
FLUSH TABLES;
+call mtr.add_suppression("Found 1 prepared XA transactions");
#
# MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
# while rolling back recovered incomplete transactions
@@ -8,10 +9,12 @@ BEGIN;
COMMIT;
connect con$c,localhost,root,,;
CREATE TABLE t8 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
-BEGIN;
+XA START 'x';
INSERT INTO t8 (a) SELECT NULL FROM t;
UPDATE t8 SET a=a+100, b=a;
DELETE FROM t8;
+XA END 'x';
+XA PREPARE 'x';
connect con$c,localhost,root,,;
CREATE TABLE t7 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
BEGIN;
@@ -65,5 +68,8 @@ CREATE TABLE u(a SERIAL) ENGINE=INNODB;
FLUSH TABLES;
# restart
# restart
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 1 0 x
# restart
DROP TABLE t,u;
diff --git a/mysql-test/suite/innodb/r/trx_id_future.result b/mysql-test/suite/innodb/r/trx_id_future.result
index 17b76b4b1c1..1ddc0e64f8b 100644
--- a/mysql-test/suite/innodb/r/trx_id_future.result
+++ b/mysql-test/suite/innodb/r/trx_id_future.result
@@ -8,8 +8,11 @@ INSERT INTO t1 VALUES(1);
InnoDB 0 transactions not purged
NOT FOUND /\[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum/ in mysqld.1.err
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+SET @save_count = @@max_error_count;
+SET max_error_count = 1;
SELECT * FROM t1;
a
Warnings:
Warning 1642 InnoDB: Transaction id in a record of table `test`.`t1` is newer than system-wide maximum.
+SET max_error_count = @save_count;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index e7ba5530b19..06cab983656 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/count_sessions.inc
+--source include/default_charset.inc
--echo #
--echo # Bug #19027905 ASSERT RET.SECOND DICT_CREATE_FOREIGN_CONSTRAINTS_LOW
@@ -155,7 +156,7 @@ call mtr.add_suppression("InnoDB: Cannot delete/update rows with cascading forei
--enable_query_log
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE DATABASE best;
+CREATE DATABASE best default character set latin1;
CREATE TABLE t3 (a INT PRIMARY KEY,
CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB;
CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b),
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index 961d8653e90..d383b3bf55e 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/default_charset.inc
SET NAMES utf8mb4;
@@ -585,6 +586,9 @@ DROP TABLE t1, parent;
let $source_db = source_db;
let $dest_db = dest_db;
+--source include/default_charset.inc
+SET NAMES utf8mb4;
+
eval CREATE DATABASE $source_db;
eval CREATE DATABASE $dest_db;
diff --git a/mysql-test/suite/innodb/t/innodb-fkcheck.test b/mysql-test/suite/innodb/t/innodb-fkcheck.test
index 51e36ae6984..4657edc4d65 100644
--- a/mysql-test/suite/innodb/t/innodb-fkcheck.test
+++ b/mysql-test/suite/innodb/t/innodb-fkcheck.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/default_charset.inc
#
# MDEV-10083: Orphan ibd file when playing with foreign keys
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 46eb7dd0273..47db92a0c6d 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -1,6 +1,7 @@
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
# need to restart server
--- source include/not_embedded.inc
+--source include/not_embedded.inc
CREATE SCHEMA `repro`;
CREATE TABLE `repro`.`crew` (
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index 4e32c13ee50..27c140689c1 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -2,6 +2,7 @@
--source include/have_partition.inc
# Test causes OS error printout
--source include/not_windows.inc
+--source include/default_charset.inc
--disable_query_log
--disable_result_log
@@ -30,7 +31,10 @@ RENAME TABLE t1 TO `t2_new..............................................end`;
show warnings;
drop table t1;
-DROP DATABASE test;CREATE DATABASE test;USE test;
+drop database test;
+create database test;
+use test;
+
SET @@session.storage_engine=MYISAM;
--error 0,1,1103
CREATE TABLE t1(id INT,purchased DATE)PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY='/tmp/not-existing' INDEX DIRECTORY='/tmp/not-existing',SUBPARTITION sp1));
@@ -40,9 +44,12 @@ ALTER TABLE t1 ENGINE=InnoDB;
drop table t1;
+drop database test;
+create database test;
+use test;
+
--enable_query_log
--enable_result_log
--enable_warnings
-# make sure that we have at least some ouput to avoid mtr warning
---echo 1
+show create database test;
diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.opt b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
index b5a61b9ec4b..4d6858cbe0b 100644
--- a/mysql-test/suite/innodb/t/innodb-system-table-view.opt
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
@@ -8,3 +8,5 @@
--innodb-sys-fields
--innodb-sys-foreign
--innodb-sys-foreign-cols
+--character_set_server="latin1"
+--collation_server="latin1_swedish_ci"
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index fb0fe8fccd1..b223113b6ff 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -13,7 +13,8 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
let $restart_noprint=2;
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt
new file mode 100644
index 00000000000..c61abdefbdb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt
@@ -0,0 +1 @@
+--innodb-log-optimize-ddl \ No newline at end of file
diff --git a/mysql-test/suite/innodb/t/instant_alter_charset.test b/mysql-test/suite/innodb/t/instant_alter_charset.test
index b6e45cb6924..82ae1040f57 100644
--- a/mysql-test/suite/innodb/t/instant_alter_charset.test
+++ b/mysql-test/suite/innodb/t/instant_alter_charset.test
@@ -52,7 +52,7 @@ drop table supported_types;
create table various_cases (
a char(150) charset ascii,
b varchar(150) as (a) virtual,
- c varchar(150) as (a) persistent
+ c char(150) as (a) persistent
) engine=innodb;
alter table various_cases
@@ -70,7 +70,7 @@ alter table various_cases
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table various_cases
- change c c varchar(150) as (a) persistent,
+ change c c char(150) as (a) persistent,
algorithm=inplace;
# Can not grow storage in bytes from CHAR
diff --git a/mysql-test/suite/innodb/t/log_alter_table.opt b/mysql-test/suite/innodb/t/log_alter_table.opt
new file mode 100644
index 00000000000..ef236fcec40
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_alter_table.opt
@@ -0,0 +1 @@
+--innodb-log-optimize-ddl
diff --git a/mysql-test/suite/innodb/t/recovery_shutdown.test b/mysql-test/suite/innodb/t/recovery_shutdown.test
index ede5f1973c4..d9079f2e42c 100644
--- a/mysql-test/suite/innodb/t/recovery_shutdown.test
+++ b/mysql-test/suite/innodb/t/recovery_shutdown.test
@@ -6,6 +6,7 @@
# Flush any open myisam tables from previous tests
FLUSH TABLES;
+call mtr.add_suppression("Found 1 prepared XA transactions");
--echo #
--echo # MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
@@ -26,6 +27,15 @@ dec $c;
COMMIT;
let $c = $trx;
+connect (con$c,localhost,root,,);
+eval CREATE TABLE t$c (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
+XA START 'x';
+eval INSERT INTO t$c (a) SELECT NULL FROM t;
+eval UPDATE t$c SET a=a+$size, b=a;
+eval DELETE FROM t$c;
+XA END 'x';
+XA PREPARE 'x';
+dec $c;
while ($c)
{
connect (con$c,localhost,root,,);
@@ -56,12 +66,17 @@ FLUSH TABLES;
# Perform a slow shutdown in order to roll back all recovered transactions
# and to avoid locking conflicts with the DROP TABLE below.
+XA RECOVER;
--disable_query_log
SET GLOBAL innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
--disable_query_log
let $c = $trx;
+disconnect con$c;
+XA ROLLBACK 'x';
+eval DROP TABLE t$c;
+dec $c;
while ($c)
{
disconnect con$c;
diff --git a/mysql-test/suite/innodb/t/trx_id_future.test b/mysql-test/suite/innodb/t/trx_id_future.test
index 391650c13d4..b897800fa91 100644
--- a/mysql-test/suite/innodb/t/trx_id_future.test
+++ b/mysql-test/suite/innodb/t/trx_id_future.test
@@ -3,7 +3,6 @@
--echo # IN THE FUTURE
--echo #
---source include/not_debug.inc
--source include/have_innodb.inc
--source include/not_embedded.inc
@@ -58,6 +57,8 @@ syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
EOF
+# Debug assertions would fail due to the injected corruption.
+--let $restart_parameters= --loose-skip-debug-assert
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
@@ -66,5 +67,9 @@ let SEARCH_PATTERN= \[Warning\] InnoDB: A transaction id in a record of table `t
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+# A debug assertion would cause a duplicated message to be output.
+SET @save_count = @@max_error_count;
+SET max_error_count = 1;
SELECT * FROM t1;
+SET max_error_count = @save_count;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test b/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test
index 18bce1a8105..d95c551e2db 100644
--- a/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test
+++ b/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc
+--source include/have_64bit.inc
let $restart_noprint=2;
--echo #
diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
index 6fa4f25c60e..e3d350b34a3 100644
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
@@ -1,7 +1,9 @@
-#------------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
# Test With alter/create/drop index
-#------------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+
--source include/have_innodb.inc
+--source include/default_charset.inc
let collation=UTF8_UNICODE_CI;
--source include/have_collation.inc
diff --git a/mysql-test/suite/innodb_gis/r/rtree_compress2.result b/mysql-test/suite/innodb_gis/r/rtree_compress2.result
index 3fa6b5e8c01..503be08c66f 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_compress2.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_compress2.result
@@ -8,7 +8,9 @@ insert into t1 values (i, Point(i, i));
set i = i + 1;
end while;
end|
+begin;
CALL insert_t1(70000);
+commit;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb_gis/t/rtree_compress2.test b/mysql-test/suite/innodb_gis/t/rtree_compress2.test
index 95be8b8f357..051fcfcac46 100644
--- a/mysql-test/suite/innodb_gis/t/rtree_compress2.test
+++ b/mysql-test/suite/innodb_gis/t/rtree_compress2.test
@@ -28,7 +28,9 @@ end|
delimiter ;|
# Test level 3 rtree.
+begin;
CALL insert_t1(70000);
+commit;
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb_gis/t/update_root.test b/mysql-test/suite/innodb_gis/t/update_root.test
index 395fc715f31..c6d3ba60650 100644
--- a/mysql-test/suite/innodb_gis/t/update_root.test
+++ b/mysql-test/suite/innodb_gis/t/update_root.test
@@ -8,6 +8,8 @@
--source include/have_debug.inc
--source include/big_test.inc
--source include/not_valgrind.inc
+--source include/have_64bit.inc
+
# Create table with R-tree index.
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
index c81eca69db8..e42f1baed74 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -10,7 +10,8 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
--- source include/innodb_page_size_small.inc
+--source include/innodb_page_size_small.inc
+--source include/default_charset.inc
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
diff --git a/mysql-test/suite/maria/icp.test b/mysql-test/suite/maria/icp.test
index d8af34daf2e..83d770dd8fd 100644
--- a/mysql-test/suite/maria/icp.test
+++ b/mysql-test/suite/maria/icp.test
@@ -3,6 +3,7 @@
#
--source include/have_maria.inc
+--source include/default_optimizer_switch.inc
set @save_storage_engine= @@storage_engine;
set storage_engine=Maria;
diff --git a/mysql-test/suite/maria/maria-big.test b/mysql-test/suite/maria/maria-big.test
index 5b4b6c4defe..6dc56756cf7 100644
--- a/mysql-test/suite/maria/maria-big.test
+++ b/mysql-test/suite/maria/maria-big.test
@@ -69,6 +69,6 @@ drop table t1;
--disable_result_log
--disable_query_log
set global aria_log_file_size=default;
-set global max_allowed_packet=default;
+eval set global max_allowed_packet= $default_max_allowed_packet;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/maria-gis-recovery.test b/mysql-test/suite/maria/maria-gis-recovery.test
index c40cc3788de..61e1e8362dc 100644
--- a/mysql-test/suite/maria/maria-gis-recovery.test
+++ b/mysql-test/suite/maria/maria-gis-recovery.test
@@ -5,6 +5,7 @@
--source include/have_debug.inc
--source include/have_maria.inc
--source include/have_geometry.inc
+--source include/default_charset.inc
set global aria_log_file_size=4294967295;
let $MARIA_LOG=../../tmp;
diff --git a/mysql-test/suite/maria/maria-no-logging.test b/mysql-test/suite/maria/maria-no-logging.test
index 7055a842510..fb2f34f7708 100644
--- a/mysql-test/suite/maria/maria-no-logging.test
+++ b/mysql-test/suite/maria/maria-no-logging.test
@@ -3,6 +3,7 @@
--source include/have_maria.inc
# can't restart server in embedded
--source include/not_embedded.inc
+--source include/default_charset.inc
set global aria_log_file_size=4294959104;
diff --git a/mysql-test/suite/maria/maria-recover.test b/mysql-test/suite/maria/maria-recover.test
index 893cd5e601d..36fa41d9adb 100644
--- a/mysql-test/suite/maria/maria-recover.test
+++ b/mysql-test/suite/maria/maria-recover.test
@@ -1,6 +1,7 @@
# Test of the --aria-recover-options option.
--source include/have_maria.inc
+--source include/default_charset.inc
#
# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
diff --git a/mysql-test/suite/maria/maria-recovery.test b/mysql-test/suite/maria/maria-recovery.test
index a1671a56d53..04f5f665bb7 100644
--- a/mysql-test/suite/maria/maria-recovery.test
+++ b/mysql-test/suite/maria/maria-recovery.test
@@ -4,6 +4,7 @@
# Binary must be compiled with debug for crash to occur
--source include/have_debug.inc
--source include/have_maria.inc
+--source include/default_charset.inc
set global aria_log_file_size=4294959104;
let $MARIA_LOG=../../tmp;
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 09ce22411eb..3c0b8f28800 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -302,28 +302,29 @@ check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
-select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" and variable_name not like "aria_used_for_temp_tables" order by 1;
+select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" order by 1;
Variable_name Value
-aria_block_size 8192
-aria_checkpoint_interval 30
-aria_checkpoint_log_activity 1048576
-aria_encrypt_tables OFF
-aria_force_start_after_recovery_failures 0
-aria_group_commit none
-aria_group_commit_interval 0
-aria_log_file_size 4294959104
-aria_log_purge_type immediate
-aria_max_sort_file_size 9223372036853727232
-aria_pagecache_age_threshold 300
-aria_pagecache_buffer_size 8388608
-aria_pagecache_division_limit 100
-aria_pagecache_file_hash_size 512
-aria_page_checksum OFF
-aria_recover_options BACKUP,QUICK
-aria_repair_threads 1
-aria_sort_buffer_size 268434432
-aria_stats_method nulls_unequal
-aria_sync_log_dir NEWFILE
+aria_block_size #
+aria_checkpoint_interval #
+aria_checkpoint_log_activity #
+aria_encrypt_tables #
+aria_force_start_after_recovery_failures #
+aria_group_commit #
+aria_group_commit_interval #
+aria_log_file_size #
+aria_log_purge_type #
+aria_max_sort_file_size #
+aria_pagecache_age_threshold #
+aria_pagecache_buffer_size #
+aria_pagecache_division_limit #
+aria_pagecache_file_hash_size #
+aria_page_checksum #
+aria_recover_options #
+aria_repair_threads #
+aria_sort_buffer_size #
+aria_stats_method #
+aria_sync_log_dir #
+aria_used_for_temp_tables #
show status like 'aria%';
Variable_name Value
Aria_pagecache_blocks_not_flushed #
diff --git a/mysql-test/suite/maria/maria3.test b/mysql-test/suite/maria/maria3.test
index b4e3e30d63f..fd0d5c67a57 100644
--- a/mysql-test/suite/maria/maria3.test
+++ b/mysql-test/suite/maria/maria3.test
@@ -258,9 +258,8 @@ update t1 set s1=2 where seq=1;
check table t1 extended;
drop table t1;
-# Fix if we are using safemalloc
---replace_result 8388572 8388600 134217692 134217720
-select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" and variable_name not like "aria_used_for_temp_tables" order by 1;
+--replace_column 2 #
+select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" order by 1;
--replace_column 2 #
show status like 'aria%';
diff --git a/mysql-test/suite/parts/inc/part_exch_qa_4.inc b/mysql-test/suite/parts/inc/part_exch_qa_4.inc
index d1de0298516..55ac87ec0b2 100644
--- a/mysql-test/suite/parts/inc/part_exch_qa_4.inc
+++ b/mysql-test/suite/parts/inc/part_exch_qa_4.inc
@@ -1,3 +1,5 @@
+--source include/default_charset.inc
+
CREATE DATABASE test_2;
USE test;
diff --git a/mysql-test/suite/parts/inc/part_exch_qa_8.inc b/mysql-test/suite/parts/inc/part_exch_qa_8.inc
index 56c050e3481..410c9840cc1 100644
--- a/mysql-test/suite/parts/inc/part_exch_qa_8.inc
+++ b/mysql-test/suite/parts/inc/part_exch_qa_8.inc
@@ -1,3 +1,5 @@
+--source include/default_charset.inc
+
CREATE USER test2@localhost;
--source include/not_embedded.inc
diff --git a/mysql-test/suite/parts/inc/partition_mgm.inc b/mysql-test/suite/parts/inc/partition_mgm.inc
index 5386a929db0..dcfdb544345 100644
--- a/mysql-test/suite/parts/inc/partition_mgm.inc
+++ b/mysql-test/suite/parts/inc/partition_mgm.inc
@@ -16,6 +16,7 @@
# Original Author: mattiasj #
# Original Date: 2008-06-27 #
################################################################################
+--source include/default_charset.inc
--enable_abort_on_error
let $old_db= `SELECT DATABASE()`;
diff --git a/mysql-test/suite/perfschema/include/hostcache_set_state.inc b/mysql-test/suite/perfschema/include/hostcache_set_state.inc
index 25dd56a4e0d..29f321236bd 100644
--- a/mysql-test/suite/perfschema/include/hostcache_set_state.inc
+++ b/mysql-test/suite/perfschema/include/hostcache_set_state.inc
@@ -9,10 +9,10 @@ flush privileges;
# Print critical setup
-select @@global.debug;
-select @@global.max_connect_errors;
-select @@global.max_user_connections;
-select @@global.max_connections;
+#select @@global.debug;
+#select @@global.max_connect_errors;
+#select @@global.max_user_connections;
+#select @@global.max_connections;
# Make sure there are no remaining records that can change the test outcome
@@ -20,4 +20,3 @@ select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
select `User`, `Host` from mysql.`user` where `user` like '192.%';
select `User`, `Host` from mysql.`user` where `user` like '2001:%';
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
-
diff --git a/mysql-test/suite/perfschema/include/stage_setup.inc b/mysql-test/suite/perfschema/include/stage_setup.inc
index 85ade046939..683c4561c15 100644
--- a/mysql-test/suite/perfschema/include/stage_setup.inc
+++ b/mysql-test/suite/perfschema/include/stage_setup.inc
@@ -121,10 +121,12 @@ begin
where thread_id = my_thread_id
and nesting_event_id = my_statement_id
order by event_id asc;
+ # Ignore query cache as it may not be enabled
select username, event_name, nesting_event_type
from performance_schema.events_stages_history
where thread_id = my_thread_id
- and nesting_event_id = my_statement_id
+ and nesting_event_id = my_statement_id and
+ event_name not like "%query cache%"
order by event_id asc;
end;
else
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
index 0abbc7326dc..27243b52422 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
index c2ec1e1d1e4..7879919b09d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
index fd286dc4c24..1d5923483c9 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
index d4887df429d..87fc75817df 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
index 684897a3b38..949fa8f9c3e 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
index 7f6de0de46d..b2e0fb60811 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
index 1f8345a8315..bfc7fde5be8 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
index 3f069d515be..41eb9636e31 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
index 9a85430a6d7..22dd7e7632c 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index 011af9b2eaa..f301df94ce6 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
index cfc6c8e4f66..14a6ace09e4 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
index 357aa07f08d..6cca75f9775 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-1024
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
index 7963bed8213..6d278da3812 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
index 3852a675f81..abe9a606bc4 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
index f42a300e6ea..18986674491 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
index d1ce2ac0c25..88ac817ce17 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
index 683376fb088..a5f70873ed9 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
index 353c4a55772..86e7bf5780b 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
index 93bcca91300..42d86e858fb 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
index d386d30c2d7..87e97ba2138 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
index 41006170ab4..bcd47243d03 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
index d67f8cce707..5c24a86248a 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
index ccb3c7564f2..68ea9a1d826 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
index 01a70fd2183..5b1f546b30e 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
index b4f1a39fcce..0a3a3329c1e 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
index 22271f4ba5f..493ada909b7 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
index dea4d07f593..a36d1442ee6 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index 5f9f47fc8da..7cfb6f87277 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
index 8fe9a0954a3..f9d2b556804 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-1024
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
@@ -22,8 +10,8 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
-select @@global.max_connections into @saved_max_connections;
-select @@global.max_user_connections into @saved_max_user_connections;
+SET @saved_max_connections=@@global.max_connections;
+SET @saved_max_user_connections=@@global.max_user_connections;
create user 'quota'@'santa.claus.ipv6.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
index baddc88b116..6d98c2cc186 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
index 59891d359ff..22ce0c3e809 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
index 9e88dcf66b3..a78ba09513c 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
index 7bbff5f30db..da1570f1b37 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
@@ -3,18 +3,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
index d35dc133015..a4cc3eeb0d0 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
index 03be70e1553..75f8e5391cf 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
index 35b11567252..ddb44157f44 100644
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -2,18 +2,6 @@ flush status;
flush hosts;
flush user_resources;
flush privileges;
-select @@global.debug;
-@@global.debug
-
-select @@global.max_connect_errors;
-@@global.max_connect_errors
-100
-select @@global.max_user_connections;
-@@global.max_user_connections
-0
-select @@global.max_connections;
-@@global.max_connections
-151
select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
User Host
select `User`, `Host` from mysql.`user` where `user` like '192.%';
diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result
index 837c2573a72..ae64c90582c 100644
--- a/mysql-test/suite/perfschema/r/query_cache.result
+++ b/mysql-test/suite/perfschema/r/query_cache.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@query_cache_size;
drop table if exists t1;
create table t1 (a int not null);
insert into t1 values (1), (2), (3);
@@ -63,6 +64,6 @@ Qcache_inserts 1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
-SET GLOBAL query_cache_size= default;
+SET GLOBAL query_cache_size=@save_query_cache_size;
drop table t1;
flush status;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index 11531124cae..aab68fa7cc7 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -9,7 +9,6 @@ user1 statement/sql/flush flush tables with read lock
username event_name nesting_event_type
username event_name nesting_event_type
user1 stage/sql/Init STATEMENT
-user1 stage/sql/Waiting for query cache lock STATEMENT
user1 stage/sql/Init STATEMENT
user1 stage/sql/Query end STATEMENT
user1 stage/sql/Commit STATEMENT
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
index df82a5c047d..6bed01e50bf 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
@@ -1,4 +1,3 @@
-
#
# Tests for the performance_schema host_cache.
#
@@ -9,6 +8,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
index f99cbc80577..3c72de8a05e 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
index 08cbe8d15af..5cbe4c30530 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Hostname 'santa.claus.ipv4.example.com' does not resolve to '192.0.2.4'.
# [Note] Hostname 'santa.claus.ipv4.example.com' has the following IP addresses:
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
index 2f5f12fe0ab..c0639cd6b86 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Hostname 'santa.claus.ipv4.example.com' does not resolve to '192.0.2.4'.
# [Note] Hostname 'santa.claus.ipv4.example.com' has the following IP addresses:
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
index 808a1b927d7..3b69e0731a0 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# no reverse address mapping.
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
index b46661c6852..e6478c13951 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# no reverse address mapping.
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
index 6f763d8c666..b4b11526af6 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
index eb69c2a5365..06f0f7d29ee 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
index da2a2bbc725..325460e66ba 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
@@ -12,6 +12,7 @@
--source include/have_debug.inc
--source include/have_perfschema.inc
--source include/have_plugin_auth.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
index b18dcd5f494..6990a4e7118 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
@@ -11,6 +11,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
index 4766dbef778..b37bfc79ada 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
@@ -8,6 +8,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
index 4eb630f6350..c0349184506 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
@@ -11,6 +11,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
index ab72e0f4340..187879985c9 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
index 6152399503b..a78c0dab4eb 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
index 06776de6b27..23ecd51eb4f 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# no reverse address mapping.
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
index 72bb7fac6af..4b6c91c3df3 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
@@ -9,6 +9,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# no reverse address mapping.
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
index b39f3478146..ea331647b48 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
@@ -8,6 +8,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
index de58219d490..2b949098bad 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
@@ -8,6 +8,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
index f276e759f75..11c45724f70 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv6.example.com' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
index a5ac18a8818..bdbc0e3c025 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv6.example.com' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
index 9f951273e98..1eb0d3ec41f 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Hostname 'santa.claus.ipv6.example.com' does not resolve to '2001:db8::6:6'.
# [Note] Hostname 'santa.claus.ipv6.example.com' has the following IP addresses:
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
index 361a3ce6bd1..f8a3cc23c00 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Hostname 'santa.claus.ipv6.example.com' does not resolve to '2001:db8::6:6'.
# [Note] Hostname 'santa.claus.ipv6.example.com' has the following IP addresses:
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
index 81427e86c5e..6493bb61a1a 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '192.0.2.4' could not be resolved:
# no reverse address mapping.
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
index 4836dfc2d36..065ae02dd49 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
index 7ce12639b7f..9ebafc9627d 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv6.example.com' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
index 9ce4fb926e6..136b3c7a24f 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] Host name 'santa.claus.ipv6.example.com' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
index 9c8168e573a..3a822bfacb3 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
@@ -12,6 +12,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
--source include/have_plugin_auth.inc
# Enforce a clean state
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
index 4b2088ce37f..a80feadb230 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
@@ -1,2 +1,3 @@
+--disable-skip-name-resolve
--bind-address=::
--max-user-connections=1024
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
index 8948ea45e37..b14fff1cc72 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
@@ -12,13 +12,14 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
--source ../include/hostcache_set_state.inc
-select @@global.max_connections into @saved_max_connections;
-select @@global.max_user_connections into @saved_max_user_connections;
+SET @saved_max_connections=@@global.max_connections;
+SET @saved_max_user_connections=@@global.max_user_connections;
create user 'quota'@'santa.claus.ipv6.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
index 7e49ed62b93..b44b58eb0d5 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '2001:db8::6:6' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
index 3cdd87e4cf9..073451c7e75 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '2001:db8::6:6' could not be resolved:
# Temporary failure in name resolution
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
index 62876e859cb..a7b1a961f09 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '2001:db8::6:6' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
index 054940e4a02..5c3d643b166 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
@@ -10,6 +10,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# [Warning] IP address '2001:db8::6:6' could not be resolved:
# Name or service not known
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
index 811c5c51c26..7dcfbb922e5 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
@@ -9,6 +9,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt
index c2bb4d156af..063beb402d7 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt
@@ -1 +1,2 @@
+--disable-skip-name-resolve
--bind-address=::
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
index c11922624c6..3ea4451c7aa 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
@@ -9,6 +9,7 @@
--source include/have_debug.inc
--source include/check_ipv6.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
index 9e5c88b8bd5..65f33ce73a8 100644
--- a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
+++ b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
@@ -8,6 +8,7 @@
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_perfschema.inc
+--source include/have_hostname_cache.inc
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test
index 802e574f89b..4c130813611 100644
--- a/mysql-test/suite/perfschema/t/query_cache.test
+++ b/mysql-test/suite/perfschema/t/query_cache.test
@@ -7,6 +7,8 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+set @save_query_cache_size=@@query_cache_size;
+
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -50,7 +52,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
-SET GLOBAL query_cache_size= default;
+SET GLOBAL query_cache_size=@save_query_cache_size;
drop table t1;
flush status;
diff --git a/mysql-test/suite/perfschema/t/stage_mdl_global-master.opt b/mysql-test/suite/perfschema/t/stage_mdl_global-master.opt
deleted file mode 100644
index a00258bc48c..00000000000
--- a/mysql-test/suite/perfschema/t/stage_mdl_global-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---query_cache_type=1
diff --git a/mysql-test/suite/perfschema/t/stage_mdl_global.opt b/mysql-test/suite/perfschema/t/stage_mdl_global.opt
new file mode 100644
index 00000000000..ca3d8a72f9f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/stage_mdl_global.opt
@@ -0,0 +1,2 @@
+--query-cache-size=1048576
+--query-cache-type=OFF
diff --git a/mysql-test/suite/period/r/versioning.result b/mysql-test/suite/period/r/versioning.result
index efb7a646e87..6a55e48217c 100644
--- a/mysql-test/suite/period/r/versioning.result
+++ b/mysql-test/suite/period/r/versioning.result
@@ -87,8 +87,4 @@ x s e if(row_start = @ins_time, "OLD", "NEW") check_row(row_start, row_end)
2 1999-01-01 1999-12-12 OLD CURRENT ROW
6 2000-01-01 2018-01-01 NEW CURRENT ROW
drop table t,log_tbl;
-drop function check_row;
-drop function current_row;
-drop procedure verify_trt;
-drop procedure verify_trt_dummy;
drop procedure log;
diff --git a/mysql-test/suite/period/t/versioning.test b/mysql-test/suite/period/t/versioning.test
index ea20344515d..5d38d81349e 100644
--- a/mysql-test/suite/period/t/versioning.test
+++ b/mysql-test/suite/period/t/versioning.test
@@ -57,8 +57,5 @@ select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
order by x, s, e, row_start;
drop table t,log_tbl;
-drop function check_row;
-drop function current_row;
-drop procedure verify_trt;
-drop procedure verify_trt_dummy;
drop procedure log;
+source suite/versioning/common_finish.inc;
diff --git a/mysql-test/suite/plugins/r/qc_info.result b/mysql-test/suite/plugins/r/qc_info.result
index b9ed48b6598..41073359e93 100644
--- a/mysql-test/suite/plugins/r/qc_info.result
+++ b/mysql-test/suite/plugins/r/qc_info.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@global.query_cache_size;
set global query_cache_type=ON;
set local query_cache_type=ON;
set global query_cache_size=1355776;
@@ -55,3 +56,4 @@ show query_cache_info;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
flush query_cache_info;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
+set @@global.query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/suite/plugins/r/qc_info_priv.result b/mysql-test/suite/plugins/r/qc_info_priv.result
index 9863d7f98a8..78ea78a33b8 100644
--- a/mysql-test/suite/plugins/r/qc_info_priv.result
+++ b/mysql-test/suite/plugins/r/qc_info_priv.result
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@global.query_cache_size;
set global query_cache_type=ON;
set local query_cache_type=ON;
set global query_cache_size=1355776;
@@ -43,5 +44,5 @@ count(*)
connection default;
drop user mysqltest;
drop table t1;
-set global query_cache_size= default;
+set @@global.query_cache_size=@save_query_cache_size;
set global query_cache_type=default;
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test
index 165b7d4c3b8..8b6b820934f 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_load.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test
@@ -1,4 +1,4 @@
-if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active'`)
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active' and @@feedback_url <> ""`)
{
--skip Feedback plugin is not active
}
diff --git a/mysql-test/suite/plugins/t/qc_info.test b/mysql-test/suite/plugins/t/qc_info.test
index ba642a817e7..8803e907b89 100644
--- a/mysql-test/suite/plugins/t/qc_info.test
+++ b/mysql-test/suite/plugins/t/qc_info.test
@@ -1,3 +1,5 @@
+set @save_query_cache_size=@@global.query_cache_size;
+--source include/default_charset.inc
--source qc_info_init.inc
# test that hits are correctly incremented
@@ -21,3 +23,4 @@ show query_cache_info;
--error ER_PARSE_ERROR
flush query_cache_info;
+set @@global.query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/suite/plugins/t/qc_info_init.inc b/mysql-test/suite/plugins/t/qc_info_init.inc
index 4f125432876..c3f700f08d0 100644
--- a/mysql-test/suite/plugins/t/qc_info_init.inc
+++ b/mysql-test/suite/plugins/t/qc_info_init.inc
@@ -32,4 +32,3 @@ set time_zone= @time_zone, default_week_format= @default_week_format, character_
--sorted_result
--replace_column 5 # 19 # 23 #
select * from information_schema.query_cache_info;
-
diff --git a/mysql-test/suite/plugins/t/qc_info_priv.test b/mysql-test/suite/plugins/t/qc_info_priv.test
index adcf882be9f..59258731508 100644
--- a/mysql-test/suite/plugins/t/qc_info_priv.test
+++ b/mysql-test/suite/plugins/t/qc_info_priv.test
@@ -1,3 +1,4 @@
+set @save_query_cache_size=@@global.query_cache_size;
--source include/not_embedded.inc
--source qc_info_init.inc
@@ -11,5 +12,5 @@ connection default;
drop user mysqltest;
drop table t1;
-set global query_cache_size= default;
+set @@global.query_cache_size=@save_query_cache_size;
set global query_cache_type=default;
diff --git a/mysql-test/suite/roles/acl_statistics.opt b/mysql-test/suite/roles/acl_statistics.opt
new file mode 100644
index 00000000000..24307596e69
--- /dev/null
+++ b/mysql-test/suite/roles/acl_statistics.opt
@@ -0,0 +1 @@
+--disable-skip-name-resolve
diff --git a/mysql-test/suite/roles/definer.test b/mysql-test/suite/roles/definer.test
index 16d23386741..c1e56f3f94b 100644
--- a/mysql-test/suite/roles/definer.test
+++ b/mysql-test/suite/roles/definer.test
@@ -4,7 +4,9 @@
# create event
# mysqldump dumping the definer
-source include/not_embedded.inc;
+--source include/not_embedded.inc
+--source include/default_charset.inc
+
let MYSQLD_DATADIR=`select @@datadir`;
create database mysqltest1;
diff --git a/mysql-test/suite/roles/show_create_database-10463.test b/mysql-test/suite/roles/show_create_database-10463.test
index 6278cc71c02..b1eaaf5ff5a 100644
--- a/mysql-test/suite/roles/show_create_database-10463.test
+++ b/mysql-test/suite/roles/show_create_database-10463.test
@@ -1,4 +1,5 @@
-source include/not_embedded.inc;
+--source include/not_embedded.inc
+--source include/default_charset.inc
drop database if exists db;
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index 3ac023c9f4f..77b01bd8d1d 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -17,4 +17,5 @@ rpl_row_binlog_max_cache_size : MDEV-11092
rpl_row_index_choice : MDEV-11666
rpl_parallel2 : fails after MDEV-16172
rpl_semi_sync_after_sync : fails after MDEV-16172
+rpl_slave_grp_exec: MDEV-10514
rpl_auto_increment_update_failure : disabled for now
diff --git a/mysql-test/suite/rpl/r/mdev_17588.result b/mysql-test/suite/rpl/r/mdev_17588.result
index f6b4728bd88..54990a450e3 100644
--- a/mysql-test/suite/rpl/r/mdev_17588.result
+++ b/mysql-test/suite/rpl/r/mdev_17588.result
@@ -1,18 +1,16 @@
include/master-slave.inc
[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
connection master;
create table t1 (a int) engine=innodb;
create table t2 (a int);
create table t3 (a int) engine=innodb;
-include/save_master_gtid.inc
connection slave;
-include/wait_for_slave_sql_error.inc [errno=1286]
-Last_Error = 'Error 'Unknown storage engine 'innodb'' on query. Default database: 'test'. Query: 'create table t1 (a int) engine=innodb''
-STOP SLAVE IO_THREAD;
-include/wait_for_slave_to_stop.inc
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
+include/wait_for_slave_sql_error_and_skip.inc [errno=1286]
+# Asserted this: Status should be 'Slave has read all relay log...'
show tables;
Tables_in_test
t2
diff --git a/mysql-test/suite/rpl/t/mdev_17588.test b/mysql-test/suite/rpl/t/mdev_17588.test
index e9a340cbd25..44644158dff 100644
--- a/mysql-test/suite/rpl/t/mdev_17588.test
+++ b/mysql-test/suite/rpl/t/mdev_17588.test
@@ -1,23 +1,28 @@
--source include/master-slave.inc
--source include/have_innodb.inc
+--connection slave
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
--connection master
create table t1 (a int) engine=innodb;
create table t2 (a int);
create table t3 (a int) engine=innodb;
---source include/save_master_gtid.inc
+--save_master_pos
--connection slave
# Using ER_UNKNOWN_STORAGE_ENGINE wont work
let $slave_sql_errno= 1286;
---source include/wait_for_slave_sql_error.inc
---let $status_items= Last_Error
---source include/show_slave_status.inc
-STOP SLAVE IO_THREAD;
-source include/wait_for_slave_to_stop.inc;
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
+--source include/wait_for_slave_sql_error_and_skip.inc
+--sync_with_master
+
+--let $assert_text= Status should be 'Slave has read all relay log...'
+--let $assert_cond= "[SHOW SLAVE STATUS, Slave_SQL_Running_State, 1]"
+#Like "Slave has read all relay log%"
+--source include/rpl_assert.inc
+
show tables;
show create table t2;
--error ER_NO_SUCH_TABLE
diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
index 09784ff5d1e..dff31cb2b97 100644
--- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc
+++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
@@ -12,62 +12,24 @@ set sql_mode=ansi_quotes;
# global_value_origin=SQL
set global div_precision_increment=5;
---replace_regex /^\/\S+/PATH/
---replace_result $MASTER_MYPORT MASTER_MYPORT 392192 299008
-select * from information_schema.system_variables
- where variable_name not like 'aria%' and
- variable_name not like 'debug%' and
- variable_name not like 'wsrep%' and
- variable_name not in (
- 'in_predicate_conversion_threshold',
- 'have_openssl',
- 'have_symlink',
- 'have_sanitizer',
- 'hostname',
- 'large_files_support', 'log_tc_size',
- 'lower_case_file_system',
- 'lower_case_table_names',
- 'open_files_limit',
- 'plugin_maturity',
- 'rand_seed1',
- 'rand_seed2',
- 'system_time_zone',
- 'tls_version',
- 'version_comment',
- 'version_source_revision',
- 'version_compile_machine', 'version_compile_os',
- 'version_malloc_library', 'version_ssl_library', 'version'
- )
- order by variable_name;
+# Don't show values or origin as they may have been changed by the test
+# or different recompilation. Remove variables that are depending on
+# configuration options
-# now various metadata but no values, for variables where
-# values change often
-select VARIABLE_NAME, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT,
- NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE,
- ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
+--replace_regex /^\/\S+/PATH/
+select VARIABLE_NAME,VARIABLE_SCOPE,VARIABLE_TYPE,VARIABLE_COMMENT,NUMERIC_MIN_VALUE,NUMERIC_MAX_VALUE,NUMERIC_BLOCK_SIZE,ENUM_VALUE_LIST,READ_ONLY,COMMAND_LINE_ARGUMENT
from information_schema.system_variables
- where variable_name in (
- 'have_openssl',
- 'have_symlink',
- 'hostname',
- 'large_files_support',
- 'lower_case_file_system',
- 'lower_case_table_names',
- 'open_files_limit',
- 'rand_seed1',
- 'rand_seed2',
- 'system_time_zone',
- 'tls_version',
- 'version_comment',
- 'version_source_revision',
- 'version_compile_machine', 'version_compile_os',
- 'version_malloc_library', 'version_ssl_library', 'version'
+ where variable_name not like 'debug%' and
+ variable_name not like 'wsrep%' and
+ variable_name not like 's3%' and
+ variable_name not in (
+ 'have_sanitizer',
+ 'log_tc_size'
)
order by variable_name;
# yet less data: no values, no blocks size, no min/max value.
-select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE,
- VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
+select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
from information_schema.system_variables
where variable_name in (
'log_tc_size'
diff --git a/mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result
index 94835829275..9c91653d87a 100644
--- a/mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result
@@ -1,20 +1,20 @@
-select @@global.aria_pagecache_buffer_size;
-@@global.aria_pagecache_buffer_size
-8388608
+select @@global.aria_pagecache_buffer_size > 0;
+@@global.aria_pagecache_buffer_size > 0
+1
select @@session.aria_pagecache_buffer_size;
ERROR HY000: Variable 'aria_pagecache_buffer_size' is a GLOBAL variable
show global variables like 'aria_pagecache_buffer_size';
Variable_name Value
-aria_pagecache_buffer_size 8388608
+aria_pagecache_buffer_size #
show session variables like 'aria_pagecache_buffer_size';
Variable_name Value
-aria_pagecache_buffer_size 8388608
+aria_pagecache_buffer_size #
select * from information_schema.global_variables where variable_name='aria_pagecache_buffer_size';
VARIABLE_NAME VARIABLE_VALUE
-ARIA_PAGECACHE_BUFFER_SIZE 8388608
+ARIA_PAGECACHE_BUFFER_SIZE #
select * from information_schema.session_variables where variable_name='aria_pagecache_buffer_size';
VARIABLE_NAME VARIABLE_VALUE
-ARIA_PAGECACHE_BUFFER_SIZE 8388608
+ARIA_PAGECACHE_BUFFER_SIZE #
set global aria_pagecache_buffer_size=1;
ERROR HY000: Variable 'aria_pagecache_buffer_size' is a read only variable
set session aria_pagecache_buffer_size=1;
diff --git a/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result b/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result
index 0399b531eeb..19af9f5c83f 100644
--- a/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result
+++ b/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result
@@ -1,4 +1,5 @@
SET @start_global_value = @@global.aria_recover_options;
+set @@global.aria_recover_options=default;
select @@global.aria_recover_options;
@@global.aria_recover_options
BACKUP,QUICK
diff --git a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result
index 680e62162a7..faa21da6879 100644
--- a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result
@@ -1,6 +1,7 @@
SET @start_value = @@global.binlog_cache_size;
-SELECT @start_value;
-@start_value
+set @@global.binlog_cache_size= default;
+SELECT @@global.binlog_cache_size;
+@@global.binlog_cache_size
32768
'#--------------------FN_DYNVARS_006_01------------------------#'
SET @@global.binlog_cache_size = 100;
@@ -11,7 +12,7 @@ SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
32768
'#---------------------FN_DYNVARS_006_02-------------------------#'
-SET @@global.binlog_cache_size = @start_value;
+SET @@global.binlog_cache_size = default;
SELECT @@global.binlog_cache_size = 32768;
@@global.binlog_cache_size = 32768
1
@@ -101,6 +102,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT binlog_cache_size = @@session.binlog_cache_size;
ERROR 42S22: Unknown column 'binlog_cache_size' in 'field list'
SET @@global.binlog_cache_size = @start_value;
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-32768
diff --git a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result
index f16a36eefa4..74cce393dbc 100644
--- a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result
@@ -1,6 +1,7 @@
SET @start_value = @@global.binlog_stmt_cache_size;
-SELECT @start_value;
-@start_value
+set @@global.binlog_stmt_cache_size=default;
+SELECT @@global.binlog_stmt_cache_size;
+@@global.binlog_stmt_cache_size
32768
'#--------------------FN_DYNVARS_006_01------------------------#'
SET @@global.binlog_stmt_cache_size = 100;
@@ -11,7 +12,7 @@ SELECT @@global.binlog_stmt_cache_size;
@@global.binlog_stmt_cache_size
32768
'#---------------------FN_DYNVARS_006_02-------------------------#'
-SET @@global.binlog_stmt_cache_size = @start_value;
+SET @@global.binlog_stmt_cache_size = default;
SELECT @@global.binlog_stmt_cache_size = 32768;
@@global.binlog_stmt_cache_size = 32768
1
@@ -101,6 +102,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT binlog_stmt_cache_size = @@session.binlog_stmt_cache_size;
ERROR 42S22: Unknown column 'binlog_stmt_cache_size' in 'field list'
SET @@global.binlog_stmt_cache_size = @start_value;
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-32768
diff --git a/mysql-test/suite/sys_vars/r/character_set_client_basic.result b/mysql-test/suite/sys_vars/r/character_set_client_basic.result
index 749e669dd26..1464c35cc20 100644
--- a/mysql-test/suite/sys_vars/r/character_set_client_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_client_basic.result
@@ -1,7 +1,5 @@
SET @global_start_value = @@global.character_set_client;
-SELECT @global_start_value;
-@global_start_value
-latin1
+SET @@global.character_set_client=@@character_set_client;
SET @session_start_value = @@character_set_client;
SELECT @session_start_value;
@session_start_value
@@ -30,14 +28,14 @@ ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_010_02-------------------------#'
SET @@character_set_client = latin5;
SET @@character_set_client = DEFAULT;
-SELECT @@character_set_client AS DEFAULT_VALUE;
-DEFAULT_VALUE
-utf8
+SELECT @@character_set_client = @@global.character_set_client;
+@@character_set_client = @@global.character_set_client
+1
SET @@global.character_set_client = latin5;
SET @@global.character_set_client = DEFAULT;
-SELECT @@global.character_set_client;
-@@global.character_set_client
-latin1
+SELECT @@global.character_set_client= @global_start_value;
+@@global.character_set_client= @global_start_value
+1
'#--------------------FN_DYNVARS_010_03-------------------------#'
SET @@session.character_set_client = utf8;
SELECT @@session.character_set_client;
@@ -500,10 +498,4 @@ WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
SET @@global.character_set_client = @global_start_value;
-SELECT @@global.character_set_client;
-@@global.character_set_client
-latin1
SET @@session.character_set_client = @session_start_value;
-SELECT @@session.character_set_client;
-@@session.character_set_client
-latin1
diff --git a/mysql-test/suite/sys_vars/r/character_set_connection_basic.result b/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
index ee550ee105f..bb8273353fc 100644
--- a/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
@@ -1,7 +1,6 @@
SET @global_start_value = @@global.character_set_connection;
-SELECT @global_start_value;
-@global_start_value
-latin1
+SET @save_character_set_client=@@global.character_set_client;
+SET @@global.character_set_client=@@character_set_client;
SET @session_start_value = @@character_set_connection;
SELECT @session_start_value;
@session_start_value
@@ -30,14 +29,14 @@ ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_011_02-------------------------#'
SET @@character_set_connection = latin5;
SET @@character_set_connection = DEFAULT;
-SELECT @@character_set_connection AS DEFAULT_VALUE;
-DEFAULT_VALUE
-utf8
+SELECT @@character_set_connection = @@global.character_set_connection;
+@@character_set_connection = @@global.character_set_connection
+1
SET @@global.character_set_connection = latin5;
SET @@global.character_set_connection = DEFAULT;
-SELECT @@global.character_set_connection;
-@@global.character_set_connection
-latin1
+SELECT @@global.character_set_connection = @global_start_value;
+@@global.character_set_connection = @global_start_value
+1
'#--------------------FN_DYNVARS_011_03-------------------------#'
SET @@session.character_set_connection = utf8;
SELECT @@session.character_set_connection;
@@ -494,10 +493,4 @@ WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
SET @@global.character_set_connection = @global_start_value;
-SELECT @@global.character_set_connection;
-@@global.character_set_connection
-latin1
-SET @@session.character_set_connection = @session_start_value;
-SELECT @@session.character_set_connection;
-@@session.character_set_connection
-latin1
+SET @@global.character_set_client = @save_character_set_client;
diff --git a/mysql-test/suite/sys_vars/r/character_set_database_basic.result b/mysql-test/suite/sys_vars/r/character_set_database_basic.result
index 4ced9231560..9eb987381c6 100644
--- a/mysql-test/suite/sys_vars/r/character_set_database_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_database_basic.result
@@ -1,6 +1,7 @@
SET @global_start_value = @@global.character_set_database;
-SELECT @global_start_value;
-@global_start_value
+SET @@global.character_set_database=@@character_set_client;
+SELECT @@global.character_set_database;
+@@global.character_set_database
latin1
SET @session_start_value = @@character_set_database;
SELECT @session_start_value;
@@ -494,10 +495,4 @@ WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
SET @@global.character_set_database = @global_start_value;
-SELECT @@global.character_set_database;
-@@global.character_set_database
-latin1
SET @@session.character_set_database = @session_start_value;
-SELECT @@session.character_set_database;
-@@session.character_set_database
-latin1
diff --git a/mysql-test/suite/sys_vars/r/character_set_results_basic.result b/mysql-test/suite/sys_vars/r/character_set_results_basic.result
index 7fc498fa735..fc109940c41 100644
--- a/mysql-test/suite/sys_vars/r/character_set_results_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_results_basic.result
Binary files differ
diff --git a/mysql-test/suite/sys_vars/r/character_set_server_basic.result b/mysql-test/suite/sys_vars/r/character_set_server_basic.result
index 84f6819aae2..c91c53e30c6 100644
--- a/mysql-test/suite/sys_vars/r/character_set_server_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_server_basic.result
@@ -1,6 +1,7 @@
SET @global_start_value = @@global.character_set_server;
-SELECT @global_start_value;
-@global_start_value
+SET @@global.character_set_server=@@character_set_client;
+SELECT @@global.character_set_server;
+@@global.character_set_server
latin1
SET @session_start_value = @@character_set_server;
SELECT @session_start_value;
@@ -32,14 +33,14 @@ ERROR 42000: Variable 'character_set_server' can't be set to the value of 'NULL'
'#--------------------FN_DYNVARS_009_02-------------------------#'
SET @@character_set_server = latin5;
SET @@character_set_server = DEFAULT;
-SELECT @@character_set_server AS DEFAULT_VALUE;
-DEFAULT_VALUE
-utf8
+SELECT @@character_set_server = @@global.character_set_server;
+@@character_set_server = @@global.character_set_server
+1
SET @@global.character_set_server = latin5;
SET @@global.character_set_server = DEFAULT;
-SELECT @@global.character_set_server;
-@@global.character_set_server
-latin1
+SELECT @@global.character_set_server = @global_start_value;
+@@global.character_set_server = @global_start_value
+1
'#--------------------FN_DYNVARS_009_03-------------------------#'
SET @@session.character_set_server = utf8;
SELECT @@session.character_set_server;
@@ -488,10 +489,4 @@ WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
SET @@global.character_set_server = @global_start_value;
-SELECT @@global.character_set_server;
-@@global.character_set_server
-latin1
SET @@session.character_set_server = @session_start_value;
-SELECT @@session.character_set_server;
-@@session.character_set_server
-latin1
diff --git a/mysql-test/suite/sys_vars/r/character_set_server_func.result b/mysql-test/suite/sys_vars/r/character_set_server_func.result
index f7267985aa2..38370da509d 100644
--- a/mysql-test/suite/sys_vars/r/character_set_server_func.result
+++ b/mysql-test/suite/sys_vars/r/character_set_server_func.result
@@ -13,7 +13,10 @@ utf8
disconnect con1;
'#--------------------FN_DYNVARS_009_02-------------------------#'
connection default;
-'---global character_set_server should not effects current connection---'
+'--global character_set_server should not effects current connection--'
+select @@character_set_database=@@character_set_connection;
+@@character_set_database=@@character_set_connection
+1
SET @@global.character_set_server = utf8;
CREATE DATABASE db1;
USE db1;
diff --git a/mysql-test/suite/sys_vars/r/collation_connection_basic.result b/mysql-test/suite/sys_vars/r/collation_connection_basic.result
index eeab4885790..31c15a68f1c 100644
--- a/mysql-test/suite/sys_vars/r/collation_connection_basic.result
+++ b/mysql-test/suite/sys_vars/r/collation_connection_basic.result
@@ -1,6 +1,7 @@
SET @global_start_value = @@global.collation_connection;
-SELECT @global_start_value;
-@global_start_value
+SET @@global.collation_connection=@@collation_connection;
+SELECT @@global.collation_connection;
+@@global.collation_connection
latin1_swedish_ci
SET @session_start_value = @@collation_connection;
SELECT @session_start_value;
@@ -30,14 +31,14 @@ ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_015_02-------------------------#'
SET @@collation_connection = latin1_bin;
SET @@collation_connection = DEFAULT;
-SELECT @@collation_connection AS DEFAULT_VALUE;
-DEFAULT_VALUE
-utf8_unicode_ci
+SELECT @@collation_connection = @@global.collation_connection;
+@@collation_connection = @@global.collation_connection
+1
SET @@global.collation_connection = latin1_bin;
SET @@global.collation_connection = DEFAULT;
-SELECT @@global.collation_connection;
-@@global.collation_connection
-latin1_swedish_ci
+SELECT @@global.collation_connection = @global_start_value;
+@@global.collation_connection = @global_start_value
+1
'#--------------------FN_DYNVARS_015_03-------------------------#'
SET @@session.collation_connection = utf8_polish_ci;
SELECT @@session.collation_connection;
@@ -1222,10 +1223,4 @@ WHERE VARIABLE_NAME='collation_connection') AS res;
res
1
SET @@global.collation_connection = @global_start_value;
-SELECT @@global.collation_connection;
-@@global.collation_connection
-latin1_swedish_ci
SET @@session.collation_connection = @session_start_value;
-SELECT @@session.collation_connection;
-@@session.collation_connection
-latin1_swedish_ci
diff --git a/mysql-test/suite/sys_vars/r/collation_database_basic.result b/mysql-test/suite/sys_vars/r/collation_database_basic.result
index b99a5ac29df..ac2fcbe07fc 100644
--- a/mysql-test/suite/sys_vars/r/collation_database_basic.result
+++ b/mysql-test/suite/sys_vars/r/collation_database_basic.result
@@ -1,6 +1,7 @@
SET @global_start_value = @@global.collation_database;
-SELECT @global_start_value;
-@global_start_value
+SET @@global.collation_database=@@collation_server;
+SELECT @@global.collation_database;
+@@global.collation_database
latin1_swedish_ci
SET @session_start_value = @@collation_database;
SELECT @session_start_value;
@@ -25,6 +26,7 @@ SET session collation_database=utf8_unicode_ci;
SELECT session collation_database;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global collation_database=utf8_unicode_ci;
+set global collation_database=@@collation_server;
SELECT global collation_database;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_016_02-------------------------#'
@@ -33,14 +35,14 @@ SET @@collation_database = DEFAULT;
SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME=DATABASE();
DEFAULT_COLLATION_NAME
latin1_swedish_ci
-SELECT @@collation_database AS DEFAULT_VALUE;
-DEFAULT_VALUE
-latin1_swedish_ci
+SELECT @@collation_database = @@global.collation_database;
+@@collation_database = @@global.collation_database
+1
SET @@global.collation_database = latin1_bin;
SET @@global.collation_database = DEFAULT;
-SELECT @@global.collation_database;
-@@global.collation_database
-latin1_swedish_ci
+SELECT length(@@global.collation_database) > 0;
+length(@@global.collation_database) > 0
+1
'#--------------------FN_DYNVARS_016_03-------------------------#'
SET @@session.collation_database = utf8_polish_ci;
SELECT @@session.collation_database;
@@ -1224,10 +1226,4 @@ WHERE VARIABLE_NAME='collation_database') AS res;
res
1
SET @@global.collation_database = @global_start_value;
-SELECT @@global.collation_database;
-@@global.collation_database
-latin1_swedish_ci
SET @@session.collation_database = @session_start_value;
-SELECT @@session.collation_database;
-@@session.collation_database
-latin1_swedish_ci
diff --git a/mysql-test/suite/sys_vars/r/collation_database_func.result b/mysql-test/suite/sys_vars/r/collation_database_func.result
index 8bcf9fea224..43f680eb6e6 100644
--- a/mysql-test/suite/sys_vars/r/collation_database_func.result
+++ b/mysql-test/suite/sys_vars/r/collation_database_func.result
@@ -15,9 +15,6 @@ disconnect con1;
'#--------------------FN_DYNVARS_011_02-------------------------#'
connection default;
DROP TABLE IF EXISTS t1,t2;
-SELECT @@character_set_server,@@collation_server;
-@@character_set_server @@collation_server
-latin1 latin1_swedish_ci
'--check if setting collation_database update character_set_database--'
SET @@session.collation_database = utf8_spanish_ci;
SELECT @@collation_database, @@character_set_database;
diff --git a/mysql-test/suite/sys_vars/r/collation_server_basic.result b/mysql-test/suite/sys_vars/r/collation_server_basic.result
index ffe5218f21c..13712622a33 100644
--- a/mysql-test/suite/sys_vars/r/collation_server_basic.result
+++ b/mysql-test/suite/sys_vars/r/collation_server_basic.result
@@ -1,7 +1,5 @@
SET @global_start_value = @@global.collation_server;
-SELECT @global_start_value;
-@global_start_value
-latin1_swedish_ci
+SET @@global.collation_server= @@collation_server;
SET @session_start_value = @@collation_server;
SELECT @session_start_value;
@session_start_value
@@ -30,14 +28,14 @@ ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_014_02-------------------------#'
SET @@collation_server = latin1_bin;
SET @@collation_server = DEFAULT;
-SELECT @@collation_server AS DEFAULT_VALUE;
-DEFAULT_VALUE
-utf8_unicode_ci
+SELECT @@collation_server= @@global.collation_server;
+@@collation_server= @@global.collation_server
+1
SET @@global.collation_server = latin1_bin;
SET @@global.collation_server = DEFAULT;
-SELECT @@global.collation_server;
-@@global.collation_server
-latin1_swedish_ci
+SELECT @@global.collation_server = @global_start_value;
+@@global.collation_server = @global_start_value
+1
'#--------------------FN_DYNVARS_014_03-------------------------#'
SET @@session.collation_server = utf8_polish_ci;
SELECT @@session.collation_server;
@@ -1221,10 +1219,4 @@ WHERE VARIABLE_NAME='collation_server') AS res;
res
1
SET @@global.collation_server = @global_start_value;
-SELECT @@global.collation_server;
-@@global.collation_server
-latin1_swedish_ci
SET @@session.collation_server = @session_start_value;
-SELECT @@session.collation_server;
-@@session.collation_server
-latin1_swedish_ci
diff --git a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
index f36fbd17321..ea6f29767d9 100644
--- a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
+++ b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
@@ -1,18 +1,15 @@
SET @start_value = @@global.expire_logs_days;
-SELECT @start_value;
-@start_value
-0
'#--------------------FN_DYNVARS_029_01------------------------#'
SET @@global.expire_logs_days = 99;
SET @@global.expire_logs_days = DEFAULT;
-SELECT @@global.expire_logs_days;
-@@global.expire_logs_days
-0
-'#---------------------FN_DYNVARS_029_02-------------------------#'
-SET @@global.expire_logs_days = @start_value;
SELECT @@global.expire_logs_days = 0;
@@global.expire_logs_days = 0
1
+'#---------------------FN_DYNVARS_029_02-------------------------#'
+SET @@global.expire_logs_days = @start_value;
+SELECT @@global.expire_logs_days = @start_value;
+@@global.expire_logs_days = @start_value
+1
'#--------------------FN_DYNVARS_029_03------------------------#'
SET @@global.expire_logs_days = 0;
SELECT @@global.expire_logs_days;
@@ -120,6 +117,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT expire_logs_days = @@session.expire_logs_days;
ERROR 42S22: Unknown column 'expire_logs_days' in 'field list'
SET @@global.expire_logs_days = @start_value;
-SELECT @@global.expire_logs_days;
-@@global.expire_logs_days
-0
diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
index c7c24f155ca..6a80749453b 100644
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
@@ -1,12 +1,12 @@
SET @start_value = @@global.general_log_file;
-SELECT @start_value;
-@start_value
-test.log
+SELECT length(@start_value) > 0;
+length(@start_value) > 0
+1
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.general_log_file = DEFAULT;
-SELECT @@global.general_log_file;
-@@global.general_log_file
-mysqld.log
+SELECT length(@@global.general_log_file) > 0;
+length(@@global.general_log_file) > 0
+1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log_file = mytest.log;
ERROR 42000: Incorrect argument type to variable 'general_log_file'
diff --git a/mysql-test/suite/sys_vars/r/histogram_size_basic.result b/mysql-test/suite/sys_vars/r/histogram_size_basic.result
index 05a52309d9f..b4630cb2746 100644
--- a/mysql-test/suite/sys_vars/r/histogram_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/histogram_size_basic.result
@@ -1,11 +1,8 @@
SET @start_global_value = @@global.histogram_size;
-SELECT @start_global_value;
-@start_global_value
-254
SET @start_session_value = @@session.histogram_size;
-SELECT @start_session_value;
-@start_session_value
-254
+SELECT @start_global_value = @start_session_value;
+@start_global_value = @start_session_value
+1
'#--------------------FN_DYNVARS_053_01-------------------------#'
SET @@global.histogram_size = DEFAULT;
SELECT @@global.histogram_size;
@@ -127,10 +124,4 @@ SELECT @@local.histogram_size = @@session.histogram_size;
@@local.histogram_size = @@session.histogram_size
1
SET @@global.histogram_size = @start_global_value;
-SELECT @@global.histogram_size;
-@@global.histogram_size
-254
SET @@session.histogram_size = @start_session_value;
-SELECT @@session.histogram_size;
-@@session.histogram_size
-254
diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result
index 1dbd625b52b..1471ae36244 100644
--- a/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result
@@ -1,28 +1,22 @@
SET @start_global_value = @@global.innodb_adaptive_hash_index;
-SELECT @start_global_value;
-@start_global_value
-1
Valid values are 'ON' and 'OFF'
select @@global.innodb_adaptive_hash_index in (0, 1);
@@global.innodb_adaptive_hash_index in (0, 1)
1
-select @@global.innodb_adaptive_hash_index;
-@@global.innodb_adaptive_hash_index
-1
select @@session.innodb_adaptive_hash_index;
ERROR HY000: Variable 'innodb_adaptive_hash_index' is a GLOBAL variable
show global variables like 'innodb_adaptive_hash_index';
Variable_name Value
-innodb_adaptive_hash_index ON
+innodb_adaptive_hash_index #
show session variables like 'innodb_adaptive_hash_index';
Variable_name Value
-innodb_adaptive_hash_index ON
-select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ADAPTIVE_HASH_INDEX ON
-select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ADAPTIVE_HASH_INDEX ON
+innodb_adaptive_hash_index #
+select variable_name from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
+variable_name
+INNODB_ADAPTIVE_HASH_INDEX
+select variable_name from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
+variable_name
+INNODB_ADAPTIVE_HASH_INDEX
set global innodb_adaptive_hash_index='OFF';
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
@@ -87,6 +81,3 @@ INNODB_ADAPTIVE_HASH_INDEX ON
set global innodb_adaptive_hash_index='AUTO';
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of 'AUTO'
SET @@global.innodb_adaptive_hash_index = @start_global_value;
-SELECT @@global.innodb_adaptive_hash_index;
-@@global.innodb_adaptive_hash_index
-1
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
index 993bb13ebf0..72477a04cf5 100644
--- a/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
@@ -5,9 +5,6 @@ COUNT(@@GLOBAL.innodb_log_optimize_ddl)
SELECT COUNT(@@SESSION.innodb_log_optimize_ddl);
ERROR HY000: Variable 'innodb_log_optimize_ddl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
-SELECT @@GLOBAL.innodb_log_optimize_ddl;
-@@GLOBAL.innodb_log_optimize_ddl
-1
SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save;
SET @@GLOBAL.innodb_log_optimize_ddl = ON;
SET @@GLOBAL.innodb_log_optimize_ddl = OFF;
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
index 13ae9821752..20b619972dd 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
@@ -1,3 +1,5 @@
+SET @save_innodb_max_dirty_pages_pct=@@global.innodb_max_dirty_pages_pct;
+set @@global.innodb_max_dirty_pages_pct=75;
SET @global_start_value = @@global.innodb_max_dirty_pages_pct;
SELECT @global_start_value;
@global_start_value
@@ -170,3 +172,4 @@ SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_max_dirty_lwm_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0.000000
+SET @@global.innodb_max_dirty_pages_pct=@save_innodb_max_dirty_pages_pct;
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result
index b6394d03b46..641386d5f23 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result
@@ -1,3 +1,5 @@
+SET @save_innodb_max_dirty_pages_pct=@@global.innodb_max_dirty_pages_pct;
+set @@global.innodb_max_dirty_pages_pct=75;
SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
SELECT @pct_lwm_start_value;
@pct_lwm_start_value
@@ -129,3 +131,4 @@ SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0.000000
+SET @@global.innodb_max_dirty_pages_pct=@save_innodb_max_dirty_pages_pct;
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result
index 48131c96fce..0586767b660 100644
--- a/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result
@@ -1,20 +1,14 @@
SET @start_global_value = @@global.join_buffer_size;
-SELECT @start_global_value;
-@start_global_value
-262144
SET @start_session_value = @@session.join_buffer_size;
-SELECT @start_session_value;
-@start_session_value
-262144
'#--------------------FN_DYNVARS_053_01-------------------------#'
SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-262144
+SELECT @@global.join_buffer_size > 0;
+@@global.join_buffer_size > 0
+1
SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-262144
+SELECT @@session.join_buffer_size > 0;
+@@session.join_buffer_size > 0
+1
'#--------------------FN_DYNVARS_053_03-------------------------#'
SET @@global.join_buffer_size = 8200;
Warnings:
@@ -170,10 +164,4 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT join_buffer_size = @@session.join_buffer_size;
ERROR 42S22: Unknown column 'join_buffer_size' in 'field list'
SET @@global.join_buffer_size = @start_global_value;
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-262144
SET @@session.join_buffer_size = @start_session_value;
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-262144
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result b/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result
index 9a65367a56f..fdc843fc3f4 100644
--- a/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result
+++ b/mysql-test/suite/sys_vars/r/join_buffer_space_limit_basic.result
@@ -1,22 +1,16 @@
SET @start_global_value = @@global.join_buffer_space_limit;
-select @@global.join_buffer_space_limit;
-@@global.join_buffer_space_limit
-2097152
-select @@session.join_buffer_space_limit;
-@@session.join_buffer_space_limit
-2097152
show global variables like 'join_buffer_space_limit';
Variable_name Value
-join_buffer_space_limit 2097152
+join_buffer_space_limit #
show session variables like 'join_buffer_space_limit';
Variable_name Value
-join_buffer_space_limit 2097152
+join_buffer_space_limit #
select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
VARIABLE_NAME VARIABLE_VALUE
-JOIN_BUFFER_SPACE_LIMIT 2097152
+JOIN_BUFFER_SPACE_LIMIT #
select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
VARIABLE_NAME VARIABLE_VALUE
-JOIN_BUFFER_SPACE_LIMIT 2097152
+JOIN_BUFFER_SPACE_LIMIT #
set global join_buffer_space_limit=10;
Warnings:
Warning 1292 Truncated incorrect join_buffer_space_limit value: '10'
diff --git a/mysql-test/suite/sys_vars/r/join_cache_level_basic.result b/mysql-test/suite/sys_vars/r/join_cache_level_basic.result
index eca823a5d72..63c1d8ba417 100644
--- a/mysql-test/suite/sys_vars/r/join_cache_level_basic.result
+++ b/mysql-test/suite/sys_vars/r/join_cache_level_basic.result
@@ -1,22 +1,16 @@
SET @start_global_value = @@global.join_cache_level;
-select @@global.join_cache_level;
-@@global.join_cache_level
-2
-select @@session.join_cache_level;
-@@session.join_cache_level
-2
show global variables like 'join_cache_level';
Variable_name Value
-join_cache_level 2
+join_cache_level #
show session variables like 'join_cache_level';
Variable_name Value
-join_cache_level 2
+join_cache_level #
select * from information_schema.global_variables where variable_name='join_cache_level';
VARIABLE_NAME VARIABLE_VALUE
-JOIN_CACHE_LEVEL 2
+JOIN_CACHE_LEVEL #
select * from information_schema.session_variables where variable_name='join_cache_level';
VARIABLE_NAME VARIABLE_VALUE
-JOIN_CACHE_LEVEL 2
+JOIN_CACHE_LEVEL #
set global join_cache_level=4;
select @@global.join_cache_level;
@@global.join_cache_level
diff --git a/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result b/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result
index a291e276e4b..8b5b06ee4b7 100644
--- a/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result
+++ b/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result
@@ -1,10 +1,8 @@
SET @start_global_value = @@global.log_slow_verbosity;
-select @@global.log_slow_verbosity;
-@@global.log_slow_verbosity
-
-select @@session.log_slow_verbosity;
-@@session.log_slow_verbosity
-
+select @@global.log_slow_verbosity = @@session.log_slow_verbosity;
+@@global.log_slow_verbosity = @@session.log_slow_verbosity
+1
+SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity="";
show global variables like 'log_slow_verbosity';
Variable_name Value
log_slow_verbosity
diff --git a/mysql-test/suite/sys_vars/r/long_query_time_basic.result b/mysql-test/suite/sys_vars/r/long_query_time_basic.result
index 2fb9ff143ac..198030e7564 100644
--- a/mysql-test/suite/sys_vars/r/long_query_time_basic.result
+++ b/mysql-test/suite/sys_vars/r/long_query_time_basic.result
@@ -1,30 +1,15 @@
SET @start_global_value = @@global.long_query_time;
-SELECT @start_global_value;
-@start_global_value
-10
SET @start_session_value = @@session.long_query_time;
-SELECT @start_session_value;
-@start_session_value
-10
'#--------------------FN_DYNVARS_068_01-------------------------#'
SET @@global.long_query_time = 100;
SET @@global.long_query_time = DEFAULT;
-SELECT @@global.long_query_time;
-@@global.long_query_time
-10.000000
-SET @@session.long_query_time = 200;
-SET @@session.long_query_time = DEFAULT;
-SELECT @@session.long_query_time;
-@@session.long_query_time
-10.000000
-'#--------------------FN_DYNVARS_068_02-------------------------#'
-SET @@global.long_query_time = DEFAULT;
-SELECT @@global.long_query_time = 10;
-@@global.long_query_time = 10
+SELECT @@global.long_query_time >= 0;
+@@global.long_query_time >= 0
1
+SET @@session.long_query_time = 200;
SET @@session.long_query_time = DEFAULT;
-SELECT @@session.long_query_time = 10;
-@@session.long_query_time = 10
+SELECT @@session.long_query_time >= 0;
+@@session.long_query_time >= 0
1
'#--------------------FN_DYNVARS_068_03-------------------------#'
SET @@global.long_query_time = 0;
@@ -157,10 +142,3 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT long_query_time = @@session.long_query_time;
ERROR 42S22: Unknown column 'long_query_time' in 'field list'
SET @@global.long_query_time = @start_global_value;
-SELECT @@global.long_query_time;
-@@global.long_query_time
-10.000000
-SET @@session.long_query_time = @start_session_value;
-SELECT @@session.long_query_time;
-@@session.long_query_time
-10.000000
diff --git a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
index 10bda48dd43..32b8f73491e 100644
--- a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
@@ -1,7 +1,4 @@
SET @start_global_value = @@global.max_allowed_packet;
-SELECT @start_global_value;
-@start_global_value
-16777216
SET @@global.max_allowed_packet = DEFAULT;
connect conn1, localhost, root,,;
'#--------------------FN_DYNVARS_070_01-------------------------#'
@@ -197,9 +194,3 @@ SELECT max_allowed_packet = @@session.max_allowed_packet;
ERROR 42S22: Unknown column 'max_allowed_packet' in 'field list'
connection default;
SET @@global.max_allowed_packet = @start_global_value;
-SELECT @@global.max_allowed_packet;
-@@global.max_allowed_packet
-16777216
-SELECT @@session.max_allowed_packet;
-@@session.max_allowed_packet
-16777216
diff --git a/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result b/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
index 62d543d0a0f..48e85c03ee5 100644
--- a/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
+++ b/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result
@@ -12,14 +12,14 @@ name BLOB
## Setting value of max_allowed packet and net_buffer_length to 1024 ##
SET @@session.max_allowed_packet = 1024;
ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
-SELECT @@session.max_allowed_packet;
-@@session.max_allowed_packet
-16777216
+SELECT @@session.max_allowed_packet > 0;
+@@session.max_allowed_packet > 0
+1
SET @@session.net_buffer_length = 1024;
ERROR HY000: SESSION variable 'net_buffer_length' is read-only. Use SET GLOBAL to assign the value
-SELECT @@session.net_buffer_length;
-@@session.net_buffer_length
-16384
+SELECT @@session.net_buffer_length > 0;
+@@session.net_buffer_length > 0
+1
'#--------------------FN_DYNVARS_070_02-------------------------#'
## Setting value of max_allowed packet and net_buffer_length to 1024 ##
SET @@global.max_allowed_packet = 1024;
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
index 01e8ef464fb..e37463fa465 100644
--- a/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
@@ -1,18 +1,15 @@
SET @start_value = @@global.max_connect_errors;
-SELECT @start_value;
-@start_value
-100
+SELECT @start_value >= 0;
+@start_value >= 0
+1
'#--------------------FN_DYNVARS_073_01------------------------#'
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-100
'#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors = 10;
-@@global.max_connect_errors = 10
-0
+SELECT @@global.max_connect_errors = @start_value;
+@@global.max_connect_errors = @start_value
+1
'#--------------------FN_DYNVARS_073_03------------------------#'
SET @@global.max_connect_errors = 4096;
SELECT @@global.max_connect_errors;
@@ -125,6 +122,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT max_connect_errors = @@session.max_connect_errors;
ERROR 42S22: Unknown column 'max_connect_errors' in 'field list'
SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-100
diff --git a/mysql-test/suite/sys_vars/r/max_connections_basic.result b/mysql-test/suite/sys_vars/r/max_connections_basic.result
index b4d23427e41..048fb99b3f5 100644
--- a/mysql-test/suite/sys_vars/r/max_connections_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_connections_basic.result
@@ -1,17 +1,17 @@
SET @start_value = @@global.max_connections;
-SELECT @start_value;
-@start_value
-151
+SELECT @start_value > 0;
+@start_value > 0
+1
'#--------------------FN_DYNVARS_074_01------------------------#'
-SET @@global.max_connections = 5000;
+SET @@global.max_connections = @start_value+1;
SET @@global.max_connections = DEFAULT;
-SELECT @@global.max_connections;
-@@global.max_connections
-151
+SELECT @@global.max_connections <> @start_value+1;
+@@global.max_connections <> @start_value+1
+1
'#---------------------FN_DYNVARS_074_02-------------------------#'
SET @@global.max_connections = @start_value;
-SELECT @@global.max_connections = 151;
-@@global.max_connections = 151
+SELECT @@global.max_connections = @start_value;
+@@global.max_connections = @start_value
1
'#--------------------FN_DYNVARS_074_03------------------------#'
SET @@global.max_connections = 100000;
@@ -131,6 +131,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT max_connections = @@session.max_connections;
ERROR 42S22: Unknown column 'max_connections' in 'field list'
SET @@global.max_connections = @start_value;
-SELECT @@global.max_connections;
-@@global.max_connections
-151
diff --git a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result
index 2c6d86d49f3..1080e51cc62 100644
--- a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result
@@ -1,34 +1,22 @@
SET @start_global_value = @@global.max_heap_table_size;
-SELECT @start_global_value;
-@start_global_value
-1048576
SET @start_session_value = @@session.max_heap_table_size;
-SELECT @start_session_value;
-@start_session_value
-1048576
+SELECT @start_session_value = @start_global_value;
+@start_session_value = @start_global_value
+1
'#--------------------FN_DYNVARS_077_01-------------------------#'
SET @@global.max_heap_table_size = 1677721610;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '1677721610'
SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16777216
+SELECT @@global.max_heap_table_size > 0;
+@@global.max_heap_table_size > 0
+1
SET @@session.max_heap_table_size = 1677721610;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '1677721610'
SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16777216
-'#--------------------FN_DYNVARS_077_02-------------------------#'
-SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size = 16777216;
-@@global.max_heap_table_size = 16777216
-1
-SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size = 16777216;
-@@session.max_heap_table_size = 16777216
+SELECT @@session.max_heap_table_size > 0;
+@@session.max_heap_table_size > 0
1
'#--------------------FN_DYNVARS_077_03-------------------------#'
SET @@global.max_heap_table_size = 16384;
@@ -210,10 +198,3 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT max_heap_table_size = @@session.max_heap_table_size;
ERROR 42S22: Unknown column 'max_heap_table_size' in 'field list'
SET @@global.max_heap_table_size = @start_global_value;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-1048576
-SET @@session.max_heap_table_size = @start_session_value;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-1048576
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
index f833f417290..f6468fd8a7a 100644
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
+++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
@@ -1,3 +1,5 @@
+set @@global.optimizer_switch=@@local.optimizer_switch;
+set @@global.join_cache_level=@@local.join_cache_level;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1
(a INT AUTO_INCREMENT PRIMARY KEY,
@@ -7,12 +9,6 @@ SET @start_value= @@global.max_seeks_for_key;
'#--------------------FN_DYNVARS_084_01-------------------------#'
CONNECT test_con1,localhost,root,,;
connection test_con1;
-SELECT @@global.max_seeks_for_key = 10;
-@@global.max_seeks_for_key = 10
-0
-SELECT @@session.max_seeks_for_key = 10;
-@@session.max_seeks_for_key = 10
-0
SET @@global.max_seeks_for_key = 20;
SELECT @@global.max_seeks_for_key;
@@global.max_seeks_for_key
@@ -83,3 +79,5 @@ disconnect test_con1;
disconnect test_con2;
DROP TABLE t1;
SET @@global.max_seeks_for_key= @start_value;
+SET @@global.optimizer_switch= @save_optimizer_switch;
+SET @@global.join_cache_level=  @save_join_cache_level;
diff --git a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
index 932d06668fb..6fbbdac5a45 100644
--- a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
@@ -1,34 +1,23 @@
SET @start_global_value = @@global.myisam_sort_buffer_size ;
-SELECT @start_global_value;
-@start_global_value
-134216704
-SET @start_session_value = @@session.myisam_sort_buffer_size ;
-SELECT @start_session_value;
-@start_session_value
-134216704
+SELECT @@session.myisam_sort_buffer_size = @@global.myisam_sort_buffer_size;
+@@session.myisam_sort_buffer_size = @@global.myisam_sort_buffer_size
+1
+SET @@global.myisam_sort_buffer_size= default;
+SET @default_myisam_sort_buffer_size= @@global.myisam_sort_buffer_size;
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.myisam_sort_buffer_size = 100;
Warnings:
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '100'
SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-134216704
+SELECT @@global.myisam_sort_buffer_size = @default_myisam_sort_buffer_size;
+@@global.myisam_sort_buffer_size = @default_myisam_sort_buffer_size
+1
SET @@session.myisam_sort_buffer_size = 200;
Warnings:
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '200'
SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-134216704
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size = 134216704;
-@@global.myisam_sort_buffer_size = 134216704
-1
-SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size = 134216704;
-@@session.myisam_sort_buffer_size = 134216704
+SELECT @@session.myisam_sort_buffer_size = @default_myisam_sort_buffer_size;
+@@session.myisam_sort_buffer_size = @default_myisam_sort_buffer_size
1
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.myisam_sort_buffer_size = 4;
@@ -185,10 +174,3 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT myisam_sort_buffer_size = @@session.myisam_sort_buffer_size ;
ERROR 42S22: Unknown column 'myisam_sort_buffer_size' in 'field list'
SET @@global.myisam_sort_buffer_size = @start_global_value;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-134216704
-SET @@session.myisam_sort_buffer_size = @start_session_value;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-134216704
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
index 58daf414466..0ac1b839d76 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,7 +1,4 @@
-SET @start_global_value = @@global.optimizer_switch;
-SELECT @start_global_value;
-@start_global_value
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
+set @@global.optimizer_switch=@@optimizer_switch;
select @@global.optimizer_switch;
@@global.optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
@@ -66,7 +63,4 @@ set session optimizer_switch="index_merge";
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
set session optimizer_switch="foobar";
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar'
-SET @@global.optimizer_switch = @start_global_value;
-SELECT @@global.optimizer_switch;
-@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
+SET @@global.optimizer_switch = @save_optimizer_switch;
diff --git a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
index 941b7699747..1e6d420a9d7 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
@@ -1,33 +1,6 @@
SET @start_global_value = @@global.optimizer_use_condition_selectivity;
-SELECT @start_global_value;
-@start_global_value
-4
SET @start_session_value = @@session.optimizer_use_condition_selectivity;
-SELECT @start_session_value;
-@start_session_value
-4
-'#--------------------FN_DYNVARS_115_01-------------------------#'
-SET @@global.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@global.optimizer_use_condition_selectivity;
-@@global.optimizer_use_condition_selectivity
-4
-SET @@session.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@session.optimizer_use_condition_selectivity;
-@@session.optimizer_use_condition_selectivity
-4
-'#--------------------FN_DYNVARS_115_02-------------------------#'
-SET @@global.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@global.optimizer_use_condition_selectivity = 1;
-@@global.optimizer_use_condition_selectivity = 1
-0
-SET @@session.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@session.optimizer_use_condition_selectivity = 1;
-@@session.optimizer_use_condition_selectivity = 1
-0
'#--------------------FN_DYNVARS_115_03-------------------------#'
-SELECT @@global.optimizer_use_condition_selectivity;
-@@global.optimizer_use_condition_selectivity
-4
SET @@global.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
@@ -61,9 +34,6 @@ SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
5
'#--------------------FN_DYNVARS_115_04-------------------------#'
-SELECT @@session.optimizer_use_condition_selectivity;
-@@session.optimizer_use_condition_selectivity
-4
SET @@session.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
@@ -132,10 +102,3 @@ SELECT @@local.optimizer_use_condition_selectivity = @@session.optimizer_use_con
@@local.optimizer_use_condition_selectivity = @@session.optimizer_use_condition_selectivity
1
SET @@global.optimizer_use_condition_selectivity = @start_global_value;
-SELECT @@global.optimizer_use_condition_selectivity;
-@@global.optimizer_use_condition_selectivity
-4
-SET @@session.optimizer_use_condition_selectivity = @start_session_value;
-SELECT @@session.optimizer_use_condition_selectivity;
-@@session.optimizer_use_condition_selectivity
-4
diff --git a/mysql-test/suite/sys_vars/r/relay_log_basic.result b/mysql-test/suite/sys_vars/r/relay_log_basic.result
index eca4f36c78d..6ff74bc650e 100644
--- a/mysql-test/suite/sys_vars/r/relay_log_basic.result
+++ b/mysql-test/suite/sys_vars/r/relay_log_basic.result
@@ -1,20 +1,20 @@
select @@global.relay_log;
@@global.relay_log
-mysqld-relay-bin
+RELAY_LOG
select @@session.relay_log;
ERROR HY000: Variable 'relay_log' is a GLOBAL variable
show global variables like 'relay_log';
Variable_name Value
-relay_log mysqld-relay-bin
+relay_log RELAY_LOG
show session variables like 'relay_log';
Variable_name Value
-relay_log mysqld-relay-bin
+relay_log RELAY_LOG
select * from information_schema.global_variables where variable_name='relay_log';
VARIABLE_NAME VARIABLE_VALUE
-RELAY_LOG mysqld-relay-bin
+RELAY_LOG RELAY_LOG
select * from information_schema.session_variables where variable_name='relay_log';
VARIABLE_NAME VARIABLE_VALUE
-RELAY_LOG mysqld-relay-bin
+RELAY_LOG RELAY_LOG
set global relay_log=1;
ERROR HY000: Variable 'relay_log' is a read only variable
set session relay_log=1;
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
index a64666f6298..74cf0da9338 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
@@ -1,9 +1,9 @@
SET @start_value = @@global.slow_query_log_file;
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.slow_query_log_file = DEFAULT;
-SELECT @@global.slow_query_log_file;
-@@global.slow_query_log_file
-mysqld-slow.log
+SELECT length(@@global.slow_query_log_file) > 0;
+length(@@global.slow_query_log_file) > 0
+1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log_file = mytest.log;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
diff --git a/mysql-test/suite/sys_vars/r/sync_binlog_basic.result b/mysql-test/suite/sys_vars/r/sync_binlog_basic.result
index cb0af255f33..e1c7e69d0f5 100644
--- a/mysql-test/suite/sys_vars/r/sync_binlog_basic.result
+++ b/mysql-test/suite/sys_vars/r/sync_binlog_basic.result
@@ -1,18 +1,4 @@
SET @start_value = @@global.sync_binlog;
-SELECT @start_value;
-@start_value
-0
-'#--------------------FN_DYNVARS_168_01------------------------#'
-SET @@global.sync_binlog = 99;
-SET @@global.sync_binlog = DEFAULT;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
-'#---------------------FN_DYNVARS_168_02-------------------------#'
-SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog = 0;
-@@global.sync_binlog = 0
-1
'#--------------------FN_DYNVARS_168_03------------------------#'
SET @@global.sync_binlog = 0;
SELECT @@global.sync_binlog;
@@ -105,6 +91,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT sync_binlog = @@session.sync_binlog;
ERROR 42S22: Unknown column 'sync_binlog' in 'field list'
SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria.result b/mysql-test/suite/sys_vars/r/sysvars_aria.result
index 4fdb82f8510..7b74c85b6da 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_aria.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result
@@ -1,10 +1,8 @@
-select * from information_schema.system_variables
+select VARIABLE_NAME, SESSION_VALUE, DEFAULT_VALUE, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT from information_schema.system_variables
where variable_name like 'aria%'
order by variable_name;
VARIABLE_NAME ARIA_BLOCK_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8192
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -17,8 +15,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
SESSION_VALUE NULL
-GLOBAL_VALUE 30
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -31,8 +27,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -45,8 +39,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_ENCRYPT_TABLES
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -59,8 +51,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -73,8 +63,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT
SESSION_VALUE NULL
-GLOBAL_VALUE none
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE none
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -87,8 +75,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -101,8 +87,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 104857600
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -115,8 +99,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_PURGE_TYPE
SESSION_VALUE NULL
-GLOBAL_VALUE immediate
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE immediate
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -129,8 +111,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_MAX_SORT_FILE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 9223372036853727232
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 9223372036853727232
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -143,8 +123,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -157,8 +135,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_BUFFER_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -171,8 +147,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -185,8 +159,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 512
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 512
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -199,8 +171,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGE_CHECKSUM
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -213,8 +183,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_RECOVER_OPTIONS
SESSION_VALUE NULL
-GLOBAL_VALUE BACKUP,QUICK
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE BACKUP,QUICK
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
@@ -227,8 +195,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -241,8 +207,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_SORT_BUFFER_SIZE
SESSION_VALUE 268434432
-GLOBAL_VALUE 268434432
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 268434432
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -255,8 +219,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_STATS_METHOD
SESSION_VALUE nulls_unequal
-GLOBAL_VALUE nulls_unequal
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE nulls_unequal
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
@@ -269,8 +231,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_SYNC_LOG_DIR
SESSION_VALUE NULL
-GLOBAL_VALUE NEWFILE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NEWFILE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -283,8 +243,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_USED_FOR_TEMP_TABLES
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
diff --git a/mysql-test/suite/sys_vars/r/sysvars_debug.result b/mysql-test/suite/sys_vars/r/sysvars_debug.result
index b544f6b50d9..f50e796bff4 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_debug.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_debug.result
@@ -1,6 +1,5 @@
select * from information_schema.system_variables
where variable_name like 'debug%'
- or variable_name = 'in_predicate_conversion_threshold'
order by variable_name;
VARIABLE_NAME DEBUG
SESSION_VALUE
@@ -86,17 +85,3 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME IN_PREDICATE_CONVERSION_THRESHOLD
-SESSION_VALUE 1000
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1000
-VARIABLE_SCOPE SESSION
-VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT The minimum number of scalar elements in the value list of IN predicate that triggers its conversion to IN subquery
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 4294967295
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index 2d299817d53..a7850658aa9 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -1,7 +1,7 @@
---- suite/sys_vars/r/sysvars_innodb.result 2017-09-14 10:37:46.000000000 +0000
-+++ suite/sys_vars/r/sysvars_innodb,32bit.reject 2017-09-26 13:13:23.685012523 +0000
-@@ -56,7 +56,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+--- sysvars_innodb.result
++++ sysvars_innodb,32bit.result
+@@ -49,7 +49,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -9,8 +9,8 @@
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -70,7 +70,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -61,7 +61,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 150000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -18,8 +18,8 @@
VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
-@@ -84,7 +84,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -73,7 +73,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -27,8 +27,8 @@
VARIABLE_COMMENT Data file autoextend increment in megabytes
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -98,7 +98,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -85,7 +85,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
@@ -36,8 +36,8 @@
VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -182,10 +182,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -157,10 +157,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -49,8 +49,8 @@
NUMERIC_BLOCK_SIZE 1048576
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -224,7 +224,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -193,7 +193,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -58,8 +58,8 @@
VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -266,7 +266,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -229,7 +229,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -67,8 +67,8 @@
VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -336,7 +336,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -289,7 +289,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -76,8 +76,8 @@
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -448,7 +448,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -373,7 +373,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -85,8 +85,8 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -490,7 +490,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -409,7 +409,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -94,8 +94,8 @@
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -518,7 +518,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -433,7 +433,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -103,8 +103,8 @@
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 75
-@@ -532,10 +532,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -445,10 +445,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 5000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -116,8 +116,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -798,7 +798,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -673,7 +673,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 120
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -125,8 +125,8 @@
VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 127
-@@ -896,7 +896,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -769,7 +769,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -134,8 +134,8 @@
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -938,7 +938,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -817,7 +817,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -143,8 +143,8 @@
VARIABLE_COMMENT Make the first page of the given tablespace dirty.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -952,7 +952,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -829,7 +829,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -152,8 +152,8 @@
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -980,7 +980,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -853,7 +853,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -161,8 +161,8 @@
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
-@@ -1008,7 +1008,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -877,7 +877,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -170,8 +170,8 @@
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -1064,7 +1064,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -925,7 +925,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -179,8 +179,8 @@
VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
-@@ -1092,7 +1092,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -949,7 +949,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -188,8 +188,8 @@
VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
NUMERIC_MIN_VALUE 1600000
NUMERIC_MAX_VALUE 80000000
-@@ -1134,7 +1134,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -985,7 +985,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -197,8 +197,8 @@
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1148,7 +1148,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -997,7 +997,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -206,8 +206,8 @@
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16
-@@ -1162,7 +1162,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1009,7 +1009,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -215,8 +215,8 @@
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
NUMERIC_MIN_VALUE 1000
NUMERIC_MAX_VALUE 10000
-@@ -1176,10 +1176,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1021,10 +1021,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -228,8 +228,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1204,7 +1204,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1045,7 +1045,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -237,8 +237,8 @@
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 16
-@@ -1218,7 +1218,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1057,7 +1057,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -246,8 +246,8 @@
VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
NUMERIC_MIN_VALUE 32000000
NUMERIC_MAX_VALUE 1600000000
-@@ -1246,7 +1246,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1081,7 +1081,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -255,8 +255,8 @@
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -1274,10 +1274,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1105,22 +1105,22 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -268,10 +268,9 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1286,12 +1286,12 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_IO_CAPACITY_MAX
SESSION_VALUE NULL
- GLOBAL_VALUE 2000
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
+DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
@@ -284,8 +283,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1344,7 +1344,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1165,7 +1165,7 @@
+ SESSION_VALUE 50
DEFAULT_VALUE 50
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -293,8 +292,8 @@
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1073741824
-@@ -1358,10 +1358,10 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -1177,10 +1177,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -306,8 +305,8 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1414,7 +1414,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -1225,7 +1225,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -315,8 +314,8 @@
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -1470,7 +1470,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1273,7 +1273,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -324,8 +323,8 @@
VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
NUMERIC_MIN_VALUE 512
NUMERIC_MAX_VALUE 16384
-@@ -1484,10 +1484,10 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -1285,10 +1285,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -337,8 +336,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1540,10 +1540,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1333,10 +1333,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -350,8 +349,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1554,7 +1554,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1345,7 +1345,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -359,8 +358,8 @@
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 10000000
-@@ -1694,10 +1694,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1465,10 +1465,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -372,8 +371,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1722,7 +1722,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1489,7 +1489,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -381,8 +380,8 @@
VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
-@@ -1750,7 +1750,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1513,7 +1513,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 16
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -390,8 +389,8 @@
VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -1764,7 +1764,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1525,7 +1525,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -399,8 +398,8 @@
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 65536
-@@ -1806,7 +1806,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1561,7 +1561,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -408,8 +407,8 @@
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5000
-@@ -1820,7 +1820,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1573,7 +1573,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -417,8 +416,8 @@
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -1834,7 +1834,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1585,7 +1585,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -426,8 +425,8 @@
VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
-@@ -1862,7 +1862,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1609,7 +1609,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -435,8 +434,8 @@
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -1876,7 +1876,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -1621,7 +1621,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -444,8 +443,8 @@
VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
-@@ -1904,10 +1904,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1645,10 +1645,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -457,8 +456,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1946,7 +1946,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1669,7 +1669,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -466,8 +465,8 @@
VARIABLE_COMMENT An InnoDB page number.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2002,7 +2002,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1717,7 +1717,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -475,8 +474,8 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
-@@ -2212,7 +2212,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1885,7 +1885,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -484,8 +483,8 @@
VARIABLE_COMMENT Size of the mutex/lock wait array.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2240,10 +2240,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1909,10 +1909,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -497,8 +496,8 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2282,7 +2282,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1945,7 +1945,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -506,8 +505,8 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -2296,7 +2296,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -1957,7 +1957,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -515,17 +514,17 @@
VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
-@@ -2366,7 +2366,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -2017,7 +2017,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Deprecated parameter with no effect.
- NUMERIC_MIN_VALUE 1
+ NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 128
-@@ -2394,7 +2394,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -2041,7 +2041,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -533,8 +532,8 @@
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 127
-@@ -2422,7 +2422,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -2065,7 +2065,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index e9caa8844f8..e44b5a06e3d 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -1,4 +1,4 @@
-select * from information_schema.system_variables
+select VARIABLE_NAME, SESSION_VALUE, DEFAULT_VALUE, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT from information_schema.system_variables
where variable_name like 'innodb%' and
variable_name not in (
'innodb_version', # always the same as the server version
@@ -11,8 +11,6 @@ variable_name not in (
order by variable_name;
VARIABLE_NAME INNODB_ADAPTIVE_FLUSHING
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -25,8 +23,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_ADAPTIVE_FLUSHING_LWM
SESSION_VALUE NULL
-GLOBAL_VALUE 10.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
@@ -39,8 +35,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -53,8 +47,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -67,8 +59,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
SESSION_VALUE NULL
-GLOBAL_VALUE 150000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 150000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -81,8 +71,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_AUTOEXTEND_INCREMENT
SESSION_VALUE NULL
-GLOBAL_VALUE 64
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -95,8 +83,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_AUTOINC_LOCK_MODE
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
@@ -109,8 +95,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BACKGROUND_DROP_LIST_EMPTY
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -123,8 +107,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL
SESSION_VALUE NULL
-GLOBAL_VALUE 3600
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 3600
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -137,8 +119,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_COMPRESSED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -151,8 +131,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_INTERVAL
SESSION_VALUE NULL
-GLOBAL_VALUE 604800
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 604800
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -165,8 +143,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_UNCOMPRESSED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -179,8 +155,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_CHUNK_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -193,8 +167,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_AT_SHUTDOWN
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -207,8 +179,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_NOW
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -221,8 +191,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 25
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -235,8 +203,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_EVICT
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -249,8 +215,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_FILENAME
SESSION_VALUE NULL
-GLOBAL_VALUE ib_buffer_pool
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ib_buffer_pool
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -263,8 +227,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_INSTANCES
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -277,8 +239,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_ABORT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -291,8 +251,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_AT_STARTUP
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -305,8 +263,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_NOW
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -319,8 +275,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -333,8 +287,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUF_DUMP_STATUS_FREQUENCY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -347,8 +299,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUF_FLUSH_LIST_NOW
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -361,8 +311,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_CHANGE_BUFFERING
SESSION_VALUE NULL
-GLOBAL_VALUE all
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE all
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -375,8 +323,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CHANGE_BUFFERING_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -389,8 +335,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CHANGE_BUFFER_MAX_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 25
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -403,8 +347,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CHECKSUM_ALGORITHM
SESSION_VALUE NULL
-GLOBAL_VALUE full_crc32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE full_crc32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -417,8 +359,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -431,8 +371,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_COMMIT_CONCURRENCY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -445,8 +383,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_COMPRESSION_ALGORITHM
SESSION_VALUE NULL
-GLOBAL_VALUE zlib
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE zlib
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -459,8 +395,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_COMPRESSION_DEFAULT
SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -473,8 +407,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_COMPRESSION_FAILURE_THRESHOLD_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -487,8 +419,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_COMPRESSION_LEVEL
SESSION_VALUE NULL
-GLOBAL_VALUE 6
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 6
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -501,8 +431,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_COMPRESSION_PAD_PCT_MAX
SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -515,8 +443,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_CONCURRENCY_TICKETS
SESSION_VALUE NULL
-GLOBAL_VALUE 5000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -529,8 +455,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DATA_FILE_PATH
SESSION_VALUE NULL
-GLOBAL_VALUE ibdata1:12M:autoextend
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE ibdata1:12M:autoextend
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -543,8 +467,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DATA_FILE_SIZE_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -557,8 +479,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DATA_HOME_DIR
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -571,8 +491,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEADLOCK_DETECT
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -585,8 +503,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DEBUG_FORCE_SCRUBBING
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -599,8 +515,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID
SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
@@ -613,8 +527,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFAULT_ROW_FORMAT
SESSION_VALUE NULL
-GLOBAL_VALUE dynamic
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE dynamic
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -627,8 +539,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -641,8 +551,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_FILL_FACTOR
SESSION_VALUE NULL
-GLOBAL_VALUE 0.900000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0.900000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
@@ -655,8 +563,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_FILL_FACTOR_N_RECS
SESSION_VALUE NULL
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 20
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -669,8 +575,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_FREQUENCY
SESSION_VALUE NULL
-GLOBAL_VALUE 40
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 40
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -683,8 +587,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_N_PAGES
SESSION_VALUE NULL
-GLOBAL_VALUE 7
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 7
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -697,8 +599,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_STATS_ACCURACY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -711,8 +611,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DICT_STATS_DISABLED_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -725,8 +623,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_DISABLE_BACKGROUND_MERGE
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -739,8 +635,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -753,8 +647,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_SORT_FILE_CACHE
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -767,8 +659,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_DOUBLEWRITE
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -781,8 +671,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DOUBLEWRITE_BATCH_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 120
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 120
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -795,8 +683,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -809,8 +695,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ENCRYPTION_ROTATION_IOPS
SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -823,8 +707,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ENCRYPTION_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -837,8 +719,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ENCRYPT_LOG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -851,8 +731,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPT_TABLES
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -865,8 +743,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPT_TEMPORARY_TABLES
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -879,8 +755,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FAST_SHUTDOWN
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -893,8 +767,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FATAL_SEMAPHORE_WAIT_THRESHOLD
SESSION_VALUE NULL
-GLOBAL_VALUE 600
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -907,8 +779,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FILE_FORMAT
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -921,8 +791,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FILE_PER_TABLE
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -935,8 +803,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FILL_FACTOR
SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -949,8 +815,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FIL_MAKE_PAGE_DIRTY_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -963,8 +827,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSHING_AVG_LOOPS
SESSION_VALUE NULL
-GLOBAL_VALUE 30
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -977,8 +839,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FLUSH_LOG_AT_TIMEOUT
SESSION_VALUE NULL
-GLOBAL_VALUE 3
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -991,8 +851,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1005,8 +863,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSH_METHOD
SESSION_VALUE NULL
-GLOBAL_VALUE fsync
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE fsync
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -1019,8 +875,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FLUSH_NEIGHBORS
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1033,8 +887,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSH_SYNC
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1047,8 +899,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1061,8 +911,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_PRIMARY_KEY
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1075,8 +923,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FORCE_RECOVERY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1089,8 +935,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_AUX_TABLE
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1103,8 +947,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_CACHE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1117,8 +959,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_ENABLE_DIAG_PRINT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1131,8 +971,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_ENABLE_STOPWORD
SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -1145,8 +983,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_MAX_TOKEN_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 84
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1159,8 +995,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_MIN_TOKEN_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 3
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1173,8 +1007,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_NUM_WORD_OPTIMIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 2000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1187,8 +1019,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_RESULT_CACHE_LIMIT
SESSION_VALUE NULL
-GLOBAL_VALUE 2000000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1201,8 +1031,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_SERVER_STOPWORD_TABLE
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1215,8 +1043,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_SORT_PLL_DEGREE
SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1229,8 +1055,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_TOTAL_CACHE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 640000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1243,8 +1067,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_USER_STOPWORD_TABLE
SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
@@ -1257,8 +1079,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_IDLE_FLUSH_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1271,8 +1091,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1285,8 +1103,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_IO_CAPACITY
SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1299,8 +1115,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_IO_CAPACITY_MAX
SESSION_VALUE NULL
-GLOBAL_VALUE 2000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1313,8 +1127,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1327,8 +1139,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1341,8 +1151,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOCK_SCHEDULE_ALGORITHM
SESSION_VALUE NULL
-GLOBAL_VALUE fcfs
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE fcfs
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -1355,8 +1163,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
SESSION_VALUE 50
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1369,8 +1175,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1383,8 +1187,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_CHECKPOINT_NOW
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1397,8 +1199,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_CHECKSUMS
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1411,8 +1211,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1425,8 +1223,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILES_IN_GROUP
SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1439,8 +1235,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_FILE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 5242880
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 50331648
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1453,8 +1247,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_GROUP_HOME_DIR
SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1467,8 +1259,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_OPTIMIZE_DDL
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1481,8 +1271,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_WRITE_AHEAD_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 8192
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1495,8 +1283,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LRU_SCAN_DEPTH
SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1509,8 +1295,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MASTER_THREAD_DISABLED_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1523,8 +1307,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 75.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 75.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
@@ -1537,8 +1319,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT_LWM
SESSION_VALUE NULL
-GLOBAL_VALUE 0.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
@@ -1551,8 +1331,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_PURGE_LAG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1565,8 +1343,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_PURGE_LAG_DELAY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1579,8 +1355,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_UNDO_LOG_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 10485760
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10485760
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1593,8 +1367,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_MERGE_THRESHOLD_SET_ALL_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1607,8 +1379,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_DISABLE
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1621,8 +1391,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_ENABLE
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1635,8 +1403,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_RESET
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1649,8 +1415,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_RESET_ALL
SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1663,8 +1427,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_OLD_BLOCKS_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 37
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 37
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1677,8 +1439,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_OLD_BLOCKS_TIME
SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1691,8 +1451,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ONLINE_ALTER_LOG_MAX_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 134217728
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1705,8 +1463,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_OPEN_FILES
SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1719,8 +1475,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_OPTIMIZE_FULLTEXT_ONLY
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1733,8 +1487,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_PAGE_CLEANERS
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1747,8 +1499,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_PAGE_CLEANER_DISABLED_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1761,8 +1511,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PAGE_HASH_LOCKS
SESSION_VALUE NULL
-GLOBAL_VALUE 16
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1775,8 +1523,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PAGE_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1789,8 +1535,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1803,8 +1547,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PRINT_ALL_DEADLOCKS
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1817,8 +1559,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1831,8 +1571,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY
SESSION_VALUE NULL
-GLOBAL_VALUE 128
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1845,8 +1583,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1859,8 +1595,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_RANDOM_READ_AHEAD
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1873,8 +1607,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_READ_AHEAD_THRESHOLD
SESSION_VALUE NULL
-GLOBAL_VALUE 56
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1887,8 +1619,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_READ_IO_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1901,8 +1631,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_READ_ONLY
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1915,8 +1643,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_REPLICATION_DELAY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1929,8 +1655,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ROLLBACK_ON_TIMEOUT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1943,8 +1667,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SAVED_PAGE_NUMBER_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1957,8 +1679,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SCRUB_LOG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -1971,8 +1691,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SCRUB_LOG_SPEED
SESSION_VALUE NULL
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1985,8 +1703,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1999,8 +1715,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_SORT_BUFFER_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2013,8 +1727,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SPIN_WAIT_DELAY
SESSION_VALUE NULL
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -2027,8 +1739,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_AUTO_RECALC
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2041,8 +1751,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_INCLUDE_DELETE_MARKED
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2055,8 +1763,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_METHOD
SESSION_VALUE NULL
-GLOBAL_VALUE nulls_equal
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE nulls_equal
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -2069,8 +1775,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_MODIFIED_COUNTER
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2083,8 +1787,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_ON_METADATA
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2097,8 +1799,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_PERSISTENT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2111,8 +1811,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_PERSISTENT_SAMPLE_PAGES
SESSION_VALUE NULL
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 20
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2125,8 +1823,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_TRADITIONAL
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2139,8 +1835,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_TRANSIENT_SAMPLE_PAGES
SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2153,8 +1847,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATUS_OUTPUT
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2167,8 +1859,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATUS_OUTPUT_LOCKS
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2181,8 +1871,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STRICT_MODE
SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -2195,8 +1883,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_ARRAY_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2209,8 +1895,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2223,8 +1907,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_SPIN_LOOPS
SESSION_VALUE NULL
-GLOBAL_VALUE 30
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2237,8 +1919,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_TABLE_LOCKS
SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -2251,8 +1931,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TEMP_DATA_FILE_PATH
SESSION_VALUE NULL
-GLOBAL_VALUE ibtmp1:12M:autoextend
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ibtmp1:12M:autoextend
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -2265,8 +1943,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_THREAD_CONCURRENCY
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2279,8 +1955,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_THREAD_SLEEP_DELAY
SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2293,8 +1967,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_TMPDIR
SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
@@ -2307,8 +1979,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2321,8 +1991,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INNODB_TRX_RSEG_N_SLOTS_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -2335,8 +2003,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INNODB_UNDO_DIRECTORY
SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -2349,8 +2015,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_UNDO_LOGS
SESSION_VALUE NULL
-GLOBAL_VALUE 128
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2363,8 +2027,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_UNDO_LOG_TRUNCATE
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2377,8 +2039,6 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_UNDO_TABLESPACES
SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2391,8 +2051,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_USE_ATOMIC_WRITES
SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
@@ -2405,8 +2063,6 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_WRITE_IO_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
index 36254fa104b..9ec15d3079a 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
@@ -1,33 +1,136 @@
--- sysvars_server_embedded.result
-+++ sysvars_server_embedded,32bit.result
-@@ -74,7 +74,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 1
++++ sysvars_server_embedded.result
+@@ -34,7 +34,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_BLOCK_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Block size to be used for Aria index pages.
+ NUMERIC_MIN_VALUE 4096
+ NUMERIC_MAX_VALUE 32768
+@@ -44,7 +44,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -54,7 +54,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -74,7 +74,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 255
+@@ -94,7 +94,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -104,7 +104,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_LOG_FILE_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Limit for transaction log size
+ NUMERIC_MIN_VALUE 8388608
+ NUMERIC_MAX_VALUE 4294967295
+@@ -134,10 +134,10 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.
+ NUMERIC_MIN_VALUE 100
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 100
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -154,7 +154,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 100
+@@ -164,7 +164,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
+ NUMERIC_MIN_VALUE 128
+ NUMERIC_MAX_VALUE 16384
+@@ -194,7 +194,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME ARIA_REPAIR_THREADS
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 128
+@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
+ NUMERIC_MIN_VALUE 4096
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -264,7 +264,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -88,7 +88,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -274,7 +274,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -102,7 +102,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 150
+@@ -284,7 +284,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -175,7 +175,7 @@
+@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -36,9 +139,9 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -200,10 +200,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -354,20 +354,20 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -49,9 +152,8 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -214,10 +214,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100000
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME BINLOG_COMMIT_WAIT_USEC
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -62,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -245,7 +245,7 @@
+@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -71,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -301,7 +301,7 @@
+@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -80,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -315,7 +315,7 @@
+@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -89,151 +191,151 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -578,7 +578,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 10
+@@ -624,7 +624,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -648,7 +648,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 15
+@@ -674,7 +674,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -662,7 +662,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+@@ -684,7 +684,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -676,7 +676,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50000000
+@@ -694,7 +694,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -690,7 +690,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10000
+@@ -704,7 +704,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -746,7 +746,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -754,7 +754,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -760,7 +760,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -764,7 +764,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -774,7 +774,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 300
+@@ -774,7 +774,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -788,7 +788,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1000
+@@ -784,7 +784,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -816,7 +816,7 @@
- GLOBAL_VALUE_ORIGIN SQL
- DEFAULT_VALUE 4
+@@ -814,7 +814,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -928,7 +928,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -894,7 +894,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -970,7 +970,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -924,7 +924,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -1012,7 +1012,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -954,7 +954,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1054,7 +1054,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 84
+@@ -984,7 +984,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1068,7 +1068,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+@@ -994,7 +994,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -1082,7 +1082,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+@@ -1004,7 +1004,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1141,7 +1141,7 @@
+@@ -1047,7 +1047,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
@@ -242,34 +344,34 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1292,7 +1292,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -1174,7 +1174,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1320,7 +1320,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 128
+@@ -1204,7 +1204,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1474,7 +1474,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 28800
+@@ -1314,7 +1314,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1505,7 +1505,7 @@
+@@ -1347,7 +1347,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -278,16 +380,16 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1530,7 +1530,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -1364,7 +1364,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1561,7 +1561,7 @@
+@@ -1387,7 +1387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -296,52 +398,43 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1768,7 +1768,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 86400
+@@ -1544,7 +1544,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1936,7 +1936,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -1664,7 +1664,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1978,7 +1978,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -1694,7 +1694,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2020,7 +2020,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16777216
+@@ -1744,7 +1744,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2030,14 +2030,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_BINLOG_CACHE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709547520
-+GLOBAL_VALUE 4294963200
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709547520
-+DEFAULT_VALUE 4294963200
- VARIABLE_SCOPE GLOBAL
+@@ -1757,14 +1757,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -350,25 +443,15 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2048,7 +2048,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1073741824
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_BINLOG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -2058,14 +2058,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_BINLOG_STMT_CACHE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709547520
-+GLOBAL_VALUE 4294963200
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709547520
-+DEFAULT_VALUE 4294963200
- VARIABLE_SCOPE GLOBAL
+@@ -1777,14 +1777,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -377,43 +460,42 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2076,7 +2076,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 151
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -2090,7 +2090,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -1794,7 +1794,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2104,7 +2104,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+@@ -1804,7 +1804,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -2132,7 +2132,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 64
+@@ -1824,7 +1824,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -2149,7 +2149,7 @@
+@@ -1837,14 +1837,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -422,43 +504,42 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2160,7 +2160,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_INSERT_DELAYED_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -2188,7 +2188,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -1864,7 +1864,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2202,7 +2202,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 1048576
+@@ -1874,7 +1874,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_LONG_DATA_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2244,7 +2244,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+@@ -1904,7 +1904,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2261,7 +2261,7 @@
+@@ -1917,14 +1917,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
NUMERIC_MIN_VALUE 1024
@@ -467,90 +548,89 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2272,7 +2272,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2300,7 +2300,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -1944,7 +1944,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2314,7 +2314,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -1954,7 +1954,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -2342,7 +2342,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32
+@@ -1974,7 +1974,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2370,7 +2370,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+@@ -1994,7 +1994,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2384,7 +2384,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2004,7 +2004,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2398,7 +2398,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8
+@@ -2014,7 +2014,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2412,7 +2412,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -2024,7 +2024,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2426,7 +2426,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 262144
+@@ -2034,7 +2034,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2440,10 +2440,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 256
+@@ -2044,17 +2044,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MULTI_RANGE_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -561,46 +641,24 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2454,7 +2454,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2468,7 +2468,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 6
+@@ -2064,7 +2064,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2478,9 +2478,9 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 9223372036853727232
-+GLOBAL_VALUE 2146435072
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 9223372036853727232
-+DEFAULT_VALUE 2146435072
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
-@@ -2492,14 +2492,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MYISAM_MMAP_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709551615
-+GLOBAL_VALUE 4294967295
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709551615
-+DEFAULT_VALUE 4294967295
- VARIABLE_SCOPE GLOBAL
+@@ -2087,7 +2087,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -609,9 +667,9 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2524,10 +2524,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -2104,10 +2104,10 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -622,7 +680,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2541,7 +2541,7 @@
+@@ -2117,7 +2117,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -631,72 +689,81 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2594,7 +2594,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16384
+@@ -2154,7 +2154,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2608,7 +2608,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 30
+@@ -2164,7 +2164,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2622,7 +2622,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -2174,7 +2174,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2636,7 +2636,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 60
+@@ -2184,7 +2184,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2706,7 +2706,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -2234,7 +2234,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME OPEN_FILES_LIMIT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -2244,7 +2244,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2720,7 +2720,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 62
+@@ -2254,7 +2254,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2734,7 +2734,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2264,7 +2264,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2762,10 +2762,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1048576
+@@ -2294,17 +2294,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -707,349 +774,348 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2790,7 +2790,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2818,7 +2818,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2324,7 +2324,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2832,7 +2832,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2334,7 +2334,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 200
-@@ -2846,7 +2846,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2344,7 +2344,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2860,7 +2860,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2354,7 +2354,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2874,7 +2874,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2364,7 +2364,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2898,7 +2898,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2374,7 +2374,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2902,7 +2902,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2384,7 +2384,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2916,7 +2916,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2394,7 +2394,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2930,7 +2930,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2404,7 +2404,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2944,7 +2944,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 80
+@@ -2414,7 +2414,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2958,7 +2958,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2424,7 +2424,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2972,7 +2972,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2434,7 +2434,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2986,7 +2986,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
+@@ -2444,7 +2444,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3000,7 +3000,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32768
+@@ -2454,7 +2454,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -3014,7 +3014,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2464,7 +2464,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3028,7 +3028,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 200
+@@ -2474,7 +2474,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3042,7 +3042,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2484,7 +2484,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -3056,7 +3056,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 40
+@@ -2494,7 +2494,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3070,7 +3070,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2504,7 +2504,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -3084,7 +3084,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -2514,7 +2514,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3098,7 +3098,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2524,7 +2524,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3112,7 +3112,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 160
+@@ -2534,7 +2534,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3126,7 +3126,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 202
+@@ -2544,7 +2544,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3140,7 +3140,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2554,7 +2554,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3154,7 +3154,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2564,7 +2564,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3168,7 +3168,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
+@@ -2574,7 +2574,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3182,7 +3182,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2584,7 +2584,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3196,7 +3196,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2594,7 +2594,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3210,7 +3210,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2604,7 +2604,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1024
-@@ -3224,7 +3224,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2614,7 +2614,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -3238,7 +3238,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2624,7 +2624,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3294,7 +3294,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32768
+@@ -2674,7 +2674,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3322,7 +3322,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 15
+@@ -2694,7 +2694,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -3336,7 +3336,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5
+@@ -2704,7 +2704,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3420,7 +3420,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16384
+@@ -2764,7 +2764,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3434,7 +3434,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1048576
+@@ -2774,7 +2774,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3458,7 +3458,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -2784,7 +2784,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3465,7 +3465,7 @@
+@@ -2797,7 +2797,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1058,45 +1124,62 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3518,7 +3518,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 24576
+@@ -2834,7 +2834,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3532,7 +3532,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -2847,7 +2847,7 @@ VARIABLE_SCOPE SESSION ONLY
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -2857,14 +2857,14 @@ VARIABLE_SCOPE SESSION ONLY
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME RANGE_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -3546,7 +3546,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 131072
+@@ -2874,7 +2874,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME READ_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -3574,7 +3574,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 262144
+@@ -2894,7 +2894,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -3598,10 +3598,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8388608
+@@ -2904,10 +2904,10 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -1107,34 +1190,34 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3644,7 +3644,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 1
+@@ -2944,7 +2944,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -3742,7 +3742,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1073741824
+@@ -3014,7 +3014,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3756,7 +3756,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -3024,7 +3024,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -3715,7 +3715,7 @@
+@@ -3067,7 +3067,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1143,63 +1226,52 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4106,7 +4106,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 256
+@@ -3274,7 +3274,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -4204,7 +4204,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 400
+@@ -3354,7 +3354,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -4218,7 +4218,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 2000
+@@ -3364,7 +3364,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -4302,7 +4302,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 256
+@@ -3424,7 +3424,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -4316,7 +4316,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -3434,7 +3434,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME THREAD_CONCURRENCY
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -4423,15 +4423,15 @@
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME TMP_DISK_TABLE_SIZE
--SESSION_VALUE 18446744073709551615
--GLOBAL_VALUE 18446744073709551615
-+SESSION_VALUE 4294967295
-+GLOBAL_VALUE 4294967295
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709551615
-+DEFAULT_VALUE 4294967295
- VARIABLE_SCOPE SESSION
+@@ -3527,7 +3527,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1208,7 +1280,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4445,7 +4445,7 @@
+@@ -3537,7 +3537,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
NUMERIC_MIN_VALUE 1024
@@ -1217,7 +1289,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4459,7 +4459,7 @@
+@@ -3547,14 +3547,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1226,61 +1298,33 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4470,7 +4470,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8192
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TRANSACTION_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4484,7 +4484,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -3564,7 +3564,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4582,7 +4582,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 28800
+@@ -3704,7 +3704,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -4687,7 +4687,7 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME OPEN_FILES_LIMIT
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -4700,7 +4700,7 @@
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -4710,7 +4710,7 @@
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -4805,7 +4805,7 @@
+@@ -3731,7 +3731,7 @@ order by variable_name;
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 93eae92404d..5da931f8b90 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -3,36 +3,17 @@ set timestamp=unix_timestamp('2014-09-01 13:40:23');
set pseudo_thread_id=10;
set sql_mode=ansi_quotes;
set global div_precision_increment=5;
-select * from information_schema.system_variables
-where variable_name not like 'aria%' and
-variable_name not like 'debug%' and
+select VARIABLE_NAME,VARIABLE_SCOPE,VARIABLE_TYPE,VARIABLE_COMMENT,NUMERIC_MIN_VALUE,NUMERIC_MAX_VALUE,NUMERIC_BLOCK_SIZE,ENUM_VALUE_LIST,READ_ONLY,COMMAND_LINE_ARGUMENT
+from information_schema.system_variables
+where variable_name not like 'debug%' and
variable_name not like 'wsrep%' and
+variable_name not like 's3%' and
variable_name not in (
-'in_predicate_conversion_threshold',
-'have_openssl',
-'have_symlink',
'have_sanitizer',
-'hostname',
-'large_files_support', 'log_tc_size',
-'lower_case_file_system',
-'lower_case_table_names',
-'open_files_limit',
-'plugin_maturity',
-'rand_seed1',
-'rand_seed2',
-'system_time_zone',
-'tls_version',
-'version_comment',
-'version_source_revision',
-'version_compile_machine', 'version_compile_os',
-'version_malloc_library', 'version_ssl_library', 'version'
+'log_tc_size'
)
order by variable_name;
VARIABLE_NAME ALTER_ALGORITHM
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specify the alter table algorithm
@@ -43,10 +24,6 @@ ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ANALYZE_SAMPLE_PERCENTAGE
-SESSION_VALUE 100.000000
-GLOBAL_VALUE 100.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Percentage of rows from the table ANALYZE TABLE will sample to collect table statistics. Set to 0 to let MariaDB decide what percentage of rows to sample.
@@ -56,11 +33,217 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_BLOCK_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Block size to be used for Aria index pages.
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 32768
+NUMERIC_BLOCK_SIZE 1024
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_ENCRYPT_TABLES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Encrypt tables (only for tables with ROW_FORMAT=PAGE (default) and not FIXED/DYNAMIC)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 255
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_GROUP_COMMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies Aria group commit mode. Possible values are "none" (no group commit), "hard" (with waiting to actual commit), "soft" (no wait for commit (DANGEROUS!!!))
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,hard,soft
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_LOG_FILE_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Limit for transaction log size
+NUMERIC_MIN_VALUE 8388608
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 8192
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_LOG_PURGE_TYPE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies how Aria transactional log will be purged
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST immediate,external,at_flush
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_MAX_SORT_FILE_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1048576
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.
+NUMERIC_MIN_VALUE 100
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 100
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_BUFFER_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The size of the buffer used for index blocks for Aria tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford.
+NUMERIC_MIN_VALUE 131072
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
+NUMERIC_MIN_VALUE 128
+NUMERIC_MAX_VALUE 16384
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGE_CHECKSUM
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Maintain page checksums (can be overridden per table with PAGE_CHECKSUM clause in CREATE TABLE)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_RECOVER_OPTIONS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NORMAL,BACKUP,FORCE,QUICK,OFF
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ARIA_REPAIR_THREADS
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 128
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_SORT_BUFFER_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_STATS_METHOD
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies how Aria index statistics collection code should treat NULLs
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST nulls_unequal,nulls_equal,nulls_ignored
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_SYNC_LOG_DIR
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Controls syncing directory after log file growth and new file creation
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NEVER,NEWFILE,ALWAYS
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_USED_FOR_TEMP_TABLES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether temporary tables should be MyISAM or Aria
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME AUTOCOMMIT
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, all queries are committed immediately. If set to 0, they are only committed upon a COMMIT statement, or rolled back with a ROLLBACK statement. If autocommit is set to 0, and then changed to 1, all open transactions are immediately committed.
@@ -71,10 +254,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME AUTOMATIC_SP_PRIVILEGES
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Creating and dropping stored procedures alters ACLs
@@ -85,10 +264,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Auto-increment columns are incremented by this
@@ -99,10 +274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
@@ -113,10 +284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE 80
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 150
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
@@ -127,10 +294,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BASEDIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to installation directory. All paths are usually resolved relative to this
@@ -141,10 +304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
@@ -155,10 +314,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BIND_ADDRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE 127.0.0.1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT IP address to bind to.
@@ -169,10 +324,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ANNOTATE_ROW_EVENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Tells the master to annotate RBR events with the statement that caused these events
@@ -183,10 +334,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BINLOG_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
@@ -197,10 +344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM
-SESSION_VALUE NULL
-GLOBAL_VALUE CRC32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log
@@ -211,10 +354,6 @@ ENUM_VALUE_LIST NONE,CRC32
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If non-zero, binlog write will wait at most binlog_commit_wait_usec microseconds for at least this many commits to queue up for group commit to the binlog. This can reduce I/O on the binlog and provide increased opportunity for parallel apply on the slave, but too high a value will decrease commit throughput.
@@ -225,10 +364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_USEC
-SESSION_VALUE NULL
-GLOBAL_VALUE 100000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum time, in microseconds, to wait for more commits to queue up for binlog group commit. Only takes effect if the value of binlog_commit_wait_count is non-zero.
@@ -239,10 +374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Causes updates to non-transactional engines using statement format to be written directly to binary log. Before using this option make sure that there are no dependencies between transactional and non-transactional tables such as in the statement INSERT INTO t_myisam SELECT * FROM t_innodb; otherwise, slaves may diverge from the master.
@@ -253,10 +384,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BINLOG_FILE_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
@@ -267,10 +394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_FORMAT
-SESSION_VALUE MIXED
-GLOBAL_VALUE MIXED
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MIXED
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT What form of binary logging the master will use: either ROW for row-based binary logging, STATEMENT for statement-based binary logging, or MIXED. MIXED is statement-based binary logging except for those statements where only row-based is correct: those which involve user-defined functions (i.e. UDFs) or the UUID() function; for those, row-based binary logging is automatically used.
@@ -281,10 +404,6 @@ ENUM_VALUE_LIST MIXED,STATEMENT,ROW
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_OPTIMIZE_THREAD_SCHEDULING
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Run fast part of group commit in a single thread, to optimize kernel thread scheduling. On by default. Disable to run each transaction in group commit in its own thread, which can be slower at very high concurrency. This option is mostly for testing one algorithm versus the other, and it should not normally be necessary to change it.
@@ -295,10 +414,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ROW_IMAGE
-SESSION_VALUE FULL
-GLOBAL_VALUE FULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE FULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Controls whether rows should be logged in 'FULL', 'NOBLOB' or 'MINIMAL' formats. 'FULL', means that all columns in the before and after image are logged. 'NOBLOB', means that mysqld avoids logging blob columns whenever possible (eg, blob column was not changed or is not part of primary key). 'MINIMAL', means that a PK equivalent (PK columns or full row if there is no PK in the table) is logged in the before image, and only changed columns are logged in the after image. (Default: FULL).
@@ -309,10 +424,6 @@ ENUM_VALUE_LIST MINIMAL,NOBLOB,FULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_STMT_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
@@ -323,10 +434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BULK_INSERT_BUFFER_SIZE
-SESSION_VALUE 8388608
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8388608
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
@@ -337,10 +444,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CHARACTER_SETS_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory where character sets are
@@ -351,10 +454,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CHARACTER_SET_CLIENT
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set for statements that arrive from the client
@@ -365,10 +464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_CONNECTION
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used for literals that do not have a character set introducer and for number-to-string conversion
@@ -379,10 +474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_DATABASE
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used by the default database
@@ -393,10 +484,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_FILESYSTEM
-SESSION_VALUE binary
-GLOBAL_VALUE binary
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE binary
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The filesystem character set
@@ -407,10 +494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_RESULTS
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used for returning query results to the client
@@ -421,10 +504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_SERVER
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The default character set
@@ -435,10 +514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_SYSTEM
-SESSION_VALUE NULL
-GLOBAL_VALUE utf8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used by the server for storing identifiers
@@ -449,10 +524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHECK_CONSTRAINT_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT check_constraint_checks
@@ -463,10 +534,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_CONNECTION
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The collation of the connection character set
@@ -477,10 +544,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_DATABASE
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The collation of the database character set
@@ -491,10 +554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_SERVER
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The server default collation
@@ -505,10 +564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLUMN_COMPRESSION_THRESHOLD
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Minimum column data length eligible for compression
@@ -519,10 +574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_LEVEL
-SESSION_VALUE 6
-GLOBAL_VALUE 6
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 6
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT zlib compression level (1 gives best speed, 9 gives best compression)
@@ -533,10 +584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_STRATEGY
-SESSION_VALUE DEFAULT_STRATEGY
-GLOBAL_VALUE DEFAULT_STRATEGY
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT_STRATEGY
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The strategy parameter is used to tune the compression algorithm. Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
@@ -547,10 +594,6 @@ ENUM_VALUE_LIST DEFAULT_STRATEGY,FILTERED,HUFFMAN_ONLY,RLE,FIXED
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_WRAP
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Generate zlib header and trailer and compute adler32 check value. It can be used with storage engines that don't provide data integrity verification to detect data corruption.
@@ -561,10 +604,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME COMPLETION_TYPE
-SESSION_VALUE NO_CHAIN
-GLOBAL_VALUE NO_CHAIN
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO_CHAIN
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The transaction completion type
@@ -575,10 +614,6 @@ ENUM_VALUE_LIST NO_CHAIN,CHAIN,RELEASE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CONCURRENT_INSERT
-SESSION_VALUE NULL
-GLOBAL_VALUE AUTO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE AUTO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Use concurrent insert with MyISAM
@@ -589,10 +624,6 @@ ENUM_VALUE_LIST NEVER,AUTO,ALWAYS
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 60
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
@@ -603,10 +634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CORE_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT write a core-file on crashes
@@ -617,10 +644,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DATADIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE PATH
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to the database root directory
@@ -631,10 +654,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DATETIME_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %Y-%m-%d %H:%i:%s
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %Y-%m-%d %H:%i:%s
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The DATETIME format (ignored)
@@ -645,10 +664,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DATE_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %Y-%m-%d
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %Y-%m-%d
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The DATE format (ignored)
@@ -659,10 +674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
-SESSION_VALUE 15
-GLOBAL_VALUE 15
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 15
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
@@ -673,10 +684,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
-SESSION_VALUE 4
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
@@ -687,10 +694,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
-SESSION_VALUE 50000000
-GLOBAL_VALUE 50000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
@@ -701,10 +704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
-SESSION_VALUE 10000
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
@@ -715,10 +714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_PASSWORD_LIFETIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT This defines the global password expiration policy. 0 means automatic password expiration is disabled. If the value is a positive integer N, the passwords must be changed every N days. This behavior can be overridden using the password expiration options in ALTER USER.
@@ -729,10 +724,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_REGEX_FLAGS
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Default flags for the regex library
@@ -743,10 +734,6 @@ ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_STORAGE_ENGINE
-SESSION_VALUE MyISAM
-GLOBAL_VALUE MyISAM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MyISAM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The default storage engine for new tables
@@ -757,10 +744,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_TMP_STORAGE_ENGINE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The default storage engine for user-created temporary tables
@@ -771,10 +754,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The default week format used by WEEK() functions
@@ -785,10 +764,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
@@ -799,10 +774,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
@@ -813,10 +784,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
@@ -827,10 +794,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAY_KEY_WRITE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how MyISAM tables handles CREATE TABLE DELAY_KEY_WRITE. If set to ON, the default, any DELAY KEY WRITEs are honored. The key buffer is then flushed only when the table closes, speeding up writes. MyISAM tables should be automatically checked upon startup in this case, and --external locking should not be used, as it can lead to index corruption. If set to OFF, DELAY KEY WRITEs are ignored, while if set to ALL, all new opened tables are treated as if created with DELAY KEY WRITEs enabled.
@@ -841,10 +804,6 @@ ENUM_VALUE_LIST OFF,ON,ALL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DISCONNECT_ON_EXPIRED_PASSWORD
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT This variable controls how the server handles clients that are not aware of the sandbox mode. If enabled, the server disconnects the client, otherwise the server puts the client in a sandbox mode.
@@ -855,10 +814,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
-SESSION_VALUE 4
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN SQL
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
@@ -869,10 +824,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ENCRYPT_BINLOG
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt binary logs (including relay logs)
@@ -883,10 +834,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENCRYPT_TMP_DISK_TABLES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt temporary on-disk tables (created as part of query execution)
@@ -897,10 +844,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENCRYPT_TMP_FILES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt temporary files (created for filesort, binary log cache, etc)
@@ -911,10 +854,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENFORCE_STORAGE_ENGINE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Force the use of a storage engine for new tables
@@ -925,10 +864,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
-SESSION_VALUE 200
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
@@ -939,10 +874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ERROR_COUNT
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of errors that resulted from the last statement that generated messages
@@ -953,10 +884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXPENSIVE_SUBQUERY_LIMIT
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum number of rows a subquery may examine in order to be executed during optimization and used for constant optimization
@@ -967,10 +894,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
@@ -981,10 +904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPLICIT_DEFAULTS_FOR_TIMESTAMP
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT This option causes CREATE TABLE to create all TIMESTAMP columns as NULL with DEFAULT NULL attribute, Without this option, TIMESTAMP columns are NOT NULL and have implicit DEFAULT clauses.
@@ -995,10 +914,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME EXTERNAL_USER
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The external user account used when logging in
@@ -1009,10 +924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of connections on extra-port
@@ -1023,10 +934,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXTRA_PORT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Extra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another port
@@ -1037,10 +944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FLUSH
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Flush MyISAM tables to disk between SQL commands
@@ -1051,10 +954,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
@@ -1065,10 +964,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FOREIGN_KEY_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (the default) foreign key constraints (including ON UPDATE and ON DELETE behavior) InnoDB tables are checked, while if set to 0, they are not checked. 0 is not recommended for normal use, though it can be useful in situations where you know the data is consistent, but want to reload data in a different order from that that specified by parent/child relationships. Setting this variable to 1 does not retrospectively check for inconsistencies introduced while set to 0.
@@ -1079,10 +974,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME FT_BOOLEAN_SYNTAX
-SESSION_VALUE NULL
-GLOBAL_VALUE + -><()~*:""&|
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE + -><()~*:""&|
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT List of operators for MATCH ... AGAINST ( ... IN BOOLEAN MODE)
@@ -1093,10 +984,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 84
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
@@ -1107,10 +994,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
@@ -1121,10 +1004,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of best matches to use for query expansion
@@ -1135,10 +1014,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_STOPWORD_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE (built-in)
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Use stopwords from this file instead of built-in list
@@ -1149,10 +1024,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GENERAL_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log connections and queries to a table or log file. Defaults logging to a file 'hostname'.log or a table mysql.general_logif --log-output=TABLE is used.
@@ -1163,10 +1034,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME GENERAL_LOG_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log connections and queries to given file
@@ -1177,10 +1044,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GROUP_CONCAT_MAX_LEN
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
@@ -1191,10 +1054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_DOMAIN_ID
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Used with global transaction ID to identify logically independent replication streams. When events can propagate through multiple parallel paths (for example multiple masters), each independent source server must use a distinct domain_id. For simple tree-shaped replication topologies, it can be left at its default, 0.
@@ -1205,10 +1064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_SEQ_NO
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Internal server usage, for replication with global transaction id. When set, next event group logged to the binary log will use this sequence number, not generate a new one, thus allowing to preserve master's GTID in slave's binlog.
@@ -1219,10 +1074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_COMPRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the zlib compression library is accessible to the server, this will be set to YES, otherwise it will be NO. The COMPRESS() and UNCOMPRESS() functions will only be available if set to YES.
@@ -1233,10 +1084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_CRYPT
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the crypt() system call is available this variable will be set to YES, otherwise it will be set to NO. If set to NO, the ENCRYPT() function cannot be used.
@@ -1247,10 +1094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_DYNAMIC_LOADING
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports dynamic loading of plugins, will be set to YES, otherwise will be set to NO.
@@ -1261,10 +1104,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_GEOMETRY
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports spatial data types, will be set to YES, otherwise will be set to NO.
@@ -1274,11 +1113,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME HAVE_OPENSSL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Comparing have_openssl with have_ssl will indicate whether YaSSL or openssl was used. If YaSSL, have_ssl will be YES, but have_openssl will be NO.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_PROFILING
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If statement profiling is available, will be set to YES, otherwise will be set to NO. See SHOW PROFILES and SHOW PROFILE.
@@ -1289,10 +1134,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_QUERY_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports the query cache, will be set to YES, otherwise will be set to NO.
@@ -1303,10 +1144,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_RTREE_KEYS
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If RTREE indexes (used for spatial indexes) are available, will be set to YES, otherwise will be set to NO.
@@ -1317,10 +1154,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_SSL
-SESSION_VALUE NULL
-GLOBAL_VALUE NO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports secure connections, will be set to YES, otherwise will be set to NO. If set to DISABLED, the server was compiled with TLS support, but was not started with TLS support (see the mysqld options). See also have_openssl.
@@ -1330,11 +1163,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME HAVE_SYMLINK
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT If symbolic link support is enabled, will be set to YES, otherwise will be set to NO. Required for the INDEX DIRECTORY and DATA DIRECTORY table options (see CREATE TABLE) and Windows symlink support. Will be set to DISABLED if the server is started with the --skip-symbolic-links option.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
-SESSION_VALUE 254
-GLOBAL_VALUE 254
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 254
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
@@ -1345,10 +1184,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME HISTOGRAM_TYPE
-SESSION_VALUE DOUBLE_PREC_HB
-GLOBAL_VALUE DOUBLE_PREC_HB
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DOUBLE_PREC_HB
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies type of the histograms created by ANALYZE. Possible values are: SINGLE_PREC_HB - single precision height-balanced, DOUBLE_PREC_HB - double precision height-balanced.
@@ -1358,11 +1193,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST SINGLE_PREC_HB,DOUBLE_PREC_HB
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME HOSTNAME
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Server host name
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 279
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
@@ -1373,10 +1214,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDENTITY
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Synonym for the last_insert_id variable
@@ -1387,10 +1224,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME IDLE_READONLY_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for read-only idle transaction
@@ -1401,10 +1234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDLE_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for idle transaction
@@ -1415,10 +1244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDLE_WRITE_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for write idle transaction
@@ -1429,10 +1254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IGNORE_BUILTIN_INNODB
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable initialization of builtin InnoDB plugin
@@ -1443,10 +1264,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME IGNORE_DB_DIRS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Specifies a directory to add to the ignore list when collecting database names from the datadir. Put a blank argument to reset the list accumulated so far.
@@ -1457,10 +1274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_CONNECT
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Command(s) that are executed for each new connection (unless the user has SUPER privilege)
@@ -1471,10 +1284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Read SQL commands from this file at startup
@@ -1485,10 +1294,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_SLAVE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Command(s) that are executed by a slave server each time the SQL thread starts
@@ -1499,10 +1304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INSERT_ID
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The value to be used by the following INSERT or ALTER TABLE statement when inserting an AUTO_INCREMENT value
@@ -1513,10 +1314,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
-SESSION_VALUE 28800
-GLOBAL_VALUE 28800
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 28800
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
@@ -1526,11 +1323,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME IN_PREDICATE_CONVERSION_THRESHOLD
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT The minimum number of scalar elements in the value list of IN predicate that triggers its conversion to IN subquery. Set to 0 to disable the conversion.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IN_TRANSACTION
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Whether there is an active transaction
@@ -1541,10 +1344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME JOIN_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
@@ -1555,10 +1354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_BUFFER_SPACE_LIMIT
-SESSION_VALUE 2097152
-GLOBAL_VALUE 2097152
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2097152
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The limit of the space for all join buffers used by a query
@@ -1569,10 +1364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
-SESSION_VALUE 2
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
@@ -1583,10 +1374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEEP_FILES_ON_CREATE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't overwrite stale .MYD and .MYI even if no directory is specified
@@ -1597,10 +1384,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME KEY_BUFFER_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
@@ -1611,10 +1394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_AGE_THRESHOLD
-SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache
@@ -1625,10 +1404,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_BLOCK_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The default size of key cache blocks
@@ -1639,10 +1414,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_DIVISION_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
@@ -1653,10 +1424,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_FILE_HASH_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 512
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 512
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of MyISAM files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open MyISAM files.
@@ -1667,10 +1434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_SEGMENTS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of segments in a key cache
@@ -1680,11 +1443,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME LARGE_FILES_SUPPORT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether mysqld was compiled with options for large file support
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LARGE_PAGES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable support for large pages
@@ -1695,10 +1464,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LARGE_PAGE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If large page support is enabled, this shows the size of memory pages
@@ -1709,10 +1474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LAST_INSERT_ID
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The value to be returned from LAST_INSERT_ID()
@@ -1723,10 +1484,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LC_MESSAGES
-SESSION_VALUE en_US
-GLOBAL_VALUE en_US
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE en_US
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Set the language used for the error messages
@@ -1737,10 +1494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LC_MESSAGES_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory where error messages are
@@ -1751,10 +1504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LC_TIME_NAMES
-SESSION_VALUE en_US
-GLOBAL_VALUE en_US
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE en_US
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Set the language used for the month names and the days of the week
@@ -1765,10 +1514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LICENSE
-SESSION_VALUE NULL
-GLOBAL_VALUE GPL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The type of license the server has
@@ -1779,10 +1524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCAL_INFILE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable LOAD DATA LOCAL INFILE
@@ -1793,10 +1534,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOCKED_IN_MEMORY
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether mysqld was locked in memory with --memlock
@@ -1807,10 +1544,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
-SESSION_VALUE 86400
-GLOBAL_VALUE 86400
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 86400
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
@@ -1821,10 +1554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_BIN
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the binary log is enabled
@@ -1835,10 +1564,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOG_BIN_COMPRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the binary log can be compressed
@@ -1849,10 +1574,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_COMPRESS_MIN_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Minimum length of sql statement(in statement mode) or record(in row mode)that can be compressed.
@@ -1863,10 +1584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_TRUST_FUNCTION_CREATORS
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to FALSE (the default), then when --log-bin is used, creation of a stored function (or trigger) is allowed only to users having the SUPER privilege and only if this stored function (trigger) may not break binary logging. Note that if ALL connections to this server ALWAYS use row-based binary logging, the security issues do not exist and the binary logging cannot break, so you can safely set this to TRUE
@@ -1877,10 +1594,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_DISABLED_STATEMENTS
-SESSION_VALUE sp
-GLOBAL_VALUE sp
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE sp
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Don't log certain types of statements to general log
@@ -1891,10 +1604,6 @@ ENUM_VALUE_LIST slave,sp
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_ERROR
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log errors to file (instead of stdout). If file name is not specified then 'datadir'/'log-basename'.err or the 'pid-file' path with extension .err is used
@@ -1905,10 +1614,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_OUTPUT
-SESSION_VALUE NULL
-GLOBAL_VALUE FILE
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE FILE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
VARIABLE_COMMENT How logs should be written
@@ -1919,10 +1624,6 @@ ENUM_VALUE_LIST NONE,FILE,TABLE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_QUERIES_NOT_USING_INDEXES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log queries that are executed without benefit of any index to the slow log if it is open. Same as log_slow_filter='not_using_index'
@@ -1933,10 +1634,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_disabled_statements
@@ -1947,10 +1644,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_DISABLED_STATEMENTS
-SESSION_VALUE sp
-GLOBAL_VALUE sp
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE sp
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Don't log certain types of statements to slow log
@@ -1961,10 +1654,6 @@ ENUM_VALUE_LIST admin,call,slave,sp
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_FILTER
-SESSION_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
-GLOBAL_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Log only certain types of queries to the slow log. If variable empty alll kind of queries are logged. All types are bound by slow_query_time, except 'not_using_index' which is always logged if enabled
@@ -1975,10 +1664,6 @@ ENUM_VALUE_LIST admin,filesort,filesort_on_disk,filesort_priority_queue,full_joi
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
@@ -1989,10 +1674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_SLAVE_STATEMENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow statements executed by slave thread to the slow log if it is open. Resets or sets the option 'slave' in log_slow_disabled_statements
@@ -2003,10 +1684,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_VERBOSITY
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Verbosity level for the slow log
@@ -2017,10 +1694,6 @@ ENUM_VALUE_LIST innodb,query_plan,explain
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
-SESSION_VALUE 2
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
@@ -2031,10 +1704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LONG_QUERY_TIME
-SESSION_VALUE 10.000000
-GLOBAL_VALUE 10.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Log all queries that have taken more than long_query_time seconds to execute to the slow query log file. The argument will be treated as a decimal value with microsecond precision
@@ -2044,11 +1713,27 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME LOWER_CASE_FILE_SYSTEM
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Case sensitivity of file names on the file system where the data directory is located
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME LOWER_CASE_TABLE_NAMES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive. Should be set to 2 if you are using a case insensitive file system
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOW_PRIORITY_UPDATES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT INSERT/DELETE/UPDATE has lower priority than selects
@@ -2059,10 +1744,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max packet length to send to or receive from the server
@@ -2073,10 +1754,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709547520
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709547520
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
@@ -2087,10 +1764,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1073741824
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
@@ -2101,10 +1774,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_STMT_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709547520
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709547520
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
@@ -2115,10 +1784,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE 151
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 151
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of simultaneous clients allowed
@@ -2129,10 +1794,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
@@ -2143,10 +1804,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
-SESSION_VALUE 20
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
@@ -2157,10 +1814,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DIGEST_LENGTH
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum length considered for digest text.
@@ -2171,10 +1824,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
-SESSION_VALUE 64
-GLOBAL_VALUE 64
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 64
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
@@ -2185,10 +1834,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_HEAP_TABLE_SIZE
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
@@ -2199,10 +1844,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_INSERT_DELAYED_THREADS
-SESSION_VALUE 20
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
@@ -2213,10 +1854,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME MAX_JOIN_SIZE
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Joins that are probably going to read more than max_join_size records return an error
@@ -2227,10 +1864,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
-SESSION_VALUE 1024
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of bytes in sorted records
@@ -2241,10 +1874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LONG_DATA_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
@@ -2255,10 +1884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PASSWORD_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
@@ -2269,10 +1894,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 16382
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16382
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of prepared statements in the server
@@ -2283,10 +1904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
-SESSION_VALUE 4294967295
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
@@ -2297,10 +1914,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ROWID_FILTER_SIZE
-SESSION_VALUE 131072
-GLOBAL_VALUE 131072
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
@@ -2311,10 +1924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
-SESSION_VALUE 4294967295
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
@@ -2325,10 +1934,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SESSION_MEM_USED
-SESSION_VALUE 9223372036854775807
-GLOBAL_VALUE 9223372036854775807
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 9223372036854775807
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED
@@ -2339,10 +1944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
-SESSION_VALUE 1024
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
@@ -2353,10 +1954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum stored procedure recursion depth
@@ -2367,10 +1964,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_STATEMENT_TIME
-SESSION_VALUE 0.000000
-GLOBAL_VALUE 0.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
@@ -2381,10 +1974,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
-SESSION_VALUE 32
-GLOBAL_VALUE 32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused, will be removed.
@@ -2395,10 +1984,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_USER_CONNECTIONS
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT
VARIABLE_COMMENT The maximum number of active connections for a single user (0 = no limit)
@@ -2409,10 +1994,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
@@ -2423,10 +2004,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused
@@ -2437,10 +2014,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused
@@ -2451,10 +2024,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
@@ -2465,10 +2034,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
@@ -2479,10 +2044,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MULTI_RANGE_COUNT
-SESSION_VALUE 256
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
@@ -2493,10 +2054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Block size to be used for MyISAM index pages
@@ -2507,10 +2064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 6
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 6
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
@@ -2521,10 +2074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 9223372036853727232
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 9223372036853727232
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
@@ -2535,10 +2084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MMAP_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
@@ -2549,10 +2094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_RECOVER_OPTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE BACKUP,QUICK
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE BACKUP,QUICK
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired
@@ -2563,10 +2104,6 @@ ENUM_VALUE_LIST DEFAULT,BACKUP,FORCE,QUICK,BACKUP_ALL,OFF
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If larger than 1, when repairing a MyISAM table all indexes will be created in parallel, with one thread per index. The value of 1 disables parallel repair
@@ -2577,10 +2114,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_SORT_BUFFER_SIZE
-SESSION_VALUE 134216704
-GLOBAL_VALUE 134216704
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 134216704
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
@@ -2591,10 +2124,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_STATS_METHOD
-SESSION_VALUE NULLS_UNEQUAL
-GLOBAL_VALUE NULLS_UNEQUAL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULLS_UNEQUAL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how MyISAM index statistics collection code should treat NULLs. Possible values of name are NULLS_UNEQUAL (default behavior for 4.1 and later), NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
@@ -2605,10 +2134,6 @@ ENUM_VALUE_LIST NULLS_UNEQUAL,NULLS_EQUAL,NULLS_IGNORED
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_USE_MMAP
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use memory mapping for reading and writing MyISAM tables
@@ -2619,10 +2144,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME MYSQL56_TEMPORAL_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns.
@@ -2633,10 +2154,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
-SESSION_VALUE 16384
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
@@ -2647,10 +2164,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
-SESSION_VALUE 30
-GLOBAL_VALUE 30
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 30
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
@@ -2661,10 +2174,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
-SESSION_VALUE 10
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
@@ -2675,10 +2184,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
-SESSION_VALUE 60
-GLOBAL_VALUE 60
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 60
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
@@ -2689,10 +2194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OLD
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use compatible behavior from previous MariaDB version. See also --old-mode
@@ -2703,10 +2204,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_ALTER_TABLE
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Alias for alter_algorithm. Deprecated. Use --alter-algorithm instead.
@@ -2717,10 +2214,6 @@ ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_MODE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Used to emulate old behavior from earlier MariaDB or MySQL versions
@@ -2731,10 +2224,6 @@ ENUM_VALUE_LIST NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO,ZERO_DATE_TIME_
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OLD_PASSWORDS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use old password encryption method (needed for 4.0 and older clients)
@@ -2744,11 +2233,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME OPEN_FILES_LIMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
@@ -2759,10 +2254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
-SESSION_VALUE 62
-GLOBAL_VALUE 62
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 62
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
@@ -2773,10 +2264,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
@@ -2787,28 +2274,16 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SWITCH
-SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
-GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
-SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,not_null_range_scan=off
-GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,not_null_range_scan=off
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,not_null_range_scan=off
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,not_null_range_scan,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE
-SESSION_VALUE enabled=off
-GLOBAL_VALUE enabled=off
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE enabled=off
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Controls tracing of the Optimizer: optimizer_trace=option=val[,option=val...], where option is one of {enabled} and val is one of {on, off, default}
@@ -2819,10 +2294,6 @@ ENUM_VALUE_LIST enabled,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum allowed size of an optimizer trace
@@ -2830,14 +2301,9 @@ NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,not_null_range_scan,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
-SESSION_VALUE 4
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
@@ -2848,10 +2314,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable the performance schema.
@@ -2862,10 +2324,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
@@ -2876,10 +2334,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
@@ -2890,10 +2344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -2904,10 +2354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -2918,10 +2364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -2932,10 +2374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -2946,10 +2384,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -2960,10 +2394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -2974,10 +2404,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
@@ -2988,10 +2414,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 80
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 80
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of condition instruments.
@@ -3002,10 +2424,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
@@ -3016,10 +2434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
@@ -3030,10 +2444,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of file instruments.
@@ -3044,10 +2454,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of opened instrumented files.
@@ -3058,10 +2464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
@@ -3072,10 +2474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of mutex instruments.
@@ -3086,10 +2484,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 5000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
@@ -3100,10 +2494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 40
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 40
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rwlock instruments.
@@ -3114,10 +2504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 5000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
@@ -3128,10 +2514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of socket instruments.
@@ -3142,10 +2524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
@@ -3156,10 +2534,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 160
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 160
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of stage instruments.
@@ -3170,10 +2544,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 202
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 202
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -3184,10 +2554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
@@ -3198,10 +2564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 500
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
@@ -3212,10 +2574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of thread instruments.
@@ -3226,10 +2584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
@@ -3240,10 +2594,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 2048
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
@@ -3254,10 +2604,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
@@ -3268,10 +2614,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
@@ -3282,10 +2624,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
@@ -3296,10 +2634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PID_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Pid file used by safe_mysqld
@@ -3310,10 +2644,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PLUGIN_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory for plugins
@@ -3323,11 +2653,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PLUGIN_MATURITY
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PORT
-SESSION_VALUE NULL
-GLOBAL_VALUE MASTER_MYPORT
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Port number to use for connection or 0 to default to, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306), whatever comes first
@@ -3338,10 +2674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
-SESSION_VALUE 32768
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
@@ -3352,10 +2684,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROFILING
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is default), statement profiling will be enabled. See SHOW PROFILES and SHOW PROFILE.
@@ -3366,10 +2694,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
-SESSION_VALUE 15
-GLOBAL_VALUE 15
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 15
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
@@ -3380,10 +2704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
-SESSION_VALUE 5
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 5
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
@@ -3394,10 +2714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROTOCOL_VERSION
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The version of the client/server protocol used by the MariaDB server
@@ -3408,10 +2724,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROXY_PROTOCOL_NETWORKS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Enable proxy protocol for these source networks. The syntax is a comma separated list of IPv4 and IPv6 networks. If the network doesn't contain mask, it is considered to be a single host. "*" represents all networks and must the only directive on the line. String "localhost" represents non-TCP local connections (Unix domain socket, Windows named pipe or shared memory).
@@ -3422,10 +2734,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROXY_USER
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The proxy user account name used when logging in
@@ -3436,10 +2744,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PSEUDO_SLAVE_MODE
-SESSION_VALUE OFF
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT SET pseudo_slave_mode= 0,1 are commands that mysqlbinlog adds to beginning and end of binary log dumps. While zero value indeed disables, the actual enabling of the slave applier execution mode is done implicitly when a Format_description_event is sent through the session.
@@ -3450,10 +2754,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PSEUDO_THREAD_ID
-SESSION_VALUE 10
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT This variable is for internal server use
@@ -3464,10 +2764,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
-SESSION_VALUE 16384
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for query parsing and execution
@@ -3478,10 +2774,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't cache results that are bigger than this
@@ -3492,10 +2784,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
@@ -3506,10 +2794,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
@@ -3520,10 +2804,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_STRIP_COMMENTS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Strip all comments from a query before storing it in the query cache
@@ -3534,10 +2814,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_CACHE_TYPE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT OFF = Don't cache or retrieve results. ON = Cache all results except SELECT SQL_NO_CACHE ... queries. DEMAND = Cache only SELECT SQL_CACHE ... queries
@@ -3548,10 +2824,6 @@ ENUM_VALUE_LIST OFF,ON,DEMAND
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_WLOCK_INVALIDATE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Invalidate queries in query cache on LOCK for write
@@ -3562,10 +2834,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
-SESSION_VALUE 24576
-GLOBAL_VALUE 24576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 24576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Persistent buffer for query parsing and execution
@@ -3575,11 +2843,27 @@ NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME RAND_SEED1
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME RAND_SEED2
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME RANGE_ALLOC_BLOCK_SIZE
-SESSION_VALUE 4096
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
@@ -3590,10 +2874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_BUFFER_SIZE
-SESSION_VALUE 131072
-GLOBAL_VALUE 131072
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
@@ -3604,10 +2884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_ONLY
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege
@@ -3618,10 +2894,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
@@ -3632,10 +2904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
-SESSION_VALUE 8388608
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8388608
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffers used [NOT] IN evaluation via partial matching
@@ -3646,10 +2914,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SECURE_AUTH
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disallow authentication for accounts that have old (pre-4.1) passwords
@@ -3660,10 +2924,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SECURE_FILE_PRIV
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files within specified directory
@@ -3674,10 +2934,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SECURE_TIMESTAMP
-SESSION_VALUE NULL
-GLOBAL_VALUE NO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Restricts direct setting of a session timestamp. Possible levels are: YES - timestamp cannot deviate from the system clock, REPLICATION - replication thread can adjust timestamp to match the master's, SUPER - a user with this privilege and a replication thread can adjust timestamp, NO - historical behavior, anyone can modify session timestamp
@@ -3688,10 +2944,6 @@ ENUM_VALUE_LIST NO,SUPER,REPLICATION,YES
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
@@ -3702,10 +2954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SKIP_EXTERNAL_LOCKING
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't use system (external) locking
@@ -3716,10 +2964,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SKIP_NAME_RESOLVE
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't resolve hostnames. All hostnames are IP's or 'localhost'.
@@ -3730,10 +2974,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SKIP_NETWORKING
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't allow connection with TCP/IP
@@ -3744,10 +2984,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SKIP_REPLICATION
-SESSION_VALUE OFF
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Changes are logged into the binary log with the @@skip_replication flag set. Such events will not be replicated by slaves that run with --replicate-events-marked-for-skip set different from its default of REPLICATE. See Selectively skipping replication of binlog events for more information.
@@ -3758,10 +2994,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SKIP_SHOW_DATABASE
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't allow 'SHOW DATABASE' commands
@@ -3772,10 +3004,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_COMPRESSED_PROTOCOL
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use compression on master/slave protocol
@@ -3786,10 +3014,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
-SESSION_VALUE NULL
-GLOBAL_VALUE 1073741824
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
@@ -3800,10 +3024,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
@@ -3814,10 +3034,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_QUERY_LOG
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow queries to a table or log file. Defaults logging to a file 'hostname'-slow.log or a table mysql.slow_log if --log-output=TABLE is used. Must be enabled to activate other slow log options.
@@ -3828,10 +3044,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLOW_QUERY_LOG_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options
@@ -3842,10 +3054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SOCKET
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Socket file to use for connection
@@ -3856,10 +3064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SORT_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 2097152
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
@@ -3870,10 +3074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_AUTO_IS_NULL
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the query SELECT * FROM table_name WHERE auto_increment_column IS NULL will return an auto-increment that has just been successfully inserted, the same as the LAST_INSERT_ID() function. Some ODBC programs make use of this IS NULL comparison.
@@ -3884,10 +3084,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_BIG_SELECTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 0, MariaDB will not perform large SELECTs. See max_join_size for details. If max_join_size is set to anything but DEFAULT, sql_big_selects is automatically set to 0. If sql_big_selects is again set, max_join_size will be ignored.
@@ -3898,10 +3094,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_BUFFER_RESULT
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is default), results from SELECT statements are always placed into temporary tables. This can help the server when it takes a long time to send the results to the client by allowing the table locks to be freed early.
@@ -3912,10 +3104,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_BIN
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 0 (1 is the default), no logging to the binary log is done for the client. Only clients with the SUPER privilege can update this variable. Can have unintended consequences if set globally, see SET SQL_LOG_BIN. Starting MariaDB 10.1.7, this variable does not affect the replication of events in a Galera cluster.
@@ -3926,10 +3114,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_OFF
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is the default), no logging to the general query log is done for the client. Only clients with the SUPER privilege can update this variable.
@@ -3940,10 +3124,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_MODE
-SESSION_VALUE ANSI_QUOTES
-GLOBAL_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Sets the sql mode
@@ -3954,10 +3134,6 @@ ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BA
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, warning_count is incremented each time a Note warning is encountered. If set to 0, Note warnings are not recorded. mysqldump has outputs to set this variable to 0 so that no unnecessary increments occur when data is reloaded.
@@ -3968,10 +3144,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_QUOTE_SHOW_CREATE
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, the server will quote identifiers for SHOW CREATE DATABASE, SHOW CREATE TABLE and SHOW CREATE VIEW statements. Quoting is disabled if set to 0. Enable to ensure replications works when identifiers require quoting.
@@ -3982,10 +3154,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_SAFE_UPDATES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, UPDATEs and DELETEs need either a key in the WHERE clause, or a LIMIT clause, or else they will aborted. Prevents the common mistake of accidentally deleting or updating every row in a table.
@@ -3996,10 +3164,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SQL_SELECT_LIMIT
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum number of rows to return from SELECT statements
@@ -4010,10 +3174,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_WARNINGS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, single-row INSERTs will produce a string containing warning information if a warning occurs.
@@ -4024,10 +3184,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CA
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CA file in PEM format (check OpenSSL docs, implies --ssl)
@@ -4038,10 +3194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CAPATH
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CA directory (check OpenSSL docs, implies --ssl)
@@ -4052,10 +3204,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CERT
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT X509 cert in PEM format (implies --ssl)
@@ -4066,10 +3214,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CIPHER
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT SSL cipher to use (implies --ssl)
@@ -4080,10 +3224,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CRL
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CRL file in PEM format (check OpenSSL docs, implies --ssl)
@@ -4094,10 +3234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CRLPATH
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CRL directory (check OpenSSL docs, implies --ssl)
@@ -4108,10 +3244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_KEY
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT X509 key in PEM format (implies --ssl)
@@ -4122,10 +3254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STANDARD_COMPLIANT_CTE
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Allow only CTEs compliant to SQL standard
@@ -4136,10 +3264,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME STORAGE_ENGINE
-SESSION_VALUE MyISAM
-GLOBAL_VALUE MyISAM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MyISAM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Alias for @@default_storage_engine. Deprecated
@@ -4150,10 +3274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
@@ -4164,10 +3284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME STRICT_PASSWORD_VALIDATION
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT When password validation plugins are enabled, reject passwords that cannot be validated (passwords specified as a hash)
@@ -4178,10 +3294,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SYNC_BINLOG
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush binary log to disk after every #th event. Use 0 (default) to disable synchronous flushing
@@ -4192,10 +3304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYNC_FRM
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Sync .frm files to disk on creation
@@ -4206,10 +3314,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SYNC_MASTER_INFO
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush master info to disk after every #th event. Use 0 to disable synchronous flushing
@@ -4219,11 +3323,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME SYSTEM_TIME_ZONE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT The server system time zone
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SYSTEM_VERSIONING_ALTER_HISTORY
-SESSION_VALUE ERROR
-GLOBAL_VALUE ERROR
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ERROR
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Versioning ALTER TABLE mode. ERROR: Fail ALTER with error; KEEP: Keep historical system rows and subject them to ALTER
@@ -4234,10 +3344,6 @@ ENUM_VALUE_LIST ERROR,KEEP
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYSTEM_VERSIONING_ASOF
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Default value for the FOR SYSTEM_TIME AS OF clause
@@ -4248,10 +3354,6 @@ ENUM_VALUE_LIST DEFAULT
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 400
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 400
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
@@ -4262,10 +3364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached open tables
@@ -4276,10 +3374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of table cache instances
@@ -4290,10 +3384,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_INTERVAL
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.If set to 0, system dependent default is used.
@@ -4304,10 +3394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_PROBES
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT The number of unacknowledged probes to send before considering the connection dead and notifying the application layer.If set to 0, system dependent default is used.
@@ -4318,10 +3404,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used.
@@ -4332,10 +3414,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_NODELAY
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Set option TCP_NODELAY (disable Nagle's algorithm) on socket
@@ -4346,10 +3424,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 151
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
@@ -4360,10 +3434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CONCURRENCY
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
@@ -4374,10 +3444,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_HANDLING
-SESSION_VALUE NULL
-GLOBAL_VALUE no-threads
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE one-thread-per-connection
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Define threads usage for handling queries
@@ -4388,10 +3454,6 @@ ENUM_VALUE_LIST one-thread-per-connection,no-threads
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_STACK
-SESSION_VALUE NULL
-GLOBAL_VALUE 299008
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 299008
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The stack size for each thread
@@ -4402,10 +3464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TIMED_MUTEXES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Specify whether to time mutexes. Deprecated, has no effect.
@@ -4416,10 +3474,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME TIMESTAMP
-SESSION_VALUE 1409578823.000000
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Set the time for this client
@@ -4430,10 +3484,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TIME_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %H:%i:%s
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %H:%i:%s
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The TIME format (ignored)
@@ -4444,10 +3494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TIME_ZONE
-SESSION_VALUE +00:00
-GLOBAL_VALUE SYSTEM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE SYSTEM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The current time zone, used to initialize the time zone for a client when it connects. Set to SYSTEM by default, in which the client uses the system time zone value.
@@ -4457,11 +3503,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME TLS_VERSION
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT TLS protocol version for secure connections.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMPDIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path for temporary files. Several paths may be specified, separated by a colon (:), in this case they are used in a round-robin fashion
@@ -4472,10 +3524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_DISK_TABLE_SIZE
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
@@ -4486,10 +3534,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_MEMORY_TABLE_SIZE
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
@@ -4500,10 +3544,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_TABLE_SIZE
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
@@ -4514,10 +3554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_ALLOC_BLOCK_SIZE
-SESSION_VALUE 8192
-GLOBAL_VALUE 8192
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8192
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
@@ -4528,10 +3564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
-SESSION_VALUE 4096
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
@@ -4542,10 +3574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TX_ISOLATION
-SESSION_VALUE REPEATABLE-READ
-GLOBAL_VALUE REPEATABLE-READ
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE REPEATABLE-READ
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Default transaction isolation level
@@ -4556,10 +3584,6 @@ ENUM_VALUE_LIST READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLE
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TX_READ_ONLY
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Default transaction access mode. If set to OFF, the default, access is read/write. If set to ON, access is read-only. The SET TRANSACTION statement can also change the value of this variable. See SET TRANSACTION and START TRANSACTION.
@@ -4570,10 +3594,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME UNIQUE_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, secondary indexes in InnoDB tables are performed. If set to 0, storage engines can (but are not required to) assume that duplicate keys are not present in input data. Set to 0 to speed up imports of large tables to InnoDB. The storage engine will still issue a duplicate key error if it detects one, even if set to 0.
@@ -4584,10 +3604,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME UPDATABLE_VIEWS_WITH_LIMIT
-SESSION_VALUE YES
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE YES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is used in queries with a LIMIT clause for updating. NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools)
@@ -4598,10 +3614,6 @@ ENUM_VALUE_LIST NO,YES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME USERSTAT
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enables statistics gathering for USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS tables in the INFORMATION_SCHEMA
@@ -4612,10 +3624,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME USE_STAT_TABLES
-SESSION_VALUE PREFERABLY
-GLOBAL_VALUE PREFERABLY
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE PREFERABLY_FOR_QUERIES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how to use system statistics tables
@@ -4625,166 +3633,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME WAIT_TIMEOUT
-SESSION_VALUE 28800
-GLOBAL_VALUE 28800
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 28800
-VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 31536000
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME WARNING_COUNT
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The number of errors, warnings, and notes that resulted from the last statement that generated messages
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-select VARIABLE_NAME, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT,
-NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE,
-ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
-from information_schema.system_variables
-where variable_name in (
-'have_openssl',
-'have_symlink',
-'hostname',
-'large_files_support',
-'lower_case_file_system',
-'lower_case_table_names',
-'open_files_limit',
-'rand_seed1',
-'rand_seed2',
-'system_time_zone',
-'tls_version',
-'version_comment',
-'version_source_revision',
-'version_compile_machine', 'version_compile_os',
-'version_malloc_library', 'version_ssl_library', 'version'
- )
-order by variable_name;
-VARIABLE_NAME HAVE_OPENSSL
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT Comparing have_openssl with have_ssl will indicate whether YaSSL or openssl was used. If YaSSL, have_ssl will be YES, but have_openssl will be NO.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME HAVE_SYMLINK
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT If symbolic link support is enabled, will be set to YES, otherwise will be set to NO. Required for the INDEX DIRECTORY and DATA DIRECTORY table options (see CREATE TABLE) and Windows symlink support. Will be set to DISABLED if the server is started with the --skip-symbolic-links option.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME HOSTNAME
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT Server host name
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LARGE_FILES_SUPPORT
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Whether mysqld was compiled with options for large file support
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LOWER_CASE_FILE_SYSTEM
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Case sensitivity of file names on the file system where the data directory is located
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LOWER_CASE_TABLE_NAMES
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive. Should be set to 2 if you are using a case insensitive file system
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 2
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME OPEN_FILES_LIMIT
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 4294967295
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME RAND_SEED1
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME RAND_SEED2
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME SYSTEM_TIME_ZONE
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT The server system time zone
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME TLS_VERSION
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE SET
-VARIABLE_COMMENT TLS protocol version for secure connections.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSION
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -4855,8 +3703,27 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
-select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE,
-VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
+VARIABLE_NAME WAIT_TIMEOUT
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 31536000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WARNING_COUNT
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of errors, warnings, and notes that resulted from the last statement that generated messages
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
from information_schema.system_variables
where variable_name in (
'log_tc_size'
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
index 13f9c786f20..bfe56dbc1a9 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
@@ -1,33 +1,136 @@
--- sysvars_server_notembedded.result
-+++ sysvars_server_notembedded,32bit.result
-@@ -74,7 +74,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 1
++++ sysvars_server_notembedded.result
+@@ -34,7 +34,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_BLOCK_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Block size to be used for Aria index pages.
+ NUMERIC_MIN_VALUE 4096
+ NUMERIC_MAX_VALUE 32768
+@@ -44,7 +44,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -54,7 +54,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -74,7 +74,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 255
+@@ -94,7 +94,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -104,7 +104,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_LOG_FILE_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Limit for transaction log size
+ NUMERIC_MIN_VALUE 8388608
+ NUMERIC_MAX_VALUE 4294967295
+@@ -134,10 +134,10 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.
+ NUMERIC_MIN_VALUE 100
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 100
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -154,7 +154,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 100
+@@ -164,7 +164,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
+ NUMERIC_MIN_VALUE 128
+ NUMERIC_MAX_VALUE 16384
+@@ -194,7 +194,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME ARIA_REPAIR_THREADS
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 128
+@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
+ NUMERIC_MIN_VALUE 4096
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -264,7 +264,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -88,7 +88,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -274,7 +274,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -102,7 +102,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 150
+@@ -284,7 +284,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -175,7 +175,7 @@
+@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -36,9 +139,9 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -200,10 +200,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -354,20 +354,20 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -49,9 +152,8 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -214,10 +214,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100000
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME BINLOG_COMMIT_WAIT_USEC
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -62,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -245,7 +245,7 @@
+@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -71,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -301,7 +301,7 @@
+@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -80,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -315,7 +315,7 @@
+@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -89,151 +191,151 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -578,7 +578,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 10
+@@ -624,7 +624,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -648,7 +648,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 15
+@@ -674,7 +674,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -662,7 +662,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+@@ -684,7 +684,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -676,7 +676,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50000000
+@@ -694,7 +694,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -690,7 +690,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10000
+@@ -704,7 +704,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -760,7 +760,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -764,7 +764,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -774,7 +774,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -774,7 +774,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -788,7 +788,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 300
+@@ -784,7 +784,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -802,7 +802,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1000
+@@ -794,7 +794,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -830,7 +830,7 @@
- GLOBAL_VALUE_ORIGIN SQL
- DEFAULT_VALUE 4
+@@ -824,7 +824,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -956,7 +956,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -914,7 +914,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -998,7 +998,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -944,7 +944,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -1040,7 +1040,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -974,7 +974,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1082,7 +1082,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 84
+@@ -1004,7 +1004,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1096,7 +1096,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+@@ -1014,7 +1014,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -1110,7 +1110,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+@@ -1024,7 +1024,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1169,7 +1169,7 @@
+@@ -1067,7 +1067,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
@@ -242,34 +344,34 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1432,7 +1432,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -1274,7 +1274,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1460,7 +1460,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 128
+@@ -1304,7 +1304,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1614,7 +1614,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 28800
+@@ -1414,7 +1414,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1645,7 +1645,7 @@
+@@ -1447,7 +1447,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -278,16 +380,16 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1670,7 +1670,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -1464,7 +1464,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1701,7 +1701,7 @@
+@@ -1487,7 +1487,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -296,52 +398,43 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1922,7 +1922,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 86400
+@@ -1654,7 +1654,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -2132,7 +2132,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -1804,7 +1804,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2174,7 +2174,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -1834,7 +1834,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2230,7 +2230,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16777216
+@@ -1894,7 +1894,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2240,14 +2240,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_BINLOG_CACHE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709547520
-+GLOBAL_VALUE 4294963200
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709547520
-+DEFAULT_VALUE 4294963200
- VARIABLE_SCOPE GLOBAL
+@@ -1907,14 +1907,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -350,25 +443,15 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2258,7 +2258,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1073741824
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_BINLOG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -2268,14 +2268,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_BINLOG_STMT_CACHE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709547520
-+GLOBAL_VALUE 4294963200
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709547520
-+DEFAULT_VALUE 4294963200
- VARIABLE_SCOPE GLOBAL
+@@ -1927,14 +1927,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -377,43 +460,42 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2286,7 +2286,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 151
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -2300,7 +2300,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -1944,7 +1944,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2314,7 +2314,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+@@ -1954,7 +1954,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -2342,7 +2342,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 64
+@@ -1974,7 +1974,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -2359,7 +2359,7 @@
+@@ -1987,14 +1987,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -422,43 +504,42 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2370,7 +2370,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 20
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_INSERT_DELAYED_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -2398,7 +2398,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2014,7 +2014,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2412,7 +2412,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 1048576
+@@ -2024,7 +2024,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_LONG_DATA_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2454,7 +2454,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+@@ -2054,7 +2054,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2485,7 +2485,7 @@
+@@ -2077,14 +2077,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
NUMERIC_MIN_VALUE 1024
@@ -467,90 +548,89 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2496,7 +2496,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2524,7 +2524,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2104,7 +2104,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2538,7 +2538,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -2114,7 +2114,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -2566,7 +2566,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32
+@@ -2134,7 +2134,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2594,7 +2594,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4294967295
+@@ -2154,7 +2154,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2608,7 +2608,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2164,7 +2164,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2622,7 +2622,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8
+@@ -2174,7 +2174,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2636,7 +2636,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -2184,7 +2184,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2650,7 +2650,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 262144
+@@ -2194,7 +2194,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2664,10 +2664,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 256
+@@ -2204,17 +2204,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MULTI_RANGE_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -561,46 +641,24 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2678,7 +2678,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2692,7 +2692,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 6
+@@ -2224,7 +2224,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2702,9 +2702,9 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 9223372036853727232
-+GLOBAL_VALUE 2146435072
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 9223372036853727232
-+DEFAULT_VALUE 2146435072
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
-@@ -2716,14 +2716,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MYISAM_MMAP_SIZE
- SESSION_VALUE NULL
--GLOBAL_VALUE 18446744073709551615
-+GLOBAL_VALUE 4294967295
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709551615
-+DEFAULT_VALUE 4294967295
- VARIABLE_SCOPE GLOBAL
+@@ -2247,7 +2247,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -609,9 +667,9 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2748,10 +2748,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -2264,10 +2264,10 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -622,7 +680,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2765,7 +2765,7 @@
+@@ -2277,7 +2277,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -631,72 +689,81 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2818,7 +2818,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16384
+@@ -2314,7 +2314,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2832,7 +2832,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 30
+@@ -2324,7 +2324,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2846,7 +2846,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -2334,7 +2334,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2860,7 +2860,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 60
+@@ -2344,7 +2344,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2930,7 +2930,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
+@@ -2394,7 +2394,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME OPEN_FILES_LIMIT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -2404,7 +2404,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2944,7 +2944,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 62
+@@ -2414,7 +2414,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2958,7 +2958,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2424,7 +2424,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2986,10 +2986,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1048576
+@@ -2454,17 +2454,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -707,349 +774,348 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2996,7 +2996,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -3042,7 +3042,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2484,7 +2484,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3056,7 +3056,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2494,7 +2494,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 200
-@@ -3070,7 +3070,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2504,7 +2504,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3084,7 +3084,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2514,7 +2514,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -3098,7 +3098,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2524,7 +2524,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3112,7 +3112,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2534,7 +2534,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -3126,7 +3126,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2544,7 +2544,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3140,7 +3140,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2554,7 +2554,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -3154,7 +3154,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2564,7 +2564,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3168,7 +3168,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 80
+@@ -2574,7 +2574,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3182,7 +3182,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2584,7 +2584,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3196,7 +3196,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1024
+@@ -2594,7 +2594,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -3210,7 +3210,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
+@@ -2604,7 +2604,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3196,7 +3196,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32768
+@@ -2614,7 +2614,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -3210,7 +3210,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2624,7 +2624,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3252,7 +3252,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 200
+@@ -2634,7 +2634,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3266,7 +3266,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2644,7 +2644,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -3280,7 +3280,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 40
+@@ -2654,7 +2654,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3294,7 +3294,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2664,7 +2664,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -3308,7 +3308,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -2674,7 +2674,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3322,7 +3322,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2684,7 +2684,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3336,7 +3336,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 160
+@@ -2694,7 +2694,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3350,7 +3350,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 202
+@@ -2704,7 +2704,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3364,7 +3364,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2714,7 +2714,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3378,7 +3378,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2724,7 +2724,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3392,7 +3392,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
+@@ -2734,7 +2734,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -3406,7 +3406,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2744,7 +2744,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3420,7 +3420,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2754,7 +2754,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3434,7 +3434,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2764,7 +2764,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1024
-@@ -3448,7 +3448,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
+@@ -2774,7 +2774,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -3462,7 +3462,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE -1
+@@ -2784,7 +2784,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -3518,7 +3518,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32768
+@@ -2834,7 +2834,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3546,7 +3546,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 15
+@@ -2854,7 +2854,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -3560,7 +3560,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5
+@@ -2864,7 +2864,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3644,7 +3644,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16384
+@@ -2924,7 +2924,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3658,7 +3658,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1048576
+@@ -2934,7 +2934,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3672,7 +3672,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -2944,7 +2944,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3689,7 +3689,7 @@
+@@ -2957,7 +2957,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1058,25 +1124,42 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3742,7 +3742,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 24576
+@@ -2994,7 +2994,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3756,7 +3756,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -3007,7 +3007,7 @@ VARIABLE_SCOPE SESSION ONLY
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -3017,14 +3017,14 @@ VARIABLE_SCOPE SESSION ONLY
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME RANGE_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -3773,7 +3773,7 @@
+@@ -3037,14 +3037,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
NUMERIC_MIN_VALUE 0
@@ -1085,27 +1168,26 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3784,7 +3784,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 131072
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME READ_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -3812,7 +3812,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 262144
+@@ -3064,7 +3064,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -4092,10 +4092,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8388608
+@@ -3264,10 +3264,10 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -1116,9 +1198,9 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4120,10 +4120,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10000
+@@ -3284,20 +3284,20 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -1129,9 +1211,8 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4134,10 +4134,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TRACE_LEVEL
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -1142,9 +1223,9 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4218,10 +4218,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 32
+@@ -3354,10 +3354,10 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
@@ -1155,88 +1236,88 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4274,7 +4274,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 1
+@@ -3394,7 +3394,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -4456,7 +4456,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -3524,7 +3524,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLAVE_DOMAIN_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -4498,7 +4498,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1073741824
+@@ -3554,7 +3554,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -4526,7 +4526,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 131072
+@@ -3574,7 +3574,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLAVE_PARALLEL_MAX_QUEUED
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2147483647
-@@ -4554,7 +4554,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -3594,7 +3594,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME SLAVE_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -4568,7 +4568,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -3604,7 +3604,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLAVE_PARALLEL_WORKERS
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Alias for slave_parallel_threads
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -4624,7 +4624,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -3644,7 +3644,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME SLAVE_TRANSACTION_RETRIES
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock, elapsed lock wait timeout or listed in slave_transaction_retry_errors, before giving up and stopping
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -4652,7 +4652,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
+@@ -3664,7 +3664,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLAVE_TRANSACTION_RETRY_INTERVAL
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3600
-@@ -4680,7 +4680,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
+@@ -3684,7 +3684,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -4739,7 +4739,7 @@
+@@ -3727,7 +3727,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1245,63 +1326,52 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5044,7 +5044,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 256
+@@ -3944,7 +3944,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -5170,7 +5170,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 400
+@@ -4044,7 +4044,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -5184,7 +5184,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 2000
+@@ -4054,7 +4054,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -5268,7 +5268,7 @@
- GLOBAL_VALUE_ORIGIN AUTO
- DEFAULT_VALUE 256
+@@ -4114,7 +4114,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -5282,7 +5282,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10
+@@ -4124,7 +4124,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME THREAD_CONCURRENCY
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -5487,15 +5487,15 @@
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME TMP_DISK_TABLE_SIZE
--SESSION_VALUE 18446744073709551615
--GLOBAL_VALUE 18446744073709551615
-+SESSION_VALUE 4294967295
-+GLOBAL_VALUE 4294967295
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709551615
-+DEFAULT_VALUE 4294967295
- VARIABLE_SCOPE SESSION
+@@ -4287,7 +4287,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1310,7 +1380,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5509,7 +5509,7 @@
+@@ -4297,7 +4297,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
NUMERIC_MIN_VALUE 1024
@@ -1319,7 +1389,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5523,7 +5523,7 @@
+@@ -4307,14 +4307,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1328,61 +1398,33 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5534,7 +5534,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8192
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TRANSACTION_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -5548,7 +5548,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 4096
+@@ -4324,7 +4324,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -5646,7 +5646,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 28800
+@@ -4464,7 +4464,7 @@ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NULL
+ VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -5751,7 +5751,7 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME OPEN_FILES_LIMIT
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -5764,7 +5764,7 @@
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -5774,7 +5774,7 @@
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -5869,7 +5869,7 @@
+@@ -4491,7 +4491,7 @@ order by variable_name;
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 8a32eea0bdd..f85f3cf92f5 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -3,36 +3,17 @@ set timestamp=unix_timestamp('2014-09-01 13:40:23');
set pseudo_thread_id=10;
set sql_mode=ansi_quotes;
set global div_precision_increment=5;
-select * from information_schema.system_variables
-where variable_name not like 'aria%' and
-variable_name not like 'debug%' and
+select VARIABLE_NAME,VARIABLE_SCOPE,VARIABLE_TYPE,VARIABLE_COMMENT,NUMERIC_MIN_VALUE,NUMERIC_MAX_VALUE,NUMERIC_BLOCK_SIZE,ENUM_VALUE_LIST,READ_ONLY,COMMAND_LINE_ARGUMENT
+from information_schema.system_variables
+where variable_name not like 'debug%' and
variable_name not like 'wsrep%' and
+variable_name not like 's3%' and
variable_name not in (
-'in_predicate_conversion_threshold',
-'have_openssl',
-'have_symlink',
'have_sanitizer',
-'hostname',
-'large_files_support', 'log_tc_size',
-'lower_case_file_system',
-'lower_case_table_names',
-'open_files_limit',
-'plugin_maturity',
-'rand_seed1',
-'rand_seed2',
-'system_time_zone',
-'tls_version',
-'version_comment',
-'version_source_revision',
-'version_compile_machine', 'version_compile_os',
-'version_malloc_library', 'version_ssl_library', 'version'
+'log_tc_size'
)
order by variable_name;
VARIABLE_NAME ALTER_ALGORITHM
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specify the alter table algorithm
@@ -43,10 +24,6 @@ ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ANALYZE_SAMPLE_PERCENTAGE
-SESSION_VALUE 100.000000
-GLOBAL_VALUE 100.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Percentage of rows from the table ANALYZE TABLE will sample to collect table statistics. Set to 0 to let MariaDB decide what percentage of rows to sample.
@@ -56,11 +33,217 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_BLOCK_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Block size to be used for Aria index pages.
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 32768
+NUMERIC_BLOCK_SIZE 1024
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_ENCRYPT_TABLES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Encrypt tables (only for tables with ROW_FORMAT=PAGE (default) and not FIXED/DYNAMIC)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 255
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_GROUP_COMMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies Aria group commit mode. Possible values are "none" (no group commit), "hard" (with waiting to actual commit), "soft" (no wait for commit (DANGEROUS!!!))
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,hard,soft
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_LOG_FILE_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Limit for transaction log size
+NUMERIC_MIN_VALUE 8388608
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 8192
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_LOG_PURGE_TYPE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies how Aria transactional log will be purged
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST immediate,external,at_flush
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_MAX_SORT_FILE_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1048576
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.
+NUMERIC_MIN_VALUE 100
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 100
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_BUFFER_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The size of the buffer used for index blocks for Aria tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford.
+NUMERIC_MIN_VALUE 131072
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
+NUMERIC_MIN_VALUE 128
+NUMERIC_MAX_VALUE 16384
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_PAGE_CHECKSUM
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Maintain page checksums (can be overridden per table with PAGE_CHECKSUM clause in CREATE TABLE)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_RECOVER_OPTIONS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NORMAL,BACKUP,FORCE,QUICK,OFF
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ARIA_REPAIR_THREADS
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 128
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_SORT_BUFFER_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_STATS_METHOD
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies how Aria index statistics collection code should treat NULLs
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST nulls_unequal,nulls_equal,nulls_ignored
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_SYNC_LOG_DIR
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Controls syncing directory after log file growth and new file creation
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NEVER,NEWFILE,ALWAYS
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME ARIA_USED_FOR_TEMP_TABLES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether temporary tables should be MyISAM or Aria
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME AUTOCOMMIT
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, all queries are committed immediately. If set to 0, they are only committed upon a COMMIT statement, or rolled back with a ROLLBACK statement. If autocommit is set to 0, and then changed to 1, all open transactions are immediately committed.
@@ -71,10 +254,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME AUTOMATIC_SP_PRIVILEGES
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Creating and dropping stored procedures alters ACLs
@@ -85,10 +264,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Auto-increment columns are incremented by this
@@ -99,10 +274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
@@ -113,10 +284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE 80
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 150
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
@@ -127,10 +294,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BASEDIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to installation directory. All paths are usually resolved relative to this
@@ -141,10 +304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
@@ -155,10 +314,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BIND_ADDRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE 127.0.0.1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT IP address to bind to.
@@ -169,10 +324,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ANNOTATE_ROW_EVENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Tells the master to annotate RBR events with the statement that caused these events
@@ -183,10 +334,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BINLOG_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
@@ -197,10 +344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM
-SESSION_VALUE NULL
-GLOBAL_VALUE CRC32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log
@@ -211,10 +354,6 @@ ENUM_VALUE_LIST NONE,CRC32
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If non-zero, binlog write will wait at most binlog_commit_wait_usec microseconds for at least this many commits to queue up for group commit to the binlog. This can reduce I/O on the binlog and provide increased opportunity for parallel apply on the slave, but too high a value will decrease commit throughput.
@@ -225,10 +364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_USEC
-SESSION_VALUE NULL
-GLOBAL_VALUE 100000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum time, in microseconds, to wait for more commits to queue up for binlog group commit. Only takes effect if the value of binlog_commit_wait_count is non-zero.
@@ -239,10 +374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Causes updates to non-transactional engines using statement format to be written directly to binary log. Before using this option make sure that there are no dependencies between transactional and non-transactional tables such as in the statement INSERT INTO t_myisam SELECT * FROM t_innodb; otherwise, slaves may diverge from the master.
@@ -253,10 +384,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BINLOG_FILE_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
@@ -267,10 +394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_FORMAT
-SESSION_VALUE MIXED
-GLOBAL_VALUE MIXED
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MIXED
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT What form of binary logging the master will use: either ROW for row-based binary logging, STATEMENT for statement-based binary logging, or MIXED. MIXED is statement-based binary logging except for those statements where only row-based is correct: those which involve user-defined functions (i.e. UDFs) or the UUID() function; for those, row-based binary logging is automatically used.
@@ -281,10 +404,6 @@ ENUM_VALUE_LIST MIXED,STATEMENT,ROW
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_OPTIMIZE_THREAD_SCHEDULING
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Run fast part of group commit in a single thread, to optimize kernel thread scheduling. On by default. Disable to run each transaction in group commit in its own thread, which can be slower at very high concurrency. This option is mostly for testing one algorithm versus the other, and it should not normally be necessary to change it.
@@ -295,10 +414,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ROW_IMAGE
-SESSION_VALUE FULL
-GLOBAL_VALUE FULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE FULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Controls whether rows should be logged in 'FULL', 'NOBLOB' or 'MINIMAL' formats. 'FULL', means that all columns in the before and after image are logged. 'NOBLOB', means that mysqld avoids logging blob columns whenever possible (eg, blob column was not changed or is not part of primary key). 'MINIMAL', means that a PK equivalent (PK columns or full row if there is no PK in the table) is logged in the before image, and only changed columns are logged in the after image. (Default: FULL).
@@ -309,10 +424,6 @@ ENUM_VALUE_LIST MINIMAL,NOBLOB,FULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_STMT_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
@@ -323,10 +434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BULK_INSERT_BUFFER_SIZE
-SESSION_VALUE 8388608
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8388608
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
@@ -337,10 +444,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CHARACTER_SETS_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory where character sets are
@@ -351,10 +454,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CHARACTER_SET_CLIENT
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set for statements that arrive from the client
@@ -365,10 +464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_CONNECTION
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used for literals that do not have a character set introducer and for number-to-string conversion
@@ -379,10 +474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_DATABASE
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used by the default database
@@ -393,10 +484,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_FILESYSTEM
-SESSION_VALUE binary
-GLOBAL_VALUE binary
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE binary
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The filesystem character set
@@ -407,10 +494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_RESULTS
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used for returning query results to the client
@@ -421,10 +504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_SERVER
-SESSION_VALUE latin1
-GLOBAL_VALUE latin1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The default character set
@@ -435,10 +514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHARACTER_SET_SYSTEM
-SESSION_VALUE NULL
-GLOBAL_VALUE utf8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The character set used by the server for storing identifiers
@@ -449,10 +524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME CHECK_CONSTRAINT_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT check_constraint_checks
@@ -463,10 +534,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_CONNECTION
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The collation of the connection character set
@@ -477,10 +544,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_DATABASE
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The collation of the database character set
@@ -491,10 +554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLLATION_SERVER
-SESSION_VALUE latin1_swedish_ci
-GLOBAL_VALUE latin1_swedish_ci
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE latin1_swedish_ci
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The server default collation
@@ -505,10 +564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME COLUMN_COMPRESSION_THRESHOLD
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Minimum column data length eligible for compression
@@ -519,10 +574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_LEVEL
-SESSION_VALUE 6
-GLOBAL_VALUE 6
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 6
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT zlib compression level (1 gives best speed, 9 gives best compression)
@@ -533,10 +584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_STRATEGY
-SESSION_VALUE DEFAULT_STRATEGY
-GLOBAL_VALUE DEFAULT_STRATEGY
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT_STRATEGY
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The strategy parameter is used to tune the compression algorithm. Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
@@ -547,10 +594,6 @@ ENUM_VALUE_LIST DEFAULT_STRATEGY,FILTERED,HUFFMAN_ONLY,RLE,FIXED
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME COLUMN_COMPRESSION_ZLIB_WRAP
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Generate zlib header and trailer and compute adler32 check value. It can be used with storage engines that don't provide data integrity verification to detect data corruption.
@@ -561,10 +604,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME COMPLETION_TYPE
-SESSION_VALUE NO_CHAIN
-GLOBAL_VALUE NO_CHAIN
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO_CHAIN
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The transaction completion type
@@ -575,10 +614,6 @@ ENUM_VALUE_LIST NO_CHAIN,CHAIN,RELEASE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CONCURRENT_INSERT
-SESSION_VALUE NULL
-GLOBAL_VALUE AUTO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE AUTO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Use concurrent insert with MyISAM
@@ -589,10 +624,6 @@ ENUM_VALUE_LIST NEVER,AUTO,ALWAYS
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 60
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
@@ -603,10 +634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME CORE_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT write a core-file on crashes
@@ -617,10 +644,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DATADIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE PATH
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to the database root directory
@@ -631,10 +654,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DATETIME_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %Y-%m-%d %H:%i:%s
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %Y-%m-%d %H:%i:%s
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The DATETIME format (ignored)
@@ -645,10 +664,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DATE_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %Y-%m-%d
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %Y-%m-%d
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The DATE format (ignored)
@@ -659,10 +674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
-SESSION_VALUE 15
-GLOBAL_VALUE 15
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 15
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
@@ -673,10 +684,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
-SESSION_VALUE 4
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
@@ -687,10 +694,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
-SESSION_VALUE 50000000
-GLOBAL_VALUE 50000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
@@ -701,10 +704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
-SESSION_VALUE 10000
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
@@ -715,10 +714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_MASTER_CONNECTION
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Master connection to use for all slave variables and slave commands
@@ -729,10 +724,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_PASSWORD_LIFETIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT This defines the global password expiration policy. 0 means automatic password expiration is disabled. If the value is a positive integer N, the passwords must be changed every N days. This behavior can be overridden using the password expiration options in ALTER USER.
@@ -743,10 +734,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_REGEX_FLAGS
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Default flags for the regex library
@@ -757,10 +744,6 @@ ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_STORAGE_ENGINE
-SESSION_VALUE MyISAM
-GLOBAL_VALUE MyISAM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MyISAM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The default storage engine for new tables
@@ -771,10 +754,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_TMP_STORAGE_ENGINE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The default storage engine for user-created temporary tables
@@ -785,10 +764,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The default week format used by WEEK() functions
@@ -799,10 +774,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
@@ -813,10 +784,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
@@ -827,10 +794,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
@@ -841,10 +804,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAY_KEY_WRITE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how MyISAM tables handles CREATE TABLE DELAY_KEY_WRITE. If set to ON, the default, any DELAY KEY WRITEs are honored. The key buffer is then flushed only when the table closes, speeding up writes. MyISAM tables should be automatically checked upon startup in this case, and --external locking should not be used, as it can lead to index corruption. If set to OFF, DELAY KEY WRITEs are ignored, while if set to ALL, all new opened tables are treated as if created with DELAY KEY WRITEs enabled.
@@ -855,10 +814,6 @@ ENUM_VALUE_LIST OFF,ON,ALL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DISCONNECT_ON_EXPIRED_PASSWORD
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT This variable controls how the server handles clients that are not aware of the sandbox mode. If enabled, the server disconnects the client, otherwise the server puts the client in a sandbox mode.
@@ -869,10 +824,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
-SESSION_VALUE 4
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN SQL
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
@@ -883,10 +834,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ENCRYPT_BINLOG
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt binary logs (including relay logs)
@@ -897,10 +844,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENCRYPT_TMP_DISK_TABLES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt temporary on-disk tables (created as part of query execution)
@@ -911,10 +854,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENCRYPT_TMP_FILES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Encrypt temporary files (created for filesort, binary log cache, etc)
@@ -925,10 +864,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ENFORCE_STORAGE_ENGINE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Force the use of a storage engine for new tables
@@ -939,10 +874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
-SESSION_VALUE 200
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
@@ -953,10 +884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ERROR_COUNT
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of errors that resulted from the last statement that generated messages
@@ -967,10 +894,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EVENT_SCHEDULER
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Enable the event scheduler. Possible values are ON, OFF, and DISABLED (keep the event scheduler completely deactivated, it cannot be activated run-time)
@@ -981,10 +904,6 @@ ENUM_VALUE_LIST OFF,ON,DISABLED,ORIGINAL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME EXPENSIVE_SUBQUERY_LIMIT
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum number of rows a subquery may examine in order to be executed during optimization and used for constant optimization
@@ -995,10 +914,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
@@ -1009,10 +924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPLICIT_DEFAULTS_FOR_TIMESTAMP
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT This option causes CREATE TABLE to create all TIMESTAMP columns as NULL with DEFAULT NULL attribute, Without this option, TIMESTAMP columns are NOT NULL and have implicit DEFAULT clauses.
@@ -1023,10 +934,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME EXTERNAL_USER
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The external user account used when logging in
@@ -1037,10 +944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of connections on extra-port
@@ -1051,10 +954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXTRA_PORT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Extra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another port
@@ -1065,10 +964,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FLUSH
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Flush MyISAM tables to disk between SQL commands
@@ -1079,10 +974,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
@@ -1093,10 +984,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FOREIGN_KEY_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (the default) foreign key constraints (including ON UPDATE and ON DELETE behavior) InnoDB tables are checked, while if set to 0, they are not checked. 0 is not recommended for normal use, though it can be useful in situations where you know the data is consistent, but want to reload data in a different order from that that specified by parent/child relationships. Setting this variable to 1 does not retrospectively check for inconsistencies introduced while set to 0.
@@ -1107,10 +994,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME FT_BOOLEAN_SYNTAX
-SESSION_VALUE NULL
-GLOBAL_VALUE + -><()~*:""&|
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE + -><()~*:""&|
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT List of operators for MATCH ... AGAINST ( ... IN BOOLEAN MODE)
@@ -1121,10 +1004,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 84
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
@@ -1135,10 +1014,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
@@ -1149,10 +1024,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of best matches to use for query expansion
@@ -1163,10 +1034,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_STOPWORD_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE (built-in)
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Use stopwords from this file instead of built-in list
@@ -1177,10 +1044,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GENERAL_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log connections and queries to a table or log file. Defaults logging to a file 'hostname'.log or a table mysql.general_logif --log-output=TABLE is used.
@@ -1191,10 +1054,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME GENERAL_LOG_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log connections and queries to given file
@@ -1205,10 +1064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GROUP_CONCAT_MAX_LEN
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
@@ -1219,10 +1074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_BINLOG_POS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Last GTID logged to the binary log, per replicationdomain
@@ -1233,10 +1084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_BINLOG_STATE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The internal GTID state of the binlog, used to keep track of all GTIDs ever logged to the binlog.
@@ -1247,10 +1094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_CLEANUP_BATCH_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 64
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Normally does not need tuning. How many old rows must accumulate in the mysql.gtid_slave_pos table before a background job will be run to delete them. Can be increased to reduce number of commits if using many different engines with --gtid_pos_auto_engines, or to reduce CPU overhead if using a huge number of different gtid_domain_ids. Can be decreased to reduce number of old rows in the table.
@@ -1261,10 +1104,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_CURRENT_POS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Current GTID position of the server. Per replication domain, this is either the last GTID replicated by a slave thread, or the GTID logged to the binary log, whichever is most recent.
@@ -1275,10 +1114,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_DOMAIN_ID
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Used with global transaction ID to identify logically independent replication streams. When events can propagate through multiple parallel paths (for example multiple masters), each independent source server must use a distinct domain_id. For simple tree-shaped replication topologies, it can be left at its default, 0.
@@ -1289,10 +1124,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_IGNORE_DUPLICATES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT When set, different master connections in multi-source replication are allowed to receive and process event groups with the same GTID (when using GTID mode). Only one will be applied, any others will be ignored. Within a given replication domain, just the sequence number will be used to decide whether a given GTID has been already applied; this means it is the responsibility of the user to ensure that GTID sequence numbers are strictly increasing.
@@ -1303,10 +1134,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME GTID_POS_AUTO_ENGINES
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT List of engines for which to automatically create a mysql.gtid_slave_pos_ENGINE table, if a transaction using that engine is replicated. This can be used to avoid introducing cross-engine transactions, if engines are used different from that used by table mysql.gtid_slave_pos
@@ -1317,10 +1144,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_SEQ_NO
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Internal server usage, for replication with global transaction id. When set, next event group logged to the binary log will use this sequence number, not generate a new one, thus allowing to preserve master's GTID in slave's binlog.
@@ -1331,10 +1154,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_SLAVE_POS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The list of global transaction IDs that were last replicated on the server, one for each replication domain.
@@ -1345,10 +1164,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME GTID_STRICT_MODE
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enforce strict seq_no ordering of events in the binary log. Slave stops with an error if it encounters an event that would cause it to generate an out-of-order binlog if executed.
@@ -1359,10 +1174,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME HAVE_COMPRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the zlib compression library is accessible to the server, this will be set to YES, otherwise it will be NO. The COMPRESS() and UNCOMPRESS() functions will only be available if set to YES.
@@ -1373,10 +1184,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_CRYPT
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the crypt() system call is available this variable will be set to YES, otherwise it will be set to NO. If set to NO, the ENCRYPT() function cannot be used.
@@ -1387,10 +1194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_DYNAMIC_LOADING
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports dynamic loading of plugins, will be set to YES, otherwise will be set to NO.
@@ -1401,10 +1204,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_GEOMETRY
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports spatial data types, will be set to YES, otherwise will be set to NO.
@@ -1414,11 +1213,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME HAVE_OPENSSL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Comparing have_openssl with have_ssl will indicate whether YaSSL or openssl was used. If YaSSL, have_ssl will be YES, but have_openssl will be NO.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_PROFILING
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If statement profiling is available, will be set to YES, otherwise will be set to NO. See SHOW PROFILES and SHOW PROFILE.
@@ -1429,10 +1234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_QUERY_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports the query cache, will be set to YES, otherwise will be set to NO.
@@ -1443,10 +1244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_RTREE_KEYS
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If RTREE indexes (used for spatial indexes) are available, will be set to YES, otherwise will be set to NO.
@@ -1457,10 +1254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_SSL
-SESSION_VALUE NULL
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT If the server supports secure connections, will be set to YES, otherwise will be set to NO. If set to DISABLED, the server was compiled with TLS support, but was not started with TLS support (see the mysqld options). See also have_openssl.
@@ -1470,11 +1263,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME HAVE_SYMLINK
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT If symbolic link support is enabled, will be set to YES, otherwise will be set to NO. Required for the INDEX DIRECTORY and DATA DIRECTORY table options (see CREATE TABLE) and Windows symlink support. Will be set to DISABLED if the server is started with the --skip-symbolic-links option.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
-SESSION_VALUE 254
-GLOBAL_VALUE 254
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 254
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
@@ -1485,10 +1284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME HISTOGRAM_TYPE
-SESSION_VALUE DOUBLE_PREC_HB
-GLOBAL_VALUE DOUBLE_PREC_HB
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DOUBLE_PREC_HB
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies type of the histograms created by ANALYZE. Possible values are: SINGLE_PREC_HB - single precision height-balanced, DOUBLE_PREC_HB - double precision height-balanced.
@@ -1498,11 +1293,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST SINGLE_PREC_HB,DOUBLE_PREC_HB
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME HOSTNAME
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Server host name
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 279
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
@@ -1513,10 +1314,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDENTITY
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Synonym for the last_insert_id variable
@@ -1527,10 +1324,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME IDLE_READONLY_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for read-only idle transaction
@@ -1541,10 +1334,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDLE_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for idle transaction
@@ -1555,10 +1344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IDLE_WRITE_TRANSACTION_TIMEOUT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for write idle transaction
@@ -1569,10 +1354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IGNORE_BUILTIN_INNODB
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable initialization of builtin InnoDB plugin
@@ -1583,10 +1364,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME IGNORE_DB_DIRS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Specifies a directory to add to the ignore list when collecting database names from the datadir. Put a blank argument to reset the list accumulated so far.
@@ -1597,10 +1374,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_CONNECT
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Command(s) that are executed for each new connection (unless the user has SUPER privilege)
@@ -1611,10 +1384,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Read SQL commands from this file at startup
@@ -1625,10 +1394,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INIT_SLAVE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Command(s) that are executed by a slave server each time the SQL thread starts
@@ -1639,10 +1404,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INSERT_ID
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The value to be used by the following INSERT or ALTER TABLE statement when inserting an AUTO_INCREMENT value
@@ -1653,10 +1414,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
-SESSION_VALUE 28800
-GLOBAL_VALUE 28800
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 28800
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
@@ -1666,11 +1423,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME IN_PREDICATE_CONVERSION_THRESHOLD
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT The minimum number of scalar elements in the value list of IN predicate that triggers its conversion to IN subquery. Set to 0 to disable the conversion.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME IN_TRANSACTION
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Whether there is an active transaction
@@ -1681,10 +1444,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME JOIN_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
@@ -1695,10 +1454,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_BUFFER_SPACE_LIMIT
-SESSION_VALUE 2097152
-GLOBAL_VALUE 2097152
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2097152
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The limit of the space for all join buffers used by a query
@@ -1709,10 +1464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
-SESSION_VALUE 2
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
@@ -1723,10 +1474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEEP_FILES_ON_CREATE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't overwrite stale .MYD and .MYI even if no directory is specified
@@ -1737,10 +1484,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME KEY_BUFFER_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
@@ -1751,10 +1494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_AGE_THRESHOLD
-SESSION_VALUE NULL
-GLOBAL_VALUE 300
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache
@@ -1765,10 +1504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_BLOCK_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The default size of key cache blocks
@@ -1779,10 +1514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_DIVISION_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
@@ -1793,10 +1524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_FILE_HASH_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 512
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 512
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of MyISAM files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open MyISAM files.
@@ -1807,10 +1534,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_SEGMENTS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of segments in a key cache
@@ -1820,11 +1543,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME LARGE_FILES_SUPPORT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether mysqld was compiled with options for large file support
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LARGE_PAGES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable support for large pages
@@ -1835,10 +1564,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LARGE_PAGE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If large page support is enabled, this shows the size of memory pages
@@ -1849,10 +1574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LAST_GTID
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The GTID of the last commit (if binlogging was enabled), or the empty string if none.
@@ -1863,10 +1584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LAST_INSERT_ID
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The value to be returned from LAST_INSERT_ID()
@@ -1877,10 +1594,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LC_MESSAGES
-SESSION_VALUE en_US
-GLOBAL_VALUE en_US
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE en_US
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Set the language used for the error messages
@@ -1891,10 +1604,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LC_MESSAGES_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory where error messages are
@@ -1905,10 +1614,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LC_TIME_NAMES
-SESSION_VALUE en_US
-GLOBAL_VALUE en_US
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE en_US
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Set the language used for the month names and the days of the week
@@ -1919,10 +1624,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LICENSE
-SESSION_VALUE NULL
-GLOBAL_VALUE GPL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The type of license the server has
@@ -1933,10 +1634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCAL_INFILE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable LOAD DATA LOCAL INFILE
@@ -1947,10 +1644,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOCKED_IN_MEMORY
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether mysqld was locked in memory with --memlock
@@ -1961,10 +1654,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
-SESSION_VALUE 86400
-GLOBAL_VALUE 86400
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 86400
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
@@ -1975,10 +1664,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_BIN
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the binary log is enabled
@@ -1989,10 +1674,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOG_BIN_BASENAME
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The full path of the binary log file names, excluding the extension.
@@ -2003,10 +1684,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOG_BIN_COMPRESS
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the binary log can be compressed
@@ -2017,10 +1694,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_COMPRESS_MIN_LEN
-SESSION_VALUE NULL
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Minimum length of sql statement(in statement mode) or record(in row mode)that can be compressed.
@@ -2031,10 +1704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_BIN_INDEX
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT File that holds the names for last binary log files.
@@ -2045,10 +1714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOG_BIN_TRUST_FUNCTION_CREATORS
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to FALSE (the default), then when --log-bin is used, creation of a stored function (or trigger) is allowed only to users having the SUPER privilege and only if this stored function (trigger) may not break binary logging. Note that if ALL connections to this server ALWAYS use row-based binary logging, the security issues do not exist and the binary logging cannot break, so you can safely set this to TRUE
@@ -2059,10 +1724,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_DISABLED_STATEMENTS
-SESSION_VALUE sp
-GLOBAL_VALUE sp
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE sp
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Don't log certain types of statements to general log
@@ -2073,10 +1734,6 @@ ENUM_VALUE_LIST slave,sp
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_ERROR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log errors to file (instead of stdout). If file name is not specified then 'datadir'/'log-basename'.err or the 'pid-file' path with extension .err is used
@@ -2087,10 +1744,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_OUTPUT
-SESSION_VALUE NULL
-GLOBAL_VALUE FILE
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE FILE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
VARIABLE_COMMENT How logs should be written
@@ -2101,10 +1754,6 @@ ENUM_VALUE_LIST NONE,FILE,TABLE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_QUERIES_NOT_USING_INDEXES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log queries that are executed without benefit of any index to the slow log if it is open. Same as log_slow_filter='not_using_index'
@@ -2115,10 +1764,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLAVE_UPDATES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Tells the slave to log the updates from the slave thread to the binary log. You will need to turn it on if you plan to daisy-chain the slaves.
@@ -2129,10 +1774,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_disabled_statements
@@ -2143,10 +1784,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_DISABLED_STATEMENTS
-SESSION_VALUE sp
-GLOBAL_VALUE sp
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE sp
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Don't log certain types of statements to slow log
@@ -2157,10 +1794,6 @@ ENUM_VALUE_LIST admin,call,slave,sp
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_FILTER
-SESSION_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
-GLOBAL_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Log only certain types of queries to the slow log. If variable empty alll kind of queries are logged. All types are bound by slow_query_time, except 'not_using_index' which is always logged if enabled
@@ -2171,10 +1804,6 @@ ENUM_VALUE_LIST admin,filesort,filesort_on_disk,filesort_priority_queue,full_joi
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
@@ -2185,10 +1814,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_SLAVE_STATEMENTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow statements executed by slave thread to the slow log if it is open. Resets or sets the option 'slave' in log_slow_disabled_statements
@@ -2199,10 +1824,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_SLOW_VERBOSITY
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Verbosity level for the slow log
@@ -2213,10 +1834,6 @@ ENUM_VALUE_LIST innodb,query_plan,explain
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
-SESSION_VALUE 2
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
@@ -2227,10 +1844,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LONG_QUERY_TIME
-SESSION_VALUE 10.000000
-GLOBAL_VALUE 10.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Log all queries that have taken more than long_query_time seconds to execute to the slow query log file. The argument will be treated as a decimal value with microsecond precision
@@ -2240,11 +1853,27 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME LOWER_CASE_FILE_SYSTEM
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Case sensitivity of file names on the file system where the data directory is located
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME LOWER_CASE_TABLE_NAMES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive. Should be set to 2 if you are using a case insensitive file system
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOW_PRIORITY_UPDATES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT INSERT/DELETE/UPDATE has lower priority than selects
@@ -2255,10 +1884,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MASTER_VERIFY_CHECKSUM
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Force checksum verification of logged events in the binary log before sending them to slaves or printing them in the output of SHOW BINLOG EVENTS
@@ -2269,10 +1894,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max packet length to send to or receive from the server
@@ -2283,10 +1904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709547520
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709547520
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
@@ -2297,10 +1914,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1073741824
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
@@ -2311,10 +1924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_BINLOG_STMT_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709547520
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709547520
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
@@ -2325,10 +1934,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE 151
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 151
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of simultaneous clients allowed
@@ -2339,10 +1944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
@@ -2353,10 +1954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
-SESSION_VALUE 20
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
@@ -2367,10 +1964,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DIGEST_LENGTH
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum length considered for digest text.
@@ -2381,10 +1974,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
-SESSION_VALUE 64
-GLOBAL_VALUE 64
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 64
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
@@ -2395,10 +1984,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_HEAP_TABLE_SIZE
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
@@ -2409,10 +1994,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_INSERT_DELAYED_THREADS
-SESSION_VALUE 20
-GLOBAL_VALUE 20
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 20
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
@@ -2423,10 +2004,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME MAX_JOIN_SIZE
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Joins that are probably going to read more than max_join_size records return an error
@@ -2437,10 +2014,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
-SESSION_VALUE 1024
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of bytes in sorted records
@@ -2451,10 +2024,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LONG_DATA_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
@@ -2465,10 +2034,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PASSWORD_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
@@ -2479,10 +2044,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 16382
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16382
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of prepared statements in the server
@@ -2493,10 +2054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
-SESSION_VALUE 4294967295
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
@@ -2507,10 +2064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_RELAY_LOG_SIZE
-SESSION_VALUE 1073741824
-GLOBAL_VALUE 1073741824
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 1073741824
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT relay log will be rotated automatically when the size exceeds this value. If 0 at startup, it's set to max_binlog_size
@@ -2521,10 +2074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ROWID_FILTER_SIZE
-SESSION_VALUE 131072
-GLOBAL_VALUE 131072
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
@@ -2535,10 +2084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
-SESSION_VALUE 4294967295
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
@@ -2549,10 +2094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SESSION_MEM_USED
-SESSION_VALUE 9223372036854775807
-GLOBAL_VALUE 9223372036854775807
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 9223372036854775807
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED
@@ -2563,10 +2104,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
-SESSION_VALUE 1024
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
@@ -2577,10 +2114,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum stored procedure recursion depth
@@ -2591,10 +2124,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_STATEMENT_TIME
-SESSION_VALUE 0.000000
-GLOBAL_VALUE 0.000000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
@@ -2605,10 +2134,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
-SESSION_VALUE 32
-GLOBAL_VALUE 32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused, will be removed.
@@ -2619,10 +2144,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_USER_CONNECTIONS
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT
VARIABLE_COMMENT The maximum number of active connections for a single user (0 = no limit)
@@ -2633,10 +2154,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
-SESSION_VALUE NULL
-GLOBAL_VALUE 4294967295
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
@@ -2647,10 +2164,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused
@@ -2661,10 +2174,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Unused
@@ -2675,10 +2184,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
@@ -2689,10 +2194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
@@ -2703,10 +2204,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MULTI_RANGE_COUNT
-SESSION_VALUE 256
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
@@ -2717,10 +2214,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Block size to be used for MyISAM index pages
@@ -2731,10 +2224,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 6
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 6
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
@@ -2745,10 +2234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 9223372036853727232
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 9223372036853727232
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
@@ -2759,10 +2244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MMAP_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
@@ -2773,10 +2254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_RECOVER_OPTIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE BACKUP,QUICK
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE BACKUP,QUICK
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired
@@ -2787,10 +2264,6 @@ ENUM_VALUE_LIST DEFAULT,BACKUP,FORCE,QUICK,BACKUP_ALL,OFF
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If larger than 1, when repairing a MyISAM table all indexes will be created in parallel, with one thread per index. The value of 1 disables parallel repair
@@ -2801,10 +2274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_SORT_BUFFER_SIZE
-SESSION_VALUE 134216704
-GLOBAL_VALUE 134216704
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 134216704
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
@@ -2815,10 +2284,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_STATS_METHOD
-SESSION_VALUE NULLS_UNEQUAL
-GLOBAL_VALUE NULLS_UNEQUAL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULLS_UNEQUAL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how MyISAM index statistics collection code should treat NULLs. Possible values of name are NULLS_UNEQUAL (default behavior for 4.1 and later), NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
@@ -2829,10 +2294,6 @@ ENUM_VALUE_LIST NULLS_UNEQUAL,NULLS_EQUAL,NULLS_IGNORED
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_USE_MMAP
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use memory mapping for reading and writing MyISAM tables
@@ -2843,10 +2304,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME MYSQL56_TEMPORAL_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns.
@@ -2857,10 +2314,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
-SESSION_VALUE 16384
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
@@ -2871,10 +2324,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
-SESSION_VALUE 30
-GLOBAL_VALUE 30
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 30
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
@@ -2885,10 +2334,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
-SESSION_VALUE 10
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
@@ -2899,10 +2344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
-SESSION_VALUE 60
-GLOBAL_VALUE 60
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 60
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
@@ -2913,10 +2354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OLD
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use compatible behavior from previous MariaDB version. See also --old-mode
@@ -2927,10 +2364,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_ALTER_TABLE
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Alias for alter_algorithm. Deprecated. Use --alter-algorithm instead.
@@ -2941,10 +2374,6 @@ ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OLD_MODE
-SESSION_VALUE
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Used to emulate old behavior from earlier MariaDB or MySQL versions
@@ -2955,10 +2384,6 @@ ENUM_VALUE_LIST NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO,ZERO_DATE_TIME_
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OLD_PASSWORDS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use old password encryption method (needed for 4.0 and older clients)
@@ -2968,11 +2393,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME OPEN_FILES_LIMIT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
@@ -2983,10 +2414,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
-SESSION_VALUE 62
-GLOBAL_VALUE 62
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 62
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
@@ -2997,10 +2424,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
-SESSION_VALUE 100
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
@@ -3011,10 +2434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SWITCH
-SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
-GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Fine-tune the optimizer behavior
@@ -3025,10 +2444,6 @@ ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE
-SESSION_VALUE enabled=off
-GLOBAL_VALUE enabled=off
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE enabled=off
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Controls tracing of the Optimizer: optimizer_trace=option=val[,option=val...], where option is one of {enabled} and val is one of {on, off, default}
@@ -3039,10 +2454,6 @@ ENUM_VALUE_LIST enabled,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
-SESSION_VALUE 1048576
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum allowed size of an optimizer trace
@@ -3053,10 +2464,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
-SESSION_VALUE 4
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
@@ -3067,10 +2474,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable the performance schema.
@@ -3081,10 +2484,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
@@ -3095,10 +2494,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
@@ -3109,10 +2504,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -3123,10 +2514,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -3137,10 +2524,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -3151,10 +2534,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -3165,10 +2544,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
@@ -3179,10 +2554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
@@ -3193,10 +2564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
@@ -3207,10 +2574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 80
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 80
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of condition instruments.
@@ -3221,10 +2584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
@@ -3235,10 +2594,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
-SESSION_VALUE NULL
-GLOBAL_VALUE 1024
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
@@ -3249,10 +2604,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of file instruments.
@@ -3263,10 +2614,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
-SESSION_VALUE NULL
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of opened instrumented files.
@@ -3277,10 +2624,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
@@ -3291,10 +2634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of mutex instruments.
@@ -3305,10 +2644,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 5000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
@@ -3319,10 +2654,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 40
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 40
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rwlock instruments.
@@ -3333,10 +2664,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 5000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
@@ -3347,10 +2674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of socket instruments.
@@ -3361,10 +2684,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
@@ -3375,10 +2694,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 160
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 160
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of stage instruments.
@@ -3389,10 +2704,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 202
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 202
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -3403,10 +2714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
@@ -3417,10 +2724,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 500
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
@@ -3431,10 +2734,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
-SESSION_VALUE NULL
-GLOBAL_VALUE 50
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of thread instruments.
@@ -3445,10 +2744,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 200
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
@@ -3459,10 +2754,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 2048
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
@@ -3473,10 +2764,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
@@ -3487,10 +2774,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
@@ -3501,10 +2784,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
@@ -3515,10 +2794,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PID_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Pid file used by safe_mysqld
@@ -3529,10 +2804,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PLUGIN_DIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory for plugins
@@ -3542,11 +2813,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PLUGIN_MATURITY
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PORT
-SESSION_VALUE NULL
-GLOBAL_VALUE MASTER_MYPORT
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Port number to use for connection or 0 to default to, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306), whatever comes first
@@ -3557,10 +2834,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
-SESSION_VALUE 32768
-GLOBAL_VALUE 32768
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32768
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
@@ -3571,10 +2844,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROFILING
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is default), statement profiling will be enabled. See SHOW PROFILES and SHOW PROFILE.
@@ -3585,10 +2854,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
-SESSION_VALUE 15
-GLOBAL_VALUE 15
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 15
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
@@ -3599,10 +2864,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
-SESSION_VALUE 5
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 5
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
@@ -3613,10 +2874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROTOCOL_VERSION
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The version of the client/server protocol used by the MariaDB server
@@ -3627,10 +2884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROXY_PROTOCOL_NETWORKS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Enable proxy protocol for these source networks. The syntax is a comma separated list of IPv4 and IPv6 networks. If the network doesn't contain mask, it is considered to be a single host. "*" represents all networks and must the only directive on the line. String "localhost" represents non-TCP local connections (Unix domain socket, Windows named pipe or shared memory).
@@ -3641,10 +2894,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROXY_USER
-SESSION_VALUE
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The proxy user account name used when logging in
@@ -3655,10 +2904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PSEUDO_SLAVE_MODE
-SESSION_VALUE OFF
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT SET pseudo_slave_mode= 0,1 are commands that mysqlbinlog adds to beginning and end of binary log dumps. While zero value indeed disables, the actual enabling of the slave applier execution mode is done implicitly when a Format_description_event is sent through the session.
@@ -3669,10 +2914,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PSEUDO_THREAD_ID
-SESSION_VALUE 10
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT This variable is for internal server use
@@ -3683,10 +2924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
-SESSION_VALUE 16384
-GLOBAL_VALUE 16384
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for query parsing and execution
@@ -3697,10 +2934,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't cache results that are bigger than this
@@ -3711,10 +2944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
@@ -3725,10 +2954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 1048576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
@@ -3739,10 +2964,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_STRIP_COMMENTS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Strip all comments from a query before storing it in the query cache
@@ -3753,10 +2974,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_CACHE_TYPE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT OFF = Don't cache or retrieve results. ON = Cache all results except SELECT SQL_NO_CACHE ... queries. DEMAND = Cache only SELECT SQL_CACHE ... queries
@@ -3767,10 +2984,6 @@ ENUM_VALUE_LIST OFF,ON,DEMAND
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_WLOCK_INVALIDATE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Invalidate queries in query cache on LOCK for write
@@ -3781,10 +2994,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
-SESSION_VALUE 24576
-GLOBAL_VALUE 24576
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 24576
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Persistent buffer for query parsing and execution
@@ -3794,11 +3003,27 @@ NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME RAND_SEED1
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME RAND_SEED2
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME RANGE_ALLOC_BLOCK_SIZE
-SESSION_VALUE 4096
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
@@ -3809,10 +3034,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_BINLOG_SPEED_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
@@ -3823,10 +3044,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_BUFFER_SIZE
-SESSION_VALUE 131072
-GLOBAL_VALUE 131072
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
@@ -3837,10 +3054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_ONLY
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege
@@ -3851,10 +3064,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
@@ -3865,10 +3074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RELAY_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE mysqld-relay-bin
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The location and name to use for relay logs.
@@ -3879,10 +3084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RELAY_LOG_BASENAME
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The full path of the relay log file names, excluding the extension.
@@ -3893,10 +3094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME RELAY_LOG_INDEX
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The location and name to use for the file that keeps a list of the last relay logs.
@@ -3907,10 +3104,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME RELAY_LOG_INFO_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE relay-log.info
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The location and name of the file that remembers where the SQL replication thread is in the relay logs.
@@ -3921,10 +3114,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RELAY_LOG_PURGE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT if disabled - do not purge relay logs. if enabled - purge them as soon as they are no more needed.
@@ -3935,10 +3124,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RELAY_LOG_RECOVERY
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enables automatic relay log recovery right after the database startup, which means that the IO Thread starts re-fetching from the master right after the last transaction processed.
@@ -3949,10 +3134,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RELAY_LOG_SPACE_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum space to use for all relay logs
@@ -3963,10 +3144,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME REPLICATE_ANNOTATE_ROW_EVENTS
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Tells the slave to write annotate rows events received from the master to its own binary log. Ignored if log_slave_updates is not set
@@ -3977,10 +3154,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME REPLICATE_DO_DB
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tell the slave to restrict replication to updates of tables whose names appear in the comma-separated list. For statement-based replication, only the default database (that is, the one selected by USE) is considered, not any explicitly mentioned tables in the query. For row-based replication, the actual names of table(s) being updated are checked.
@@ -3991,10 +3164,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPLICATE_DO_TABLE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave to restrict replication to tables in the comma-separated list.
@@ -4005,10 +3174,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPLICATE_EVENTS_MARKED_FOR_SKIP
-SESSION_VALUE NULL
-GLOBAL_VALUE REPLICATE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE REPLICATE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Whether the slave should replicate events that were created with @@skip_replication=1 on the master. Default REPLICATE (no events are skipped). Other values are FILTER_ON_SLAVE (events will be sent by the master but ignored by the slave) and FILTER_ON_MASTER (events marked with @@skip_replication=1 will be filtered on the master and never be sent to the slave).
@@ -4019,10 +3184,6 @@ ENUM_VALUE_LIST REPLICATE,FILTER_ON_SLAVE,FILTER_ON_MASTER
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME REPLICATE_IGNORE_DB
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tell the slave to restrict replication to updates of tables whose names do not appear in the comma-separated list. For statement-based replication, only the default database (that is, the one selected by USE) is considered, not any explicitly mentioned tables in the query. For row-based replication, the actual names of table(s) being updated are checked.
@@ -4033,10 +3194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPLICATE_IGNORE_TABLE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave thread not to replicate any statement that updates the specified table, even if any other tables might be updated by the same statement.
@@ -4047,10 +3204,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPLICATE_WILD_DO_TABLE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave thread to restrict replication to statements where any of the updated tables match the specified database and table name patterns.
@@ -4061,10 +3214,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPLICATE_WILD_IGNORE_TABLE
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave thread to not replicate to the tables that match the given wildcard pattern.
@@ -4075,10 +3224,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME REPORT_HOST
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Hostname or IP of the slave to be reported to the master during slave registration. Will appear in the output of SHOW SLAVE HOSTS. Leave unset if you do not want the slave to register itself with the master. Note that it is not sufficient for the master to simply read the IP of the slave off the socket once the slave connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the slave from the master or other hosts
@@ -4089,10 +3234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME REPORT_PASSWORD
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The account password of the slave to be reported to the master during slave registration
@@ -4103,10 +3244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME REPORT_PORT
-SESSION_VALUE NULL
-GLOBAL_VALUE MASTER_MYPORT
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Port for connecting to slave reported to the master during slave registration. Set it only if the slave is listening on a non-default port or if you have a special tunnel from the master or other clients to the slave. If not sure, leave this option unset
@@ -4117,10 +3254,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME REPORT_USER
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The account user name of the slave to be reported to the master during slave registration
@@ -4131,10 +3264,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
-SESSION_VALUE 8388608
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8388608
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffers used [NOT] IN evaluation via partial matching
@@ -4145,10 +3274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_ENABLED
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable semi-synchronous replication master (disabled by default).
@@ -4159,10 +3284,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The timeout value (in ms) for semi-synchronous replication in the master
@@ -4173,10 +3294,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TRACE_LEVEL
-SESSION_VALUE NULL
-GLOBAL_VALUE 32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The tracing level for semi-sync replication.
@@ -4187,10 +3304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_WAIT_NO_SLAVE
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Wait until timeout when no semi-synchronous replication slave available (enabled by default).
@@ -4201,10 +3314,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_WAIT_POINT
-SESSION_VALUE NULL
-GLOBAL_VALUE AFTER_COMMIT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE AFTER_COMMIT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Should transaction wait for semi-sync ack after having synced binlog, or after having committed in storage engine.
@@ -4215,10 +3324,6 @@ ENUM_VALUE_LIST AFTER_SYNC,AFTER_COMMIT
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_DELAY_MASTER
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Only write master info file when ack is needed.
@@ -4229,10 +3334,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_ENABLED
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable semi-synchronous replication slave (disabled by default).
@@ -4243,10 +3344,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_KILL_CONN_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 5
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Timeout for the mysql connection used to kill the slave io_thread's connection on master. This timeout comes into play when stop slave is executed.
@@ -4257,10 +3354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL
-SESSION_VALUE NULL
-GLOBAL_VALUE 32
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The tracing level for semi-sync replication.
@@ -4271,10 +3364,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SECURE_AUTH
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disallow authentication for accounts that have old (pre-4.1) passwords
@@ -4285,10 +3374,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SECURE_FILE_PRIV
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files within specified directory
@@ -4299,10 +3384,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SECURE_TIMESTAMP
-SESSION_VALUE NULL
-GLOBAL_VALUE NO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Restricts direct setting of a session timestamp. Possible levels are: YES - timestamp cannot deviate from the system clock, REPLICATION - replication thread can adjust timestamp to match the master's, SUPER - a user with this privilege and a replication thread can adjust timestamp, NO - historical behavior, anyone can modify session timestamp
@@ -4313,10 +3394,6 @@ ENUM_VALUE_LIST NO,SUPER,REPLICATION,YES
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
-SESSION_VALUE 1
-GLOBAL_VALUE 1
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
@@ -4327,10 +3404,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SESSION_TRACK_SCHEMA
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Track changes to the default schema.
@@ -4341,10 +3414,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SESSION_TRACK_STATE_CHANGE
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Track changes to the session state.
@@ -4355,10 +3424,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SESSION_TRACK_SYSTEM_VARIABLES
-SESSION_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
-GLOBAL_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Track changes in registered system variables.
@@ -4369,10 +3434,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SESSION_TRACK_TRANSACTION_INFO
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Track changes to the transaction attributes. OFF to disable; STATE to track just transaction state (Is there an active transaction? Does it have any data? etc.); CHARACTERISTICS to track transaction state and report all statements needed to start a transaction withthe same characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction).
@@ -4383,10 +3444,6 @@ ENUM_VALUE_LIST OFF,STATE,CHARACTERISTICS
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SKIP_EXTERNAL_LOCKING
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't use system (external) locking
@@ -4397,10 +3454,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SKIP_NAME_RESOLVE
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't resolve hostnames. All hostnames are IP's or 'localhost'.
@@ -4411,10 +3464,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SKIP_NETWORKING
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't allow connection with TCP/IP
@@ -4425,10 +3474,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SKIP_PARALLEL_REPLICATION
-SESSION_VALUE OFF
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set when a transaction is written to the binlog, parallel apply of that transaction will be avoided on a slave where slave_parallel_mode is not "aggressive". Can be used to avoid unnecessary rollback and retry for transactions that are likely to cause a conflict if replicated in parallel.
@@ -4439,10 +3484,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SKIP_REPLICATION
-SESSION_VALUE OFF
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Changes are logged into the binary log with the @@skip_replication flag set. Such events will not be replicated by slaves that run with --replicate-events-marked-for-skip set different from its default of REPLICATE. See Selectively skipping replication of binlog events for more information.
@@ -4453,10 +3494,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SKIP_SHOW_DATABASE
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Don't allow 'SHOW DATABASE' commands
@@ -4467,10 +3504,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_COMPRESSED_PROTOCOL
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use compression on master/slave protocol
@@ -4481,10 +3514,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_DDL_EXEC_MODE
-SESSION_VALUE NULL
-GLOBAL_VALUE IDEMPOTENT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE IDEMPOTENT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT How replication events should be executed. Legal values are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode, replication will not stop for DDL operations that are idempotent. This means that CREATE TABLE is treated as CREATE TABLE OR REPLACE and DROP TABLE is treated as DROP TABLE IF EXISTS.
@@ -4495,10 +3524,6 @@ ENUM_VALUE_LIST STRICT,IDEMPOTENT
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_DOMAIN_PARALLEL_THREADS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
@@ -4509,10 +3534,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_EXEC_MODE
-SESSION_VALUE NULL
-GLOBAL_VALUE STRICT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE STRICT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT How replication events should be executed. Legal values are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode, replication will not stop for operations that are idempotent. For example, in row based replication attempts to delete rows that doesn't exist will be ignored. In STRICT mode, replication will stop on any unexpected difference between the master and the slave.
@@ -4523,10 +3544,6 @@ ENUM_VALUE_LIST STRICT,IDEMPOTENT
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_LOAD_TMPDIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The location where the slave should put its temporary files when replicating a LOAD DATA INFILE command
@@ -4537,10 +3554,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
-SESSION_VALUE NULL
-GLOBAL_VALUE 1073741824
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
@@ -4551,10 +3564,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_NET_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 120
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 60
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of seconds to wait for more data from any master/slave connection before aborting the read
@@ -4565,10 +3574,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_MAX_QUEUED
-SESSION_VALUE NULL
-GLOBAL_VALUE 131072
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
@@ -4579,10 +3584,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_MODE
-SESSION_VALUE NULL
-GLOBAL_VALUE conservative
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE conservative
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Controls what transactions are applied in parallel when using --slave-parallel-threads. Possible values: "optimistic" tries to apply most transactional DML in parallel, and handles any conflicts with rollback and retry. "conservative" limits parallelism in an effort to avoid any conflicts. "aggressive" tries to maximise the parallelism, possibly at the cost of increased conflict rate. "minimal" only parallelizes the commit steps of transactions. "none" disables parallel apply completely.
@@ -4593,10 +3594,6 @@ ENUM_VALUE_LIST none,minimal,conservative,optimistic,aggressive
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SLAVE_PARALLEL_THREADS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
@@ -4607,10 +3604,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_WORKERS
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for slave_parallel_threads
@@ -4621,10 +3614,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_RUN_TRIGGERS_FOR_RBR
-SESSION_VALUE NULL
-GLOBAL_VALUE NO
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Modes for how triggers in row-base replication on slave side will be executed. Legal values are NO (default), YES and LOGGING. NO means that trigger for RBR will not be running on slave. YES and LOGGING means that triggers will be running on slave, if there was not triggers running on the master for the statement. LOGGING also means results of that the executed triggers work will be written to the binlog.
@@ -4635,10 +3624,6 @@ ENUM_VALUE_LIST NO,YES,LOGGING
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_SKIP_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave thread to continue replication when a query event returns an error from the provided list
@@ -4649,10 +3634,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_SQL_VERIFY_CHECKSUM
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Force checksum verification of replication events after reading them from relay log. Note: Events are always checksum-verified by slave on receiving them from the network before writing them to the relay log
@@ -4663,10 +3644,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_TRANSACTION_RETRIES
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock, elapsed lock wait timeout or listed in slave_transaction_retry_errors, before giving up and stopping
@@ -4677,10 +3654,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_ERRORS
-SESSION_VALUE NULL
-GLOBAL_VALUE 1158,1159,1160,1161,1205,1213,1429,2013,12701
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Tells the slave thread to retry transaction for replication when a query event returns an error from the provided list. Deadlock error, elapsed lock wait timeout, net read error, net read timeout, net write error, net write timeout, connect error and 2 types of lost connection error are automatically added to this list
@@ -4691,10 +3664,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_INTERVAL
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors
@@ -4705,10 +3674,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TYPE_CONVERSIONS
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE SET
VARIABLE_COMMENT Set of slave type conversions that are enabled. If the variable is empty, no conversions are allowed and it is expected that the types match exactly
@@ -4719,10 +3684,6 @@ ENUM_VALUE_LIST ALL_LOSSY,ALL_NON_LOSSY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 2
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
@@ -4733,10 +3694,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_QUERY_LOG
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Log slow queries to a table or log file. Defaults logging to a file 'hostname'-slow.log or a table mysql.slow_log if --log-output=TABLE is used. Must be enabled to activate other slow log options.
@@ -4747,10 +3704,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLOW_QUERY_LOG_FILE
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options
@@ -4761,10 +3714,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SOCKET
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Socket file to use for connection
@@ -4775,10 +3724,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SORT_BUFFER_SIZE
-SESSION_VALUE 262144
-GLOBAL_VALUE 262144
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 2097152
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
@@ -4789,10 +3734,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_AUTO_IS_NULL
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the query SELECT * FROM table_name WHERE auto_increment_column IS NULL will return an auto-increment that has just been successfully inserted, the same as the LAST_INSERT_ID() function. Some ODBC programs make use of this IS NULL comparison.
@@ -4803,10 +3744,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_BIG_SELECTS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 0, MariaDB will not perform large SELECTs. See max_join_size for details. If max_join_size is set to anything but DEFAULT, sql_big_selects is automatically set to 0. If sql_big_selects is again set, max_join_size will be ignored.
@@ -4817,10 +3754,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_BUFFER_RESULT
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is default), results from SELECT statements are always placed into temporary tables. This can help the server when it takes a long time to send the results to the client by allowing the table locks to be freed early.
@@ -4831,10 +3764,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_BIN
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 0 (1 is the default), no logging to the binary log is done for the client. Only clients with the SUPER privilege can update this variable. Can have unintended consequences if set globally, see SET SQL_LOG_BIN. Starting MariaDB 10.1.7, this variable does not affect the replication of events in a Galera cluster.
@@ -4845,10 +3774,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_OFF
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1 (0 is the default), no logging to the general query log is done for the client. Only clients with the SUPER privilege can update this variable.
@@ -4859,10 +3784,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_MODE
-SESSION_VALUE ANSI_QUOTES
-GLOBAL_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Sets the sql mode
@@ -4873,10 +3794,6 @@ ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BA
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, warning_count is incremented each time a Note warning is encountered. If set to 0, Note warnings are not recorded. mysqldump has outputs to set this variable to 0 so that no unnecessary increments occur when data is reloaded.
@@ -4887,10 +3804,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_QUOTE_SHOW_CREATE
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, the server will quote identifiers for SHOW CREATE DATABASE, SHOW CREATE TABLE and SHOW CREATE VIEW statements. Quoting is disabled if set to 0. Enable to ensure replications works when identifiers require quoting.
@@ -4901,10 +3814,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_SAFE_UPDATES
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, UPDATEs and DELETEs need either a key in the WHERE clause, or a LIMIT clause, or else they will aborted. Prevents the common mistake of accidentally deleting or updating every row in a table.
@@ -4915,10 +3824,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SQL_SELECT_LIMIT
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum number of rows to return from SELECT statements
@@ -4929,10 +3834,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_SLAVE_SKIP_COUNTER
-SESSION_VALUE 0
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Skip the next N events from the master log
@@ -4943,10 +3844,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_WARNINGS
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, single-row INSERTs will produce a string containing warning information if a warning occurs.
@@ -4957,10 +3854,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SSL_CA
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CA file in PEM format (check OpenSSL docs, implies --ssl)
@@ -4971,10 +3864,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_CAPATH
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CA directory (check OpenSSL docs, implies --ssl)
@@ -4985,10 +3874,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_CERT
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT X509 cert in PEM format (implies --ssl)
@@ -4999,10 +3884,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_CIPHER
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT SSL cipher to use (implies --ssl)
@@ -5013,10 +3894,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_CRL
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CRL file in PEM format (check OpenSSL docs, implies --ssl)
@@ -5027,10 +3904,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_CRLPATH
-SESSION_VALUE NULL
-GLOBAL_VALUE
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT CRL directory (check OpenSSL docs, implies --ssl)
@@ -5041,10 +3914,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SSL_KEY
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT X509 key in PEM format (implies --ssl)
@@ -5055,10 +3924,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME STANDARD_COMPLIANT_CTE
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Allow only CTEs compliant to SQL standard
@@ -5069,10 +3934,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME STORAGE_ENGINE
-SESSION_VALUE MyISAM
-GLOBAL_VALUE MyISAM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE MyISAM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Alias for @@default_storage_engine. Deprecated
@@ -5083,10 +3944,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 256
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
@@ -5097,10 +3954,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME STRICT_PASSWORD_VALIDATION
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT When password validation plugins are enabled, reject passwords that cannot be validated (passwords specified as a hash)
@@ -5111,10 +3964,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SYNC_BINLOG
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush binary log to disk after every #th event. Use 0 (default) to disable synchronous flushing
@@ -5125,10 +3974,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYNC_FRM
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Sync .frm files to disk on creation
@@ -5139,10 +3984,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SYNC_MASTER_INFO
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush master info to disk after every #th event. Use 0 to disable synchronous flushing
@@ -5153,10 +3994,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYNC_RELAY_LOG
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush relay log to disk after every #th event. Use 0 to disable synchronous flushing
@@ -5167,10 +4004,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYNC_RELAY_LOG_INFO
-SESSION_VALUE NULL
-GLOBAL_VALUE 10000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Synchronously flush relay log info to disk after every #th transaction. Use 0 to disable synchronous flushing
@@ -5180,11 +4013,17 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME SYSTEM_TIME_ZONE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT The server system time zone
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SYSTEM_VERSIONING_ALTER_HISTORY
-SESSION_VALUE ERROR
-GLOBAL_VALUE ERROR
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ERROR
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Versioning ALTER TABLE mode. ERROR: Fail ALTER with error; KEEP: Keep historical system rows and subject them to ALTER
@@ -5195,10 +4034,6 @@ ENUM_VALUE_LIST ERROR,KEEP
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYSTEM_VERSIONING_ASOF
-SESSION_VALUE DEFAULT
-GLOBAL_VALUE DEFAULT
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Default value for the FOR SYSTEM_TIME AS OF clause
@@ -5209,10 +4044,6 @@ ENUM_VALUE_LIST DEFAULT
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 400
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 400
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
@@ -5223,10 +4054,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
-SESSION_VALUE NULL
-GLOBAL_VALUE 100
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached open tables
@@ -5237,10 +4064,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE_INSTANCES
-SESSION_VALUE NULL
-GLOBAL_VALUE 8
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of table cache instances
@@ -5251,10 +4074,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_INTERVAL
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.If set to 0, system dependent default is used.
@@ -5265,10 +4084,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_PROBES
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT The number of unacknowledged probes to send before considering the connection dead and notifying the application layer.If set to 0, system dependent default is used.
@@ -5279,10 +4094,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_KEEPALIVE_TIME
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT
VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used.
@@ -5293,10 +4104,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TCP_NODELAY
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Set option TCP_NODELAY (disable Nagle's algorithm) on socket
@@ -5307,10 +4114,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 151
-GLOBAL_VALUE_ORIGIN AUTO
-DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
@@ -5321,10 +4124,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CONCURRENCY
-SESSION_VALUE NULL
-GLOBAL_VALUE 10
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
@@ -5335,10 +4134,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_HANDLING
-SESSION_VALUE NULL
-GLOBAL_VALUE one-thread-per-connection
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE one-thread-per-connection
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Define threads usage for handling queries
@@ -5349,10 +4144,6 @@ ENUM_VALUE_LIST one-thread-per-connection,no-threads,pool-of-threads
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_DEDICATED_LISTENER
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1,listener thread will not pick up queries
@@ -5363,10 +4154,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_POOL_EXACT_STATS
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, provides better statistics in information_schema threadpool tables
@@ -5377,10 +4164,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_POOL_IDLE_TIMEOUT
-SESSION_VALUE NULL
-GLOBAL_VALUE 60
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 60
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Timeout in seconds for an idle thread in the thread pool.Worker thread will be shut down after timeout
@@ -5391,10 +4174,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_MAX_THREADS
-SESSION_VALUE NULL
-GLOBAL_VALUE 65536
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 65536
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum allowed number of worker threads in the thread pool
@@ -5405,10 +4184,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_OVERSUBSCRIBE
-SESSION_VALUE NULL
-GLOBAL_VALUE 3
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT How many additional active worker threads in a group are allowed.
@@ -5419,10 +4194,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_PRIORITY
-SESSION_VALUE auto
-GLOBAL_VALUE auto
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE auto
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Threadpool priority. High priority connections usually start executing earlier than low priority.If priority set to 'auto', the the actual priority(low or high) is determined based on whether or not connection is inside transaction.
@@ -5433,10 +4204,6 @@ ENUM_VALUE_LIST high,low,auto
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_PRIO_KICKUP_TIMER
-SESSION_VALUE NULL
-GLOBAL_VALUE 1000
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of milliseconds before a dequeued low-priority statement is moved to the high-priority queue
@@ -5447,10 +4214,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 4
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of thread groups in the pool. This parameter is roughly equivalent to maximum number of concurrently executing threads (threads in a waiting state do not count as executing).
@@ -5461,10 +4224,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_STALL_LIMIT
-SESSION_VALUE NULL
-GLOBAL_VALUE 500
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 500
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum query execution time in milliseconds,before an executing non-yielding thread is considered stalled.If a worker thread is stalled, additional worker thread may be created to handle remaining clients.
@@ -5475,10 +4234,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_STACK
-SESSION_VALUE NULL
-GLOBAL_VALUE 299008
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 299008
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The stack size for each thread
@@ -5489,10 +4244,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TIMED_MUTEXES
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Specify whether to time mutexes. Deprecated, has no effect.
@@ -5503,10 +4254,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME TIMESTAMP
-SESSION_VALUE 1409578823.000000
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Set the time for this client
@@ -5517,10 +4264,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TIME_FORMAT
-SESSION_VALUE NULL
-GLOBAL_VALUE %H:%i:%s
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE %H:%i:%s
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The TIME format (ignored)
@@ -5531,10 +4274,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TIME_ZONE
-SESSION_VALUE +00:00
-GLOBAL_VALUE SYSTEM
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE SYSTEM
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The current time zone, used to initialize the time zone for a client when it connects. Set to SYSTEM by default, in which the client uses the system time zone value.
@@ -5544,11 +4283,17 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME TLS_VERSION
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT TLS protocol version for secure connections.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMPDIR
-SESSION_VALUE NULL
-GLOBAL_VALUE PATH
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path for temporary files. Several paths may be specified, separated by a colon (:), in this case they are used in a round-robin fashion
@@ -5559,10 +4304,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_DISK_TABLE_SIZE
-SESSION_VALUE 18446744073709551615
-GLOBAL_VALUE 18446744073709551615
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 18446744073709551615
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
@@ -5573,10 +4314,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_MEMORY_TABLE_SIZE
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
@@ -5587,10 +4324,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMP_TABLE_SIZE
-SESSION_VALUE 16777216
-GLOBAL_VALUE 16777216
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 16777216
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
@@ -5601,10 +4334,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_ALLOC_BLOCK_SIZE
-SESSION_VALUE 8192
-GLOBAL_VALUE 8192
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8192
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
@@ -5615,10 +4344,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
-SESSION_VALUE 4096
-GLOBAL_VALUE 4096
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
@@ -5629,10 +4354,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TX_ISOLATION
-SESSION_VALUE REPEATABLE-READ
-GLOBAL_VALUE REPEATABLE-READ
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE REPEATABLE-READ
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Default transaction isolation level
@@ -5643,10 +4364,6 @@ ENUM_VALUE_LIST READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLE
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TX_READ_ONLY
-SESSION_VALUE OFF
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Default transaction access mode. If set to OFF, the default, access is read/write. If set to ON, access is read-only. The SET TRANSACTION statement can also change the value of this variable. See SET TRANSACTION and START TRANSACTION.
@@ -5657,10 +4374,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME UNIQUE_CHECKS
-SESSION_VALUE ON
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT If set to 1, the default, secondary indexes in InnoDB tables are performed. If set to 0, storage engines can (but are not required to) assume that duplicate keys are not present in input data. Set to 0 to speed up imports of large tables to InnoDB. The storage engine will still issue a duplicate key error if it detects one, even if set to 0.
@@ -5671,10 +4384,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME UPDATABLE_VIEWS_WITH_LIMIT
-SESSION_VALUE YES
-GLOBAL_VALUE YES
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE YES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is used in queries with a LIMIT clause for updating. NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools)
@@ -5685,10 +4394,6 @@ ENUM_VALUE_LIST NO,YES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME USERSTAT
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enables statistics gathering for USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS tables in the INFORMATION_SCHEMA
@@ -5699,10 +4404,6 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME USE_STAT_TABLES
-SESSION_VALUE PREFERABLY
-GLOBAL_VALUE PREFERABLY
-GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE PREFERABLY_FOR_QUERIES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how to use system statistics tables
@@ -5712,166 +4413,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME WAIT_TIMEOUT
-SESSION_VALUE 28800
-GLOBAL_VALUE 28800
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 28800
-VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 31536000
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME WARNING_COUNT
-SESSION_VALUE 0
-GLOBAL_VALUE NULL
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NULL
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The number of errors, warnings, and notes that resulted from the last statement that generated messages
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-select VARIABLE_NAME, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT,
-NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE,
-ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
-from information_schema.system_variables
-where variable_name in (
-'have_openssl',
-'have_symlink',
-'hostname',
-'large_files_support',
-'lower_case_file_system',
-'lower_case_table_names',
-'open_files_limit',
-'rand_seed1',
-'rand_seed2',
-'system_time_zone',
-'tls_version',
-'version_comment',
-'version_source_revision',
-'version_compile_machine', 'version_compile_os',
-'version_malloc_library', 'version_ssl_library', 'version'
- )
-order by variable_name;
-VARIABLE_NAME HAVE_OPENSSL
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT Comparing have_openssl with have_ssl will indicate whether YaSSL or openssl was used. If YaSSL, have_ssl will be YES, but have_openssl will be NO.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME HAVE_SYMLINK
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT If symbolic link support is enabled, will be set to YES, otherwise will be set to NO. Required for the INDEX DIRECTORY and DATA DIRECTORY table options (see CREATE TABLE) and Windows symlink support. Will be set to DISABLED if the server is started with the --skip-symbolic-links option.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME HOSTNAME
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT Server host name
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LARGE_FILES_SUPPORT
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Whether mysqld was compiled with options for large file support
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LOWER_CASE_FILE_SYSTEM
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Case sensitivity of file names on the file system where the data directory is located
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME LOWER_CASE_TABLE_NAMES
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive. Should be set to 2 if you are using a case insensitive file system
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 2
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME OPEN_FILES_LIMIT
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 4294967295
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME RAND_SEED1
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME RAND_SEED2
-VARIABLE_SCOPE SESSION ONLY
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME SYSTEM_TIME_ZONE
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT The server system time zone
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NULL
-VARIABLE_NAME TLS_VERSION
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE SET
-VARIABLE_COMMENT TLS protocol version for secure connections.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSION
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -5942,8 +4483,27 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
-select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE,
-VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
+VARIABLE_NAME WAIT_TIMEOUT
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 31536000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WARNING_COUNT
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of errors, warnings, and notes that resulted from the last statement that generated messages
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+select VARIABLE_NAME, GLOBAL_VALUE_ORIGIN, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT
from information_schema.system_variables
where variable_name in (
'log_tc_size'
diff --git a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
index 69f3d42d2fb..a3d86108862 100644
--- a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
@@ -1,19 +1,11 @@
SET @start_value = @@global.table_definition_cache;
-SELECT @start_value;
-@start_value
-400
'#--------------------FN_DYNVARS_019_01------------------------#'
SET @@global.table_definition_cache = 100;
Warnings:
Warning 1292 Truncated incorrect table_definition_cache value: '100'
SET @@global.table_definition_cache = DEFAULT;
-SELECT @@global.table_definition_cache;
-@@global.table_definition_cache
-400
-'#---------------------FN_DYNVARS_019_02-------------------------#'
-SET @@global.table_definition_cache = DEFAULT;
-SELECT @@global.table_definition_cache = 400;
-@@global.table_definition_cache = 400
+SELECT @@global.table_definition_cache > 0;
+@@global.table_definition_cache > 0
1
'#--------------------FN_DYNVARS_019_03------------------------#'
SET @@global.table_definition_cache = 1;
@@ -104,6 +96,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT table_definition_cache = @@session.table_definition_cache;
ERROR 42S22: Unknown column 'table_definition_cache' in 'field list'
SET @@global.table_definition_cache = @start_value;
-SELECT @@global.table_definition_cache;
-@@global.table_definition_cache
-400
diff --git a/mysql-test/suite/sys_vars/r/userstat_basic.result b/mysql-test/suite/sys_vars/r/userstat_basic.result
index 2d082cd3a25..9fbb88d5f70 100644
--- a/mysql-test/suite/sys_vars/r/userstat_basic.result
+++ b/mysql-test/suite/sys_vars/r/userstat_basic.result
@@ -1,9 +1,10 @@
SET @start_global_value = @@global.userstat;
-select @@global.userstat;
-@@global.userstat
-0
+select @@global.userstat = 0 or @@global.userstat = 1;
+@@global.userstat = 0 or @@global.userstat = 1
+1
select @@session.userstat;
ERROR HY000: Variable 'userstat' is a GLOBAL variable
+SET @@global.userstat=0;
show global variables like 'userstat';
Variable_name Value
userstat OFF
diff --git a/mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test
index 172787d793a..c0d640d5985 100644
--- a/mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test
@@ -4,12 +4,16 @@
#
# show the global and session values;
#
-select @@global.aria_pagecache_buffer_size;
+select @@global.aria_pagecache_buffer_size > 0;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.aria_pagecache_buffer_size;
+--replace_column 2 #
show global variables like 'aria_pagecache_buffer_size';
+--replace_column 2 #
show session variables like 'aria_pagecache_buffer_size';
+--replace_column 2 #
select * from information_schema.global_variables where variable_name='aria_pagecache_buffer_size';
+--replace_column 2 #
select * from information_schema.session_variables where variable_name='aria_pagecache_buffer_size';
#
diff --git a/mysql-test/suite/sys_vars/t/aria_recover_options_basic.test b/mysql-test/suite/sys_vars/t/aria_recover_options_basic.test
index f621998b501..c4060045990 100644
--- a/mysql-test/suite/sys_vars/t/aria_recover_options_basic.test
+++ b/mysql-test/suite/sys_vars/t/aria_recover_options_basic.test
@@ -2,6 +2,7 @@
--source include/have_maria.inc
SET @start_global_value = @@global.aria_recover_options;
+set @@global.aria_recover_options=default;
#
# exists as global only
diff --git a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test
index da098fc3495..45018914ebc 100644
--- a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test
@@ -1,27 +1,27 @@
-################# mysql-test\t\binlog_cache_size_basic.test ####################
-# #
-# Variable Name: binlog_cache_size #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
-# Data Type: Numeric #
-# Default Value: 32768 #
-# Range: 4096 - 4294967295 #
-# #
-# #
-# Creation Date: 2008-04-28 #
-# Author: Salman Rawala/Horst Hunger #
-# #
-# Description: Test Cases of Dynamic System Variable "binlog_cache_size" #
-# that checks behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity . #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html#option_mysqld_binlog_cache_size #
-# #
-################################################################################
+################ mysql-test\t\binlog_cache_size_basic.test ####################
+ #
+# Variable Name: binlog_cache_size #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 32768 #
+# Range: 4096 - 4294967295 #
+# #
+# #
+# Creation Date: 2008-04-28 #
+# Author: Salman Rawala/Horst Hunger #
+# #
+# Description: Test Cases of Dynamic System Variable "binlog_cache_size" #
+# that checks behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity . #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html#option_mysqld_binlog_cache_size #
+# #
+###############################################################################
#################################################################
# START OF binlog_cache_size TESTS #
@@ -32,7 +32,8 @@
#########################################################################
SET @start_value = @@global.binlog_cache_size;
-SELECT @start_value;
+set @@global.binlog_cache_size= default;
+SELECT @@global.binlog_cache_size;
--echo '#--------------------FN_DYNVARS_006_01------------------------#'
#########################################################################
@@ -49,7 +50,7 @@ SELECT @@global.binlog_cache_size;
# Verify default value of variable #
###############################################
-SET @@global.binlog_cache_size = @start_value;
+SET @@global.binlog_cache_size = default;
SELECT @@global.binlog_cache_size = 32768;
@@ -145,8 +146,6 @@ SELECT binlog_cache_size = @@session.binlog_cache_size;
##############################
SET @@global.binlog_cache_size = @start_value;
-SELECT @@global.binlog_cache_size;
-
###########################################################
# END OF binlog_cache_size TESTS #
diff --git a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test
index 5c74c6fe8fe..d6ae35ca9c0 100644
--- a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test
@@ -1,27 +1,27 @@
-################ mysql-test\t\binlog_stmt_cache_size_basic.test ################
-# #
-# Variable Name: binlog_stmt_cache_size #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
-# Data Type: Numeric #
-# Default Value: 32768 #
-# Range: 4096 - 4294967295 #
-# #
-# #
-# Creation Date: 2010-10-12 #
-# Author: Alfranio Correia #
-# #
-# Description: Test Cases of Dynamic System Variable "binlog_stmt_cache_size" #
-# that checks behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity . #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.5/en/ #
-# server-system-variables.html#option_mysqld_binlog_stmt_cache_size #
-# #
-################################################################################
+################ mysql-test\t\binlog_stmt_cache_size_basic.test ###############
+# #
+# Variable Name: binlog_stmt_cache_size #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 32768 #
+# Range: 4096 - 4294967295 #
+# #
+# #
+# Creation Date: 2010-10-12 #
+# Author: Alfranio Correia #
+# #
+# Description: Test Cases of Dynamic System Variable "binlog_stmt_cache_size" #
+# that checks behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity . #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.5/en/ #
+# server-system-variables.html#option_mysqld_binlog_stmt_cache_size #
+# #
+###############################################################################
#################################################################
# START OF binlog_stmt_cache_size TESTS #
@@ -32,7 +32,8 @@
#########################################################################
SET @start_value = @@global.binlog_stmt_cache_size;
-SELECT @start_value;
+set @@global.binlog_stmt_cache_size=default;
+SELECT @@global.binlog_stmt_cache_size;
--echo '#--------------------FN_DYNVARS_006_01------------------------#'
#########################################################################
@@ -49,7 +50,7 @@ SELECT @@global.binlog_stmt_cache_size;
# Verify default value of variable #
###############################################
-SET @@global.binlog_stmt_cache_size = @start_value;
+SET @@global.binlog_stmt_cache_size = default;
SELECT @@global.binlog_stmt_cache_size = 32768;
@@ -145,7 +146,6 @@ SELECT binlog_stmt_cache_size = @@session.binlog_stmt_cache_size;
##############################
SET @@global.binlog_stmt_cache_size = @start_value;
-SELECT @@global.binlog_stmt_cache_size;
###########################################################
diff --git a/mysql-test/suite/sys_vars/t/character_set_client_basic.test b/mysql-test/suite/sys_vars/t/character_set_client_basic.test
index d8ae6a81444..e3461e4ac77 100644
--- a/mysql-test/suite/sys_vars/t/character_set_client_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_client_basic.test
@@ -30,8 +30,9 @@
--source include/have_utf8mb4.inc
--source include/have_utf16.inc
--source include/have_utf32.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
+
###################################################
## START OF character_set_client TESTS ##
###################################################
@@ -40,7 +41,7 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.character_set_client;
-SELECT @global_start_value;
+SET @@global.character_set_client=@@character_set_client;
# Save initial session value
SET @session_start_value = @@character_set_client;
SELECT @session_start_value;
@@ -78,11 +79,11 @@ SELECT global character_set_client;
###############################################################################
SET @@character_set_client = latin5;
SET @@character_set_client = DEFAULT;
-SELECT @@character_set_client AS DEFAULT_VALUE;
+SELECT @@character_set_client = @@global.character_set_client;
SET @@global.character_set_client = latin5;
SET @@global.character_set_client = DEFAULT;
-SELECT @@global.character_set_client;
+SELECT @@global.character_set_client= @global_start_value;
--echo '#--------------------FN_DYNVARS_010_03-------------------------#'
###############################################################################
@@ -335,9 +336,7 @@ SELECT @@session.character_set_client =
# Restore initial value #
####################################
SET @@global.character_set_client = @global_start_value;
-SELECT @@global.character_set_client;
SET @@session.character_set_client = @session_start_value;
-SELECT @@session.character_set_client;
#############################################################
# END OF character_set_client TESTS #
diff --git a/mysql-test/suite/sys_vars/t/character_set_connection_basic.test b/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
index bb63ff8db6a..5d6412dd420 100644
--- a/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
@@ -30,7 +30,7 @@
--source include/have_utf8mb4.inc
--source include/have_utf16.inc
--source include/have_utf32.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
## START OF character_set_connection TESTS ##
@@ -40,7 +40,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.character_set_connection;
-SELECT @global_start_value;
+SET @save_character_set_client=@@global.character_set_client;
+SET @@global.character_set_client=@@character_set_client;
# Save initial session value
SET @session_start_value = @@character_set_connection;
SELECT @session_start_value;
@@ -78,11 +79,11 @@ SELECT global character_set_connection;
###############################################################################
SET @@character_set_connection = latin5;
SET @@character_set_connection = DEFAULT;
-SELECT @@character_set_connection AS DEFAULT_VALUE;
+SELECT @@character_set_connection = @@global.character_set_connection;
SET @@global.character_set_connection = latin5;
SET @@global.character_set_connection = DEFAULT;
-SELECT @@global.character_set_connection;
+SELECT @@global.character_set_connection = @global_start_value;
--echo '#--------------------FN_DYNVARS_011_03-------------------------#'
###############################################################################
@@ -262,9 +263,7 @@ SELECT @@session.character_set_connection =
# Restore initial value #
####################################
SET @@global.character_set_connection = @global_start_value;
-SELECT @@global.character_set_connection;
-SET @@session.character_set_connection = @session_start_value;
-SELECT @@session.character_set_connection;
+SET @@global.character_set_client = @save_character_set_client;
#############################################################
# END OF character_set_connection TESTS #
diff --git a/mysql-test/suite/sys_vars/t/character_set_database_basic.test b/mysql-test/suite/sys_vars/t/character_set_database_basic.test
index f3a1ee45de0..54ccc5afddb 100644
--- a/mysql-test/suite/sys_vars/t/character_set_database_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_database_basic.test
@@ -30,7 +30,7 @@
--source include/have_utf8mb4.inc
--source include/have_utf16.inc
--source include/have_utf32.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
## START OF character_set_database TESTS ##
@@ -40,7 +40,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.character_set_database;
-SELECT @global_start_value;
+SET @@global.character_set_database=@@character_set_client;
+SELECT @@global.character_set_database;
# Save initial session value
SET @session_start_value = @@character_set_database;
SELECT @session_start_value;
@@ -263,9 +264,7 @@ SELECT @@session.character_set_database =
# Restore initial value #
####################################
SET @@global.character_set_database = @global_start_value;
-SELECT @@global.character_set_database;
SET @@session.character_set_database = @session_start_value;
-SELECT @@session.character_set_database;
#############################################################
# END OF character_set_database TESTS #
diff --git a/mysql-test/suite/sys_vars/t/character_set_results_basic.test b/mysql-test/suite/sys_vars/t/character_set_results_basic.test
index 5472cd1509e..cca2277713e 100644
--- a/mysql-test/suite/sys_vars/t/character_set_results_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_results_basic.test
@@ -30,7 +30,7 @@
--source include/have_utf8mb4.inc
--source include/have_utf16.inc
--source include/have_utf32.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
################################################
## START OF character_set_results TESTS ##
@@ -40,7 +40,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.character_set_results;
-SELECT @global_start_value;
+SET @@global.character_set_results=@@character_set_client;
+SELECT @@global.character_set_results;
# Save initial session value
SET @session_start_value = @@character_set_results;
SELECT @session_start_value;
@@ -77,11 +78,11 @@ SELECT global character_set_results;
###############################################################################
SET @@character_set_results = latin5;
SET @@character_set_results = DEFAULT;
-SELECT @@character_set_results AS DEFAULT_VALUE;
+SELECT @@character_set_results = @@global.character_set_results;
SET @@global.character_set_results = latin5;
SET @@global.character_set_results = DEFAULT;
-SELECT @@global.character_set_results;
+SELECT @@global.character_set_results= @global_start_value;
--echo '#--------------------FN_DYNVARS_013_03-------------------------#'
###############################################################################
@@ -262,9 +263,7 @@ SELECT @@session.character_set_results =
# Restore initial value #
####################################
SET @@global.character_set_results = @global_start_value;
-SELECT @@global.character_set_results;
SET @@session.character_set_results = @session_start_value;
-SELECT @@session.character_set_results;
#############################################################
# END OF character_set_results TESTS #
diff --git a/mysql-test/suite/sys_vars/t/character_set_server_basic.test b/mysql-test/suite/sys_vars/t/character_set_server_basic.test
index adb80fcfffd..de090348307 100644
--- a/mysql-test/suite/sys_vars/t/character_set_server_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_server_basic.test
@@ -27,7 +27,7 @@
--source include/have_sjis.inc
--source include/have_utf8.inc
--source include/have_ucs2.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
@@ -38,7 +38,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.character_set_server;
-SELECT @global_start_value;
+SET @@global.character_set_server=@@character_set_client;
+SELECT @@global.character_set_server;
# Save initial session value
SET @session_start_value = @@character_set_server;
SELECT @session_start_value;
@@ -78,11 +79,11 @@ SET @@character_set_server = null;
###############################################################################
SET @@character_set_server = latin5;
SET @@character_set_server = DEFAULT;
-SELECT @@character_set_server AS DEFAULT_VALUE;
+SELECT @@character_set_server = @@global.character_set_server;
SET @@global.character_set_server = latin5;
SET @@global.character_set_server = DEFAULT;
-SELECT @@global.character_set_server;
+SELECT @@global.character_set_server = @global_start_value;
--echo '#--------------------FN_DYNVARS_009_03-------------------------#'
###############################################################################
@@ -257,9 +258,7 @@ SELECT @@session.character_set_server =
# Restore initial value #
####################################
SET @@global.character_set_server = @global_start_value;
-SELECT @@global.character_set_server;
SET @@session.character_set_server = @session_start_value;
-SELECT @@session.character_set_server;
#############################################################
# END OF character_set_server TESTS #
diff --git a/mysql-test/suite/sys_vars/t/character_set_server_func.test b/mysql-test/suite/sys_vars/t/character_set_server_func.test
index 183f87c2ba7..f96c725e1cb 100644
--- a/mysql-test/suite/sys_vars/t/character_set_server_func.test
+++ b/mysql-test/suite/sys_vars/t/character_set_server_func.test
@@ -45,9 +45,11 @@ connection default;
#character set and collation are not specified in CREATE DATABASE statements.
#==============================================================================
---echo '---global character_set_server should not effects current connection---'
+--echo '--global character_set_server should not effects current connection--'
#==============================================================================
+--source include/default_charset.inc
+select @@character_set_database=@@character_set_connection;
SET @@global.character_set_server = utf8;
CREATE DATABASE db1;
USE db1;
diff --git a/mysql-test/suite/sys_vars/t/collation_connection_basic.test b/mysql-test/suite/sys_vars/t/collation_connection_basic.test
index 963eadbbcbd..04eae1d8645 100644
--- a/mysql-test/suite/sys_vars/t/collation_connection_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_connection_basic.test
@@ -27,7 +27,7 @@
--source include/have_sjis.inc
--source include/have_utf8.inc
--source include/have_ucs2.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
@@ -38,7 +38,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.collation_connection;
-SELECT @global_start_value;
+SET @@global.collation_connection=@@collation_connection;
+SELECT @@global.collation_connection;
# Save initial session value
SET @session_start_value = @@collation_connection;
SELECT @session_start_value;
@@ -75,11 +76,11 @@ SELECT global collation_connection;
###############################################################################
SET @@collation_connection = latin1_bin;
SET @@collation_connection = DEFAULT;
-SELECT @@collation_connection AS DEFAULT_VALUE;
+SELECT @@collation_connection = @@global.collation_connection;
SET @@global.collation_connection = latin1_bin;
SET @@global.collation_connection = DEFAULT;
-SELECT @@global.collation_connection;
+SELECT @@global.collation_connection = @global_start_value;
--echo '#--------------------FN_DYNVARS_015_03-------------------------#'
##############################################################################
@@ -253,9 +254,7 @@ SELECT @@session.collation_connection =
# Restore initial value #
####################################
SET @@global.collation_connection = @global_start_value;
-SELECT @@global.collation_connection;
SET @@session.collation_connection = @session_start_value;
-SELECT @@session.collation_connection;
#############################################################
# END OF collation_connection TESTS #
diff --git a/mysql-test/suite/sys_vars/t/collation_database_basic.test b/mysql-test/suite/sys_vars/t/collation_database_basic.test
index 04aee789746..314331a7999 100644
--- a/mysql-test/suite/sys_vars/t/collation_database_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_database_basic.test
@@ -22,12 +22,13 @@
# server-system-variables.html #
# #
###############################################################################
+
--source include/have_big5.inc
--source include/have_ujis.inc
--source include/have_sjis.inc
--source include/have_utf8.inc
--source include/have_ucs2.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
@@ -38,7 +39,8 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.collation_database;
-SELECT @global_start_value;
+SET @@global.collation_database=@@collation_server;
+SELECT @@global.collation_database;
# Save initial session value
SET @session_start_value = @@collation_database;
SELECT @session_start_value;
@@ -66,6 +68,7 @@ SET session collation_database=utf8_unicode_ci;
SELECT session collation_database;
# using another syntax for accessing dynamic variable
SET global collation_database=utf8_unicode_ci;
+set global collation_database=@@collation_server;
--Error ER_BAD_FIELD_ERROR
SELECT global collation_database;
@@ -76,11 +79,13 @@ SELECT global collation_database;
SET @@collation_database = latin1_bin;
SET @@collation_database = DEFAULT;
SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME=DATABASE();
-SELECT @@collation_database AS DEFAULT_VALUE;
+SELECT @@collation_database = @@global.collation_database;
SET @@global.collation_database = latin1_bin;
SET @@global.collation_database = DEFAULT;
-SELECT @@global.collation_database;
+# collation_database is depending on how the 'test' database was created, so
+# we can't trust it's value.
+SELECT length(@@global.collation_database) > 0;
--echo '#--------------------FN_DYNVARS_016_03-------------------------#'
##############################################################################
@@ -253,9 +258,7 @@ SELECT @@session.collation_database =
# Restore initial value #
####################################
SET @@global.collation_database = @global_start_value;
-SELECT @@global.collation_database;
SET @@session.collation_database = @session_start_value;
-SELECT @@session.collation_database;
###########################################################
# END OF collation_database TESTS #
diff --git a/mysql-test/suite/sys_vars/t/collation_database_func.test b/mysql-test/suite/sys_vars/t/collation_database_func.test
index 2914d8a07d3..eead98942f1 100644
--- a/mysql-test/suite/sys_vars/t/collation_database_func.test
+++ b/mysql-test/suite/sys_vars/t/collation_database_func.test
@@ -47,8 +47,6 @@ connection default;
DROP TABLE IF EXISTS t1,t2;
--enable_warnings
-
-SELECT @@character_set_server,@@collation_server;
#==============================================================================
--echo '--check if setting collation_database update character_set_database--'
#==============================================================================
diff --git a/mysql-test/suite/sys_vars/t/collation_server_basic.test b/mysql-test/suite/sys_vars/t/collation_server_basic.test
index b8c2a25fc46..f27a9a185c4 100644
--- a/mysql-test/suite/sys_vars/t/collation_server_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_server_basic.test
@@ -27,7 +27,7 @@
--source include/have_sjis.inc
--source include/have_utf8.inc
--source include/have_ucs2.inc
-
+--source include/default_charset.inc
--source include/load_sysvars.inc
###################################################
@@ -38,7 +38,7 @@
# Save initial value #
#############################################################
SET @global_start_value = @@global.collation_server;
-SELECT @global_start_value;
+SET @@global.collation_server= @@collation_server;
# Save initial session value
SET @session_start_value = @@collation_server;
SELECT @session_start_value;
@@ -75,11 +75,11 @@ SELECT global collation_server;
###############################################################################
SET @@collation_server = latin1_bin;
SET @@collation_server = DEFAULT;
-SELECT @@collation_server AS DEFAULT_VALUE;
+SELECT @@collation_server= @@global.collation_server;
SET @@global.collation_server = latin1_bin;
SET @@global.collation_server = DEFAULT;
-SELECT @@global.collation_server;
+SELECT @@global.collation_server = @global_start_value;
--echo '#--------------------FN_DYNVARS_014_03-------------------------#'
###########################################################################
@@ -254,9 +254,7 @@ SELECT @@session.collation_server =
# Restore initial value #
####################################
SET @@global.collation_server = @global_start_value;
-SELECT @@global.collation_server;
SET @@session.collation_server = @session_start_value;
-SELECT @@session.collation_server;
#####################################################
# END OF collation_server TESTS #
diff --git a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
index fa57cec38c6..f95c7c55f6e 100644
--- a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
+++ b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
@@ -36,7 +36,6 @@
########################################################################
SET @start_value = @@global.expire_logs_days;
-SELECT @start_value;
--echo '#--------------------FN_DYNVARS_029_01------------------------#'
@@ -46,7 +45,7 @@ SELECT @start_value;
SET @@global.expire_logs_days = 99;
SET @@global.expire_logs_days = DEFAULT;
-SELECT @@global.expire_logs_days;
+SELECT @@global.expire_logs_days = 0;
--echo '#---------------------FN_DYNVARS_029_02-------------------------#'
@@ -55,7 +54,7 @@ SELECT @@global.expire_logs_days;
###############################################
SET @@global.expire_logs_days = @start_value;
-SELECT @@global.expire_logs_days = 0;
+SELECT @@global.expire_logs_days = @start_value;
--echo '#--------------------FN_DYNVARS_029_03------------------------#'
@@ -166,8 +165,6 @@ SELECT expire_logs_days = @@session.expire_logs_days;
##############################
SET @@global.expire_logs_days = @start_value;
-SELECT @@global.expire_logs_days;
-
########################################################################
# END OF expire_logs_days TESTS #
diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
index 0a169b472e2..afbfa1a6c03 100644
--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
@@ -36,7 +36,7 @@
########################################################################
SET @start_value = @@global.general_log_file;
-SELECT @start_value;
+SELECT length(@start_value) > 0;
--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
@@ -45,7 +45,7 @@ SELECT @start_value;
###############################################
SET @@global.general_log_file = DEFAULT;
-SELECT @@global.general_log_file;
+SELECT length(@@global.general_log_file) > 0;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/histogram_size_basic.test b/mysql-test/suite/sys_vars/t/histogram_size_basic.test
index d65936e3616..1ddab38780e 100644
--- a/mysql-test/suite/sys_vars/t/histogram_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/histogram_size_basic.test
@@ -10,9 +10,8 @@
#############################################################
SET @start_global_value = @@global.histogram_size;
-SELECT @start_global_value;
SET @start_session_value = @@session.histogram_size;
-SELECT @start_session_value;
+SELECT @start_global_value = @start_session_value;
--echo '#--------------------FN_DYNVARS_053_01-------------------------#'
################################################################
@@ -131,10 +130,7 @@ SELECT @@local.histogram_size = @@session.histogram_size;
####################################
SET @@global.histogram_size = @start_global_value;
-SELECT @@global.histogram_size;
SET @@session.histogram_size = @start_session_value;
-SELECT @@session.histogram_size;
-
###################################################
# END OF histogram_size TESTS #
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
index 5171c0e1621..88e239574d2 100644
--- a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
@@ -6,20 +6,20 @@
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_adaptive_hash_index;
-SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
select @@global.innodb_adaptive_hash_index in (0, 1);
-select @@global.innodb_adaptive_hash_index;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_adaptive_hash_index;
+--replace_column 2 #
show global variables like 'innodb_adaptive_hash_index';
+--replace_column 2 #
show session variables like 'innodb_adaptive_hash_index';
-select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
-select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
+select variable_name from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
+select variable_name from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
#
# show that it's writable
@@ -67,4 +67,3 @@ set global innodb_adaptive_hash_index='AUTO';
#
SET @@global.innodb_adaptive_hash_index = @start_global_value;
-SELECT @@global.innodb_adaptive_hash_index;
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test
index 8e7612b0d9e..b8983093414 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test
@@ -21,9 +21,6 @@ SELECT COUNT(@@GLOBAL.innodb_log_optimize_ddl);
SELECT COUNT(@@SESSION.innodb_log_optimize_ddl);
--echo Expected error 'Variable is a GLOBAL variable'
-#### Display the default value
-SELECT @@GLOBAL.innodb_log_optimize_ddl;
-
SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save;
#### Check if the value can be set
SET @@GLOBAL.innodb_log_optimize_ddl = ON;
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
index e8cc46086bc..0459d46ab0f 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
@@ -26,6 +26,10 @@
--source include/have_innodb.inc
--source include/load_sysvars.inc
+# set default value for test
+SET @save_innodb_max_dirty_pages_pct=@@global.innodb_max_dirty_pages_pct;
+set @@global.innodb_max_dirty_pages_pct=75;
+
######################################################################
# START OF innodb_max_dirty_pages_pct TESTS #
######################################################################
@@ -184,6 +188,8 @@ SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_max_dirty_lwm_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SET @@global.innodb_max_dirty_pages_pct=@save_innodb_max_dirty_pages_pct;
+
###############################################################
# END OF innodb_max_dirty_pages_pct TESTS #
###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test
index b06f209a263..947c1bfac9e 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test
@@ -26,6 +26,10 @@
--source include/have_innodb.inc
--source include/load_sysvars.inc
+# set default value for test
+SET @save_innodb_max_dirty_pages_pct=@@global.innodb_max_dirty_pages_pct;
+set @@global.innodb_max_dirty_pages_pct=75;
+
######################################################################
# START OF innodb_max_dirty_pages_pct_lwm TESTS #
######################################################################
@@ -164,6 +168,8 @@ SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SET @@global.innodb_max_dirty_pages_pct=@save_innodb_max_dirty_pages_pct;
+
###############################################################
# END OF innodb_max_dirty_pages_pct_lwm TESTS #
###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.opt b/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.opt
new file mode 100644
index 00000000000..3ead0984f93
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.opt
@@ -0,0 +1 @@
+--innodb_read_io_threads=2
diff --git a/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.opt b/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.opt
new file mode 100644
index 00000000000..9740d1adafd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.opt
@@ -0,0 +1 @@
+--innodb_write_io_threads=2
diff --git a/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test
index 6ebaa14ab92..d610ddb106e 100644
--- a/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test
@@ -35,10 +35,7 @@
#############################################################
SET @start_global_value = @@global.join_buffer_size;
-SELECT @start_global_value;
SET @start_session_value = @@session.join_buffer_size;
-SELECT @start_session_value;
-
--echo '#--------------------FN_DYNVARS_053_01-------------------------#'
################################################################
@@ -46,10 +43,10 @@ SELECT @start_session_value;
################################################################
SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size;
+SELECT @@global.join_buffer_size > 0;
SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size;
+SELECT @@session.join_buffer_size > 0;
--echo '#--------------------FN_DYNVARS_053_03-------------------------#'
@@ -182,10 +179,7 @@ SELECT join_buffer_size = @@session.join_buffer_size;
####################################
SET @@global.join_buffer_size = @start_global_value;
-SELECT @@global.join_buffer_size;
SET @@session.join_buffer_size = @start_session_value;
-SELECT @@session.join_buffer_size;
-
########################################################
# END OF join_buffer_size TESTS #
diff --git a/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test b/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test
index 46d09062abc..0182820ff79 100644
--- a/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test
+++ b/mysql-test/suite/sys_vars/t/join_buffer_space_limit_basic.test
@@ -5,11 +5,13 @@ SET @start_global_value = @@global.join_buffer_space_limit;
#
# exists as global and session
#
-select @@global.join_buffer_space_limit;
-select @@session.join_buffer_space_limit;
+--replace_column 2 #
show global variables like 'join_buffer_space_limit';
+--replace_column 2 #
show session variables like 'join_buffer_space_limit';
+--replace_column 2 #
select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
+--replace_column 2 #
select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
#
@@ -41,4 +43,3 @@ set session join_buffer_space_limit=cast(-1 as unsigned int);
select @@session.join_buffer_space_limit;
SET @@global.join_buffer_space_limit = @start_global_value;
-
diff --git a/mysql-test/suite/sys_vars/t/join_cache_level_basic.test b/mysql-test/suite/sys_vars/t/join_cache_level_basic.test
index 1e0deb9c028..a39ddffeab2 100644
--- a/mysql-test/suite/sys_vars/t/join_cache_level_basic.test
+++ b/mysql-test/suite/sys_vars/t/join_cache_level_basic.test
@@ -5,11 +5,13 @@ SET @start_global_value = @@global.join_cache_level;
#
# exists as global only
#
-select @@global.join_cache_level;
-select @@session.join_cache_level;
+--replace_column 2 #
show global variables like 'join_cache_level';
+--replace_column 2 #
show session variables like 'join_cache_level';
+--replace_column 2 #
select * from information_schema.global_variables where variable_name='join_cache_level';
+--replace_column 2 #
select * from information_schema.session_variables where variable_name='join_cache_level';
#
@@ -39,4 +41,3 @@ set session join_cache_level=cast(-1 as unsigned int);
select @@session.join_cache_level;
SET @@global.join_cache_level = @start_global_value;
-
diff --git a/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test b/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test
index f45fa5da9c5..9f1cf6351a0 100644
--- a/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test
+++ b/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test
@@ -1,12 +1,12 @@
# set session
SET @start_global_value = @@global.log_slow_verbosity;
+select @@global.log_slow_verbosity = @@session.log_slow_verbosity;
+SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity="";
#
# exists as global only
#
-select @@global.log_slow_verbosity;
-select @@session.log_slow_verbosity;
show global variables like 'log_slow_verbosity';
show session variables like 'log_slow_verbosity';
select * from information_schema.global_variables where variable_name='log_slow_verbosity';
diff --git a/mysql-test/suite/sys_vars/t/long_query_time_basic.test b/mysql-test/suite/sys_vars/t/long_query_time_basic.test
index 492ccfbc617..f3acdb61931 100644
--- a/mysql-test/suite/sys_vars/t/long_query_time_basic.test
+++ b/mysql-test/suite/sys_vars/t/long_query_time_basic.test
@@ -35,10 +35,7 @@
#############################################################
SET @start_global_value = @@global.long_query_time;
-SELECT @start_global_value;
SET @start_session_value = @@session.long_query_time;
-SELECT @start_session_value;
-
--echo '#--------------------FN_DYNVARS_068_01-------------------------#'
###############################################################
@@ -47,24 +44,11 @@ SELECT @start_session_value;
SET @@global.long_query_time = 100;
SET @@global.long_query_time = DEFAULT;
-SELECT @@global.long_query_time;
+SELECT @@global.long_query_time >= 0;
SET @@session.long_query_time = 200;
SET @@session.long_query_time = DEFAULT;
-SELECT @@session.long_query_time;
-
-
---echo '#--------------------FN_DYNVARS_068_02-------------------------#'
-###############################################################
-# Check the DEFAULT value of long_query_time #
-###############################################################
-
-SET @@global.long_query_time = DEFAULT;
-SELECT @@global.long_query_time = 10;
-
-SET @@session.long_query_time = DEFAULT;
-SELECT @@session.long_query_time = 10;
-
+SELECT @@session.long_query_time >= 0;
--echo '#--------------------FN_DYNVARS_068_03-------------------------#'
#########################################################################
@@ -197,12 +181,7 @@ SELECT long_query_time = @@session.long_query_time;
####################################
SET @@global.long_query_time = @start_global_value;
-SELECT @@global.long_query_time;
-SET @@session.long_query_time = @start_session_value;
-SELECT @@session.long_query_time;
-
####################################################
# END OF long_query_time TESTS #
####################################################
-
diff --git a/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test b/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
index ee25b6d8f5f..fda349fce41 100644
--- a/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
@@ -35,7 +35,6 @@
#############################################################
SET @start_global_value = @@global.max_allowed_packet;
-SELECT @start_global_value;
# give a known value to @@session.max_allowed_packet by assigning to
# @@global and setting up a new connection (for deterministic result
@@ -219,9 +218,6 @@ SELECT max_allowed_packet = @@session.max_allowed_packet;
connection default;
SET @@global.max_allowed_packet = @start_global_value;
-SELECT @@global.max_allowed_packet;
-SELECT @@session.max_allowed_packet;
-
#######################################################
# END OF max_allowed_packet TESTS #
diff --git a/mysql-test/suite/sys_vars/t/max_allowed_packet_func.test b/mysql-test/suite/sys_vars/t/max_allowed_packet_func.test
index 2ba3d552f6b..d60c10a1a33 100644
--- a/mysql-test/suite/sys_vars/t/max_allowed_packet_func.test
+++ b/mysql-test/suite/sys_vars/t/max_allowed_packet_func.test
@@ -50,11 +50,11 @@ name BLOB
--echo ## Setting value of max_allowed packet and net_buffer_length to 1024 ##
--error ER_VARIABLE_IS_READONLY
SET @@session.max_allowed_packet = 1024;
-SELECT @@session.max_allowed_packet;
+SELECT @@session.max_allowed_packet > 0;
--error ER_VARIABLE_IS_READONLY
SET @@session.net_buffer_length = 1024;
-SELECT @@session.net_buffer_length;
+SELECT @@session.net_buffer_length > 0;
--echo '#--------------------FN_DYNVARS_070_02-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test b/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test
index cc860e92fbb..654ccfd45b8 100644
--- a/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test
@@ -35,7 +35,7 @@
######################################################################
SET @start_value = @@global.max_connect_errors;
-SELECT @start_value;
+SELECT @start_value >= 0;
--echo '#--------------------FN_DYNVARS_073_01------------------------#'
@@ -45,7 +45,6 @@ SELECT @start_value;
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
-SELECT @@global.max_connect_errors;
--echo '#---------------------FN_DYNVARS_073_02-------------------------#'
###############################################
@@ -53,7 +52,7 @@ SELECT @@global.max_connect_errors;
###############################################
SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors = 10;
+SELECT @@global.max_connect_errors = @start_value;
--echo '#--------------------FN_DYNVARS_073_03------------------------#'
##################################################################
@@ -165,10 +164,7 @@ SELECT max_connect_errors = @@session.max_connect_errors;
##############################
SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors;
-
##################################################################
-# END OF max_connect_errors TESTS #
+# END OF max_connect_errors TESTS #
##################################################################
-
diff --git a/mysql-test/suite/sys_vars/t/max_connections_basic.test b/mysql-test/suite/sys_vars/t/max_connections_basic.test
index de259b32c17..b4f3afbf3b6 100644
--- a/mysql-test/suite/sys_vars/t/max_connections_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_connections_basic.test
@@ -35,7 +35,7 @@
###################################################################
SET @start_value = @@global.max_connections;
-SELECT @start_value;
+SELECT @start_value > 0;
--echo '#--------------------FN_DYNVARS_074_01------------------------#'
@@ -43,9 +43,9 @@ SELECT @start_value;
# Display the DEFAULT value of max_connections #
##################################################################
-SET @@global.max_connections = 5000;
+SET @@global.max_connections = @start_value+1;
SET @@global.max_connections = DEFAULT;
-SELECT @@global.max_connections;
+SELECT @@global.max_connections <> @start_value+1;
--echo '#---------------------FN_DYNVARS_074_02-------------------------#'
###############################################
@@ -53,7 +53,7 @@ SELECT @@global.max_connections;
###############################################
SET @@global.max_connections = @start_value;
-SELECT @@global.max_connections = 151;
+SELECT @@global.max_connections = @start_value;
--echo '#--------------------FN_DYNVARS_074_03------------------------#'
@@ -166,10 +166,8 @@ SELECT max_connections = @@session.max_connections;
##############################
SET @@global.max_connections = @start_value;
-SELECT @@global.max_connections;
##################################################################
# END OF max_connections TESTS #
##################################################################
-
diff --git a/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
index 5e4bcd9490d..26216814059 100644
--- a/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
@@ -35,9 +35,8 @@
#############################################################
SET @start_global_value = @@global.max_heap_table_size;
-SELECT @start_global_value;
SET @start_session_value = @@session.max_heap_table_size;
-SELECT @start_session_value;
+SELECT @start_session_value = @start_global_value;
--echo '#--------------------FN_DYNVARS_077_01-------------------------#'
@@ -47,23 +46,11 @@ SELECT @start_session_value;
SET @@global.max_heap_table_size = 1677721610;
SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size;
+SELECT @@global.max_heap_table_size > 0;
SET @@session.max_heap_table_size = 1677721610;
SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size;
-
-
---echo '#--------------------FN_DYNVARS_077_02-------------------------#'
-##################################################################
-# Check the DEFAULT value of max_heap_table_size #
-##################################################################
-
-SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size = 16777216;
-
-SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size = 16777216;
+SELECT @@session.max_heap_table_size > 0;
--echo '#--------------------FN_DYNVARS_077_03-------------------------#'
@@ -216,12 +203,8 @@ SELECT max_heap_table_size = @@session.max_heap_table_size;
####################################
SET @@global.max_heap_table_size = @start_global_value;
-SELECT @@global.max_heap_table_size;
-SET @@session.max_heap_table_size = @start_session_value;
-SELECT @@session.max_heap_table_size;
#######################################################
-# END OF max_heap_table_size TESTS #
+# END OF max_heap_table_size TESTS #
#######################################################
-
diff --git a/mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test b/mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test
index f648b23c0a3..0b85017983c 100644
--- a/mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test
+++ b/mysql-test/suite/sys_vars/t/max_seeks_for_key_func.test
@@ -1,5 +1,9 @@
# Test for max_seeks_for_key #
+--source include/default_optimizer_switch.inc
+set @@global.optimizer_switch=@@local.optimizer_switch;
+set @@global.join_cache_level=@@local.join_cache_level;
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -24,10 +28,6 @@ SET @start_value= @@global.max_seeks_for_key;
CONNECT (test_con1,localhost,root,,);
CONNECTION test_con1;
-# Value of session & global vairable here should be 10
-SELECT @@global.max_seeks_for_key = 10;
-SELECT @@session.max_seeks_for_key = 10;
-
# Setting global value of variable and inserting data in table
SET @@global.max_seeks_for_key = 20;
SELECT @@global.max_seeks_for_key;
@@ -97,3 +97,5 @@ disconnect test_con2;
DROP TABLE t1;
SET @@global.max_seeks_for_key= @start_value;
+SET @@global.optimizer_switch= @save_optimizer_switch;
+SET @@global.join_cache_level=  @save_join_cache_level;
diff --git a/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.opt b/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.opt
new file mode 100644
index 00000000000..a818d14b9ec
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.opt
@@ -0,0 +1 @@
+--myisam-recover-options=BACKUP,QUICK
diff --git a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test
index 1aa25fa2c8e..81ff81ae935 100644
--- a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test
@@ -35,10 +35,9 @@
#############################################################
SET @start_global_value = @@global.myisam_sort_buffer_size ;
-SELECT @start_global_value;
-SET @start_session_value = @@session.myisam_sort_buffer_size ;
-SELECT @start_session_value;
-
+SELECT @@session.myisam_sort_buffer_size = @@global.myisam_sort_buffer_size;
+SET @@global.myisam_sort_buffer_size= default;
+SET @default_myisam_sort_buffer_size= @@global.myisam_sort_buffer_size;
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
########################################################################
@@ -47,23 +46,11 @@ SELECT @start_session_value;
SET @@global.myisam_sort_buffer_size = 100;
SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size ;
+SELECT @@global.myisam_sort_buffer_size = @default_myisam_sort_buffer_size;
SET @@session.myisam_sort_buffer_size = 200;
SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size ;
-
-
---echo '#--------------------FN_DYNVARS_005_02-------------------------#'
-########################################################################
-# Check the DEFAULT value of myisam_sort_buffer_size #
-########################################################################
-
-SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size = 134216704;
-
-SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size = 134216704;
+SELECT @@session.myisam_sort_buffer_size = @default_myisam_sort_buffer_size;
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
@@ -95,9 +82,6 @@ SELECT @@session.myisam_sort_buffer_size ;
SET @@session.myisam_sort_buffer_size = 655345;
SELECT @@session.myisam_sort_buffer_size ;
-
-
-
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
####################################################################
# Change the value of myisam_sort_buffer_size to an invalid value #
@@ -236,12 +220,7 @@ SELECT myisam_sort_buffer_size = @@session.myisam_sort_buffer_size ;
####################################
SET @@global.myisam_sort_buffer_size = @start_global_value;
-SELECT @@global.myisam_sort_buffer_size ;
-SET @@session.myisam_sort_buffer_size = @start_session_value;
-SELECT @@session.myisam_sort_buffer_size ;
-
#############################################################
# END OF myisam_sort_buffer_size TESTS #
#############################################################
-
diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test b/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test
index 210910d7a86..ef9d8f17832 100644
--- a/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test
+++ b/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test
@@ -1,10 +1,10 @@
+--source include/default_optimizer_switch.inc
#
# 2010-01-20 OBN Added check for I_S values after variable value changed
#
-SET @start_global_value = @@global.optimizer_switch;
-SELECT @start_global_value;
+set @@global.optimizer_switch=@@optimizer_switch;
#
# exists as global and session
@@ -49,5 +49,4 @@ set session optimizer_switch="index_merge";
--error ER_WRONG_VALUE_FOR_VAR
set session optimizer_switch="foobar";
-SET @@global.optimizer_switch = @start_global_value;
-SELECT @@global.optimizer_switch;
+SET @@global.optimizer_switch = @save_optimizer_switch;
diff --git a/mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test b/mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test
index c409abd0d1b..1529db1a145 100644
--- a/mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test
+++ b/mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test
@@ -11,41 +11,13 @@
#############################################################
SET @start_global_value = @@global.optimizer_use_condition_selectivity;
-SELECT @start_global_value;
SET @start_session_value = @@session.optimizer_use_condition_selectivity;
-SELECT @start_session_value;
-
-
---echo '#--------------------FN_DYNVARS_115_01-------------------------#'
-#########################################################################
-# Display the DEFAULT value of optimizer_use_condition_selectivity #
-#########################################################################
-
-SET @@global.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@global.optimizer_use_condition_selectivity;
-
-SET @@session.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@session.optimizer_use_condition_selectivity;
-
-
---echo '#--------------------FN_DYNVARS_115_02-------------------------#'
-#########################################################################
-# Check the DEFAULT value of optimizer_use_condition_selectivity #
-#########################################################################
-
-SET @@global.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@global.optimizer_use_condition_selectivity = 1;
-
-SET @@session.optimizer_use_condition_selectivity = DEFAULT;
-SELECT @@session.optimizer_use_condition_selectivity = 1;
-
--echo '#--------------------FN_DYNVARS_115_03-------------------------#'
#############################################################################################
# Change the value of optimizer_use_condition_selectivity to a valid value for GLOBAL Scope #
#############################################################################################
-SELECT @@global.optimizer_use_condition_selectivity;
SET @@global.optimizer_use_condition_selectivity = 0;
SELECT @@global.optimizer_use_condition_selectivity;
SET @@global.optimizer_use_condition_selectivity = 1;
@@ -67,7 +39,6 @@ SELECT @@global.optimizer_use_condition_selectivity;
# Change the value of optimizer_use_condition_selectivity to a valid value for SESSION Scope#
#############################################################################################
-SELECT @@session.optimizer_use_condition_selectivity;
SET @@session.optimizer_use_condition_selectivity = 0;
SELECT @@session.optimizer_use_condition_selectivity;
SET @@session.optimizer_use_condition_selectivity = 1;
@@ -144,9 +115,6 @@ SELECT @@local.optimizer_use_condition_selectivity = @@session.optimizer_use_con
####################################
SET @@global.optimizer_use_condition_selectivity = @start_global_value;
-SELECT @@global.optimizer_use_condition_selectivity;
-SET @@session.optimizer_use_condition_selectivity = @start_session_value;
-SELECT @@session.optimizer_use_condition_selectivity;
########################################################################
# END OF optimizer_use_condition_selectivity TESTS #
diff --git a/mysql-test/suite/sys_vars/t/relay_log_basic.test b/mysql-test/suite/sys_vars/t/relay_log_basic.test
index 1ea60577556..c279c38fde0 100644
--- a/mysql-test/suite/sys_vars/t/relay_log_basic.test
+++ b/mysql-test/suite/sys_vars/t/relay_log_basic.test
@@ -1,13 +1,21 @@
--source include/not_embedded.inc
+
+let $MYSQLD_RELAY_LOG=`select @@global.relay_log`;
+
#
# only global
#
+--replace_result $MYSQLD_RELAY_LOG RELAY_LOG
select @@global.relay_log;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.relay_log;
+--replace_result $MYSQLD_RELAY_LOG RELAY_LOG
show global variables like 'relay_log';
+--replace_result $MYSQLD_RELAY_LOG RELAY_LOG
show session variables like 'relay_log';
+--replace_result $MYSQLD_RELAY_LOG RELAY_LOG
select * from information_schema.global_variables where variable_name='relay_log';
+--replace_result $MYSQLD_RELAY_LOG RELAY_LOG
select * from information_schema.session_variables where variable_name='relay_log';
#
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
index 69ca5f21f62..87a3e671b95 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
@@ -43,7 +43,7 @@ SET @start_value = @@global.slow_query_log_file;
###############################################
SET @@global.slow_query_log_file = DEFAULT;
-SELECT @@global.slow_query_log_file;
+SELECT length(@@global.slow_query_log_file) > 0;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sync_binlog_basic.test b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
index 5b7c5f37191..4b5cc379fbf 100644
--- a/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
+++ b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
@@ -36,27 +36,6 @@
##################################################################
SET @start_value = @@global.sync_binlog;
-SELECT @start_value;
-
-
---echo '#--------------------FN_DYNVARS_168_01------------------------#'
-##################################################################
-# Display the DEFAULT value of sync_binlog #
-##################################################################
-
-SET @@global.sync_binlog = 99;
-SET @@global.sync_binlog = DEFAULT;
-SELECT @@global.sync_binlog;
-
-
---echo '#---------------------FN_DYNVARS_168_02-------------------------#'
-###############################################
-# Verify default value of variable #
-###############################################
-
-SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog = 0;
-
--echo '#--------------------FN_DYNVARS_168_03------------------------#'
###################################################################
@@ -121,8 +100,6 @@ SELECT @@global.sync_binlog = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='sync_binlog';
-
-
--echo '#---------------------FN_DYNVARS_168_07----------------------#'
##########################################################################
# Check if sync_binlog can be accessed with and without @@ sign #
@@ -144,9 +121,7 @@ SELECT sync_binlog = @@session.sync_binlog;
##############################
SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog;
-
########################################################################
-# END OF sync_binlog TESTS #
+# END OF sync_binlog TESTS #
########################################################################
diff --git a/mysql-test/suite/sys_vars/t/sysvars_aria.test b/mysql-test/suite/sys_vars/t/sysvars_aria.test
index 67fb0baa4f1..b01e39eebf5 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_aria.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_aria.test
@@ -3,6 +3,6 @@
--source include/word_size.inc
--vertical_results
-select * from information_schema.system_variables
+select VARIABLE_NAME, SESSION_VALUE, DEFAULT_VALUE, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT from information_schema.system_variables
where variable_name like 'aria%'
order by variable_name;
diff --git a/mysql-test/suite/sys_vars/t/sysvars_debug.test b/mysql-test/suite/sys_vars/t/sysvars_debug.test
index 71d396e2df3..fbdcbd683df 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_debug.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_debug.test
@@ -4,5 +4,4 @@
--vertical_results
select * from information_schema.system_variables
where variable_name like 'debug%'
- or variable_name = 'in_predicate_conversion_threshold'
order by variable_name;
diff --git a/mysql-test/suite/sys_vars/t/sysvars_innodb.test b/mysql-test/suite/sys_vars/t/sysvars_innodb.test
index c573c5592b2..ef52ee3264a 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_innodb.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_innodb.test
@@ -5,7 +5,7 @@
--vertical_results
--replace_regex /^\/\S+/PATH/ /\.\//PATH/
-select * from information_schema.system_variables
+select VARIABLE_NAME, SESSION_VALUE, DEFAULT_VALUE, VARIABLE_SCOPE, VARIABLE_TYPE, VARIABLE_COMMENT, NUMERIC_MIN_VALUE, NUMERIC_MAX_VALUE, NUMERIC_BLOCK_SIZE, ENUM_VALUE_LIST, READ_ONLY, COMMAND_LINE_ARGUMENT from information_schema.system_variables
where variable_name like 'innodb%' and
variable_name not in (
'innodb_version', # always the same as the server version
diff --git a/mysql-test/suite/sys_vars/t/sysvars_server_embedded.opt b/mysql-test/suite/sys_vars/t/sysvars_server_embedded.opt
deleted file mode 100644
index c3f0d3bd51f..00000000000
--- a/mysql-test/suite/sys_vars/t/sysvars_server_embedded.opt
+++ /dev/null
@@ -1 +0,0 @@
---table_open_cache=100
diff --git a/mysql-test/suite/sys_vars/t/sysvars_server_notembedded.opt b/mysql-test/suite/sys_vars/t/sysvars_server_notembedded.opt
deleted file mode 100644
index c3f0d3bd51f..00000000000
--- a/mysql-test/suite/sys_vars/t/sysvars_server_notembedded.opt
+++ /dev/null
@@ -1 +0,0 @@
---table_open_cache=100
diff --git a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
index d7a6ff25a0b..c887608b00f 100644
--- a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
@@ -1,27 +1,27 @@
-############## mysql-test\t\table_definition_cache_basic.test ##################
-# #
-# Variable Name: table_definition_cache #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
-# Data Type: Numeric #
-# Default Value: 400 #
-# Range: 1 - 524288 #
-# #
-# #
-# Creation Date: 2008-03-16 #
-# Author: Salman Rawala #
-# #
-# Description: Test Cases of Dynamic System Variable "table_definition_cache" #
-# that checks behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity . #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html#option_mysqld_table_definition_cache #
-# #
-################################################################################
+############## mysql-test\t\table_definition_cache_basic.test #################
+# #
+# Variable Name: table_definition_cache #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 400 #
+# Range: 1 - 524288 #
+# #
+# #
+# Creation Date: 2008-03-16 #
+# Author: Salman Rawala #
+# #
+# Description: Test Cases of Dynamic System Variable "table_definition_cache" #
+# that checks behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity . #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html#option_mysqld_table_definition_cache #
+# #
+###############################################################################
--source include/load_sysvars.inc
@@ -34,7 +34,6 @@
##############################################################################
SET @start_value = @@global.table_definition_cache;
-SELECT @start_value;
--echo '#--------------------FN_DYNVARS_019_01------------------------#'
#######################################################################
@@ -43,16 +42,7 @@ SELECT @start_value;
SET @@global.table_definition_cache = 100;
SET @@global.table_definition_cache = DEFAULT;
-SELECT @@global.table_definition_cache;
-
-
---echo '#---------------------FN_DYNVARS_019_02-------------------------#'
-###############################################
-# Verify default value of variable #
-###############################################
-
-SET @@global.table_definition_cache = DEFAULT;
-SELECT @@global.table_definition_cache = 400;
+SELECT @@global.table_definition_cache > 0;
--echo '#--------------------FN_DYNVARS_019_03------------------------#'
@@ -147,10 +137,7 @@ SELECT table_definition_cache = @@session.table_definition_cache;
##############################
SET @@global.table_definition_cache = @start_value;
-SELECT @@global.table_definition_cache;
-
################################################################
# END OF table_definition_cache TESTS #
################################################################
-
diff --git a/mysql-test/suite/sys_vars/t/userstat_basic.test b/mysql-test/suite/sys_vars/t/userstat_basic.test
index 55aa98c90c7..cd227b7c507 100644
--- a/mysql-test/suite/sys_vars/t/userstat_basic.test
+++ b/mysql-test/suite/sys_vars/t/userstat_basic.test
@@ -1,13 +1,14 @@
# bool global
SET @start_global_value = @@global.userstat;
-
#
# exists as global only
#
-select @@global.userstat;
+select @@global.userstat = 0 or @@global.userstat = 1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.userstat;
+
+SET @@global.userstat=0;
show global variables like 'userstat';
show session variables like 'userstat';
select * from information_schema.global_variables where variable_name='userstat';
diff --git a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
index f19c0f6d63f..8be139471f1 100644
--- a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
+++ b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
@@ -235,7 +235,7 @@ CREATE TABLE t1 (
b CHAR(10) NULL DEFAULT NULL,
c blob NULL DEFAULT NULL,
blob_a blob GENERATED ALWAYS AS (a) VIRTUAL,
- blob_b blob GENERATED ALWAYS AS (b) VIRTUAL,
+ blob_b blob GENERATED ALWAYS AS (RTRIM(b)) VIRTUAL,
blob_c blob GENERATED ALWAYS AS (c) VIRTUAL,
key (a),
key (blob_a(10)),
diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result
index 5a1caaeb5eb..fe235228698 100644
--- a/mysql-test/suite/vcol/r/update.result
+++ b/mysql-test/suite/vcol/r/update.result
@@ -8,13 +8,13 @@ select * from t1;
a b c
2 3 4
drop table t1;
-create table t1 (a int, c int as(a), p varchar(20) as(y), y char(20), index (p,c));
+create table t1 (a int, c int as(a), p varchar(20) as(rtrim(y)), y char(20), index (p,c));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL,
- `p` varchar(20) GENERATED ALWAYS AS (`y`) VIRTUAL,
+ `p` varchar(20) GENERATED ALWAYS AS (rtrim(`y`)) VIRTUAL,
`y` char(20) DEFAULT NULL,
KEY `p` (`p`,`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/vcol/r/update_binlog.result b/mysql-test/suite/vcol/r/update_binlog.result
index 828452bf084..822381a1944 100644
--- a/mysql-test/suite/vcol/r/update_binlog.result
+++ b/mysql-test/suite/vcol/r/update_binlog.result
@@ -10,13 +10,13 @@ select * from t1;
a b c
2 3 4
drop table t1;
-create table t1 (a int, c int as(a), p varchar(20) as(y), y char(20), index (p,c));
+create table t1 (a int, c int as(a), p varchar(20) as(rtrim(y)), y char(20), index (p,c));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL,
- `p` varchar(20) GENERATED ALWAYS AS (`y`) VIRTUAL,
+ `p` varchar(20) GENERATED ALWAYS AS (rtrim(`y`)) VIRTUAL,
`y` char(20) DEFAULT NULL,
KEY `p` (`p`,`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -190,13 +190,13 @@ select * from t1;
a b c
2 3 4
drop table t1;
-create table t1 (a int, c int as(a), p varchar(20) as(y), y char(20), index (p,c));
+create table t1 (a int, c int as(a), p varchar(20) as(rtrim(y)), y char(20), index (p,c));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL,
- `p` varchar(20) GENERATED ALWAYS AS (`y`) VIRTUAL,
+ `p` varchar(20) GENERATED ALWAYS AS (rtrim(`y`)) VIRTUAL,
`y` char(20) DEFAULT NULL,
KEY `p` (`p`,`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode.result b/mysql-test/suite/vcol/r/vcol_sql_mode.result
new file mode 100644
index 00000000000..b1f5387507d
--- /dev/null
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode.result
@@ -0,0 +1,434 @@
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH
+#
+#
+# PAD_CHAR_TO_FULL_LENGTH + various virtual column data types
+#
+CREATE TABLE t1 (a CHAR(5), v CHAR(5) AS (a) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` char(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v INT AS (a) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v));
+DROP TABLE t1;
+CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v));
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100)));
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rtrim(`a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (RTRIM(a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` text GENERATED ALWAYS AS (rtrim(`a`)) VIRTUAL,
+ KEY `v` (`v`(100))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (trim(trailing ' ' from `a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` text GENERATED ALWAYS AS (trim(trailing ' ' from `a`)) VIRTUAL,
+ KEY `v` (`v`(100))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (trim(both ' ' from `a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` text GENERATED ALWAYS AS (trim(both ' ' from `a`)) VIRTUAL,
+ KEY `v` (`v`(100))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING NULL FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (trim(trailing NULL from `a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH NULL FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (trim(both NULL from `a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+# PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100)));
+ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (
+a CHAR(5),
+v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (
+a CHAR(5),
+v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a)
+CREATE TABLE t1 (
+a CHAR(5),
+b CHAR(5),
+v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100)));
+ERROR HY000: Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,5,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rpad(`a`,5,' ')) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,6,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rpad(`a`,6,' ')) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,6,NULL)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rpad(`a`,6,NULL)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,NULL,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rpad(`a`,NULL,' ')) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+# PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (
+a CHAR(5),
+b CHAR(5),
+v VARCHAR(5) AS (RPAD(a,NULL,b)) VIRTUAL,
+KEY(v)
+);
+ERROR HY000: Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + comparison
+CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a` = 'a') VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (
+a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin,
+v INT AS (a='a') VIRTUAL, KEY(v)
+);
+ERROR HY000: Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + LIKE
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a%') VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a` like 'a%') VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE NULL) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a` like NULL) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v));
+ERROR HY000: Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency
+CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v));
+ERROR HY000: Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+#
+# Testing NO_UNSIGNED_SUBTRACTION
+#
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c INT GENERATED ALWAYS AS (a-b) VIRTUAL,
+KEY (c)
+);
+ERROR HY000: Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-b) VIRTUAL,
+KEY (c)
+);
+ERROR HY000: Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c INT GENERATED ALWAYS AS (a-CAST(b AS SIGNED)) VIRTUAL,
+KEY (c)
+);
+ERROR HY000: Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-CAST(b AS SIGNED)) VIRTUAL,
+KEY (c)
+);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(10) unsigned DEFAULT NULL,
+ `b` int(10) unsigned DEFAULT NULL,
+ `c` int(11) GENERATED ALWAYS AS (cast(`a` as signed) - cast(`b` as signed)) VIRTUAL,
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c INT GENERATED ALWAYS AS (CAST(a AS DECIMAL(20,0))-CAST(b AS DECIMAL(20,0))) VIRTUAL,
+KEY (c)
+);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(10) unsigned DEFAULT NULL,
+ `b` int(10) unsigned DEFAULT NULL,
+ `c` int(11) GENERATED ALWAYS AS (cast(`a` as decimal(20,0)) - cast(`b` as decimal(20,0))) VIRTUAL,
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# Comnination: PAD_CHAR_TO_FULL_LENGTH + NO_UNSIGNED_SUBTRACTION
+#
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c CHAR(5),
+v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,a-b,' ')) VIRTUAL,
+KEY (v)
+);
+ERROR HY000: Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c CHAR(5),
+v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,CAST(a AS DECIMAL(20,1))-b,' ')) VIRTUAL,
+KEY (v)
+);
+ERROR HY000: Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# ALTER TABLE ADD KEY(vcol_depending_on_sql_mode) --> error
+CREATE TABLE t1 (
+a INT UNSIGNED,
+b INT UNSIGNED,
+c CHAR(5),
+v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL
+);
+ALTER TABLE t1 ADD KEY(v);
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE INDEX v ON t1 (v);
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+DROP TABLE t1;
+# A virtual column on the second position in an index - cannot depend on sql_mode
+CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100)));
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+# A persisten virtual column cannot depend on sql_mode
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT);
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rtrim(`a`)) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
new file mode 100644
index 00000000000..d3954770c7b
--- /dev/null
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
@@ -0,0 +1,336 @@
+call mtr.add_suppression("Table rebuild required");
+#
+# Opening a Maria-10.2.26 table with a stored VARCHAR column
+#
+# Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+FLUSH TABLES;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+FLUSH TABLES;
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+FLUSH TABLES;
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t2 LIKE t1;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+FLUSH TABLES;
+CREATE TABLE t2 LIKE t1;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 ADD b INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+FLUSH TABLES;
+ALTER TABLE t1 ADD c INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+DROP TABLE t1;
+#
+# Fixing a Maria-10.2.26 table with a stored VARCHAR column
+#
+# Fixing by dropping the generated stored column
+# Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+ALTER TABLE t1 DROP v;
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SELECT * FROM t1;
+a
+1
+2
+3
+DROP TABLE t1;
+# Fixing by altering the generation expression of the stored column
+# Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 MODIFY v VARCHAR(5) AS (RTRIM(a)) PERSISTENT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rtrim(`a`)) STORED
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# Opening a Maria-10.2.26 table with a virtual VARCHAR column
+#
+# Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+FLUSH TABLES;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+FLUSH TABLES;
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+FLUSH TABLES;
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+CREATE TABLE t2 LIKE t1;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+FLUSH TABLES;
+CREATE TABLE t2 LIKE t1;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 ADD b INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+FLUSH TABLES;
+ALTER TABLE t1 ADD c INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+DROP TABLE t1;
+#
+# Fixing a Maria-10.2.26 table with a virtual VARCHAR column
+#
+# Fixing by dropping the virtual column
+# Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 DROP v;
+SELECT * FROM t1;
+a
+1
+2
+3
+DROP TABLE t1;
+# Fixing by dropping a key on a virtual column, using ALTER TABLE
+# Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 DROP KEY v;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+DROP TABLE t1;
+# Fixing by dropping a key on a virtual column, using DROP INDEX
+# Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+DROP INDEX v ON t1;
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+DROP TABLE t1;
+# Fixing by altering the generation expression of a virtual column
+# Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 MODIFY v VARCHAR(5) AS(RTRIM(a)) VIRTUAL;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rtrim(`a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+a v
+1 1
+2 2
+3 3
+CREATE TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` char(5) DEFAULT NULL,
+ `v` varchar(5) GENERATED ALWAYS AS (rtrim(`a`)) VIRTUAL,
+ KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# Upgrading a Maria-10.2.26 table with a stored column
+#
+# Copying maria100226_char_to_varchar.* to MYSQLD_DATADIR
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check Warning Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+test.t1 check Warning Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+test.t1 check status OK
+FLUSH TABLES;
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check Warning Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+test.t1 check Warning Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+test.t1 check status OK
+DROP TABLE t1;
+#
+# Upgrading a Maria-10.2.26 table with a virtual column
+#
+# Copying maria100226_char_to_varchar.* to MYSQLD_DATADIR
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check Warning Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+test.t1 check Warning Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+test.t1 check status OK
+FLUSH TABLES;
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check Warning Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+test.t1 check Warning Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
index de5447e49eb..403515482f0 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
@@ -232,7 +232,7 @@ a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
c blob NULL DEFAULT NULL,
blob_a blob GENERATED ALWAYS AS (a) VIRTUAL,
-blob_b blob GENERATED ALWAYS AS (b) VIRTUAL,
+blob_b blob GENERATED ALWAYS AS (RTRIM(b)) VIRTUAL,
blob_c blob GENERATED ALWAYS AS (c) VIRTUAL,
key (a),
key (blob_a(10)),
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
index f5c87838ec9..de605bf8722 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
@@ -232,7 +232,7 @@ a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
c blob NULL DEFAULT NULL,
blob_a blob GENERATED ALWAYS AS (a) VIRTUAL,
-blob_b blob GENERATED ALWAYS AS (b) VIRTUAL,
+blob_b blob GENERATED ALWAYS AS (RTRIM(b)) VIRTUAL,
blob_c blob GENERATED ALWAYS AS (c) VIRTUAL,
key (a),
key (blob_a(10)),
diff --git a/mysql-test/suite/vcol/t/cross_db.test b/mysql-test/suite/vcol/t/cross_db.test
index 6804c459b84..5a8ee547e57 100644
--- a/mysql-test/suite/vcol/t/cross_db.test
+++ b/mysql-test/suite/vcol/t/cross_db.test
@@ -1,6 +1,9 @@
+--source include/default_charset.inc
+
#
# MDEV-13209 Cross-database operation with virtual columns fails
#
+
create database mysqltest1;
create table mysqltest1.t1 (i int, j int as (i) persistent);
show create table mysqltest1.t1;
diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test
index e1351986968..6065f926bff 100644
--- a/mysql-test/suite/vcol/t/update.test
+++ b/mysql-test/suite/vcol/t/update.test
@@ -14,7 +14,7 @@ drop table t1;
# one keypart is virtual, the other keypart is updated
# this tests TABLE::mark_columns_needed_for_update()
#
-create table t1 (a int, c int as(a), p varchar(20) as(y), y char(20), index (p,c));
+create table t1 (a int, c int as(a), p varchar(20) as(rtrim(y)), y char(20), index (p,c));
show create table t1;
insert into t1 (a,y) values(1, "yyy");
update t1 set a = 100 where a = 1;
diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test
index 314aecb75b9..8b85d04bfb5 100644
--- a/mysql-test/suite/vcol/t/vcol_select_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test
@@ -22,6 +22,7 @@
#------------------------------------------------------------------------------#
# Cleanup
+--source include/default_optimizer_switch.inc
--source suite/vcol/inc/vcol_cleanup.inc
#------------------------------------------------------------------------------#
diff --git a/mysql-test/suite/vcol/t/vcol_select_myisam.test b/mysql-test/suite/vcol/t/vcol_select_myisam.test
index 2570526af71..d60288d45ed 100644
--- a/mysql-test/suite/vcol/t/vcol_select_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_select_myisam.test
@@ -1,18 +1,18 @@
-################################################################################
-# t/vcol_select.test #
-# #
-# Purpose: #
-# Testing different SELECTs. #
-# #
-# MyISAM branch #
-# #
-#------------------------------------------------------------------------------#
-# Original Author: Andrey Zhakov #
-# Original Date: 2008-09-18 #
-# Change Author: #
-# Change Date: #
-# Change: #
-################################################################################
+###############################################################################
+# t/vcol_select.test #
+# #
+# Purpose: #
+# Testing different SELECTs. #
+# #
+# MyISAM branch #
+# #
+#-----------------------------------------------------------------------------#
+# Original Author: Andrey Zhakov #
+# Original Date: 2008-09-18 #
+# Change Author: #
+# Change Date: #
+# Change: #
+###############################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
@@ -20,15 +20,16 @@
# THE SOURCED FILES ONLY.
#
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# Cleanup
+--source include/default_optimizer_switch.inc
--source suite/vcol/inc/vcol_cleanup.inc
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# General not engine specific settings and requirements
--source suite/vcol/inc/vcol_init_vars.pre
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
@@ -38,14 +39,14 @@ eval SET @@session.storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/vcol/inc/vcol_select.inc
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# Execute storage engine specific tests
-#------------------------------------------------------------------------------#
+#-----------------------------------------------------------------------------#
# Cleanup
--source suite/vcol/inc/vcol_cleanup.inc
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode.test b/mysql-test/suite/vcol/t/vcol_sql_mode.test
new file mode 100644
index 00000000000..e4cc6d21718
--- /dev/null
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode.test
@@ -0,0 +1,322 @@
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH
+--echo #
+
+--echo #
+--echo # PAD_CHAR_TO_FULL_LENGTH + various virtual column data types
+--echo #
+
+CREATE TABLE t1 (a CHAR(5), v CHAR(5) AS (a) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v INT AS (a) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v));
+DROP TABLE t1;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100)));
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (RTRIM(a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v(100)));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING NULL FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH NULL FROM a)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100)));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+# more than one space
+CREATE TABLE t1 (
+ a CHAR(5),
+ v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+# more than one space
+CREATE TABLE t1 (
+ a CHAR(5),
+ v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a)
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a CHAR(5),
+ b CHAR(5),
+ v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100)));
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,5,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,6,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,6,NULL)) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,NULL,' ')) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a CHAR(5),
+ b CHAR(5),
+ v VARCHAR(5) AS (RPAD(a,NULL,b)) VIRTUAL,
+ KEY(v)
+);
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + comparison
+
+CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin,
+ v INT AS (a='a') VIRTUAL, KEY(v)
+);
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + LIKE
+
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a%') VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE NULL) VIRTUAL, KEY(v));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+
+--echo # PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v));
+SHOW WARNINGS;
+
+
+--echo #
+--echo # Testing NO_UNSIGNED_SUBTRACTION
+--echo #
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c INT GENERATED ALWAYS AS (a-b) VIRTUAL,
+ KEY (c)
+);
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-b) VIRTUAL,
+ KEY (c)
+);
+SHOW WARNINGS;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c INT GENERATED ALWAYS AS (a-CAST(b AS SIGNED)) VIRTUAL,
+ KEY (c)
+);
+SHOW WARNINGS;
+
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-CAST(b AS SIGNED)) VIRTUAL,
+ KEY (c)
+);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+# 'CAST(signed AS DECIMAL)' does not copy 'unsigned_flag' from the argument.
+# So the below is safe.
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c INT GENERATED ALWAYS AS (CAST(a AS DECIMAL(20,0))-CAST(b AS DECIMAL(20,0))) VIRTUAL,
+ KEY (c)
+);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Comnination: PAD_CHAR_TO_FULL_LENGTH + NO_UNSIGNED_SUBTRACTION
+--echo #
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c CHAR(5),
+ v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,a-b,' ')) VIRTUAL,
+ KEY (v)
+);
+SHOW WARNINGS;
+
+
+# The below solves the dependency on NO_UNSIGNED_SUBTRACTION
+# but does not solve the dependency on PAD_CHAR_TO_FULL_LENGTH,
+# because the 'length' argument to RPAD() is not a constant.
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c CHAR(5),
+ v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,CAST(a AS DECIMAL(20,1))-b,' ')) VIRTUAL,
+ KEY (v)
+);
+SHOW WARNINGS;
+
+
+
+--echo # ALTER TABLE ADD KEY(vcol_depending_on_sql_mode) --> error
+
+# This makes sure that QT_ITEM_IDENT_SKIP_DB_NAMES and
+# QT_ITEM_IDENT_SKIP_TABLE_NAMES are passed to print()
+# to avoid temporary table names like `test`.`#sql-50a6_4`.`c`
+# in the error message.
+#
+
+CREATE TABLE t1 (
+ a INT UNSIGNED,
+ b INT UNSIGNED,
+ c CHAR(5),
+ v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL
+);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t1 ADD KEY(v);
+SHOW WARNINGS;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE INDEX v ON t1 (v);
+SHOW WARNINGS;
+DROP TABLE t1;
+
+
+--echo # A virtual column on the second position in an index - cannot depend on sql_mode
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100)));
+SHOW WARNINGS;
+
+
+--echo # A persisten virtual column cannot depend on sql_mode
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT);
+SHOW WARNINGS;
+
+CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test
new file mode 100644
index 00000000000..71e34231ac1
--- /dev/null
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test
@@ -0,0 +1,193 @@
+-- source include/mysql_upgrade_preparation.inc
+call mtr.add_suppression("Table rebuild required");
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--enable_prepare_warnings
+
+--echo #
+--echo # Opening a Maria-10.2.26 table with a stored VARCHAR column
+--echo #
+
+--echo # Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t1;
+FLUSH TABLES;
+SHOW CREATE TABLE t1;
+
+FLUSH TABLES;
+SELECT * FROM t1;
+SELECT * FROM t1;
+FLUSH TABLES;
+SELECT * FROM t1;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t2 LIKE t1;
+FLUSH TABLES;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t2 LIKE t1;
+
+SHOW CREATE TABLE t1;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t1 ADD b INT DEFAULT a;
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+FLUSH TABLES;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t1 ADD c INT DEFAULT a;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Fixing a Maria-10.2.26 table with a stored VARCHAR column
+--echo #
+
+--echo # Fixing by dropping the generated stored column
+--echo # Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+ALTER TABLE t1 DROP v;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo # Fixing by altering the generation expression of the stored column
+--echo # Copying maria100226_char_to_vchar_stored.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 MODIFY v VARCHAR(5) AS (RTRIM(a)) PERSISTENT;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
+
+--echo #
+--echo # Opening a Maria-10.2.26 table with a virtual VARCHAR column
+--echo #
+
+--echo # Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t1;
+FLUSH TABLES;
+SHOW CREATE TABLE t1;
+
+FLUSH TABLES;
+SELECT * FROM t1;
+SELECT * FROM t1;
+FLUSH TABLES;
+SELECT * FROM t1;
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t2 LIKE t1;
+FLUSH TABLES;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t2 LIKE t1;
+
+
+SHOW CREATE TABLE t1;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t1 ADD b INT DEFAULT a;
+FLUSH TABLES;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t1 ADD c INT DEFAULT a;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Fixing a Maria-10.2.26 table with a virtual VARCHAR column
+--echo #
+
+--echo # Fixing by dropping the virtual column
+--echo # Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 DROP v;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo # Fixing by dropping a key on a virtual column, using ALTER TABLE
+--echo # Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 DROP KEY v;
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo # Fixing by dropping a key on a virtual column, using DROP INDEX
+--echo # Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+DROP INDEX v ON t1;
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo # Fixing by altering the generation expression of a virtual column
+--echo # Copying maria100226_char_to_vchar_virtual.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 MODIFY v VARCHAR(5) AS(RTRIM(a)) VIRTUAL;
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+CREATE TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Upgrading a Maria-10.2.26 table with a stored column
+--echo #
+
+--echo # Copying maria100226_char_to_varchar.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_stored.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+CHECK TABLE t1 FOR UPGRADE;
+FLUSH TABLES;
+CHECK TABLE t1 FOR UPGRADE;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Upgrading a Maria-10.2.26 table with a virtual column
+--echo #
+
+--echo # Copying maria100226_char_to_varchar.* to MYSQLD_DATADIR
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/vcol_upgrade/maria100226_char_to_vchar_virtual.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+CHECK TABLE t1 FOR UPGRADE;
+FLUSH TABLES;
+CHECK TABLE t1 FOR UPGRADE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/versioning/common.inc b/mysql-test/suite/versioning/common.inc
index 355b571e5a0..39abccd7ecd 100644
--- a/mysql-test/suite/versioning/common.inc
+++ b/mysql-test/suite/versioning/common.inc
@@ -4,6 +4,8 @@ if (!$TEST_VERSIONING_SO)
--skip needs test_versioning plugin
}
source include/have_innodb.inc;
+create database test2 character set latin1;
+use test2;
set @@session.time_zone='+00:00';
select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry;
diff --git a/mysql-test/suite/versioning/common_finish.inc b/mysql-test/suite/versioning/common_finish.inc
index 6e568013827..90a305078c8 100644
--- a/mysql-test/suite/versioning/common_finish.inc
+++ b/mysql-test/suite/versioning/common_finish.inc
@@ -1,6 +1,11 @@
--disable_query_log
-drop procedure verify_trt;
-drop procedure verify_trt_dummy;
-drop function current_row;
-drop function check_row;
+--disable_warnings
+drop procedure if exists verify_trt;
+drop procedure if exists verify_trt_dummy;
+drop function if exists current_row;
+drop function if exists check_row;
+--enable_warnings
+
+use test;
+drop database test2;
--enable_query_log
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index 51a0e7c5beb..e380c207555 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -18,13 +18,13 @@ t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t add column y int;
-ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
+ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
alter table t add primary key (a);
-ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
+ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
alter table t add unique key (a);
-ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
+ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
alter table t engine innodb;
-ERROR HY000: Not allowed for system-versioned `test`.`t`. Change to/from native system versioning engine is not supported.
+ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change to/from native system versioning engine is not supported.
alter table t drop system versioning;
show create table t;
Table Create Table
@@ -544,6 +544,7 @@ alter table t add check (a > 0);
insert into t values (0);
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t`
insert into t values (2);
+drop table t;
#
# MDEV-18869 Assertion `!((field)->vcol_info && (field)->stored_in_db())' failed in innodb_col_no upon altering table with system versioning
#
@@ -640,5 +641,4 @@ alter table t1 add f2 int with system versioning, drop system versioning;
create or replace table t1 (f1 int) with system versioning;
alter table t1 drop system versioning, add f2 int with system versioning;
ERROR HY000: Table `t1` is not system-versioned
-drop database test;
-create database test;
+drop table t1;
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result
index 4b4354e169d..47d069fc4ef 100644
--- a/mysql-test/suite/versioning/r/create.result
+++ b/mysql-test/suite/versioning/r/create.result
@@ -15,7 +15,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
select table_catalog,table_schema,table_name,table_type,version,table_rows,data_free,auto_increment,check_time,table_collation,checksum,create_options,table_comment from information_schema.tables where table_name='t1';
table_catalog def
-table_schema test
+table_schema test2
table_name t1
table_type SYSTEM VERSIONED
version 10
@@ -29,7 +29,7 @@ create_options
table_comment
select table_catalog,table_schema,table_name,column_name,ordinal_position,column_default,character_maximum_length,character_octet_length,character_set_name,collation_name,column_key,extra,column_comment,is_generated,generation_expression from information_schema.columns where table_name='t1';
table_catalog def
-table_schema test
+table_schema test2
table_name t1
column_name x1
ordinal_position 1
@@ -44,7 +44,7 @@ column_comment
is_generated NEVER
generation_expression NULL
table_catalog def
-table_schema test
+table_schema test2
table_name t1
column_name Sys_start
ordinal_position 2
@@ -59,7 +59,7 @@ column_comment start
is_generated ALWAYS
generation_expression ROW START
table_catalog def
-table_schema test
+table_schema test2
table_name t1
column_name Sys_end
ordinal_position 3
@@ -235,7 +235,7 @@ tt1 CREATE TABLE `tt1` (
drop table tt1;
create temporary table tt1 like t1;
Warnings:
-Warning 1105 System versioning is stripped from temporary `test.tt1`
+Warning 1105 System versioning is stripped from temporary `test2.tt1`
# Temporary is stripped from versioning
show create table tt1;
Table Create Table
@@ -527,5 +527,3 @@ row_end datetime(6) generated always as row end,
period for system_time(row_start, row_end)
) with system versioning;
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t`
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/delete.result b/mysql-test/suite/versioning/r/delete.result
index faf8bf6176f..cfce8aa3069 100644
--- a/mysql-test/suite/versioning/r/delete.result
+++ b/mysql-test/suite/versioning/r/delete.result
@@ -115,5 +115,3 @@ select x from t1 for system_time all;
x
2
1
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result
index 30e65de5316..91942510417 100644
--- a/mysql-test/suite/versioning/r/foreign.result
+++ b/mysql-test/suite/versioning/r/foreign.result
@@ -16,13 +16,13 @@ on update restrict
insert into parent values(1);
insert into child values(1);
delete from parent where id = 1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
delete from child where parent_id = 1;
delete from parent where id = 1;
insert into parent values(1);
insert into child values(1);
update parent set id=id+1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
delete from child;
update parent set id=id+1;
select * from child for system_time all;
@@ -47,7 +47,7 @@ foreign key(parent_id) references parent(id)
insert into parent values(1);
insert into child values(1);
delete from parent where id = 1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
drop table child;
drop table parent;
################
@@ -195,19 +195,19 @@ foreign key(parent_id) references parent(id)
insert into parent values(1);
insert into child values(1);
delete from parent;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
update parent set id=2;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
delete from child;
delete from parent;
insert into child values(1);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
insert into parent values(1);
insert into child values(1);
delete from parent;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
update parent set id=2;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`))
drop table child;
drop table parent;
###################
@@ -233,7 +233,7 @@ foreign key (v_cola) references a (v_cola);
insert into a(cola) values (12);
insert into b(cola, v_cola) values (10,2);
delete from a;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`b`, CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`))
drop table b, a;
###############################################
# CASCADE UPDATE foreign not system versioned #
@@ -298,7 +298,7 @@ SET FOREIGN_KEY_CHECKS= OFF;
INSERT IGNORE INTO t2 VALUES (1);
SET FOREIGN_KEY_CHECKS= ON;
UPDATE t2 SET f2= 2;
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`))
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test2`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`))
DELETE FROM t2;
DROP TABLE t2, t1;
#
diff --git a/mysql-test/suite/versioning/r/online.result b/mysql-test/suite/versioning/r/online.result
index 36251ddd550..33ace87d440 100644
--- a/mysql-test/suite/versioning/r/online.result
+++ b/mysql-test/suite/versioning/r/online.result
@@ -90,13 +90,13 @@ period for system_time(row_start, row_end)
insert into t values (1, 1);
select c.prtype from information_schema.innodb_sys_columns as c
join information_schema.innodb_sys_tables as t on c.table_id=t.table_id
-where t.name='test/t' and c.name='b';
+where t.name='test2/t' and c.name='b';
prtype
50179
set @@system_versioning_alter_history=keep;
select c.prtype from information_schema.innodb_sys_columns as c
join information_schema.innodb_sys_tables as t on c.table_id=t.table_id
-where t.name='test/t' and c.name='b';
+where t.name='test2/t' and c.name='b';
prtype
50179
show create table t;
@@ -115,6 +115,7 @@ update t set b=11;
select count(*) from t for system_time all;
count(*)
2
+drop table t;
# Start of 10.4 tests
create or replace table t (a int, b int) engine=innodb;
alter table t
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index aa651452108..a28b4377945 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -46,7 +46,7 @@ period for system_time(row_start, row_end))
engine=DEFAULT_ENGINE
with system versioning partition by hash(i);
alter table t1 engine=NON_DEFAULT_ENGINE;
-ERROR HY000: Not allowed for system-versioned `test`.`t1`. Change to/from native system versioning engine is not supported.
+ERROR HY000: Not allowed for system-versioned `test2`.`t1`. Change to/from native system versioning engine is not supported.
## CREATE TABLE
create or replace table t1 (x int)
partition by system_time (
@@ -266,11 +266,11 @@ x
6
insert into t1 values (7), (8);
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions
### warn about full partition
delete from t1;
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions
select * from t1 partition (p1) order by x;
x
4
@@ -441,16 +441,16 @@ create or replace table t1 (i int) with system versioning
partition by system_time interval 1 hour (
partition p0 history, partition pn current);
set @ts=(select partition_description from information_schema.partitions
-where table_schema='test' and table_name='t1' and partition_name='p0');
+where table_schema='test2' and table_name='t1' and partition_name='p0');
alter table t1 add column b int;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
p0 1 SYSTEM_TIME 00:00:00.000000
pn 2 SYSTEM_TIME NULL
Warnings:
Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 add partition (partition p1 history, partition p2 history);
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
p0 1 SYSTEM_TIME 00:00:00.000000
p1 2 SYSTEM_TIME 01:00:00.000000
@@ -459,7 +459,7 @@ pn 4 SYSTEM_TIME NULL
Warnings:
Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 drop partition p0;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
p1 1 SYSTEM_TIME 01:00:00.000000
p2 2 SYSTEM_TIME 02:00:00.000000
@@ -468,7 +468,7 @@ Warnings:
Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 drop partition p2;
ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
p1 1 SYSTEM_TIME 01:00:00.000000
p2 2 SYSTEM_TIME 02:00:00.000000
@@ -564,7 +564,7 @@ insert into t1 values (0), (1), (2), (3);
delete from t1 where x < 3;
delete from t1;
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions
unlock tables;
#
# MDEV-20336 Assertion bitmap_is_set(read_partitions) upon SELECT FOR UPDATE from versioned table
@@ -573,6 +573,3 @@ create or replace table t1 (pk int primary key) with system versioning partition
execute immediate 'select * from t1 for update';
pk
drop table t1;
-# Test cleanup
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/partition_innodb.result b/mysql-test/suite/versioning/r/partition_innodb.result
index ad6075b7aa5..554303bcee3 100644
--- a/mysql-test/suite/versioning/r/partition_innodb.result
+++ b/mysql-test/suite/versioning/r/partition_innodb.result
@@ -64,6 +64,3 @@ partition by range columns (a, row_start) (
partition p1 values less than (100, 100)
);
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
-# Test cleanup
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/replace.result b/mysql-test/suite/versioning/r/replace.result
index 4173432ff45..e5dcf61678e 100644
--- a/mysql-test/suite/versioning/r/replace.result
+++ b/mysql-test/suite/versioning/r/replace.result
@@ -46,5 +46,3 @@ INSERT INTO t1 () VALUES (),(),(),(),(),();
UPDATE IGNORE t1 SET f = 1;
REPLACE t1 SELECT * FROM t1;
DROP TABLE t1;
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index 3569268ce1d..f1ef954baa6 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -155,21 +155,21 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
-Note 1003 select `test`.`t1`.`x` AS `IJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` FOR SYSTEM_TIME ALL where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
+Note 1003 select `test2`.`t1`.`x` AS `IJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t1` FOR SYSTEM_TIME ALL join `test2`.`t2` FOR SYSTEM_TIME ALL where `test2`.`t1`.`x` = `test2`.`t2`.`x` and `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0` and `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0`
explain extended select * from (select t1.x as LJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
-Note 1003 select `test`.`t1`.`x` AS `LJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL left join `test`.`t2` FOR SYSTEM_TIME ALL on(`test`.`t2`.`x` = `test`.`t1`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`) where `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`
+Note 1003 select `test2`.`t1`.`x` AS `LJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t1` FOR SYSTEM_TIME ALL left join `test2`.`t2` FOR SYSTEM_TIME ALL on(`test2`.`t2`.`x` = `test2`.`t1`.`x` and `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0`) where `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0`
explain extended select * from (select t1.x as RJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
-Note 1003 select `test`.`t1`.`x` AS `RJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t2` FOR SYSTEM_TIME ALL left join `test`.`t1` FOR SYSTEM_TIME ALL on(`test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`) where `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`
+Note 1003 select `test2`.`t1`.`x` AS `RJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t2` FOR SYSTEM_TIME ALL left join `test2`.`t1` FOR SYSTEM_TIME ALL on(`test2`.`t1`.`x` = `test2`.`t2`.`x` and `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0`) where `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0`
select * from (select t1.x as IJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
IJ2_x1 y1 x2 y2
@@ -330,7 +330,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
Warnings:
-Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a` from `test`.`t1` FOR SYSTEM_TIME ALL left join (`test`.`t1` FOR SYSTEM_TIME ALL `t2` left join `test`.`t1` FOR SYSTEM_TIME ALL `t3` on(`test`.`t3`.`a` = `test`.`t2`.`a` and `test`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test`.`t1`.`a` > 1) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
+Note 1003 select `test2`.`t1`.`a` AS `a`,`test2`.`t2`.`a` AS `a` from `test2`.`t1` FOR SYSTEM_TIME ALL left join (`test2`.`t1` FOR SYSTEM_TIME ALL `t2` left join `test2`.`t1` FOR SYSTEM_TIME ALL `t3` on(`test2`.`t3`.`a` = `test2`.`t2`.`a` and `test2`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test2`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test2`.`t1`.`a` > 1) where `test2`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
a a
2 1
@@ -549,7 +549,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
Warnings:
-Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` left join (`test`.`t3` left join `test`.`t4` FOR SYSTEM_TIME ALL on(`test`.`t4`.`f4` = `test`.`t2`.`f2` and `test`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t3`.`f3` = `test`.`t2`.`f2`) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
+Note 1003 select `test2`.`t1`.`f1` AS `f1` from `test2`.`t1` FOR SYSTEM_TIME ALL join `test2`.`t2` left join (`test2`.`t3` left join `test2`.`t4` FOR SYSTEM_TIME ALL on(`test2`.`t4`.`f4` = `test2`.`t2`.`f2` and `test2`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test2`.`t3`.`f3` = `test2`.`t2`.`f2`) where `test2`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
drop view v1;
drop table t1, t2, t3, t4;
#
diff --git a/mysql-test/suite/versioning/r/truncate.result b/mysql-test/suite/versioning/r/truncate.result
index 88d38b18e1a..ad682f5e041 100644
--- a/mysql-test/suite/versioning/r/truncate.result
+++ b/mysql-test/suite/versioning/r/truncate.result
@@ -93,7 +93,7 @@ drop view v;
create or replace table t (i int);
create or replace view v as select * from t;
drop table v;
-ERROR 42S02: 'test.v' is a view
+ERROR 42S02: 'test2.v' is a view
lock table v write;
delete history from v before system_time now(6);
ERROR 42S02: 'v' is a view
@@ -153,5 +153,3 @@ select * from t1;
a
1
drop table t1;
-drop database test;
-create database test;
diff --git a/mysql-test/suite/versioning/r/update-big.result b/mysql-test/suite/versioning/r/update-big.result
index 89297fe5d89..5accf0a0b56 100644
--- a/mysql-test/suite/versioning/r/update-big.result
+++ b/mysql-test/suite/versioning/r/update-big.result
@@ -12,7 +12,7 @@ insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
-connect con1,localhost,root,,test;
+connect con1,localhost,root,,test2;
alter table t1 add system versioning;
connection default;
update t1 set a= 7 where a = 3;
diff --git a/mysql-test/suite/versioning/r/view.result b/mysql-test/suite/versioning/r/view.result
index ff033a16877..e897f0e17d9 100644
--- a/mysql-test/suite/versioning/r/view.result
+++ b/mysql-test/suite/versioning/r/view.result
@@ -118,9 +118,9 @@ execute stmt;
a
execute stmt;
a
-drop database test;
-create database test;
-use test;
+drop database test2;
+create database test2;
+use test2;
#
# MDEV-15146 SQLError[4122]: View is not system versioned
#
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 2874cda51cb..b7e623b2897 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -1,3 +1,6 @@
+--source include/default_charset.inc
+--source suite/versioning/common.inc
+
select @@system_versioning_alter_history;
create table t(
@@ -156,7 +159,6 @@ alter table t modify a int with system versioning;
show create table t;
# TODO: move TRX_ID cases to separate test
--- source suite/versioning/common.inc
create or replace table t(
a int
) engine=innodb;
@@ -468,6 +470,7 @@ alter table t add check (a > 0);
--error ER_CONSTRAINT_FAILED
insert into t values (0);
insert into t values (2);
+drop table t;
--echo #
--echo # MDEV-18869 Assertion `!((field)->vcol_info && (field)->stored_in_db())' failed in innodb_col_no upon altering table with system versioning
@@ -538,5 +541,5 @@ create or replace table t1 (f1 int) with system versioning;
--error ER_VERS_NOT_VERSIONED
alter table t1 drop system versioning, add f2 int with system versioning;
-drop database test;
-create database test;
+drop table t1;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test
index 21548c557c7..64858bbe0ec 100644
--- a/mysql-test/suite/versioning/t/create.test
+++ b/mysql-test/suite/versioning/t/create.test
@@ -395,6 +395,4 @@ create table t (
period for system_time(row_start, row_end)
) with system versioning;
-
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/cte.test b/mysql-test/suite/versioning/t/cte.test
index 0055b2100d3..5a8fb1f8211 100644
--- a/mysql-test/suite/versioning/t/cte.test
+++ b/mysql-test/suite/versioning/t/cte.test
@@ -1,4 +1,6 @@
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_optimizer_switch.inc
+
set time_zone="+00:00";
set default_storage_engine=innodb;
create or replace table dept (
diff --git a/mysql-test/suite/versioning/t/delete.test b/mysql-test/suite/versioning/t/delete.test
index 4c2f4daccd7..01c8ba438ab 100644
--- a/mysql-test/suite/versioning/t/delete.test
+++ b/mysql-test/suite/versioning/t/delete.test
@@ -82,5 +82,4 @@ update t1 set x= 2;
delete from t1;
select x from t1 for system_time all;
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/derived.test b/mysql-test/suite/versioning/t/derived.test
index 9784a4a0d2f..9d96856f01f 100644
--- a/mysql-test/suite/versioning/t/derived.test
+++ b/mysql-test/suite/versioning/t/derived.test
@@ -1,3 +1,5 @@
+--source include/default_optimizer_switch.inc
+
create table emp
(
emp_id int,
diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test
index ddff3945259..305a1e49813 100644
--- a/mysql-test/suite/versioning/t/foreign.test
+++ b/mysql-test/suite/versioning/t/foreign.test
@@ -406,8 +406,8 @@ REPLACE INTO t2 SELECT * FROM t2;
# Cleanup
DROP TABLE t1, t2;
--let $datadir= `select @@datadir`
---remove_file $datadir/test/t1.data
---remove_file $datadir/test/t1.data.2
---remove_file $datadir/test/t2.data
+--remove_file $datadir/test2/t1.data
+--remove_file $datadir/test2/t1.data.2
+--remove_file $datadir/test2/t2.data
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/online.test b/mysql-test/suite/versioning/t/online.test
index 02fde474d55..f38af7c2706 100644
--- a/mysql-test/suite/versioning/t/online.test
+++ b/mysql-test/suite/versioning/t/online.test
@@ -107,7 +107,7 @@ insert into t values (1, 1);
select c.prtype from information_schema.innodb_sys_columns as c
join information_schema.innodb_sys_tables as t on c.table_id=t.table_id
- where t.name='test/t' and c.name='b';
+ where t.name='test2/t' and c.name='b';
set @@system_versioning_alter_history=keep;
@@ -125,7 +125,7 @@ set debug_dbug= default;
select c.prtype from information_schema.innodb_sys_columns as c
join information_schema.innodb_sys_tables as t on c.table_id=t.table_id
- where t.name='test/t' and c.name='b';
+ where t.name='test2/t' and c.name='b';
--replace_result $sys_datatype_expl SYS_DATATYPE
show create table t;
@@ -133,6 +133,7 @@ show create table t;
select count(*) from t for system_time all;
update t set b=11;
select count(*) from t for system_time all;
+drop table t;
--echo # Start of 10.4 tests
@@ -194,3 +195,5 @@ alter table t1 drop system versioning;
drop database test;
create database test;
+
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 73df539d965..eaf4f97a242 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -393,17 +393,17 @@ partition by system_time interval 1 hour (
partition p0 history, partition pn current);
set @ts=(select partition_description from information_schema.partitions
- where table_schema='test' and table_name='t1' and partition_name='p0');
+ where table_schema='test2' and table_name='t1' and partition_name='p0');
alter table t1 add column b int;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
alter table t1 add partition (partition p1 history, partition p2 history);
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
alter table t1 drop partition p0;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
--error ER_VERS_DROP_PARTITION_INTERVAL
alter table t1 drop partition p2;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1';
--echo #
--echo # MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
@@ -506,6 +506,4 @@ create or replace table t1 (pk int primary key) with system versioning partition
execute immediate 'select * from t1 for update';
drop table t1;
---echo # Test cleanup
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition_innodb.test b/mysql-test/suite/versioning/t/partition_innodb.test
index d7527ff7410..bf995bbb11d 100644
--- a/mysql-test/suite/versioning/t/partition_innodb.test
+++ b/mysql-test/suite/versioning/t/partition_innodb.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_partition.inc
+--source suite/versioning/common.inc
--echo # MDEV-15951 system versioning by trx id doesn't work with partitioning
--echo # currently trx_id does not support partitioning by system_time
@@ -74,6 +75,4 @@ partition by range columns (a, row_start) (
partition p1 values less than (100, 100)
);
---echo # Test cleanup
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/replace.test b/mysql-test/suite/versioning/t/replace.test
index 391cd2a12fc..22d32ff3795 100644
--- a/mysql-test/suite/versioning/t/replace.test
+++ b/mysql-test/suite/versioning/t/replace.test
@@ -52,6 +52,4 @@ UPDATE IGNORE t1 SET f = 1;
REPLACE t1 SELECT * FROM t1;
DROP TABLE t1;
-
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index ebe4503401d..c4c1d703ce5 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -1,5 +1,6 @@
--source suite/versioning/engines.inc
--source suite/versioning/common.inc
+--source include/default_optimizer_switch.inc
# test_01
diff --git a/mysql-test/suite/versioning/t/truncate.test b/mysql-test/suite/versioning/t/truncate.test
index b21956cc68f..89b49fe735d 100644
--- a/mysql-test/suite/versioning/t/truncate.test
+++ b/mysql-test/suite/versioning/t/truncate.test
@@ -169,5 +169,4 @@ insert into t1 values (1);
select * from t1;
drop table t1;
-drop database test;
-create database test;
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test
index f98c21fb26a..943d9182a8a 100644
--- a/mysql-test/suite/versioning/t/trx_id.test
+++ b/mysql-test/suite/versioning/t/trx_id.test
@@ -2,7 +2,8 @@ if (!$TEST_VERSIONING_SO)
{
--skip needs test_versioning plugin
}
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
set default_storage_engine= innodb;
diff --git a/mysql-test/suite/versioning/t/update-big.test b/mysql-test/suite/versioning/t/update-big.test
index 175bfc79a48..f5a72b22454 100644
--- a/mysql-test/suite/versioning/t/update-big.test
+++ b/mysql-test/suite/versioning/t/update-big.test
@@ -17,7 +17,7 @@ insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
---connect (con1,localhost,root,,test)
+--connect (con1,localhost,root,,test2)
alter table t1 add system versioning;
--connection default
diff --git a/mysql-test/suite/versioning/t/view.test b/mysql-test/suite/versioning/t/view.test
index 68ee54d3df5..d824f1c52c0 100644
--- a/mysql-test/suite/versioning/t/view.test
+++ b/mysql-test/suite/versioning/t/view.test
@@ -98,9 +98,9 @@ create or replace table t2 (b int) with system versioning;
prepare stmt from 'select a from v1 inner join t2 group by a order by a';
execute stmt;
execute stmt;
-drop database test;
-create database test;
-use test;
+drop database test2;
+create database test2;
+use test2;
--echo #
--echo # MDEV-15146 SQLError[4122]: View is not system versioned
@@ -124,3 +124,5 @@ show create view v1;
drop view v1;
drop table t1;
+
+--source suite/versioning/common_finish.inc
diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c
index c2aeb40daf0..ce8a9ca786f 100644
--- a/mysys/my_getsystime.c
+++ b/mysys/my_getsystime.c
@@ -89,6 +89,8 @@ my_hrtime_t my_hrtime()
while (gettimeofday(&t, NULL) != 0) {}
hrtime.val= t.tv_sec*1000000ULL + t.tv_usec;
#endif
+ DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;);
+ DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;);
return hrtime;
}
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index d8ca18b86e1..ba5daf05365 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -135,7 +135,7 @@ SET (SQL_SOURCE
rpl_gtid.cc rpl_parallel.cc
semisync.cc semisync_master.cc semisync_slave.cc
semisync_master_ack_receiver.cc
- sql_type.cc sql_type_json.cc
+ sql_type.cc sql_mode.cc sql_type_json.cc
sql_type_geom.cc
item_windowfunc.cc sql_window.cc
sql_cte.cc
diff --git a/sql/field.cc b/sql/field.cc
index be97ceeb227..1ab02f61e46 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1382,6 +1382,46 @@ error:
}
+void Field::error_generated_column_function_is_not_allowed(THD *thd,
+ bool error) const
+{
+ StringBuffer<64> tmp;
+ vcol_info->expr->print(&tmp, (enum_query_type)
+ (QT_TO_SYSTEM_CHARSET |
+ QT_ITEM_IDENT_SKIP_DB_NAMES |
+ QT_ITEM_IDENT_SKIP_TABLE_NAMES));
+ my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED,
+ MYF(error ? 0 : ME_WARNING),
+ tmp.c_ptr(), vcol_info->get_vcol_type_name(),
+ const_cast<const char*>(field_name.str));
+}
+
+
+/*
+ Check if an indexed or a persistent virtual column depends on sql_mode flags
+ that it cannot handle.
+ See sql_mode.h for details.
+*/
+bool Field::check_vcol_sql_mode_dependency(THD *thd, vcol_init_mode mode) const
+{
+ DBUG_ASSERT(vcol_info);
+ if ((flags & PART_KEY_FLAG) != 0 || stored_in_db())
+ {
+ Sql_mode_dependency dep=
+ vcol_info->expr->value_depends_on_sql_mode() &
+ Sql_mode_dependency(~0, ~can_handle_sql_mode_dependency_on_store());
+ if (dep)
+ {
+ bool error= (mode & VCOL_INIT_DEPENDENCY_FAILURE_IS_ERROR) != 0;
+ error_generated_column_function_is_not_allowed(thd, error);
+ dep.push_dependency_warnings(thd);
+ return error;
+ }
+ }
+ return false;
+}
+
+
bool Field::make_empty_rec_store_default_value(THD *thd, Item *item)
{
DBUG_ASSERT(!(flags & BLOB_FLAG));
@@ -1426,6 +1466,12 @@ void Field_num::prepend_zeros(String *value) const
}
+sql_mode_t Field_num::can_handle_sql_mode_dependency_on_store() const
+{
+ return MODE_PAD_CHAR_TO_FULL_LENGTH;
+}
+
+
Item *Field_num::get_equal_zerofill_const_item(THD *thd, const Context &ctx,
Item *const_item)
{
@@ -5583,6 +5629,12 @@ bool Field_timestampf::val_native(Native *to)
/*************************************************************/
+sql_mode_t Field_temporal::can_handle_sql_mode_dependency_on_store() const
+{
+ return MODE_PAD_CHAR_TO_FULL_LENGTH;
+}
+
+
bool Field_temporal::is_equal(const Column_definition &new_field) const
{
return new_field.type_handler() == type_handler() &&
@@ -7189,6 +7241,18 @@ longlong Field_string::val_int(void)
}
+sql_mode_t Field_string::value_depends_on_sql_mode() const
+{
+ return has_charset() ? MODE_PAD_CHAR_TO_FULL_LENGTH : sql_mode_t(0);
+};
+
+
+sql_mode_t Field_string::can_handle_sql_mode_dependency_on_store() const
+{
+ return has_charset() ? MODE_PAD_CHAR_TO_FULL_LENGTH : sql_mode_t(0);
+}
+
+
String *Field_string::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
@@ -8817,6 +8881,12 @@ longlong Field_blob_compressed::val_int(void)
** If one uses this string in a number context one gets the type number.
****************************************************************************/
+sql_mode_t Field_enum::can_handle_sql_mode_dependency_on_store() const
+{
+ return MODE_PAD_CHAR_TO_FULL_LENGTH;
+}
+
+
enum ha_base_keytype Field_enum::key_type() const
{
switch (packlength) {
@@ -10877,33 +10947,6 @@ key_map Field::get_possible_keys()
}
-/**
- Mark the field as having an explicit default value.
-
- @param value if available, the value that the field is being set to
-
- @note
- Fields that have an explicit default value should not be updated
- automatically via the DEFAULT or ON UPDATE functions. The functions
- that deal with data change functionality (INSERT/UPDATE/LOAD),
- determine if there is an explicit value for each field before performing
- the data change, and call this method to mark the field.
-
- If the 'value' parameter is NULL, then the field is marked unconditionally
- as having an explicit value. If 'value' is not NULL, then it can be further
- analyzed to check if it really should count as a value.
-*/
-
-bool Field::set_explicit_default(Item *value)
-{
- if (value->type() == Item::DEFAULT_VALUE_ITEM &&
- !((Item_default_value*)value)->arg)
- return false;
- set_has_explicit_value();
- return true;
-}
-
-
bool Field::validate_value_in_record_with_warn(THD *thd, const uchar *record)
{
my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
diff --git a/sql/field.h b/sql/field.h
index 5ae8838c303..bc413865e7e 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -645,6 +645,8 @@ protected:
val_str(&result);
return to->store(result.ptr(), result.length(), charset());
}
+ void error_generated_column_function_is_not_allowed(THD *thd, bool error)
+ const;
static void do_field_int(Copy_field *copy);
static void do_field_real(Copy_field *copy);
static void do_field_string(Copy_field *copy);
@@ -1037,7 +1039,6 @@ public:
{
bitmap_clear_bit(&table->has_value_set, field_index);
}
- bool set_explicit_default(Item *value);
virtual my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const
{ DBUG_ASSERT(0); return 0; }
@@ -1046,14 +1047,6 @@ public:
return get_timestamp(ptr, sec_part);
}
- /**
- Evaluates the @c UPDATE default function, if one exists, and stores the
- result in the record buffer. If no such function exists for the column,
- or the function is not valid for the column's data type, invoking this
- function has no effect.
- */
- virtual int evaluate_update_default_function() { return 0; }
-
virtual bool binary() const { return 1; }
virtual bool zero_pack() const { return 1; }
virtual enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
@@ -1266,6 +1259,16 @@ public:
}
bool stored_in_db() const { return !vcol_info || vcol_info->stored_in_db; }
+ bool check_vcol_sql_mode_dependency(THD *, vcol_init_mode mode) const;
+
+ virtual sql_mode_t value_depends_on_sql_mode() const
+ {
+ return 0;
+ }
+ virtual sql_mode_t can_handle_sql_mode_dependency_on_store() const
+ {
+ return 0;
+ }
inline THD *get_thd() const
{ return likely(table) ? table->in_use : current_thd; }
@@ -1832,6 +1835,7 @@ public:
{
return DTCollation_numeric::singleton();
}
+ sql_mode_t can_handle_sql_mode_dependency_on_store() const;
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item)
{
return (flags & ZEROFILL_FLAG) ?
@@ -2805,6 +2809,7 @@ public:
{
return store(str, length, &my_charset_bin);
}
+ sql_mode_t can_handle_sql_mode_dependency_on_store() const;
Copy_func *get_copy_func(const Field *from) const;
int save_in_field(Field *to)
{
@@ -2933,13 +2938,6 @@ public:
void sql_type(String &str) const;
bool zero_pack() const { return 0; }
int set_time();
- int evaluate_update_default_function()
- {
- int res= 0;
- if (has_update_default_function())
- res= set_time();
- return res;
- }
/* Get TIMESTAMP field value as seconds since begging of Unix Epoch */
my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const;
my_time_t get_timestamp(ulong *sec_part) const
@@ -3462,13 +3460,6 @@ public:
bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_datetime::get_TIME(ltime, ptr, fuzzydate); }
int set_time();
- int evaluate_update_default_function()
- {
- int res= 0;
- if (has_update_default_function())
- res= set_time();
- return res;
- }
uchar *pack(uchar* to, const uchar *from,
uint max_length __attribute__((unused)))
{
@@ -3732,6 +3723,8 @@ public:
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
virtual uint get_key_image(uchar *buff,uint length, imagetype type);
+ sql_mode_t value_depends_on_sql_mode() const;
+ sql_mode_t can_handle_sql_mode_dependency_on_store() const;
void print_key_value(String *out, uint32 length);
private:
int save_field_metadata(uchar *first_byte);
@@ -4285,6 +4278,7 @@ public:
Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
const Type_handler *type_handler() const { return &type_handler_enum; }
enum ha_base_keytype key_type() const;
+ sql_mode_t can_handle_sql_mode_dependency_on_store() const;
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param &param) const;
diff --git a/sql/handler.h b/sql/handler.h
index 63d0bf2215c..4f66aed3b6f 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -835,9 +835,9 @@ struct xid_t {
char data[XIDDATASIZE]; // not \0-terminated !
xid_t() {} /* Remove gcc warning */
- bool eq(struct xid_t *xid)
+ bool eq(struct xid_t *xid) const
{ return !xid->is_null() && eq(xid->gtrid_length, xid->bqual_length, xid->data); }
- bool eq(long g, long b, const char *d)
+ bool eq(long g, long b, const char *d) const
{ return !is_null() && g == gtrid_length && b == bqual_length && !memcmp(d, data, g+b); }
void set(struct xid_t *xid)
{ memcpy(this, xid, xid->length()); }
diff --git a/sql/item.cc b/sql/item.cc
index 7d1c71901f2..dbfe63fc403 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -9310,8 +9310,6 @@ int Item_default_value::save_in_field(Field *field_arg, bool no_conversions)
return Item_field::save_in_field(field_arg, no_conversions);
}
- if (field_arg->default_value && field_arg->default_value->flags)
- return 0; // defaut fields will be set later, no need to do it twice
return field_arg->save_in_field_default_value(context->error_processor ==
&view_error_processor);
}
@@ -9558,7 +9556,7 @@ bool Item_trigger_field::set_value(THD *thd, sp_rcontext * /*ctx*/, Item **it)
int err_code= item->save_in_field(field, 0);
field->table->copy_blobs= copy_blobs_saved;
- field->set_explicit_default(item);
+ field->set_has_explicit_value();
return err_code < 0;
}
diff --git a/sql/item.h b/sql/item.h
index b9a0287482e..f26ca6493d0 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1499,6 +1499,32 @@ public:
}
longlong val_int_from_str(int *error);
+ /*
+ Returns true if this item can be calculated during
+ value_depends_on_sql_mode()
+ */
+ bool value_depends_on_sql_mode_const_item()
+ {
+ /*
+ Currently we use value_depends_on_sql_mode() only for virtual
+ column expressions. They should not contain any expensive items.
+ If we ever get a crash on the assert below, it means
+ check_vcol_func_processor() is badly implemented for this item.
+ */
+ DBUG_ASSERT(!is_expensive());
+ /*
+ It should return const_item() actually.
+ But for some reasons Item_field::const_item() returns true
+ at value_depends_on_sql_mode() call time.
+ This should be checked and fixed.
+ */
+ return basic_const_item();
+ }
+ virtual Sql_mode_dependency value_depends_on_sql_mode() const
+ {
+ return Sql_mode_dependency();
+ }
+
int save_time_in_field(Field *field, bool no_conversions);
int save_date_in_field(Field *field, bool no_conversions);
int save_str_in_field(Field *field, bool no_conversions);
@@ -2599,6 +2625,7 @@ public:
inline Item **arguments() const { return args; }
inline uint argument_count() const { return arg_count; }
inline void remove_arguments() { arg_count=0; }
+ Sql_mode_dependency value_depends_on_sql_mode_bit_or() const;
};
@@ -3351,6 +3378,10 @@ public:
{
return MONOTONIC_STRICT_INCREASING;
}
+ Sql_mode_dependency value_depends_on_sql_mode() const
+ {
+ return Sql_mode_dependency(0, field->value_depends_on_sql_mode());
+ }
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool get_date_result(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate);
@@ -5041,6 +5072,10 @@ public:
bool const_item() const { return const_item_cache; }
table_map used_tables() const { return used_tables_cache; }
Item* build_clone(THD *thd);
+ Sql_mode_dependency value_depends_on_sql_mode() const
+ {
+ return Item_args::value_depends_on_sql_mode_bit_or().soft_to_hard();
+ }
};
class sp_head;
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 4f950c0fefe..71bf5f431a6 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -425,6 +425,23 @@ bool Item_func::setup_args_and_comparator(THD *thd, Arg_comparator *cmp)
}
+/*
+ Comparison operators remove arguments' dependency on PAD_CHAR_TO_FULL_LENGTH
+ in case of PAD SPACE comparison collations: trailing spaces do not affect
+ the comparison result for such collations.
+*/
+Sql_mode_dependency
+Item_bool_rowready_func2::value_depends_on_sql_mode() const
+{
+ if (compare_collation()->state & MY_CS_NOPAD)
+ return Item_func::value_depends_on_sql_mode();
+ return ((args[0]->value_depends_on_sql_mode() |
+ args[1]->value_depends_on_sql_mode()) &
+ Sql_mode_dependency(~0, ~MODE_PAD_CHAR_TO_FULL_LENGTH)).
+ soft_to_hard();
+}
+
+
bool Item_bool_rowready_func2::fix_length_and_dec()
{
max_length= 1; // Function returns 0 or 1
@@ -5618,6 +5635,29 @@ bool Item_func_like::with_sargable_pattern() const
}
+/*
+ subject LIKE pattern
+ removes subject's dependency on PAD_CHAR_TO_FULL_LENGTH
+ if pattern ends with the '%' wildcard.
+*/
+Sql_mode_dependency Item_func_like::value_depends_on_sql_mode() const
+{
+ if (!args[1]->value_depends_on_sql_mode_const_item())
+ return Item_func::value_depends_on_sql_mode();
+ StringBuffer<64> patternbuf;
+ String *pattern= args[1]->val_str_ascii(&patternbuf);
+ if (!pattern || !pattern->length())
+ return Sql_mode_dependency(); // Will return NULL or 0
+ DBUG_ASSERT(pattern->charset()->mbminlen == 1);
+ if (pattern->ptr()[pattern->length() - 1] != '%')
+ return Item_func::value_depends_on_sql_mode();
+ return ((args[0]->value_depends_on_sql_mode() |
+ args[1]->value_depends_on_sql_mode()) &
+ Sql_mode_dependency(~0, ~MODE_PAD_CHAR_TO_FULL_LENGTH)).
+ soft_to_hard();
+}
+
+
SEL_TREE *Item_func_like::get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr)
{
MEM_ROOT *tmp_root= param->mem_root;
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index a311c32c5a6..ffe17f8a0bc 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -518,6 +518,7 @@ public:
Item_bool_rowready_func2(THD *thd, Item *a, Item *b):
Item_bool_func2_with_rev(thd, a, b), cmp(tmp_arg, tmp_arg + 1)
{ }
+ Sql_mode_dependency value_depends_on_sql_mode() const;
void print(String *str, enum_query_type query_type)
{
Item_func::print_op(str, query_type);
@@ -2700,6 +2701,7 @@ public:
bool get_negated() const { return negated; } // Used by ColumnStore
+ Sql_mode_dependency value_depends_on_sql_mode() const;
longlong val_int();
enum Functype functype() const { return LIKE_FUNC; }
void print(String *str, enum_query_type query_type);
diff --git a/sql/item_func.cc b/sql/item_func.cc
index eaf6113e10e..88f36cf1e98 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -581,6 +581,15 @@ void Item_args::propagate_equal_fields(THD *thd,
}
+Sql_mode_dependency Item_args::value_depends_on_sql_mode_bit_or() const
+{
+ Sql_mode_dependency res;
+ for (uint i= 0; i < arg_count; i++)
+ res|= args[i]->value_depends_on_sql_mode();
+ return res;
+}
+
+
/**
See comments in Item_cond::split_sum_func()
*/
@@ -1226,6 +1235,13 @@ bool Item_func_minus::fix_length_and_dec()
if (Item_func_minus::type_handler()->Item_func_minus_fix_length_and_dec(this))
DBUG_RETURN(TRUE);
DBUG_PRINT("info", ("Type: %s", type_handler()->name().ptr()));
+ m_sql_mode_dependency= Item_func::value_depends_on_sql_mode();
+ if (unsigned_flag)
+ {
+ m_sql_mode_dependency|= Sql_mode_dependency(0,MODE_NO_UNSIGNED_SUBTRACTION);
+ if (current_thd->variables.sql_mode & MODE_NO_UNSIGNED_SUBTRACTION)
+ unsigned_flag= false;
+ }
DBUG_RETURN(FALSE);
}
diff --git a/sql/item_func.h b/sql/item_func.h
index f1212033b6c..a48e1895a5f 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1342,11 +1342,16 @@ public:
class Item_func_minus :public Item_func_additive_op
{
+ Sql_mode_dependency m_sql_mode_dependency;
public:
Item_func_minus(THD *thd, Item *a, Item *b):
Item_func_additive_op(thd, a, b) {}
const char *func_name() const { return "-"; }
enum precedence precedence() const { return ADD_PRECEDENCE; }
+ Sql_mode_dependency value_depends_on_sql_mode() const
+ {
+ return m_sql_mode_dependency;
+ }
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 234d36b36fe..bf571473211 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2172,6 +2172,41 @@ void Item_func_trim::print(String *str, enum_query_type query_type)
}
+/*
+ RTRIM(expr)
+ TRIM(TRAILING ' ' FROM expr)
+ remove argument's soft dependency on PAD_CHAR_TO_FULL_LENGTH:
+*/
+Sql_mode_dependency Item_func_trim::value_depends_on_sql_mode() const
+{
+ DBUG_ASSERT(fixed);
+ if (arg_count == 1) // RTRIM(expr)
+ return (args[0]->value_depends_on_sql_mode() &
+ Sql_mode_dependency(~0, ~MODE_PAD_CHAR_TO_FULL_LENGTH)).
+ soft_to_hard();
+ // TRIM(... FROM expr)
+ DBUG_ASSERT(arg_count == 2);
+ if (!args[1]->value_depends_on_sql_mode_const_item())
+ return Item_func::value_depends_on_sql_mode();
+ StringBuffer<64> trimstrbuf;
+ String *trimstr= args[1]->val_str(&trimstrbuf);
+ if (!trimstr)
+ return Sql_mode_dependency(); // will return NULL
+ if (trimstr->length() == 0)
+ return Item_func::value_depends_on_sql_mode(); // will trim nothing
+ if (trimstr->lengthsp() != 0)
+ return Item_func::value_depends_on_sql_mode(); // will trim not only spaces
+ if (trimstr->length() > trimstr->charset()->mbminlen ||
+ trimstr->numchars() > 1)
+ return Item_func::value_depends_on_sql_mode(); // more than one space
+ // TRIM(TRAILING ' ' FROM expr)
+ return ((args[0]->value_depends_on_sql_mode() |
+ args[1]->value_depends_on_sql_mode()) &
+ Sql_mode_dependency(~0, ~MODE_PAD_CHAR_TO_FULL_LENGTH)).
+ soft_to_hard();
+}
+
+
/* Item_func_password */
bool Item_func_password::fix_fields(THD *thd, Item **ref)
@@ -3185,6 +3220,38 @@ bool Item_func_pad::fix_length_and_dec()
}
+/*
+ PAD(expr,length,' ')
+ removes argument's soft dependency on PAD_CHAR_TO_FULL_LENGTH if the result
+ is longer than the argument's maximim possible length.
+*/
+Sql_mode_dependency Item_func_rpad::value_depends_on_sql_mode() const
+{
+ DBUG_ASSERT(fixed);
+ DBUG_ASSERT(arg_count == 3);
+ if (!args[1]->value_depends_on_sql_mode_const_item() ||
+ !args[2]->value_depends_on_sql_mode_const_item())
+ return Item_func::value_depends_on_sql_mode();
+ Longlong_hybrid len= args[1]->to_longlong_hybrid();
+ if (args[1]->null_value || len.neg())
+ return Sql_mode_dependency(); // will return NULL
+ if (len.abs() > 0 && len.abs() < args[0]->max_char_length())
+ return Item_func::value_depends_on_sql_mode();
+ StringBuffer<64> padstrbuf;
+ String *padstr= args[2]->val_str(&padstrbuf);
+ if (!padstr || !padstr->length())
+ return Sql_mode_dependency(); // will return NULL
+ if (padstr->lengthsp() != 0)
+ return Item_func::value_depends_on_sql_mode(); // will pad not only spaces
+ // RPAD(expr, length, ' ') -- with a long enough length
+ return ((args[0]->value_depends_on_sql_mode() |
+ args[1]->value_depends_on_sql_mode()) &
+ Sql_mode_dependency(~0, ~MODE_PAD_CHAR_TO_FULL_LENGTH)).
+ soft_to_hard();
+}
+
+
+
String *Item_func_rpad::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 676a815eb4e..81f72b6bb83 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -558,6 +558,7 @@ protected:
public:
Item_func_trim(THD *thd, Item *a, Item *b): Item_str_func(thd, a, b) {}
Item_func_trim(THD *thd, Item *a): Item_str_func(thd, a) {}
+ Sql_mode_dependency value_depends_on_sql_mode() const;
String *val_str(String *);
bool fix_length_and_dec();
const char *func_name() const { return "trim"; }
@@ -595,6 +596,10 @@ class Item_func_ltrim :public Item_func_trim
public:
Item_func_ltrim(THD *thd, Item *a, Item *b): Item_func_trim(thd, a, b) {}
Item_func_ltrim(THD *thd, Item *a): Item_func_trim(thd, a) {}
+ Sql_mode_dependency value_depends_on_sql_mode() const
+ {
+ return Item_func::value_depends_on_sql_mode();
+ }
String *val_str(String *);
const char *func_name() const { return "ltrim"; }
const char *mode_name() const { return "leading"; }
@@ -1128,6 +1133,7 @@ public:
Item_func_pad(thd, arg1, arg2) {}
String *val_str(String *);
const char *func_name() const { return "rpad"; }
+ Sql_mode_dependency value_depends_on_sql_mode() const;
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_rpad>(thd, this); }
};
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d621a3be1cd..9b972a9af5e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -8142,14 +8142,13 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
return 1;
#endif
- SYSVAR_AUTOSIZE(pidfile_name_ptr, pidfile_name);
- /* PID file */
- strmake(pidfile_name, argument, sizeof(pidfile_name)-5);
- strmov(fn_ext(pidfile_name),".pid");
-
- /* check for errors */
- if (!pidfile_name_ptr)
- return 1; // out of memory error
+ if (IS_SYSVAR_AUTOSIZE(&pidfile_name_ptr))
+ {
+ SYSVAR_AUTOSIZE(pidfile_name_ptr, pidfile_name);
+ /* PID file */
+ strmake(pidfile_name, argument, sizeof(pidfile_name)-5);
+ strmov(fn_ext(pidfile_name),".pid");
+ }
break;
}
#ifdef HAVE_REPLICATION
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 70a75d8eaad..5a53faec05f 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -18,6 +18,7 @@
#define MYSQLD_INCLUDED
#include "sql_basic_types.h" /* query_id_t */
+#include "sql_mode.h" /* Sql_mode_dependency */
#include "sql_plugin.h"
#include "sql_bitmap.h" /* Bitmap */
#include "my_decimal.h" /* my_decimal */
diff --git a/sql/set_var.h b/sql/set_var.h
index 7f551875c97..31ff0493942 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -439,6 +439,7 @@ inline bool IS_SYSVAR_AUTOSIZE(void *ptr)
bool fix_delay_key_write(sys_var *self, THD *thd, enum_var_type type);
sql_mode_t expand_sql_mode(sql_mode_t sql_mode);
+const char *sql_mode_string_representation(uint bit_number);
bool sql_mode_string_representation(THD *thd, sql_mode_t sql_mode,
LEX_CSTRING *ls);
int default_regex_flags_pcre(const THD *thd);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 562c70be914..54491c2362b 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -8500,7 +8500,7 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
rfield->move_field_offset((my_ptrdiff_t) (table->record[1] -
table->record[0]));
}
- rfield->set_explicit_default(value);
+ rfield->set_has_explicit_value();
}
if (update && thd->variables.sql_mode & MODE_SIMULTANEOUS_ASSIGNMENT)
@@ -8519,9 +8519,13 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
}
}
- if (!update && table_arg->default_field &&
- table_arg->update_default_fields(0, ignore_errors))
- goto err;
+ if (update)
+ table_arg->evaluate_update_default_function();
+ else
+ if (table_arg->default_field &&
+ table_arg->update_default_fields(ignore_errors))
+ goto err;
+
if (table_arg->versioned() && !only_unvers_fields)
table_arg->vers_update_fields();
/* Update virtual fields */
@@ -8711,7 +8715,6 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
{
List_iterator_fast<Item> v(values);
List<TABLE> tbl_list;
- bool all_fields_have_values= true;
Item *value;
Field *field;
bool abort_on_warning_saved= thd->abort_on_warning;
@@ -8742,10 +8745,7 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
DBUG_ASSERT(field->table == table);
if (unlikely(field->invisible))
- {
- all_fields_have_values= false;
continue;
- }
else
value=v++;
@@ -8774,11 +8774,8 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
else
if (value->save_in_field(field, 0) < 0)
goto err;
- all_fields_have_values &= field->set_explicit_default(value);
+ field->set_has_explicit_value();
}
- if (!all_fields_have_values && table->default_field &&
- table->update_default_fields(0, ignore_errors))
- goto err;
/* Update virtual fields */
thd->abort_on_warning= FALSE;
if (table->versioned())
diff --git a/sql/sql_class.h b/sql/sql_class.h
index a8f3de4cb1a..72cb8148895 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3444,6 +3444,7 @@ private:
{
system_time.sec= sec;
system_time.sec_part= sec_part;
+ system_time.start= hrtime;
}
else
{
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index dcffc0662dd..bf21a717fed 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1839,10 +1839,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
be updated as if this is an UPDATE.
*/
if (different_records && table->default_field)
- {
- if (table->update_default_fields(1, info->ignore))
- goto err;
- }
+ table->evaluate_update_default_function();
/* CHECK OPTION for VIEW ... ON DUPLICATE KEY UPDATE ... */
res= info->table_list->view_check_option(table->in_use, info->ignore);
@@ -2626,7 +2623,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
{
bool error_reported= FALSE;
if (unlikely(parse_vcol_defs(client_thd, client_thd->mem_root, copy,
- &error_reported)))
+ &error_reported,
+ VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING)))
goto error;
}
@@ -3869,7 +3867,7 @@ int select_insert::send_data(List<Item> &values)
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
store_values(values);
if (table->default_field &&
- unlikely(table->update_default_fields(0, info.ignore)))
+ unlikely(table->update_default_fields(info.ignore)))
DBUG_RETURN(1);
thd->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL;
if (unlikely(thd->is_error()))
diff --git a/sql/sql_mode.cc b/sql/sql_mode.cc
new file mode 100644
index 00000000000..32d19cecbdb
--- /dev/null
+++ b/sql/sql_mode.cc
@@ -0,0 +1,34 @@
+/*
+ Copyright (c) 2019, MariaDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
+
+#include "mariadb.h"
+#include "set_var.h"
+
+void Sql_mode_dependency::push_dependency_warnings(THD *thd)
+{
+ sql_mode_t all= m_hard | m_soft;
+ for (uint i= 0; all ; i++, all >>= 1)
+ {
+ if (all & 1)
+ {
+ // TODO-10.5: add a new error code
+ push_warning_printf(thd,
+ Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
+ "Expression depends on the @@%s value %s",
+ "sql_mode", sql_mode_string_representation(i));
+ }
+ }
+}
diff --git a/sql/sql_mode.h b/sql/sql_mode.h
new file mode 100644
index 00000000000..e92848fb6d1
--- /dev/null
+++ b/sql/sql_mode.h
@@ -0,0 +1,162 @@
+#ifndef SQL_MODE_H_INCLUDED
+#define SQL_MODE_H_INCLUDED
+/*
+ Copyright (c) 2019, MariaDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
+
+#ifdef USE_PRAGMA_INTERFACE
+#pragma interface /* gcc class implementation */
+#endif
+
+#include "sql_basic_types.h"
+
+/*
+ class Sql_mode_dependency
+
+ A combination of hard and soft dependency on sql_mode.
+ Used to watch if a GENERATED ALWAYS AS expression guarantees consitent
+ data written to its virtual column.
+
+ A virtual column can appear in an index if:
+ - the generation expression does not depend on any sql_mode flags, or
+ - the generation expression has a soft dependency on an sql_mode flag,
+ and the column knows how to handle this dependeny.
+
+ A virtual column cannot appear in an index if:
+ - its generation expression has a hard dependency
+ - its generation expression has a soft dependency, but the column
+ cannot handle it on store.
+ An error is reported in such cases.
+
+ How dependencies appear:
+ - When a column return value depends on some sql_mode flag,
+ its Item_field adds a corresponding bit to m_soft. For example,
+ Item_field for a CHAR(N) column adds the PAD_CHAR_TO_FULL_LENGTH flag.
+ - When an SQL function/operator return value depends on some sql_mode flag,
+ it adds a corresponding bit to m_soft. For example, Item_func_minus
+ adds the MODE_NO_UNSIGNED_SUBTRACTION in case of unsigned arguments.
+
+ How dependency are processed (see examples below):
+ - All SQL functions/operators bit-OR all hard dependencies from all arguments.
+ - Some soft dependencies can be handled by the underlying Field on store,
+ e.g. CHAR(N) can handle PAD_CHAR_TO_FULL_LENGTH.
+ - Some soft dependencies can be handled by SQL functions and operators,
+ e.g. RTRIM(expr) removes expr's soft dependency on PAD_CHAR_TO_FULL_LENGTH.
+ If a function or operator handles a soft dependency on a certain sql_mode
+ flag, it removes the corresponding bit from m_soft (see below).
+ Note, m_hard is not touched in such cases.
+ - When an expression with a soft dependency on a certain sql_mode flag
+ goes as an argument to an SQL function/operator which cannot handle
+ this flag, the dependency escalates from soft to hard
+ (by moving the corresponding bit from m_soft to m_hard) and cannot be
+ handled any more on the upper level, neither by a Field on store,
+ nor by another SQL function/operator.
+
+ There are four kinds of Items:
+ 1. Items that generate a soft or hard dependency, e.g.
+ - Item_field for CHAR(N) - generates soft/PAD_CHAR_TO_FULL_LENGTH
+ - Item_func_minus - generates soft/NO_UNSIGNED_SUBTRACTION
+ 2. Items that convert a soft dependency to a hard dependency.
+ This happens e.g. when an Item_func instance gets a soft dependency
+ from its arguments, and it does not know how to handle this dependency.
+ Most Item_func descendants do this.
+ 3. Items that remove soft dependencies, e.g.:
+ - Item_func_rtrim - removes soft/PAD_CHAR_TO_FULL_LENGTH
+ that came from args[0] (under certain conditions)
+ - Item_func_rpad - removes soft/PAD_CJAR_TO_FULL_LENGTH
+ that came from args[0] (under certain conditions)
+ 4. Items that repeat soft dependency from its arguments to the caller.
+ They are not implemented yet. But functions like Item_func_coalesce,
+ Item_func_case, Item_func_case_abbreviation2 could do this.
+
+ Examples:
+
+ 1. CREATE OR REPLACE TABLE t1 (a CHAR(5), v CHAR(20) AS(a), KEY(v));
+
+ Here `v` has a soft dependency on `a`.
+ The value of `a` depends on PAD_CHAR_TO_FULL_LENGTH, it can return:
+ - 'a' - if PAD_CHAR_TO_FULL_LENGTH is disabled
+ - 'a' followed by four spaces - if PAD_CHAR_TO_FULL_LENGTH is enabled
+ But `v` will pad trailing spaces to the full length on store anyway.
+ So Field_string handles this soft dependency on store.
+ This combination of the virtial column data type and its generation
+ expression is safe and provides consistent data in `v`, which is
+ 'a' followed by four spaces, no matter what PAD_CHAR_TO_FULL_LENGTH is.
+
+ 2. CREATE OR REPLACE TABLE t1 (a CHAR(5), v VARCHAR(20) AS(a), KEY(v));
+
+ Here `v` has a soft dependency on `a`. But Field_varstring does
+ not pad spaces on store, so it cannot handle this dependency.
+ This combination of the virtual column data type and its generation
+ expression is not safe. An error is returned.
+
+ 3. CREATE OR REPLACE TABLE t1 (a CHAR(5), v INT AS(LENGTH(a)), KEY(v));
+
+ Here `v` has a hard dependency on `a`, because the value of `a`
+ is wrapped to the function LENGTH().
+ The value of `LENGTH(a)` depends on PAD_CHAR_TO_FULL_LENGTH, it can return:
+ - 1 - if PAD_CHAR_TO_FULL_LENGTH is disabled
+ - 4 - if PAD_CHAR_TO_FULL_LENGTH is enabled
+ This combination cannot provide consistent data stored to `v`,
+ therefore it's disallowed.
+*/
+class Sql_mode_dependency
+{
+ sql_mode_t m_hard;
+ sql_mode_t m_soft;
+public:
+ Sql_mode_dependency()
+ :m_hard(0), m_soft(0)
+ { }
+ Sql_mode_dependency(sql_mode_t hard, sql_mode_t soft)
+ :m_hard(hard), m_soft(soft)
+ { }
+ sql_mode_t hard() const { return m_hard; }
+ sql_mode_t soft() const { return m_soft; }
+ operator bool () const
+ {
+ return m_hard > 0 || m_soft > 0;
+ }
+ Sql_mode_dependency operator|(const Sql_mode_dependency &other) const
+ {
+ return Sql_mode_dependency(m_hard | other.m_hard, m_soft | other.m_soft);
+ }
+ Sql_mode_dependency operator&(const Sql_mode_dependency &other) const
+ {
+ return Sql_mode_dependency(m_hard & other.m_hard, m_soft & other.m_soft);
+ }
+ Sql_mode_dependency &operator|=(const Sql_mode_dependency &other)
+ {
+ m_hard|= other.m_hard;
+ m_soft|= other.m_soft;
+ return *this;
+ }
+ Sql_mode_dependency &operator&=(const Sql_mode_dependency &other)
+ {
+ m_hard&= other.m_hard;
+ m_soft&= other.m_soft;
+ return *this;
+ }
+ Sql_mode_dependency &soft_to_hard()
+ {
+ m_hard|= m_soft;
+ m_soft= 0;
+ return *this;
+ }
+ void push_dependency_warnings(THD *thd);
+};
+
+
+#endif // SQL_MODE_H_INCLUDED
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 1eac2200625..deff81f3333 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -149,6 +149,10 @@ public:
{
return m_charset->cset->numchars(m_charset, str, end);
}
+ size_t lengthsp(const char *str, size_t length) const
+ {
+ return m_charset->cset->lengthsp(m_charset, str, length);
+ }
size_t charpos(const char *str, const char *end, size_t pos) const
{
return m_charset->cset->charpos(m_charset, str, end, pos);
@@ -929,6 +933,10 @@ public:
return (int) i;
return (int) Charset::charpos(ptr() + offset, end(), (size_t) i);
}
+ size_t lengthsp() const
+ {
+ return Charset::lengthsp(Ptr, str_length);
+ }
void print(String *to) const;
void print_with_conversion(String *to, CHARSET_INFO *cs) const;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0785276ecd8..9d540d18c7d 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -10062,7 +10062,7 @@ do_continue:;
thd->count_cuted_fields= CHECK_FIELD_EXPRESSION;
altered_table.reset_default_fields();
if (altered_table.default_field &&
- altered_table.update_default_fields(0, 1))
+ altered_table.update_default_fields(true))
{
cleanup_table_after_inplace_alter(&altered_table);
goto err_new_table_cleanup;
@@ -10804,7 +10804,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
prev_insert_id= to->file->next_insert_id;
if (to->default_field)
- to->update_default_fields(0, ignore);
+ to->update_default_fields(ignore);
if (to->vfield)
to->update_virtual_fields(to->file, VCOL_UPDATE_FOR_WRITE);
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc
index 47f50ae3c08..24d414e3347 100644
--- a/sql/sql_tvc.cc
+++ b/sql/sql_tvc.cc
@@ -972,7 +972,8 @@ bool Item_func_in::to_be_transformed_into_in_subq(THD *thd)
if (args[1]->type() == Item::ROW_ITEM)
values_count*= ((Item_row *)(args[1]))->cols();
- if (values_count < thd->variables.in_subquery_conversion_threshold)
+ if (thd->variables.in_subquery_conversion_threshold == 0 ||
+ thd->variables.in_subquery_conversion_threshold > values_count)
return false;
return true;
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index b16c49cf17a..258aa470b7b 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -69,17 +69,20 @@ bool compare_record(const TABLE *table)
{
DBUG_ASSERT(records_are_comparable(table));
- if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) != 0)
+ if (table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ ||
+ table->s->has_update_default_function)
{
/*
Storage engine may not have read all columns of the record. Fields
(including NULL bits) not in the write_set may not have been read and
can therefore not be compared.
+ Or ON UPDATE DEFAULT NOW() could've changed field values, including
+ NULL bits.
*/
for (Field **ptr= table->field ; *ptr != NULL; ptr++)
{
Field *field= *ptr;
- if (bitmap_is_set(table->write_set, field->field_index))
+ if (field->has_explicit_value() && !field->vcol_info)
{
if (field->real_maybe_null())
{
@@ -111,8 +114,9 @@ bool compare_record(const TABLE *table)
/* Compare updated fields */
for (Field **ptr= table->field ; *ptr ; ptr++)
{
- if (bitmap_is_set(table->write_set, (*ptr)->field_index) &&
- (*ptr)->cmp_binary_offset(table->s->rec_buff_length))
+ Field *field= *ptr;
+ if (field->has_explicit_value() && !field->vcol_info &&
+ field->cmp_binary_offset(table->s->rec_buff_length))
return TRUE;
}
return FALSE;
@@ -309,15 +313,18 @@ int cut_fields_for_portion_of_time(THD *thd, TABLE *table,
Field *start_field= table->field[table->s->period.start_fieldno];
Field *end_field= table->field[table->s->period.end_fieldno];
- DBUG_ASSERT(!start_field->has_explicit_value()
- && !end_field->has_explicit_value());
-
int res= 0;
if (lcond)
+ {
res= period_conds.start.item->save_in_field(start_field, true);
+ start_field->set_has_explicit_value();
+ }
if (likely(!res) && rcond)
+ {
res= period_conds.end.item->save_in_field(end_field, true);
+ end_field->set_has_explicit_value();
+ }
return res;
}
@@ -987,11 +994,6 @@ update_begin:
thd->lex->sql_command == SQLCOM_DELETE)
table->vers_update_end();
- if (table->default_field && table->update_default_fields(1, ignore))
- {
- error= 1;
- break;
- }
if ((res= table_list->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
{
@@ -2490,10 +2492,6 @@ int multi_update::send_data(List<Item> &not_used_values)
{
int error;
- if (table->default_field &&
- unlikely(table->update_default_fields(1, ignore)))
- DBUG_RETURN(1);
-
if ((error= cur_table->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
{
@@ -2803,6 +2801,10 @@ int multi_update::do_updates()
copy_field_ptr->to_field->set_has_explicit_value();
}
+ table->evaluate_update_default_function();
+ if (table->vfield &&
+ table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE))
+ goto err2;
if (table->triggers &&
table->triggers->process_triggers(thd, TRG_EVENT_UPDATE,
TRG_ACTION_BEFORE, TRUE))
@@ -2811,12 +2813,6 @@ int multi_update::do_updates()
if (!can_compare_record || compare_record(table))
{
int error;
- if (table->default_field &&
- (error= table->update_default_fields(1, ignore)))
- goto err2;
- if (table->vfield &&
- table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE))
- goto err2;
if ((error= cur_table->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
{
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 29c938a1f88..ca9988b660e 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3480,6 +3480,14 @@ static const char *sql_mode_names[]=
0
};
+
+const char *sql_mode_string_representation(uint bit_number)
+{
+ DBUG_ASSERT(bit_number < array_elements(sql_mode_names));
+ return sql_mode_names[bit_number];
+}
+
+
export bool sql_mode_string_representation(THD *thd, sql_mode_t sql_mode,
LEX_CSTRING *ls)
{
@@ -6359,14 +6367,13 @@ static Sys_var_mybool Sys_session_track_state_change(
#endif //EMBEDDED_LIBRARY
-#ifndef DBUG_OFF
static Sys_var_uint Sys_in_subquery_conversion_threshold(
"in_predicate_conversion_threshold",
"The minimum number of scalar elements in the value list of "
- "IN predicate that triggers its conversion to IN subquery",
- SESSION_VAR(in_subquery_conversion_threshold), CMD_LINE(OPT_ARG),
+ "IN predicate that triggers its conversion to IN subquery. Set to "
+ "0 to disable the conversion.",
+ SESSION_VAR(in_subquery_conversion_threshold), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, UINT_MAX), DEFAULT(IN_SUBQUERY_CONVERSION_THRESHOLD), BLOCK_SIZE(1));
-#endif
static Sys_var_enum Sys_secure_timestamp(
"secure_timestamp", "Restricts direct setting of a session "
diff --git a/sql/table.cc b/sql/table.cc
index 61bc015269c..0b55f3172b9 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1069,7 +1069,7 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
expression
*/
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
- bool *error_reported)
+ bool *error_reported, vcol_init_mode mode)
{
CHARSET_INFO *save_character_set_client= thd->variables.character_set_client;
CHARSET_INFO *save_collation= thd->variables.collation_connection;
@@ -1152,6 +1152,12 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
&((*field_ptr)->vcol_info), error_reported);
*(vfield_ptr++)= *field_ptr;
+ if (vcol && field_ptr[0]->check_vcol_sql_mode_dependency(thd, mode))
+ {
+ DBUG_ASSERT(thd->is_error());
+ *error_reported= true;
+ goto end;
+ }
break;
case VCOL_DEFAULT:
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
@@ -3859,8 +3865,24 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
if (share->table_check_constraints || share->field_check_constraints)
outparam->check_constraints= check_constraint_ptr;
+ vcol_init_mode mode= VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING;
+ switch (thd->lex->sql_command)
+ {
+ case SQLCOM_CREATE_TABLE:
+ mode= VCOL_INIT_DEPENDENCY_FAILURE_IS_ERROR;
+ break;
+ case SQLCOM_ALTER_TABLE:
+ case SQLCOM_CREATE_INDEX:
+ case SQLCOM_DROP_INDEX:
+ if ((ha_open_flags & HA_OPEN_FOR_ALTER) == 0)
+ mode= VCOL_INIT_DEPENDENCY_FAILURE_IS_ERROR;
+ break;
+ default:
+ break;
+ }
+
if (unlikely(parse_vcol_defs(thd, &outparam->mem_root, outparam,
- &error_reported)))
+ &error_reported, mode)))
{
error= OPEN_FRM_CORRUPTED;
goto err;
@@ -8374,7 +8396,7 @@ int TABLE::update_virtual_field(Field *vf)
ignore_errors == 0. If set then an error was generated.
*/
-int TABLE::update_default_fields(bool update_command, bool ignore_errors)
+int TABLE::update_default_fields(bool ignore_errors)
{
Query_arena backup_arena;
Field **field_ptr;
@@ -8394,14 +8416,9 @@ int TABLE::update_default_fields(bool update_command, bool ignore_errors)
*/
if (!field->has_explicit_value())
{
- if (!update_command)
- {
- if (field->default_value &&
- (field->default_value->flags || field->flags & BLOB_FLAG))
- res|= (field->default_value->expr->save_in_field(field, 0) < 0);
- }
- else
- res|= field->evaluate_update_default_function();
+ if (field->default_value &&
+ (field->default_value->flags || field->flags & BLOB_FLAG))
+ res|= (field->default_value->expr->save_in_field(field, 0) < 0);
if (!ignore_errors && res)
{
my_error(ER_CALCULATING_DEFAULT_VALUE, MYF(0), field->field_name.str);
@@ -8487,6 +8504,21 @@ int TABLE::insert_portion_of_time(THD *thd,
return res;
}
+void TABLE::evaluate_update_default_function()
+{
+ DBUG_ENTER("TABLE::evaluate_update_default_function");
+
+ if (s->has_update_default_function)
+ for (Field **field_ptr= default_field; *field_ptr ; field_ptr++)
+ {
+ Field *field= (*field_ptr);
+ if (!field->has_explicit_value() && field->has_update_default_function())
+ field->set_time();
+ }
+ DBUG_VOID_RETURN;
+}
+
+
void TABLE::vers_update_fields()
{
bitmap_set_bit(write_set, vers_start_field()->field_index);
diff --git a/sql/table.h b/sql/table.h
index ecfe5395b1f..1a7e5fbd4dc 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -330,6 +330,20 @@ enum tmp_table_type
};
enum release_type { RELEASE_NORMAL, RELEASE_WAIT_FOR_DROP };
+
+enum vcol_init_mode
+{
+ VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING= 1,
+ VCOL_INIT_DEPENDENCY_FAILURE_IS_ERROR= 2
+ /*
+ There may be new flags here.
+ e.g. to automatically remove sql_mode dependency:
+ GENERATED ALWAYS AS (char_col) ->
+ GENERATED ALWAYS AS (RTRIM(char_col))
+ */
+};
+
+
enum enum_vcol_update_mode
{
VCOL_UPDATE_FOR_READ= 0,
@@ -1516,7 +1530,8 @@ public:
ulong actual_key_flags(KEY *keyinfo);
int update_virtual_field(Field *vf);
int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode);
- int update_default_fields(bool update, bool ignore_errors);
+ int update_default_fields(bool ignore_errors);
+ void evaluate_update_default_function();
void reset_default_fields();
inline ha_rows stat_records() { return used_stat_records; }
@@ -2951,7 +2966,7 @@ bool fix_session_vcol_expr(THD *thd, Virtual_column_info *vcol);
bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
Virtual_column_info *vcol);
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
- bool *error_reported);
+ bool *error_reported, vcol_init_mode expr);
TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
const char *key, uint key_length);
void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key,
diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h
index cf785e2ad21..6300706a2b9 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -482,14 +482,10 @@ lock_rec_unlock(
const buf_block_t* block, /*!< in: buffer block containing rec */
const rec_t* rec, /*!< in: record */
lock_mode lock_mode);/*!< in: LOCK_S or LOCK_X */
-/*********************************************************************//**
-Releases a transaction's locks, and releases possible other transactions
-waiting because of these locks. Change the state of the transaction to
-TRX_STATE_COMMITTED_IN_MEMORY. */
-void
-lock_trx_release_locks(
-/*===================*/
- trx_t* trx); /*!< in/out: transaction */
+
+/** Release the explicit locks of a committing transaction,
+and release possible other transactions waiting because of these locks. */
+void lock_release(trx_t* trx);
/*********************************************************************//**
Calculates the fold value of a page file address: used in inserting or
diff --git a/storage/innobase/include/row0vers.h b/storage/innobase/include/row0vers.h
index 38fd952388d..948804beafc 100644
--- a/storage/innobase/include/row0vers.h
+++ b/storage/innobase/include/row0vers.h
@@ -44,7 +44,8 @@ index record.
@param[in] rec secondary index record
@param[in] index secondary index
@param[in] offsets rec_get_offsets(rec, index)
-@return the active transaction; trx->release_reference() must be invoked
+@return the active transaction; state must be rechecked after
+trx_mutex_enter(), and trx->release_reference() must be invoked
@retval NULL if the record was committed */
trx_t*
row_vers_impl_x_locked(
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
index 437459865fe..e80b222d260 100644
--- a/storage/innobase/include/trx0sys.h
+++ b/storage/innobase/include/trx0sys.h
@@ -514,8 +514,10 @@ class rw_trx_hash_t
{
ut_ad(!trx->read_only || !trx->rsegs.m_redo.rseg);
ut_ad(!trx_is_autocommit_non_locking(trx));
+ /* trx->state can be anything except TRX_STATE_NOT_STARTED */
mutex_enter(&trx->mutex);
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE) ||
+ trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) ||
trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED) ||
trx_state_eq(trx, TRX_STATE_PREPARED));
mutex_exit(&trx->mutex);
@@ -626,12 +628,7 @@ public:
The caller should already have handled trx_id==0 specially.
*/
ut_ad(trx_id);
- if (caller_trx && caller_trx->id == trx_id)
- {
- if (do_ref_count)
- caller_trx->reference();
- return caller_trx;
- }
+ ut_ad(!caller_trx || caller_trx->id != trx_id || !do_ref_count);
trx_t *trx= 0;
LF_PINS *pins= caller_trx ? get_pins(caller_trx) : lf_hash_get_pins(&hash);
@@ -646,9 +643,25 @@ public:
lf_hash_search_unpin(pins);
if ((trx= element->trx)) {
DBUG_ASSERT(trx_id == trx->id);
- if (do_ref_count)
- trx->reference();
ut_d(validate_element(trx));
+ if (do_ref_count)
+ {
+ /*
+ We have an early state check here to avoid committer
+ starvation in a wait loop for transaction references,
+ when there's a stream of trx_sys.find() calls from other
+ threads. The trx->state may change to COMMITTED after
+ trx->mutex is released, and it will have to be rechecked
+ by the caller after reacquiring the mutex.
+ */
+ trx_mutex_enter(trx);
+ const trx_state_t state= trx->state;
+ trx_mutex_exit(trx);
+ if (state == TRX_STATE_COMMITTED_IN_MEMORY)
+ trx= NULL;
+ else
+ trx->reference();
+ }
}
mutex_exit(&element->mutex);
}
@@ -932,7 +945,7 @@ public:
/**
Takes MVCC snapshot.
- To reduce malloc probablility we reserver rw_trx_hash.size() + 32 elements
+ To reduce malloc probablility we reserve rw_trx_hash.size() + 32 elements
in ids.
For details about get_rw_trx_hash_version() != get_max_trx_id() spin
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index d37b51036a4..2245168b169 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -211,16 +211,13 @@ trx_recover_for_mysql(
/*==================*/
XID* xid_list, /*!< in/out: prepared transactions */
uint len); /*!< in: number of slots in xid_list */
-/*******************************************************************//**
-This function is used to find one X/Open XA distributed transaction
-which is in the prepared state
-@return trx or NULL; on match, the trx->xid will be invalidated;
-note that the trx may have been committed, unless the caller is
-holding lock_sys.mutex */
-trx_t *
-trx_get_trx_by_xid(
-/*===============*/
- XID* xid); /*!< in: X/Open XA transaction identifier */
+/** Look up an X/Open distributed transaction in XA PREPARE state.
+@param[in] xid X/Open XA transaction identifier
+@return transaction on match (the trx_t::xid will be invalidated);
+note that the trx may have been committed before the caller acquires
+trx_t::mutex
+@retval NULL if no match */
+trx_t* trx_get_trx_by_xid(const XID* xid);
/**********************************************************************//**
If required, flushes the log to disk if we called trx_commit_for_mysql()
with trx->flush_log_later == TRUE. */
@@ -467,6 +464,9 @@ Check transaction state */
ut_ad(!(t)->read_view.is_open()); \
ut_ad((t)->lock.wait_thr == NULL); \
ut_ad(UT_LIST_GET_LEN((t)->lock.trx_locks) == 0); \
+ ut_ad((t)->lock.table_locks.empty()); \
+ ut_ad(!(t)->autoinc_locks \
+ || ib_vector_is_empty((t)->autoinc_locks)); \
ut_ad(UT_LIST_GET_LEN((t)->lock.evicted_tables) == 0); \
ut_ad((t)->dict_operation == TRX_DICT_OP_NONE); \
} while(0)
@@ -708,10 +708,9 @@ Normally, only the thread that is currently associated with a running
transaction may access (read and modify) the trx object, and it may do
so without holding any mutex. The following are exceptions to this:
-* trx_rollback_resurrected() may access resurrected (connectionless)
-transactions while the system is already processing new user
-transactions. The trx_sys.mutex prevents a race condition between it
-and lock_trx_release_locks() [invoked by trx_commit()].
+* trx_rollback_recovered() may access resurrected (connectionless)
+transactions (state == TRX_STATE_ACTIVE && is_recovered)
+while the system is already processing new user transactions (!is_recovered).
* trx_print_low() may access transactions not associated with the current
thread. The caller must be holding lock_sys.mutex.
@@ -722,7 +721,7 @@ must not be modified without holding trx->mutex.
* The locking code (in particular, lock_deadlock_recursive() and
lock_rec_convert_impl_to_expl()) will access transactions associated
to other connections. The locks of transactions are protected by
-lock_sys.mutex and sometimes by trx->mutex. */
+lock_sys.mutex (insertions also by trx->mutex). */
/** Represents an instance of rollback segment along with its state variables.*/
struct trx_undo_ptr_t {
@@ -846,28 +845,26 @@ public:
ACTIVE->COMMITTED is possible when the transaction is in
rw_trx_hash.
- Transitions to COMMITTED are protected by both lock_sys.mutex
- and trx->mutex.
-
- NOTE: Some of these state change constraints are an overkill,
- currently only required for a consistent view for printing stats.
- This unnecessarily adds a huge cost for the general case. */
-
+ Transitions to COMMITTED are protected by trx_t::mutex. */
trx_state_t state;
ReadView read_view; /*!< consistent read view used in the
transaction, or NULL if not yet set */
trx_lock_t lock; /*!< Information about the transaction
locks and state. Protected by
- trx->mutex or lock_sys.mutex
- or both */
- bool is_recovered; /*!< 0=normal transaction,
- 1=recovered, must be rolled back,
- protected by trx_sys.mutex when
- trx is in rw_trx_hash */
-
+ lock_sys.mutex (insertions also
+ by trx_t::mutex). */
/* These fields are not protected by any mutex. */
+
+ /** false=normal transaction, true=recovered (must be rolled back)
+ or disconnected transaction in XA PREPARE STATE.
+
+ This field is accessed by the thread that owns the transaction,
+ without holding any mutex.
+ There is only one foreign-thread access in trx_print_low()
+ and a possible race condition with trx_disconnect_prepared(). */
+ bool is_recovered;
const char* op_info; /*!< English text describing the
current operation, or an empty
string */
@@ -1125,9 +1122,15 @@ public:
return flush_observer;
}
- /** Evict a table definition due to the rollback of ALTER TABLE.
- @param[in] table_id table identifier */
- void evict_table(table_id_t table_id);
+ /** Transition to committed state, to release implicit locks. */
+ inline void commit_state();
+
+ /** Release any explicit locks of a committing transaction. */
+ inline void release_locks();
+
+ /** Evict a table definition due to the rollback of ALTER TABLE.
+ @param[in] table_id table identifier */
+ void evict_table(table_id_t table_id);
bool is_referenced()
diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic
index a5c95c788f1..f51d5368022 100644
--- a/storage/innobase/include/trx0trx.ic
+++ b/storage/innobase/include/trx0trx.ic
@@ -48,19 +48,14 @@ trx_state_eq(
switch (trx->state) {
case TRX_STATE_PREPARED:
case TRX_STATE_PREPARED_RECOVERED:
+ case TRX_STATE_COMMITTED_IN_MEMORY:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx->state == state);
case TRX_STATE_ACTIVE:
-
assert_trx_nonlocking_or_in_list(trx);
return(state == trx->state);
- case TRX_STATE_COMMITTED_IN_MEMORY:
-
- check_trx_state(trx);
- return(state == trx->state);
-
case TRX_STATE_NOT_STARTED:
/* These states are not allowed for running transactions. */
ut_a(state == TRX_STATE_NOT_STARTED
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index dc7a66ea317..9ba3a33f583 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -4268,23 +4268,17 @@ lock_check_dict_lock(
}
#endif /* UNIV_DEBUG */
-/*********************************************************************//**
-Releases transaction locks, and releases possible other transactions waiting
-because of these locks. */
-static
-void
-lock_release(
-/*=========*/
- trx_t* trx) /*!< in/out: transaction */
+/** Release the explicit locks of a committing transaction,
+and release possible other transactions waiting because of these locks. */
+void lock_release(trx_t* trx)
{
- lock_t* lock;
ulint count = 0;
trx_id_t max_trx_id = trx_sys.get_max_trx_id();
- ut_ad(lock_mutex_own());
+ lock_mutex_enter();
ut_ad(!trx_mutex_own(trx));
- for (lock = UT_LIST_GET_LAST(trx->lock.trx_locks);
+ for (lock_t* lock = UT_LIST_GET_LAST(trx->lock.trx_locks);
lock != NULL;
lock = UT_LIST_GET_LAST(trx->lock.trx_locks)) {
@@ -4324,6 +4318,8 @@ lock_release(
++count;
}
+
+ lock_mutex_exit();
}
/* True if a lock mode is S or X */
@@ -4734,7 +4730,7 @@ lock_trx_table_locks_find(
{
bool found = false;
- trx_mutex_enter(trx);
+ ut_ad(trx_mutex_own(trx));
for (lock_list::const_iterator it = trx->lock.table_locks.begin(),
end = trx->lock.table_locks.end(); it != end; ++it) {
@@ -4757,8 +4753,6 @@ lock_trx_table_locks_find(
ut_a(lock->un_member.tab_lock.table != NULL);
}
- trx_mutex_exit(trx);
-
return(found);
}
@@ -4779,25 +4773,23 @@ lock_table_queue_validate(
lock != NULL;
lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock)) {
- /* Transaction state may change from ACTIVE to PREPARED.
- State change to COMMITTED is not possible while we are
- holding lock_sys.mutex: it is done by lock_trx_release_locks()
- under lock_sys.mutex protection.
- Transaction in NOT_STARTED state cannot hold locks, and
- lock->trx->state can only move to NOT_STARTED from COMMITTED. */
+ /* lock->trx->state cannot change from or to NOT_STARTED
+ while we are holding the lock_sys.mutex. It may change
+ from ACTIVE or PREPARED to PREPARED or COMMITTED. */
+ trx_mutex_enter(lock->trx);
check_trx_state(lock->trx);
- if (!lock_get_wait(lock)) {
-
+ if (lock->trx->state == TRX_STATE_COMMITTED_IN_MEMORY) {
+ } else if (!lock_get_wait(lock)) {
ut_a(!lock_table_other_has_incompatible(
lock->trx, 0, table,
lock_get_mode(lock)));
} else {
-
ut_a(lock_table_has_to_wait_in_queue(lock));
}
ut_a(lock_trx_table_locks_find(lock->trx, lock));
+ trx_mutex_exit(lock->trx);
}
return(TRUE);
@@ -4844,42 +4836,41 @@ lock_rec_queue_validate(
lock != NULL;
lock = lock_rec_get_next_const(heap_no, lock)) {
- ut_ad(!trx_is_ac_nl_ro(lock->trx));
+ ut_ad(!index || lock->index == index);
- if (lock_get_wait(lock)) {
- ut_a(lock_rec_has_to_wait_in_queue(lock));
- }
+ trx_mutex_enter(lock->trx);
+ ut_ad(!trx_is_ac_nl_ro(lock->trx));
+ ut_ad(trx_state_eq(lock->trx,
+ TRX_STATE_COMMITTED_IN_MEMORY)
+ || !lock_get_wait(lock)
+ || lock_rec_has_to_wait_in_queue(lock));
+ trx_mutex_exit(lock->trx);
+ }
- if (index != NULL) {
- ut_a(lock->index == index);
- }
+func_exit:
+ if (!locked_lock_trx_sys) {
+ lock_mutex_exit();
}
- goto func_exit;
+ return true;
}
ut_ad(page_rec_is_leaf(rec));
+ ut_ad(lock_mutex_own());
- if (index == NULL) {
-
- /* Nothing we can do */
-
- } else if (dict_index_is_clust(index)) {
- /* Unlike the non-debug code, this invariant can only succeed
- if the check and assertion are covered by the lock mutex. */
-
- const trx_id_t impl_trx_id = lock_clust_rec_some_has_impl(
- rec, index, offsets);
-
- const trx_t *impl_trx = impl_trx_id
- ? trx_sys.find(current_trx(), impl_trx_id, false)
- : 0;
+ const trx_id_t impl_trx_id = index && index->is_primary()
+ ? lock_clust_rec_some_has_impl(rec, index, offsets)
+ : 0;
- ut_ad(lock_mutex_own());
- /* impl_trx cannot be committed until lock_mutex_exit()
- because lock_trx_release_locks() acquires lock_sys.mutex */
+ if (trx_t *impl_trx = impl_trx_id
+ ? trx_sys.find(current_trx(), impl_trx_id, false)
+ : 0) {
+ /* impl_trx could have been committed before we
+ acquire its mutex, but not thereafter. */
- if (!impl_trx) {
+ mutex_enter(&impl_trx->mutex);
+ ut_ad(impl_trx->state != TRX_STATE_NOT_STARTED);
+ if (impl_trx->state == TRX_STATE_COMMITTED_IN_MEMORY) {
} else if (const lock_t* other_lock
= lock_rec_other_has_expl_req(
LOCK_S, block, true, heap_no,
@@ -4921,6 +4912,8 @@ lock_rec_queue_validate(
ut_ad(lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP,
block, heap_no, impl_trx));
}
+
+ mutex_exit(&impl_trx->mutex);
}
for (lock = lock_rec_get_first(lock_sys.rec_hash, block, heap_no);
@@ -4965,12 +4958,7 @@ lock_rec_queue_validate(
ut_ad(innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS ||
lock_queue_validate(lock));
-func_exit:
- if (!locked_lock_trx_sys) {
- lock_mutex_exit();
- }
-
- return(TRUE);
+ goto func_exit;
}
/*********************************************************************//**
@@ -5397,25 +5385,19 @@ lock_rec_convert_impl_to_expl_for_trx(
ut_ad(!rec_is_metadata(rec, *index));
DEBUG_SYNC_C("before_lock_rec_convert_impl_to_expl_for_trx");
-
lock_mutex_enter();
-
+ trx_mutex_enter(trx);
ut_ad(!trx_state_eq(trx, TRX_STATE_NOT_STARTED));
if (!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)
&& !lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP,
block, heap_no, trx)) {
-
- ulint type_mode;
-
- type_mode = (LOCK_REC | LOCK_X | LOCK_REC_NOT_GAP);
-
- lock_rec_add_to_queue(
- type_mode, block, heap_no, index, trx, FALSE);
+ lock_rec_add_to_queue(LOCK_REC | LOCK_X | LOCK_REC_NOT_GAP,
+ block, heap_no, index, trx, true);
}
lock_mutex_exit();
-
+ trx_mutex_exit(trx);
trx->release_reference();
DEBUG_SYNC_C("after_lock_rec_convert_impl_to_expl_for_trx");
@@ -5438,13 +5420,17 @@ static my_bool lock_rec_other_trx_holds_expl_callback(
mutex_enter(&element->mutex);
if (element->trx)
{
- lock_t *expl_lock= lock_rec_has_expl(LOCK_S | LOCK_REC_NOT_GAP, arg->block,
- arg->heap_no, element->trx);
+ trx_mutex_enter(element->trx);
+ ut_ad(element->trx->state != TRX_STATE_NOT_STARTED);
+ lock_t *expl_lock= element->trx->state == TRX_STATE_COMMITTED_IN_MEMORY
+ ? NULL : lock_rec_has_expl(LOCK_S | LOCK_REC_NOT_GAP, arg->block,
+ arg->heap_no, element->trx);
/*
An explicit lock is held by trx other than the trx holding the implicit
lock.
*/
ut_ad(!expl_lock || expl_lock->trx == arg->impl_trx);
+ trx_mutex_exit(element->trx);
}
mutex_exit(&element->mutex);
return 0;
@@ -5474,9 +5460,6 @@ static void lock_rec_other_trx_holds_expl(trx_t *caller_trx, trx_t *trx,
ut_ad(!page_rec_is_metadata(rec));
lock_mutex_enter();
ut_ad(trx->is_referenced());
- /* Prevent a data race with trx_prepare(), which could change the
- state from ACTIVE to PREPARED. Other state changes should be
- blocked by lock_mutex_own() and trx->is_referenced(). */
trx_mutex_enter(trx);
const trx_state_t state = trx->state;
trx_mutex_exit(trx);
@@ -6149,92 +6132,6 @@ lock_unlock_table_autoinc(
}
}
-/*********************************************************************//**
-Releases a transaction's locks, and releases possible other transactions
-waiting because of these locks. Change the state of the transaction to
-TRX_STATE_COMMITTED_IN_MEMORY. */
-void
-lock_trx_release_locks(
-/*===================*/
- trx_t* trx) /*!< in/out: transaction */
-{
- check_trx_state(trx);
- ut_ad(trx_state_eq(trx, TRX_STATE_PREPARED)
- || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)
- || trx_state_eq(trx, TRX_STATE_ACTIVE));
-
- bool release_lock = UT_LIST_GET_LEN(trx->lock.trx_locks) > 0;
-
- /* Don't take lock_sys.mutex if trx didn't acquire any lock. */
- if (release_lock) {
-
- /* The transition of trx->state to TRX_STATE_COMMITTED_IN_MEMORY
- is protected by both the lock_sys.mutex and the trx->mutex. */
- lock_mutex_enter();
- }
-
- /* The following assignment makes the transaction committed in memory
- and makes its changes to data visible to other transactions.
- NOTE that there is a small discrepancy from the strict formal
- visibility rules here: a human user of the database can see
- modifications made by another transaction T even before the necessary
- log segment has been flushed to the disk. If the database happens to
- crash before the flush, the user has seen modifications from T which
- will never be a committed transaction. However, any transaction T2
- which sees the modifications of the committing transaction T, and
- which also itself makes modifications to the database, will get an lsn
- larger than the committing transaction T. In the case where the log
- flush fails, and T never gets committed, also T2 will never get
- committed. */
-
- /*--------------------------------------*/
- trx_mutex_enter(trx);
- trx->state = TRX_STATE_COMMITTED_IN_MEMORY;
- trx_mutex_exit(trx);
- /*--------------------------------------*/
-
- if (trx->is_referenced()) {
-
- ut_a(release_lock);
-
- lock_mutex_exit();
-
- while (trx->is_referenced()) {
-
- DEBUG_SYNC_C("waiting_trx_is_not_referenced");
-
- /** Doing an implicit to explicit conversion
- should not be expensive. */
- ut_delay(srv_spin_wait_delay);
- }
-
- lock_mutex_enter();
- }
-
- ut_ad(!trx->is_referenced());
-
- if (release_lock) {
-
- lock_release(trx);
-
- lock_mutex_exit();
- }
-
- trx->lock.n_rec_locks = 0;
-
- /* We don't remove the locks one by one from the vector for
- efficiency reasons. We simply reset it because we would have
- released all the locks anyway. */
-
- trx->lock.table_locks.clear();
-
- ut_a(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0);
- ut_a(ib_vector_is_empty(trx->autoinc_locks));
- ut_a(trx->lock.table_locks.empty());
-
- mem_heap_empty(trx->lock.lock_heap);
-}
-
static inline dberr_t lock_trx_handle_wait_low(trx_t* trx)
{
ut_ad(lock_mutex_own());
@@ -6310,21 +6207,26 @@ static my_bool lock_table_locks_lookup(rw_trx_hash_element_t *element,
mutex_enter(&element->mutex);
if (element->trx)
{
+ trx_mutex_enter(element->trx);
check_trx_state(element->trx);
- for (const lock_t *lock= UT_LIST_GET_FIRST(element->trx->lock.trx_locks);
- lock != NULL;
- lock= UT_LIST_GET_NEXT(trx_locks, lock))
+ if (element->trx->state != TRX_STATE_COMMITTED_IN_MEMORY)
{
- ut_ad(lock->trx == element->trx);
- if (lock_get_type_low(lock) == LOCK_REC)
+ for (const lock_t *lock= UT_LIST_GET_FIRST(element->trx->lock.trx_locks);
+ lock != NULL;
+ lock= UT_LIST_GET_NEXT(trx_locks, lock))
{
- ut_ad(!dict_index_is_online_ddl(lock->index) ||
- dict_index_is_clust(lock->index));
- ut_ad(lock->index->table != table);
+ ut_ad(lock->trx == element->trx);
+ if (lock_get_type_low(lock) == LOCK_REC)
+ {
+ ut_ad(!dict_index_is_online_ddl(lock->index) ||
+ lock->index->is_primary());
+ ut_ad(lock->index->table != table);
+ }
+ else
+ ut_ad(lock->un_member.tab_lock.table != table);
}
- else
- ut_ad(lock->un_member.tab_lock.table != table);
}
+ trx_mutex_exit(element->trx);
}
mutex_exit(&element->mutex);
return 0;
@@ -6492,7 +6394,7 @@ DeadlockChecker::start_print()
if (srv_print_all_deadlocks) {
ib::info() << "Transactions deadlock detected, dumping"
- << " detailed information.";
+ " detailed information.";
}
}
diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc
index f327dce121b..04237b8f7a4 100644
--- a/storage/innobase/row/row0vers.cc
+++ b/storage/innobase/row/row0vers.cc
@@ -76,7 +76,8 @@ index record.
@param[in] index secondary index
@param[in] offsets rec_get_offsets(rec, index)
@param[in,out] mtr mini-transaction
-@return the active transaction; trx->release_reference() must be invoked
+@return the active transaction; state must be rechecked after
+trx_mutex_enter(), and trx->release_reference() must be invoked
@retval NULL if the record was committed */
UNIV_INLINE
trx_t*
@@ -90,9 +91,6 @@ row_vers_impl_x_locked_low(
mtr_t* mtr)
{
trx_id_t trx_id;
- ulint comp;
- ulint rec_del;
- const rec_t* version;
rec_t* prev_version = NULL;
ulint* clust_offsets;
mem_heap_t* heap;
@@ -144,12 +142,12 @@ row_vers_impl_x_locked_low(
}
}
- comp = page_rec_is_comp(rec);
+ const ulint comp = page_rec_is_comp(rec);
ut_ad(index->table == clust_index->table);
ut_ad(!!comp == dict_table_is_comp(index->table));
ut_ad(!comp == !page_rec_is_comp(clust_rec));
- rec_del = rec_get_deleted_flag(rec, comp);
+ const ulint rec_del = rec_get_deleted_flag(rec, comp);
if (dict_index_has_virtual(index)) {
ulint n_ext;
@@ -174,7 +172,7 @@ row_vers_impl_x_locked_low(
modify rec, and does not necessarily have an implicit x-lock
on rec. */
- for (version = clust_rec;; version = prev_version) {
+ for (const rec_t* version = clust_rec;; version = prev_version) {
row_ext_t* ext;
dtuple_t* row;
dtuple_t* entry;
@@ -194,16 +192,24 @@ row_vers_impl_x_locked_low(
heap, &prev_version, NULL,
dict_index_has_virtual(index) ? &vrow : NULL, 0);
+ trx_mutex_enter(trx);
+ const bool committed = trx_state_eq(
+ trx, TRX_STATE_COMMITTED_IN_MEMORY);
+ trx_mutex_exit(trx);
+
/* The oldest visible clustered index version must not be
delete-marked, because we never start a transaction by
inserting a delete-marked record. */
- ut_ad(prev_version
- || !rec_get_deleted_flag(version, comp)
- || !trx_sys.is_registered(caller_trx, trx_id));
+ ut_ad(committed || prev_version
+ || !rec_get_deleted_flag(version, comp));
/* Free version and clust_offsets. */
mem_heap_free(old_heap);
+ if (committed) {
+ goto not_locked;
+ }
+
if (prev_version == NULL) {
/* We reached the oldest visible version without
@@ -223,6 +229,7 @@ row_vers_impl_x_locked_low(
or updated, the leaf page record always is
created with a clear delete-mark flag.
(We never insert a delete-marked record.) */
+not_locked:
trx->release_reference();
trx = 0;
}
@@ -349,14 +356,14 @@ result_check:
if (trx->id != prev_trx_id) {
/* prev_version was the first version modified by
the trx_id transaction: no implicit x-lock */
-
- trx->release_reference();
- trx = 0;
- break;
+ goto not_locked;
}
}
- DBUG_PRINT("info", ("Implicit lock is held by trx:" TRX_ID_FMT, trx_id));
+ if (trx) {
+ DBUG_PRINT("info", ("Implicit lock is held by trx:" TRX_ID_FMT,
+ trx_id));
+ }
if (v_heap != NULL) {
mem_heap_free(v_heap);
@@ -372,7 +379,8 @@ index record.
@param[in] rec secondary index record
@param[in] index secondary index
@param[in] offsets rec_get_offsets(rec, index)
-@return the active transaction; trx->release_reference() must be invoked
+@return the active transaction; state must be rechecked after
+trx_mutex_enter(), and trx->release_reference() must be invoked
@retval NULL if the record was committed */
trx_t*
row_vers_impl_x_locked(
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index fd1128083ba..d7efb4c7033 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -252,7 +252,7 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
/* After the purge thread has been given permission to exit,
we may roll back transactions (trx->undo_no==0)
in THD::cleanup() invoked from unlink_thd() in fast shutdown,
- or in trx_rollback_resurrected() in slow shutdown.
+ or in trx_rollback_recovered() in slow shutdown.
Before any transaction-generating background threads or the
purge have been started, recv_recovery_rollback_active() can
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index e36c7d9e5b9..9afc0071e17 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -766,7 +766,7 @@ static my_bool trx_rollback_recovered_callback(rw_trx_hash_element_t *element,
if (trx_t *trx= element->trx)
{
mutex_enter(&trx->mutex);
- if (trx->is_recovered && trx_state_eq(trx, TRX_STATE_ACTIVE))
+ if (trx_state_eq(trx, TRX_STATE_ACTIVE) && trx->is_recovered)
trx_list->push_back(trx);
mutex_exit(&trx->mutex);
}
@@ -812,7 +812,8 @@ void trx_rollback_recovered(bool all)
ut_ad(trx);
ut_d(trx_mutex_enter(trx));
- ut_ad(trx->is_recovered && trx_state_eq(trx, TRX_STATE_ACTIVE));
+ ut_ad(trx->is_recovered);
+ ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_d(trx_mutex_exit(trx));
if (!srv_is_being_started && !srv_undo_sources && srv_fast_shutdown)
@@ -828,6 +829,22 @@ void trx_rollback_recovered(bool all)
ut_ad(!srv_undo_sources);
ut_ad(srv_fast_shutdown);
discard:
+ /* Note: before kill_server() invoked innobase_end() via
+ unireg_end(), it invoked close_connections(), which should initiate
+ the rollback of any user transactions via THD::cleanup() in the
+ connection threads, and wait for all THD::cleanup() to complete.
+ So, no active user transactions should exist at this point.
+
+ srv_undo_sources=false was cleared early in innobase_end().
+
+ Generally, the server guarantees that all connections using
+ InnoDB must be disconnected by the time we are reaching this code,
+ be it during shutdown or UNINSTALL PLUGIN.
+
+ Because there is no possible race condition with any
+ concurrent user transaction, we do not have to invoke
+ trx->commit_state() or wait for !trx->is_referenced()
+ before trx_sys.deregister_rw(trx). */
trx_sys.deregister_rw(trx);
trx_free_at_shutdown(trx);
}
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 46a0581025e..cdabaad5f53 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -465,6 +465,48 @@ void trx_free(trx_t*& trx)
trx = NULL;
}
+/** Transition to committed state, to release implicit locks. */
+inline void trx_t::commit_state()
+{
+ ut_ad(state == TRX_STATE_PREPARED
+ || state == TRX_STATE_PREPARED_RECOVERED
+ || state == TRX_STATE_ACTIVE);
+ /* This makes the transaction committed in memory and makes its
+ changes to data visible to other transactions. NOTE that there is a
+ small discrepancy from the strict formal visibility rules here: a
+ user of the database can see modifications made by another
+ transaction T even before the necessary redo log segment has been
+ flushed to the disk. If the database happens to crash before the
+ flush, the user has seen modifications from T which will never be a
+ committed transaction. However, any transaction T2 which sees the
+ modifications of the committing transaction T, and which also itself
+ makes modifications to the database, will get an lsn larger than the
+ committing transaction T. In the case where the log flush fails, and
+ T never gets committed, also T2 will never get committed. */
+ trx_mutex_enter(this);
+ state= TRX_STATE_COMMITTED_IN_MEMORY;
+ trx_mutex_exit(this);
+ ut_ad(id || !is_referenced());
+}
+
+/** Release any explicit locks of a committing transaction. */
+inline void trx_t::release_locks()
+{
+ DBUG_ASSERT(state == TRX_STATE_COMMITTED_IN_MEMORY);
+ DBUG_ASSERT(!is_referenced());
+
+ if (UT_LIST_GET_LEN(lock.trx_locks))
+ {
+ lock_release(this);
+ lock.n_rec_locks = 0;
+ ut_ad(UT_LIST_GET_LEN(lock.trx_locks) == 0);
+ ut_ad(ib_vector_is_empty(autoinc_locks));
+ mem_heap_empty(lock.lock_heap);
+ }
+
+ lock.table_locks.clear(); /* outside "if" to work around MDEV-20483 */
+}
+
/** At shutdown, frees a transaction object. */
void
trx_free_at_shutdown(trx_t *trx)
@@ -482,21 +524,15 @@ trx_free_at_shutdown(trx_t *trx)
&& !srv_undo_sources && srv_fast_shutdown))));
ut_a(trx->magic_n == TRX_MAGIC_N);
- lock_trx_release_locks(trx);
+ trx->commit_state();
+ trx->release_locks();
trx_undo_free_at_shutdown(trx);
ut_a(!trx->read_only);
DBUG_LOG("trx", "Free prepared: " << trx);
trx->state = TRX_STATE_NOT_STARTED;
-
- /* Undo trx_resurrect_table_locks(). */
- lock_trx_lock_list_init(&trx->lock.trx_locks);
-
- /* Note: This vector is not guaranteed to be empty because the
- transaction was never committed and therefore lock_trx_release()
- was not called. */
- trx->lock.table_locks.clear();
+ ut_ad(!UT_LIST_GET_LEN(trx->lock.trx_locks));
trx->id = 0;
trx_free(trx);
@@ -1348,8 +1384,8 @@ trx_commit_in_memory(
/* Note: We are asserting without holding the lock mutex. But
that is OK because this transaction is not waiting and cannot
- be rolled back and no new locks can (or should not) be added
- becuase it is flagged as a non-locking read-only transaction. */
+ be rolled back and no new locks can (or should) be added
+ because it is flagged as a non-locking read-only transaction. */
ut_a(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0);
@@ -1367,27 +1403,33 @@ trx_commit_in_memory(
DBUG_LOG("trx", "Autocommit in memory: " << trx);
trx->state = TRX_STATE_NOT_STARTED;
} else {
- if (trx->id > 0) {
- /* For consistent snapshot, we need to remove current
- transaction from rw_trx_hash before doing commit and
- releasing locks. */
+ trx->commit_state();
+
+ if (trx->id) {
trx_sys.deregister_rw(trx);
- }
- lock_trx_release_locks(trx);
- ut_ad(trx->read_only || !trx->rsegs.m_redo.rseg || trx->id);
+ /* Wait for any implicit-to-explicit lock
+ conversions to cease, so that there will be no
+ race condition in lock_release(). */
+ while (UNIV_UNLIKELY(trx->is_referenced())) {
+ ut_delay(srv_spin_wait_delay);
+ }
- /* Remove the transaction from the list of active
- transactions now that it no longer holds any user locks. */
+ trx->release_locks();
+ trx->id = 0;
+ } else {
+ ut_ad(trx->read_only || !trx->rsegs.m_redo.rseg);
+ trx->release_locks();
+ }
- ut_ad(trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY));
DEBUG_SYNC_C("after_trx_committed_in_memory");
- if (trx->read_only || trx->rsegs.m_redo.rseg == NULL) {
+ if (trx->read_only || !trx->rsegs.m_redo.rseg) {
MONITOR_INC(MONITOR_TRX_RO_COMMIT);
} else {
trx_update_mod_tables_timestamp(trx);
MONITOR_INC(MONITOR_TRX_RW_COMMIT);
+ trx->is_recovered = false;
}
while (dict_table_t* table = UT_LIST_GET_FIRST(
@@ -1395,8 +1437,6 @@ trx_commit_in_memory(
UT_LIST_REMOVE(trx->lock.evicted_tables, table);
dict_mem_table_free(table);
}
-
- trx->id = 0;
}
ut_ad(!trx->rsegs.m_redo.undo);
@@ -2222,7 +2262,7 @@ int trx_recover_for_mysql(XID *xid_list, uint len)
struct trx_get_trx_by_xid_callback_arg
{
- XID *xid;
+ const XID *xid;
trx_t *trx;
};
@@ -2234,6 +2274,7 @@ static my_bool trx_get_trx_by_xid_callback(rw_trx_hash_element_t *element,
mutex_enter(&element->mutex);
if (trx_t *trx= element->trx)
{
+ trx_mutex_enter(trx);
if (trx->is_recovered &&
(trx_state_eq(trx, TRX_STATE_PREPARED) ||
trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) &&
@@ -2250,23 +2291,19 @@ static my_bool trx_get_trx_by_xid_callback(rw_trx_hash_element_t *element,
arg->trx= trx;
found= 1;
}
+ trx_mutex_exit(trx);
}
mutex_exit(&element->mutex);
return found;
}
-
-/**
- Finds PREPARED XA transaction by xid.
-
- trx may have been committed, unless the caller is holding lock_sys.mutex.
-
- @param[in] xid X/Open XA transaction identifier
-
- @return trx or NULL; on match, the trx->xid will be invalidated;
-*/
-
-trx_t *trx_get_trx_by_xid(XID *xid)
+/** Look up an X/Open distributed transaction in XA PREPARE state.
+@param[in] xid X/Open XA transaction identifier
+@return transaction on match (the trx_t::xid will be invalidated);
+note that the trx may have been committed before the caller acquires
+trx_t::mutex
+@retval NULL if no match */
+trx_t* trx_get_trx_by_xid(const XID* xid)
{
trx_get_trx_by_xid_callback_arg arg= { xid, 0 };
diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc
index 56a48ad5bf6..933a9d2600e 100644
--- a/storage/innobase/trx/trx0undo.cc
+++ b/storage/innobase/trx/trx0undo.cc
@@ -1644,7 +1644,7 @@ trx_undo_free_at_shutdown(trx_t *trx)
TRX_STATE_COMMITTED_IN_MEMORY));
/* fall through */
case TRX_UNDO_ACTIVE:
- /* lock_trx_release_locks() assigns
+ /* trx_t::commit_state() assigns
trx->state = TRX_STATE_COMMITTED_IN_MEMORY. */
ut_a(!srv_was_started
|| srv_read_only_mode
@@ -1671,7 +1671,7 @@ trx_undo_free_at_shutdown(trx_t *trx)
TRX_STATE_COMMITTED_IN_MEMORY));
/* fall through */
case TRX_UNDO_ACTIVE:
- /* lock_trx_release_locks() assigns
+ /* trx_t::commit_state() assigns
trx->state = TRX_STATE_COMMITTED_IN_MEMORY. */
ut_a(!srv_was_started
|| srv_read_only_mode
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 7dc07a971b3..52ae6dd8e2b 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -2858,6 +2858,17 @@ static void reset_thd_trn(THD *thd, MARIA_HA *first_table)
{
next= table->trn_next;
_ma_reset_trn_for_table(table);
+
+ /*
+ If table has changed by this statement, invalidate it from the query
+ cache
+ */
+ if (table->row_changes != table->start_row_changes)
+ {
+ table->start_row_changes= table->row_changes;
+ DBUG_ASSERT(table->s->chst_invalidator != NULL);
+ (*table->s->chst_invalidator)(table->s->data_file_name.str);
+ }
}
DBUG_VOID_RETURN;
}
@@ -3338,6 +3349,8 @@ static int maria_commit(handlerton *hton __attribute__ ((unused)),
THD *thd, bool all)
{
TRN *trn= THD_TRN;
+ int res;
+ MARIA_HA *used_instances= (MARIA_HA*) trn->used_instances;
DBUG_ENTER("maria_commit");
DBUG_ASSERT(trnman_has_locked_tables(trn) == 0);
@@ -3348,8 +3361,9 @@ static int maria_commit(handlerton *hton __attribute__ ((unused)),
if ((thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
!all)
DBUG_RETURN(0); // end of statement
- reset_thd_trn(thd, (MARIA_HA*) trn->used_instances);
- DBUG_RETURN(ma_commit(trn)); // end of transaction
+ res= ma_commit(trn);
+ reset_thd_trn(thd, used_instances);
+ DBUG_RETURN(res);
}
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 720f4e1c783..13ae2a6150a 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -657,6 +657,7 @@ struct st_maria_handler
invalidator_by_filename invalidator; /* query cache invalidator */
ulonglong last_auto_increment; /* auto value at start of statement */
ulonglong row_changes; /* Incremented for each change */
+ ulonglong start_row_changes; /* Row changes since start trans */
ulong this_unique; /* uniq filenumber or thread */
ulong last_unique; /* last unique number */
ulong this_loop; /* counter for this open */
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc
index 1b4e8575122..e29300b5db4 100644
--- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc
@@ -33,4 +33,10 @@ if (!$have_mroonga_storage_engine) {
UNINSTALL PLUGIN mroonga;
}
+# Some test re-creates the test database. Put it back in the
+# original character set
+--source include/default_charset.inc
+disable_query_log;
+drop database test;
+create database test;
enable_query_log;
diff --git a/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc b/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc
index 6c3e29537b1..40fabce0517 100644
--- a/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc
+++ b/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc
@@ -10,6 +10,8 @@
# - C IS NOT NULL
# - HAVING clause
+--source include/default_optimizer_switch.inc
+
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/storage/rocksdb/mysql-test/rocksdb/my.cnf b/storage/rocksdb/mysql-test/rocksdb/my.cnf
index 6f1722addc5..ab89713cc58 100644
--- a/storage/rocksdb/mysql-test/rocksdb/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb/my.cnf
@@ -4,7 +4,6 @@
skip-innodb
default-storage-engine=rocksdb
-
sql-mode=NO_ENGINE_SUBSTITUTION
explicit-defaults-for-timestamp=1
loose-rocksdb_lock_wait_timeout=1
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/concurrent_alter.result b/storage/rocksdb/mysql-test/rocksdb/r/concurrent_alter.result
index 396f80a2ecb..b8c73b2418e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/concurrent_alter.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/concurrent_alter.result
@@ -8,5 +8,5 @@ Table Create Table
a1 CREATE TABLE `a1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
-) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
+) ENGINE=ROCKSDB DEFAULT CHARSET=DEFAULT_CHARSET
DROP DATABASE mysqlslap;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_qcache.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_qcache.result
index 57c5b897462..2847921716c 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_qcache.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_qcache.result
@@ -1,3 +1,7 @@
+set @save_query_cache_type=@@global.query_cache_type;
+set @save_query_cache_size=@@global.query_cache_size;
+set @@global.query_cache_type=1;
+set @@global.query_cache_size=1024*1024;
create table t1 (pk int primary key, c char(8)) engine=RocksDB;
insert into t1 values (1,'new'),(2,'new');
select * from t1;
@@ -37,3 +41,5 @@ show global status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
drop table t1;
+set @@global.query_cache_type=@save_query_cache_type;
+set @@global.query_cache_size=@save_query_cache_size;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/select.result b/storage/rocksdb/mysql-test/rocksdb/r/select.result
index 2bb2bd636dc..7ea43adc9ea 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/select.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/select.result
@@ -68,6 +68,7 @@ a
SELECT FOUND_ROWS();
FOUND_ROWS()
3
+SET @save_query_cache=@@global.query_cache_size;
SET GLOBAL query_cache_size = 1024*1024;
SELECT SQL_CACHE * FROM t1, t2;
a b pk a b pk
@@ -89,7 +90,7 @@ a b pk a b pk
200 bar 6 1 z 2
200 bar 6 100 foobar 1
200 bar 6 200 bar 3
-SET GLOBAL query_cache_size = 1048576;
+SET @@global.query_cache_size=@save_query_cache;
SELECT a+10 AS field1, CONCAT(b,':',b) AS field2 FROM t1
WHERE b > 'b' AND a IS NOT NULL
GROUP BY 2 DESC, field1 ASC
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test b/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
index 9ee58aa5217..3ebdd67a1a6 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
@@ -32,6 +32,8 @@ EOF
--exec bash $MYSQL_TMP_DIR/concurrent_alter.sh
+let $server_charset=`select @@character_set_server`;
+--replace_result $server_charset DEFAULT_CHARSET
SHOW CREATE TABLE a1;
DROP DATABASE mysqlslap;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
index e2c7f143250..627d7da4171 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
@@ -93,5 +93,6 @@ information_schema: MDEV-14372: unstable testcase
mysqlbinlog_gtid_skip_empty_trans_rocksdb : MariaRocks: requires GTIDs
drop_table: Hangs on shutdown
+add_index_inplace: not stable result
rocksdb_range2 : result difference, update after MDEV-16746 is fixed
add_index_inplace: FORCE INDEX gives wrong count
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test b/storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test
index 15db3288084..68fb1a09526 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/records_in_range.test
@@ -1,6 +1,6 @@
--source include/have_rocksdb.inc
-
--source include/restart_mysqld.inc
+--source include/default_optimizer_switch.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test
index b62002b0020..0369e758f5d 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test
@@ -3,7 +3,12 @@
# Important:
# The test needs to be run with --mysqld=--query-cache-type=1
--- source include/have_query_cache.inc
+--source include/have_query_cache.inc
+set @save_query_cache_type=@@global.query_cache_type;
+set @save_query_cache_size=@@global.query_cache_size;
+set @@global.query_cache_type=1;
+set @@global.query_cache_size=1024*1024;
+
--enable_connect_log
create table t1 (pk int primary key, c char(8)) engine=RocksDB;
@@ -30,3 +35,9 @@ show status like 'Qcache_not_cached';
show global status like 'Qcache_hits';
drop table t1;
+
+#
+# Cleanup
+#
+set @@global.query_cache_type=@save_query_cache_type;
+set @@global.query_cache_size=@save_query_cache_size;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/select.test b/storage/rocksdb/mysql-test/rocksdb/t/select.test
index c4e1ad464a3..3d9bdc7b4b8 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/select.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/select.test
@@ -40,11 +40,11 @@ SELECT SQL_BIG_RESULT SQL_CALC_FOUND_ROWS DISTINCT(t2.a)
FROM t1 t1_1, t2, t1 t1_2;
SELECT FOUND_ROWS();
-let $query_cache = `SELECT @@query_cache_size`;
+SET @save_query_cache=@@global.query_cache_size;
SET GLOBAL query_cache_size = 1024*1024;
--sorted_result
SELECT SQL_CACHE * FROM t1, t2;
-eval SET GLOBAL query_cache_size = $query_cache;
+SET @@global.query_cache_size=@save_query_cache;
# Combination of main clauses
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_rows_examined.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_rows_examined.test
index f9e871ff1c8..714c2c6056c 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_rows_examined.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_rows_examined.test
@@ -38,6 +38,7 @@ connection conn2;
set debug_sync='now WAIT_FOR parked';
# display "Rows Examined" before returning from call
+--replace_result Execute Query
--replace_column 1 ### 2 ### 3 ### 4 ### 6 ### 10 ### 11 ### 12 ###
--sorted_result
SHOW PROCESSLIST;
diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/my.cnf b/storage/rocksdb/mysql-test/rocksdb_rpl/my.cnf
index ec7370b65f0..518b16535df 100644
--- a/storage/rocksdb/mysql-test/rocksdb_rpl/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb_rpl/my.cnf
@@ -5,7 +5,6 @@
skip-innodb
default-storage-engine=rocksdb
-
sql-mode=NO_ENGINE_SUBSTITUTION
explicit-defaults-for-timestamp=1
loose-rocksdb_lock_wait_timeout=1
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf b/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
index 780e46b4f22..6597d18b060 100644
--- a/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
@@ -4,5 +4,6 @@
[mysqld.1]
binlog_format=row
+
[mysqld.2]
binlog_format=row
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/my.cnf b/storage/rocksdb/mysql-test/rocksdb_sys_vars/my.cnf
index 20c2d025e0c..f37bb45bad6 100644
--- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/my.cnf
@@ -4,7 +4,6 @@
skip-innodb
default-storage-engine=rocksdb
-
sql-mode=NO_ENGINE_SUBSTITUTION
explicit-defaults-for-timestamp=1
loose-rocksdb_lock_wait_timeout=1
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-master.opt b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-master.opt
deleted file mode 100644
index e980c2de7ff..00000000000
--- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---transaction_isolation=READ-COMMITTED
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-slave.opt b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-slave.opt
deleted file mode 100644
index 264c5c1a4b4..00000000000
--- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_row_crash_safe-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-slave-start --relay-log-info-repository=TABLE --relay-log-recovery=1 --transaction_isolation=READ-COMMITTED
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-master.opt b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-master.opt
deleted file mode 100644
index e980c2de7ff..00000000000
--- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---transaction_isolation=READ-COMMITTED
diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-slave.opt b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-slave.opt
deleted file mode 100644
index 264c5c1a4b4..00000000000
--- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_stm_mixed_crash_safe-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-slave-start --relay-log-info-repository=TABLE --relay-log-recovery=1 --transaction_isolation=READ-COMMITTED
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result
new file mode 100644
index 00000000000..91913f33b03
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result
@@ -0,0 +1,109 @@
+drop table if exists t;
+create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb;
+insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
+explain select x,id from t force index (x) where x=0 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=0 and id=0;
+x id
+0 0
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select y,id from t force index (x) where x=0 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1
+flush status;
+select y,id from t force index (x) where x=0 and id=0;
+y id
+0 0
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=0 and id=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=0 and id=1;
+x id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select y,id from t force index (x)where x=0 and id=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1
+flush status;
+select y,id from t force index(x) where x=0 and id=1;
+y id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=2 and id=3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=2 and id=3;
+x id
+2 3
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=2 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=2 and id=0;
+x id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result
new file mode 100644
index 00000000000..8c8afb63bea
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result
@@ -0,0 +1,109 @@
+drop table if exists t;
+create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=tokudb;
+insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
+explain select x,id from t force index (x) where x=0 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=0 and id=0;
+x id
+0 0
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select y,id from t force index (x) where x=0 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1
+flush status;
+select y,id from t force index (x) where x=0 and id=0;
+y id
+0 0
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=0 and id=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=0 and id=1;
+x id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select y,id from t force index (x)where x=0 and id=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1
+flush status;
+select y,id from t force index(x) where x=0 and id=1;
+y id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=2 and id=3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=2 and id=3;
+x id
+2 3
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select x,id from t force index (x) where x=2 and id=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const x x 8 const,const 1 Using index
+flush status;
+select x,id from t force index (x) where x=2 and id=0;
+x id
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result
new file mode 100644
index 00000000000..9fb1a7f0880
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result
@@ -0,0 +1,40 @@
+drop table if exists t;
+create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=innodb;
+insert into t values (0,0,0,0),(0,1,0,1);
+explain select c,a,b from t where c=0 and a=0 and b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const PRIMARY,c PRIMARY 8 const,const 1
+flush status;
+select c,a,b from t where c=0 and a=0 and b=1;
+c a b
+0 0 1
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select c,a,b from t force index (c) where c=0 and a=0 and b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const c c 12 const,const,const 1 Using index
+flush status;
+select c,a,b from t force index (c) where c=0 and a=0 and b=1;
+c a b
+0 0 1
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result
new file mode 100644
index 00000000000..3efbfb7f643
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result
@@ -0,0 +1,40 @@
+drop table if exists t;
+create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=tokudb;
+insert into t values (0,0,0,0),(0,1,0,1);
+explain select c,a,b from t where c=0 and a=0 and b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const PRIMARY,c PRIMARY 8 const,const 1
+flush status;
+select c,a,b from t where c=0 and a=0 and b=1;
+c a b
+0 0 1
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+explain select c,a,b from t force index (c) where c=0 and a=0 and b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t const c c 12 const,const,const 1 Using index
+flush status;
+select c,a,b from t force index (c) where c=0 and a=0 and b=1;
+c a b
+0 0 1
+show status like 'handler_read%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 0
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-0.test b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-0.test
index eaac82d260d..ee6ac5dd5d1 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-0.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-0.test
@@ -1,4 +1,5 @@
source include/have_tokudb.inc;
+source include/default_optimizer_switch.inc;
# test that the query planner picks clustering keys for joins
# create table s
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-1.test b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-1.test
index 7ed2fc2cd7d..58b24bc93c8 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-1.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-1.test
@@ -1,4 +1,5 @@
source include/have_tokudb.inc;
+source include/default_optimizer_switch.inc;
# test that the query planner picks clustering keys for joins
# create table s
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-2.test b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-2.test
index 5b648a5325c..f24bfc08b3f 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-2.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-2.test
@@ -1,4 +1,5 @@
source include/have_tokudb.inc;
+source include/default_optimizer_switch.inc;
# test that the query planner picks clustering keys for joins
# create table s
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-3.test b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-3.test
index afbfeed2799..14c9de53236 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_2968-3.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_2968-3.test
@@ -1,4 +1,6 @@
source include/have_tokudb.inc;
+source include/default_optimizer_switch.inc;
+
# test that the query planner picks clustering keys for 3 table joins
# create table s
diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test
index 488ccc422e9..766d0c107db 100644
--- a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test
+++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test
@@ -5,8 +5,6 @@ disable_warnings;
drop table if exists t;
enable_warnings;
-select @@optimizer_switch;
-
create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb;
insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test
index 14a72a460e4..254207ec9a1 100644
--- a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test
+++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test
@@ -4,8 +4,6 @@ disable_warnings;
drop table if exists t;
enable_warnings;
-select @@optimizer_switch;
-
create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=tokudb;
insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test
index bfb56faf48e..92c1c90861e 100644
--- a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test
+++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test
@@ -5,8 +5,6 @@ disable_warnings;
drop table if exists t;
enable_warnings;
-select @@optimizer_switch;
-
create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=innodb;
insert into t values (0,0,0,0),(0,1,0,1);
diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test
index a088a16c0fd..bb4b97bf011 100644
--- a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test
+++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test
@@ -4,8 +4,6 @@ disable_warnings;
drop table if exists t;
enable_warnings;
-select @@optimizer_switch;
-
create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=tokudb;
insert into t values (0,0,0,0),(0,1,0,1);
diff --git a/storage/tokudb/mysql-test/tokudb/t/type_varchar.opt b/storage/tokudb/mysql-test/tokudb/t/type_varchar.opt
new file mode 100644
index 00000000000..35db081c15b
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb/t/type_varchar.opt
@@ -0,0 +1 @@
+--character-set-server=latin1 --collation_server=latin1_swedish_ci
diff --git a/storage/tokudb/mysql-test/tokudb/t/type_varchar.test b/storage/tokudb/mysql-test/tokudb/t/type_varchar.test
index 5becbf138a3..7db848c959a 100644
--- a/storage/tokudb/mysql-test/tokudb/t/type_varchar.test
+++ b/storage/tokudb/mysql-test/tokudb/t/type_varchar.test
@@ -1,4 +1,5 @@
source include/have_tokudb.inc;
+source include/default_charset.inc;
set default_storage_engine='tokudb';
--disable_warnings
drop table if exists t1, t2;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/disabled.def b/storage/tokudb/mysql-test/tokudb_parts/disabled.def
index 17a8ddcc12e..385772e3bcc 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/disabled.def
+++ b/storage/tokudb/mysql-test/tokudb_parts/disabled.def
@@ -8,3 +8,4 @@ partition_max_sub_parts_key_range_tokudb: 5.6 test not merged yet
partition_max_sub_parts_list_tokudb: 5.6 test not merged yet
partition_max_sub_parts_range_tokudb: 5.6 test not merged yet
nonflushing_analyze_debug: Freezes in MariaDB 10.0
+partition_alter4_tokudb : Takes frequently longer than 900 seconds