summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
committerSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
commit0accbd0364e0333e0b119aa9ce93e34ded9df6cb (patch)
treebdf0738c29dc1f57fbfba3a1754524e238f15b52 /mysql-test
parent37f87d73ae8dc6c30594867b40a5d70159acf63c (diff)
downloadmariadb-git-0accbd0364e0333e0b119aa9ce93e34ded9df6cb.tar.gz
lots of post-merge changes
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/extra/rpl_tests/rpl_innodb.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_start_stop_slave.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test1
-rw-r--r--mysql-test/include/ctype_numconv.inc2
-rw-r--r--mysql-test/include/diff_tables.inc2
-rw-r--r--mysql-test/include/have_dynamic_loading.inc9
-rw-r--r--mysql-test/include/have_example_plugin.inc7
-rw-r--r--mysql-test/include/have_innodb.opt2
-rw-r--r--mysql-test/include/have_semisync_plugin.inc10
-rw-r--r--mysql-test/include/have_simple_parser.inc7
-rw-r--r--mysql-test/include/have_udf.inc8
-rw-r--r--mysql-test/include/have_xtradb.inc9
-rw-r--r--mysql-test/include/mysqld--help.inc2
-rw-r--r--mysql-test/lib/mtr_cases.pm12
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl1
-rwxr-xr-xmysql-test/mysql-test-run.pl21
-rw-r--r--mysql-test/r/archive.result12
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/ctype_binary.result1
-rw-r--r--mysql-test/r/ctype_cp1251.result1
-rw-r--r--mysql-test/r/ctype_latin1.result1
-rw-r--r--mysql-test/r/ctype_ucs.result8
-rw-r--r--mysql-test/r/ctype_utf16.result1
-rw-r--r--mysql-test/r/ctype_utf32.result1
-rw-r--r--mysql-test/r/ctype_utf8.result2
-rw-r--r--mysql-test/r/func_math.result4
-rw-r--r--mysql-test/r/grant.result6
-rw-r--r--mysql-test/r/index_merge_innodb.result38
-rw-r--r--mysql-test/r/information_schema.result14
-rw-r--r--mysql-test/r/innodb-lock.result57
-rw-r--r--mysql-test/r/innodb-semi-consistent.result47
-rw-r--r--mysql-test/r/innodb-zip.result421
-rw-r--r--mysql-test/r/innodb.result3305
-rw-r--r--mysql-test/r/innodb_bug36172.result1
-rw-r--r--mysql-test/r/innodb_bug47167.result24
-rw-r--r--mysql-test/r/innodb_file_format.result44
-rw-r--r--mysql-test/r/join_cache.result3
-rw-r--r--mysql-test/r/join_optimizer.result2
-rw-r--r--mysql-test/r/join_outer_jcl6.result15
-rw-r--r--mysql-test/r/log_slow.result7
-rw-r--r--mysql-test/r/log_tables_upgrade.result1
-rw-r--r--mysql-test/r/merge_debug.result4
-rw-r--r--mysql-test/r/myisam.result2
-rw-r--r--mysql-test/r/mysql_upgrade.result8
-rw-r--r--mysql-test/r/mysql_upgrade_ssl.result16
-rw-r--r--mysql-test/r/mysqld--help-notwin.result93
-rw-r--r--mysql-test/r/not_partition.result2
-rw-r--r--mysql-test/r/optimizer_switch.result99
-rw-r--r--mysql-test/r/optimizer_switch_eng_cond_pushdown1.result2
-rw-r--r--mysql-test/r/optimizer_switch_eng_cond_pushdown2.result2
-rw-r--r--mysql-test/r/partition_innodb.result3
-rw-r--r--mysql-test/r/partition_key_cache.result4
-rw-r--r--mysql-test/r/partition_pruning.result2
-rw-r--r--mysql-test/r/plugin.result6
-rw-r--r--mysql-test/r/ps.result4
-rw-r--r--mysql-test/r/query_cache.result9
-rw-r--r--mysql-test/r/query_cache_debug.result12
-rw-r--r--mysql-test/r/select.result2
-rw-r--r--mysql-test/r/select_jcl6.result153
-rw-r--r--mysql-test/r/select_pkeycache.result153
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/r/single_delete_update.result54
-rw-r--r--mysql-test/r/sp.result6
-rw-r--r--mysql-test/r/status_user.result1
-rw-r--r--mysql-test/r/subselect.result55
-rw-r--r--mysql-test/r/subselect3.result7
-rw-r--r--mysql-test/r/subselect3_jcl6.result56
-rw-r--r--mysql-test/r/subselect4.result29
-rw-r--r--mysql-test/r/subselect_cache.result232
-rw-r--r--mysql-test/r/subselect_no_mat.result337
-rw-r--r--mysql-test/r/subselect_no_opts.result337
-rw-r--r--mysql-test/r/subselect_no_semijoin.result337
-rw-r--r--mysql-test/r/subselect_sj2.result7
-rw-r--r--mysql-test/r/subselect_sj2_jcl6.result9
-rw-r--r--mysql-test/r/table_options.result46
-rw-r--r--mysql-test/r/type_datetime.result6
-rw-r--r--mysql-test/r/type_varchar.result2
-rw-r--r--mysql-test/r/warnings.result2
-rw-r--r--mysql-test/r/xtradb_mrr.result (renamed from mysql-test/r/innodb_mrr.result)0
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result4
-rw-r--r--mysql-test/suite/binlog/t/binlog_base64_flag.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_index-master.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_old_versions.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_unsafe.test4
-rw-r--r--mysql-test/suite/federated/federated_debug.result5
-rw-r--r--mysql-test/suite/federated/federated_plugin-master.opt1
-rw-r--r--mysql-test/suite/innodb/combinations12
-rw-r--r--mysql-test/suite/innodb/r/innodb.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53591.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result2
-rw-r--r--mysql-test/suite/innodb/suite.pm19
-rw-r--r--mysql-test/suite/innodb/t/disabled.def1
-rw-r--r--mysql-test/suite/innodb/t/innodb-analyze.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-44030.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-optimize.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb-consistent.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-index_ucs2.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-lock.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-replace.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-semi-consistent.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-system-table-view.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-timeout.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-ucs2.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-use-sys-malloc.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-zip.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb.test19
-rw-r--r--mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug21704.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30919.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34053.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34300.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug35220.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug36169.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug36172.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug38231.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug39438.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug40360.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug40565.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug41904.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42419.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44032.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44369.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44571.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug45357.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug46000.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug46676.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47167.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47621.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47622.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47777.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug48024.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug49164.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug51378.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug51920.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52199.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52663.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52745.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53290.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53591.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53592.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53674.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54679.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56716.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug57255.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_file_format.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_multi_update.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql_rbk.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_notembedded.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_timeout_rollback.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_trx_weight.test1
-rw-r--r--mysql-test/suite/maria/r/compat_aliases.result4
-rw-r--r--mysql-test/suite/maria/r/maria-connect.result12
-rw-r--r--mysql-test/suite/maria/r/maria-no-logging.result4
-rw-r--r--mysql-test/suite/maria/r/maria-recovery-rtree-ft.result12
-rw-r--r--mysql-test/suite/maria/r/maria-recovery.result2
-rw-r--r--mysql-test/suite/maria/r/maria-recovery2.result6
-rw-r--r--mysql-test/suite/maria/r/maria-recovery3.result2
-rw-r--r--mysql-test/suite/maria/r/maria.result109
-rw-r--r--mysql-test/suite/maria/r/maria2.result1
-rw-r--r--mysql-test/suite/maria/r/maria3.result11
-rw-r--r--mysql-test/suite/maria/r/ps_maria.result396
-rw-r--r--mysql-test/suite/maria/t/maria-connect.test2
-rw-r--r--mysql-test/suite/maria/t/maria-no-logging.test2
-rw-r--r--mysql-test/suite/maria/t/maria-preload-master.opt1
-rw-r--r--mysql-test/suite/maria/t/maria-recovery-rtree-ft.test2
-rw-r--r--mysql-test/suite/maria/t/maria-recovery.test2
-rw-r--r--mysql-test/suite/maria/t/maria-recovery2.test2
-rw-r--r--mysql-test/suite/maria/t/maria-recovery3.test2
-rw-r--r--mysql-test/suite/maria/t/maria.test15
-rw-r--r--mysql-test/suite/maria/t/maria2.test1
-rw-r--r--mysql-test/suite/maria/t/maria3.test2
-rw-r--r--mysql-test/suite/parts/r/partition_repair_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_special_innodb.result4
-rw-r--r--mysql-test/suite/parts/r/partition_special_myisam.result4
-rw-r--r--mysql-test/suite/parts/t/partition_debug_innodb.test1
-rw-r--r--mysql-test/suite/parts/t/partition_debug_myisam-master.opt2
-rw-r--r--mysql-test/suite/parts/t/partition_debug_myisam.test1
-rw-r--r--mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt2
-rw-r--r--mysql-test/suite/parts/t/partition_special_innodb-master.opt2
-rw-r--r--mysql-test/suite/percona/percona_innodb_deadlock_count.test2
-rw-r--r--mysql-test/suite/percona/percona_innodb_doublewrite_file.test2
-rw-r--r--mysql-test/suite/percona/percona_innodb_use_sys_stats_table-master.opt2
-rw-r--r--mysql-test/suite/percona/percona_innodb_use_sys_stats_table.test2
-rw-r--r--mysql-test/suite/percona/percona_xtradb_admin_command.test2
-rw-r--r--mysql-test/suite/percona/percona_xtradb_bug317074.test2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade.result180
-rw-r--r--mysql-test/suite/perfschema/t/no_threads-master.opt2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ddl.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_optimize.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_rotate_logs.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_maria.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2.test14
-rw-r--r--mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_relayspace.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_event-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_event.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_maria.test2
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result2
-rw-r--r--mysql-test/suite/sys_vars/r/aria_block_size_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/aria_checkpoint_interval_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/aria_force_start_after_recovery_failures_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/aria_group_commit_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/r/aria_group_commit_interval_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/aria_log_file_size_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/aria_log_purge_type_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/r/aria_max_sort_file_size_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/aria_page_checksum_basic.result39
-rw-r--r--mysql-test/suite/sys_vars/r/aria_pagecache_age_threshold_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/aria_pagecache_division_limit_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/aria_recover_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/aria_repair_threads_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/aria_stats_method_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/aria_sync_log_dir_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/r/aria_used_for_temp_tables_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/deadlock_search_depth_long_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/deadlock_search_depth_short_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/deadlock_timeout_long_basic.result42
-rw-r--r--mysql-test/suite/sys_vars/r/deadlock_timeout_short_basic.result42
-rw-r--r--mysql-test/suite/sys_vars/r/debug_crc_break_basic.result39
-rw-r--r--mysql-test/suite/sys_vars/r/default_storage_engine_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/extra_max_connections_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/extra_port_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/join_cache_level_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/key_buffer_size_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_segments_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/log_slow_filter_basic.result96
-rw-r--r--mysql-test/suite/sys_vars/r/log_slow_rate_limit_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result64
-rw-r--r--mysql-test/suite/sys_vars/r/maria_block_size_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/maria_checkpoint_interval_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/maria_force_start_after_recovery_failures_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/maria_group_commit_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/maria_group_commit_interval_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/maria_log_file_size_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/r/maria_log_purge_type_basic.result49
-rw-r--r--mysql-test/suite/sys_vars/r/maria_max_sort_file_size_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/r/maria_page_checksum_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/maria_pagecache_age_threshold_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/r/maria_pagecache_buffer_size_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/maria_pagecache_division_limit_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/maria_recover_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/r/maria_repair_threads_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/maria_sort_buffer_size_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/maria_stats_method_basic.result52
-rw-r--r--mysql-test/suite/sys_vars/r/maria_sync_log_dir_basic.result49
-rw-r--r--mysql-test/suite/sys_vars/r/maria_used_for_temp_tables_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/mrr_buffer_size_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_use_mrr_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/plugin_dir_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/plugin_maturity_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/rowid_merge_buff_size_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/storage_engine_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/thread_stack_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/userstat_basic.result39
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars-master.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars.test59
-rw-r--r--mysql-test/suite/sys_vars/t/aria_block_size_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/aria_checkpoint_interval_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/aria_force_start_after_recovery_failures_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/aria_group_commit_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_group_commit_interval_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/aria_log_file_size_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_log_purge_type_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_page_checksum_basic.test39
-rw-r--r--mysql-test/suite/sys_vars/t/aria_pagecache_age_threshold_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/aria_pagecache_division_limit_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/aria_recover_basic.test51
-rw-r--r--mysql-test/suite/sys_vars/t/aria_repair_threads_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/aria_stats_method_basic.test46
-rw-r--r--mysql-test/suite/sys_vars/t/aria_sync_log_dir_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/deadlock_search_depth_long_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/deadlock_search_depth_short_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/deadlock_timeout_long_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/deadlock_timeout_short_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/debug_crc_break_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/default_storage_engine_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/disabled.def3
-rw-r--r--mysql-test/suite/sys_vars/t/extra_max_connections_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/extra_port_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/join_cache_level_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_segments_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/log_slow_filter_basic.test69
-rw-r--r--mysql-test/suite/sys_vars/t/log_slow_rate_limit_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test53
-rw-r--r--mysql-test/suite/sys_vars/t/maria_block_size_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/maria_checkpoint_interval_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/maria_force_start_after_recovery_failures_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/maria_group_commit_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/maria_group_commit_interval_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/maria_log_file_size_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/maria_log_purge_type_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/maria_max_sort_file_size_basic.test49
-rw-r--r--mysql-test/suite/sys_vars/t/maria_page_checksum_basic.test39
-rw-r--r--mysql-test/suite/sys_vars/t/maria_pagecache_age_threshold_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/maria_pagecache_buffer_size_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/maria_pagecache_division_limit_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/maria_recover_basic.test51
-rw-r--r--mysql-test/suite/sys_vars/t/maria_repair_threads_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/maria_sort_buffer_size_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/maria_stats_method_basic.test46
-rw-r--r--mysql-test/suite/sys_vars/t/maria_sync_log_dir_basic.test47
-rw-r--r--mysql-test/suite/sys_vars/t/maria_used_for_temp_tables_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/mrr_buffer_size_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_use_mrr_basic.test46
-rw-r--r--mysql-test/suite/sys_vars/t/plugin_dir_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/plugin_maturity_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/rowid_merge_buff_size_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/storage_engine_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/userstat_basic.test38
-rw-r--r--mysql-test/suite/vcol/inc/vcol_keys.inc4
-rw-r--r--mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc2
-rw-r--r--mysql-test/suite/vcol/r/vcol_archive.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_blackhole.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_csv.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_memory.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_merge.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_view_myisam.result4
-rw-r--r--mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_handler_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_partition_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_view_innodb.test2
-rw-r--r--mysql-test/t/archive_plugin-master.opt1
-rw-r--r--mysql-test/t/blackhole_plugin-master.opt1
-rw-r--r--mysql-test/t/bootstrap-master.opt2
-rw-r--r--mysql-test/t/bootstrap.test2
-rw-r--r--mysql-test/t/crash_commit_before-master.opt2
-rw-r--r--mysql-test/t/ctype_utf16.test2
-rw-r--r--mysql-test/t/ctype_utf32.test2
-rw-r--r--mysql-test/t/ctype_utf8.test3
-rw-r--r--mysql-test/t/delayed.test2
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/events_logs_tests.test2
-rw-r--r--mysql-test/t/fulltext_plugin.test2
-rw-r--r--mysql-test/t/information_schema_all_engines-master.opt1
-rw-r--r--mysql-test/t/information_schema_all_engines.test2
-rw-r--r--mysql-test/t/information_schema_parameters.test2
-rw-r--r--mysql-test/t/information_schema_routines.test2
-rw-r--r--mysql-test/t/innodb-lock.test102
-rw-r--r--mysql-test/t/innodb-master.opt1
-rw-r--r--mysql-test/t/innodb-semi-consistent-master.opt1
-rw-r--r--mysql-test/t/innodb-semi-consistent.test68
-rw-r--r--mysql-test/t/innodb-zip.test347
-rw-r--r--mysql-test/t/innodb.test2565
-rw-r--r--mysql-test/t/innodb_bug36172.test33
-rw-r--r--mysql-test/t/innodb_bug47167.test45
-rw-r--r--mysql-test/t/innodb_file_format.test31
-rw-r--r--mysql-test/t/lock.test2
-rw-r--r--mysql-test/t/log_slow.test2
-rw-r--r--mysql-test/t/merge_debug.test2
-rw-r--r--mysql-test/t/myisam-master.opt1
-rw-r--r--mysql-test/t/mysql_upgrade.test2
-rw-r--r--mysql-test/t/mysql_upgrade_ssl.test2
-rw-r--r--mysql-test/t/mysqld_option_err.test14
-rw-r--r--mysql-test/t/not_partition.test2
-rw-r--r--mysql-test/t/optimizer_switch.test113
-rw-r--r--mysql-test/t/partition_innodb.test6
-rw-r--r--mysql-test/t/pool_of_threads.cnf1
-rw-r--r--mysql-test/t/query_cache.test13
-rw-r--r--mysql-test/t/query_cache_debug.test12
-rw-r--r--mysql-test/t/select.test1
-rw-r--r--mysql-test/t/status_user.test4
-rw-r--r--mysql-test/t/subselect_cache.test2
-rw-r--r--mysql-test/t/subselect_sj2.test8
-rw-r--r--mysql-test/t/symlink.test2
-rw-r--r--mysql-test/t/trigger_notembedded.test2
-rw-r--r--mysql-test/t/udf.test12
-rw-r--r--mysql-test/t/unsafe_binlog_innodb-master.opt2
-rw-r--r--mysql-test/t/variables.test2
-rw-r--r--mysql-test/t/xtradb_mrr.test (renamed from mysql-test/t/innodb_mrr.test)2
430 files changed, 7074 insertions, 8463 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test
index 8b9b7e7ff39..2eee3402da9 100644
--- a/mysql-test/extra/rpl_tests/rpl_innodb.test
+++ b/mysql-test/extra/rpl_tests/rpl_innodb.test
@@ -94,6 +94,7 @@ SELECT COUNT(*) FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
ROLLBACK;
+--replace_result MyISAM InnoDB
SHOW CREATE TABLE mysqltest1.tmp2;
--echo ######### Must return no rows here #########
SELECT COUNT(*) FROM mysqltest1.t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
index c5b1102327f..f7e4f204afa 100644
--- a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
@@ -1,5 +1,5 @@
# Slow test, don't run during staging part
-source include/not_staging.inc
+source include/not_staging.inc;
#
# Bug#6148 ()
diff --git a/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test
index cb1639a04ac..9cf287281a0 100644
--- a/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test
+++ b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test
@@ -157,4 +157,3 @@ INSERT INTO t1 VALUES (1);
DROP TEMPORARY TABLE t1;
---sync_slave_with_master
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 06a9107e963..e32ed4103b5 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -1,3 +1,5 @@
+SET TIME_ZONE = _latin1 '+03:00';
+
--echo #
--echo # Start of WL#2649 Number-to-string conversions
--echo #
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc
index 1013f81d6f3..28ed6a1d137 100644
--- a/mysql-test/include/diff_tables.inc
+++ b/mysql-test/include/diff_tables.inc
@@ -54,12 +54,10 @@
--echo Comparing tables $diff_table_1 and $diff_table_2
disable_query_log;
-disable_warnings;
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
-enable_warnings;
let $_diff_table=$diff_table_2;
diff --git a/mysql-test/include/have_dynamic_loading.inc b/mysql-test/include/have_dynamic_loading.inc
deleted file mode 100644
index 3ce9641d87c..00000000000
--- a/mysql-test/include/have_dynamic_loading.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Whether server supports dynamic loading.
-#
-if (`SELECT @@have_dynamic_loading != 'YES'`) {
- --skip The test requires dynamic loading
-}
-disable_query_log;
-show variables like 'have_dynamic_loading';
-enable_query_log;
diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc
index 21e3c33865e..bb84313eb4d 100644
--- a/mysql-test/include/have_example_plugin.inc
+++ b/mysql-test/include/have_example_plugin.inc
@@ -8,7 +8,6 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable HA_EXAMPLE_SO is set
#
---require r/have_example_plugin.require
-disable_query_log;
-eval select LENGTH('$HA_EXAMPLE_SO') > 0 as 'have_example_plugin';
-enable_query_log;
+if (`SELECT LENGTH('$HA_EXAMPLE_SO') = 0`) {
+ --skip Need example plugin
+}
diff --git a/mysql-test/include/have_innodb.opt b/mysql-test/include/have_innodb.opt
index 4fb96229a7b..5d9121b3dc3 100644
--- a/mysql-test/include/have_innodb.opt
+++ b/mysql-test/include/have_innodb.opt
@@ -1,2 +1,2 @@
--loose-innodb
---plugin-load=$HA_XTRADB_SO
+--plugin-load=$HA_INNODB_SO
diff --git a/mysql-test/include/have_semisync_plugin.inc b/mysql-test/include/have_semisync_plugin.inc
index d3b42dbf5fb..62dbf878825 100644
--- a/mysql-test/include/have_semisync_plugin.inc
+++ b/mysql-test/include/have_semisync_plugin.inc
@@ -6,16 +6,10 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
}
#
-# Check if the variable SEMISYNC_MASTER_PLUGIN is set
+# Check if the variable SEMISYNC_MASTER_SO is set
#
-if (`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`)
+if (`select LENGTH('$SEMISYNC_MASTER_SO') = 0`)
{
skip Need semisync plugins;
}
-#
-# Check if --plugin-dir was setup for semisync
-#
-if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SEMISYNC_PLUGIN_OPT'`) {
- --skip SEMISYNC plugin requires that --plugin-dir is set to the semisync plugin dir (either the .opt file does not contain \$SEMISYNC_PLUGIN_OPT or another plugin is in use)
-}
diff --git a/mysql-test/include/have_simple_parser.inc b/mysql-test/include/have_simple_parser.inc
index 008116cd8cb..100c8fc7a5a 100644
--- a/mysql-test/include/have_simple_parser.inc
+++ b/mysql-test/include/have_simple_parser.inc
@@ -8,7 +8,6 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable MYPLUGLIB_SO is set
#
---require r/have_simple_parser.require
-disable_query_log;
-eval select LENGTH('$MYPLUGLIB_SO') > 0 as 'have_simple_parser';
-enable_query_log;
+if (`SELECT LENGTH('$MYPLUGLIB_SO') = 0`) {
+ --skip simple parser is not built (no mypluglib.so)
+}
diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc
index 1d0782746c4..1953cb4b303 100644
--- a/mysql-test/include/have_udf.inc
+++ b/mysql-test/include/have_udf.inc
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable UDF_EXAMPLE_SO is set
#
---require r/have_udf_example.require
-disable_query_log;
-eval select LENGTH('$UDF_EXAMPLE_SO') > 0 as 'have_udf_example_lib';
-enable_query_log;
+#
+if (`SELECT LENGTH('$UDF_EXAMPLE_SO') = 0`) {
+ --skip Need udf example
+}
diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc
index 6c2fc5155a9..5832267375c 100644
--- a/mysql-test/include/have_xtradb.inc
+++ b/mysql-test/include/have_xtradb.inc
@@ -1,4 +1,5 @@
-disable_query_log;
---require r/true.require
-SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
-enable_query_log;
+if (!`SELECT count(*) FROM information_schema.plugins WHERE
+ plugin_name = 'innodb' AND plugin_status = 'active' AND
+ plugin_description LIKE '%xtradb%'`){
+ skip Needs XtraDB engine;
+}
diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc
index 3c50e50ac0e..36e9af6d429 100644
--- a/mysql-test/include/mysqld--help.inc
+++ b/mysql-test/include/mysqld--help.inc
@@ -14,7 +14,7 @@ perl;
log-slow-queries pid-file slow-query-log-file
datadir slave-load-tmpdir tmpdir/;
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
- thread-concurrency super-large-pages mutex-deadlock-detector null-audit/;
+ thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx/;
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR /;
$re1=join('|', @skipvars, @plugins);
$re2=join('|', @plugins);
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index ebdc8fa9f98..631a5d8c348 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -982,6 +982,17 @@ sub collect_one_test_case {
}
}
+ if ( $tinfo->{'need_ipv6'} )
+ {
+ # This is a test that needs ssl
+ if ( ! $::have_ipv6 ) {
+ # IPv6 is not supported, skip it
+ $tinfo->{'skip'}= 1;
+ $tinfo->{'comment'}= "No IPv6";
+ return $tinfo;
+ }
+ }
+
# ----------------------------------------------------------------------
# Find config file to use if not already selected in <testname>.opt file
# ----------------------------------------------------------------------
@@ -1075,6 +1086,7 @@ my @tags=
["include/have_example_plugin.inc", "example_plugin_test", 1],
["include/have_oqgraph_engine.inc", "oqgraph_test", 1],
["include/have_ssl.inc", "need_ssl", 1],
+ ["include/check_ipv6.inc", "need_ipv6", 1],
);
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index e4743c73d6b..1d72303b839 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -2158,7 +2158,6 @@ sub environment_setup () {
# ----------------------------------------------------
$ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
-#warning remove the below
# ----------------------------------------------------
# Add the path where mysqld will find udf_example.so
# ----------------------------------------------------
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index bfe2c07896b..04833d58fd3 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -160,7 +160,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
# If you add a new suite, please check TEST_DIRS in Makefile.am.
#
-my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,maria,parts,innodb,innodb_plugin,percona,ndb,vcol,oqgraph,sphinx,perfschema";
+my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,maria,parts,innodb,percona,ndb,vcol,oqgraph,sphinx,perfschema";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -182,6 +182,7 @@ my $opt_ssl;
my $opt_skip_ssl;
my @opt_skip_test_list;
our $opt_ssl_supported;
+our $have_ipv6;
my $opt_ps_protocol;
my $opt_sp_protocol;
my $opt_cursor_protocol;
@@ -377,6 +378,7 @@ sub main {
}
check_ndbcluster_support(\%mysqld_variables);
check_ssl_support(\%mysqld_variables);
+ check_ipv6_support();
check_debug_support(\%mysqld_variables);
executable_setup();
@@ -2428,7 +2430,8 @@ sub setup_vardir() {
}
else
{
- for (<../storage/*/.libs/*.so>,<../plugin/*/.libs/*.so>,<../sql/.libs/*.so>)
+ for (<../storage/*/.libs/*.so>,<../plugin/*/.libs/*.so>,<../sql/.libs/*.so>,
+ <../storage/*/*.so>,<../plugin/*/*.so>,<../sql/*.so>)
{
my $pname=basename($_);
symlink rel2abs($_), "$plugindir/$pname";
@@ -2516,6 +2519,11 @@ sub check_ssl_support ($) {
$opt_ssl_supported= 1;
}
+sub check_ipv6_support {
+ use Socket;
+ $have_ipv6 = socket SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
+ close SOCK;
+}
sub check_debug_support ($) {
my $mysqld_variables= shift;
@@ -4377,6 +4385,9 @@ sub extract_warning_lines ($) {
qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|,
qr|mysqld: Table '\./mtr/test_suppressions' is marked as crashed and should be repaired|,
qr|InnoDB: Error: table 'test/bug39438'|,
+ qr|'user' entry '.*' ignored in --skip-name-resolve mode|,
+ qr|mysqld got signal 6|,
+ qr|Error while setting value 'pool-of-threads' to 'thread_handling'|,
);
my $matched_lines= [];
@@ -4868,8 +4879,8 @@ sub mysqld_arguments ($$$) {
if (!using_extern() and $mysql_version_id >= 50106 && !$opt_user_args)
{
- # Turn on logging to file and tables
- mtr_add_arg($args, "%s--log-output=table,file");
+ # Turn on logging to file
+ mtr_add_arg($args, "%s--log-output=file");
}
# Check if "extra_opt" contains --log-bin
@@ -5285,7 +5296,7 @@ sub start_servers($) {
for (all_servers()) {
next unless $_->{WAIT} and started($_);
if ($_->{WAIT}->($_)) {
- $tinfo->{comment}= "Failed to start ".$_->name();
+ $tinfo->{comment}= "Failed to start ".$_->name()."\n";
return 1;
}
}
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 55776565f78..0983e9fa8cf 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -12736,7 +12736,8 @@ INSERT INTO t1 (col1, col2) VALUES (1, "value");
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
REPAIR TABLE t1;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+test.t1 repair status Table is already up to date
DROP TABLE t1;
#
# BUG#48757 - missing .ARZ file causes server crash
@@ -12800,12 +12801,3 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
DROP TABLE t1;
-select * from t1;
-ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
-repair table t1;
-Table Op Msg_type Msg_text
-test.t1 repair status OK
-select sum(length(a)),sum(b) from t1;
-sum(length(a)) sum(b)
-8670 187
-drop table t1;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index c977b0cd30c..0b3ced6cf7f 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1882,7 +1882,7 @@ drop table if exists t1,t2,t3;
# Fix modified for MariaDB: we support this syntax
create table t1 (a int) transactional=0;
Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
create table t2 (a int) page_checksum=1;
create table t3 (a int) row_format=page;
drop table t1,t2,t3;
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index 0e8fe328589..4eab57e4d81 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -2,6 +2,7 @@ set names binary;
#
# Start of 5.5 tests
#
+SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index b1e9ff38d26..a9ced3e89bf 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -84,6 +84,7 @@ DROP TABLE t1;
#
# Start of 5.5 tests
#
+SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 6216819d172..b97e6e695af 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -412,6 +412,7 @@ End of 5.0 tests
#
# Start of 5.5 tests
#
+SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 02c3e348f2a..8d35cf445e8 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -1239,7 +1239,9 @@ WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests
-Start of 5.1 tests
+#
+# Start of 5.1 tests
+#
SET NAMES utf8;
CREATE TABLE t1 (
a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
@@ -1284,10 +1286,14 @@ hex(a)
0064017E
DROP TABLE t1;
#
+# End of 5.1 tests
+#
+#
# Start of 5.5 tests
#
SET NAMES latin1;
SET collation_connection=ucs2_general_ci;
+SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#
diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result
index 7cee15aecef..0d5280950df 100644
--- a/mysql-test/r/ctype_utf16.result
+++ b/mysql-test/r/ctype_utf16.result
@@ -1,3 +1,4 @@
+SET TIME_ZONE='+03:00';
DROP TABLE IF EXISTS t1;
#
# Start of 5.5 tests
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index 37d5aa98be3..cca4efd1571 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -1,3 +1,4 @@
+SET TIME_ZONE = '+03:00';
DROP TABLE IF EXISTS t1;
#
# Start of 5.5 tests
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 295716f48b6..4c3b661ce90 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1,3 +1,4 @@
+SET TIME_ZONE='+03:00';
drop table if exists t1,t2,t3,t4;
drop database if exists mysqltest;
drop table if exists t1,t2;
@@ -2090,6 +2091,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
SET NAMES utf8;
+SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index 307f1714132..ffd6d2fc5b2 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -383,9 +383,9 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
y
0
Warnings:
-Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
-Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
SELECT c DIV 900 y FROM t1 GROUP BY y;
y
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 2ae533afa60..e80dcd9793f 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -14,7 +14,7 @@ GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
grant delete on mysqltest.* to mysqltest_1@localhost;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@@ -45,14 +45,14 @@ flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result
index 3d3f0e433d5..98647cd369c 100644
--- a/mysql-test/r/index_merge_innodb.result
+++ b/mysql-test/r/index_merge_innodb.result
@@ -255,6 +255,24 @@ WHERE
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
`TESTID`='' AND `UCCHECK`='';
drop table t1;
+#
+# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
+#
+CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (2);
+CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
+PRIMARY KEY (f1), KEY (f2), KEY (f3) );
+INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
+SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+f1
+2
+EXPLAIN SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
+2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
+DROP TABLE t1,t2;
#
# BUG#56862/640419: Wrong result with sort_union index merge when one
# of the merged index scans is the primary key scan
@@ -291,7 +309,7 @@ SELECT COUNT(*) FROM
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 11419 Using sort_union(idx,PRIMARY); Using where
+2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 6144 Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
@@ -310,21 +328,3 @@ WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
COUNT(*)
6145
DROP TABLE t1;
-#
-# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
-#
-CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
-INSERT INTO t1 VALUES (2);
-CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
-PRIMARY KEY (f1), KEY (f2), KEY (f3) );
-INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
-SELECT t1.f1 FROM t1
-WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
-f1
-2
-EXPLAIN SELECT t1.f1 FROM t1
-WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
-2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
-DROP TABLE t1,t2;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index e6771f7c563..9ed397bbe1e 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -42,8 +42,8 @@ insert into t5 values (10);
create view v1 (c) as
SELECT table_name FROM information_schema.TABLES
WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND
-table_name not like 'ndb_%' AND table_name not like 'innodb_%';
-and table_name not like 'pbxt%'
+table_name not like 'ndb_%' AND table_name not like 'innodb_%' AND
+table_name not like 'pbxt_%' AND table_name not like 'xtradb_%';
select * from v1;
c
CHARACTER_SETS
@@ -81,8 +81,6 @@ TRIGGERS
USER_PRIVILEGES
USER_STATISTICS
VIEWS
-XTRADB_ADMIN_COMMAND
-XTRADB_ENHANCEMENTS
columns_priv
db
event
@@ -827,8 +825,6 @@ TABLES CREATE_TIME datetime
TABLES UPDATE_TIME datetime
TABLES CHECK_TIME datetime
TRIGGERS CREATED datetime
-INNODB_TRX trx_started datetime
-INNODB_TRX trx_wait_started datetime
event execute_at datetime
event last_executed datetime
event starts datetime
@@ -870,8 +866,6 @@ COLUMNS TABLE_NAME select
COLUMN_PRIVILEGES TABLE_NAME select
FILES TABLE_NAME select
INDEX_STATISTICS TABLE_NAME select
-INNODB_INDEX_STATS table_name select
-INNODB_TABLE_STATS table_name select
KEY_COLUMN_USAGE TABLE_NAME select
PARTITIONS TABLE_NAME select
REFERENTIAL_CONSTRAINTS TABLE_NAME select
@@ -1256,12 +1250,12 @@ DROP PROCEDURE p1;
DROP USER mysql_bug20230@localhost;
SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test');
MAX(table_name)
-XTRADB_ENHANCEMENTS
+VIEWS
SELECT table_name from information_schema.tables
WHERE table_name=(SELECT MAX(table_name)
FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'));
table_name
-XTRADB_ENHANCEMENTS
+VIEWS
DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
diff --git a/mysql-test/r/innodb-lock.result b/mysql-test/r/innodb-lock.result
deleted file mode 100644
index 4ace4065c34..00000000000
--- a/mysql-test/r/innodb-lock.result
+++ /dev/null
@@ -1,57 +0,0 @@
-set global innodb_table_locks=1;
-select @@innodb_table_locks;
-@@innodb_table_locks
-1
-drop table if exists t1;
-set @@innodb_table_locks=1;
-create table t1 (id integer, x integer) engine=INNODB;
-insert into t1 values(0, 0);
-set autocommit=0;
-SELECT * from t1 where id = 0 FOR UPDATE;
-id x
-0 0
-set autocommit=0;
-lock table t1 write;
-update t1 set x=1 where id = 0;
-select * from t1;
-id x
-0 1
-commit;
-update t1 set x=2 where id = 0;
-commit;
-unlock tables;
-select * from t1;
-id x
-0 2
-commit;
-drop table t1;
-set @@innodb_table_locks=0;
-create table t1 (id integer primary key, x integer) engine=INNODB;
-insert into t1 values(0, 0),(1,1),(2,2);
-commit;
-SELECT * from t1 where id = 0 FOR UPDATE;
-id x
-0 0
-set autocommit=0;
-set @@innodb_table_locks=0;
-lock table t1 write;
-update t1 set x=10 where id = 2;
-SELECT * from t1 where id = 2;
-id x
-2 2
-UPDATE t1 set x=3 where id = 2;
-commit;
-SELECT * from t1;
-id x
-0 0
-1 1
-2 3
-commit;
-unlock tables;
-commit;
-select * from t1;
-id x
-0 0
-1 1
-2 10
-drop table t1;
diff --git a/mysql-test/r/innodb-semi-consistent.result b/mysql-test/r/innodb-semi-consistent.result
deleted file mode 100644
index bfebd3dcacc..00000000000
--- a/mysql-test/r/innodb-semi-consistent.result
+++ /dev/null
@@ -1,47 +0,0 @@
-drop table if exists t1,t2;
-set binlog_format=mixed;
-set session transaction isolation level repeatable read;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2),(3),(4),(5),(6),(7);
-set autocommit=0;
-select * from t1 where a=3 lock in share mode;
-a
-3
-set binlog_format=mixed;
-set session transaction isolation level repeatable read;
-set autocommit=0;
-update t1 set a=10 where a=5;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-commit;
-set session transaction isolation level read committed;
-update t1 set a=10 where a=5;
-select * from t1 where a=2 for update;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1 where a=2 limit 1 for update;
-a
-2
-update t1 set a=11 where a=6;
-update t1 set a=12 where a=2;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-update t1 set a=13 where a=1;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-commit;
-update t1 set a=14 where a=1;
-commit;
-select * from t1;
-a
-14
-2
-3
-4
-10
-11
-7
-drop table t1;
-create table t1 (a int, b int) engine=myisam;
-create table t2 (c int, d int, key (c)) engine=innodb;
-insert into t1 values (1,1);
-insert into t2 values (1,2);
-set session transaction isolation level read committed;
-delete from t1 using t1 join t2 on t1.a = t2.c where t2.d in (1);
-drop table t1, t2;
diff --git a/mysql-test/r/innodb-zip.result b/mysql-test/r/innodb-zip.result
deleted file mode 100644
index 21396d81ba8..00000000000
--- a/mysql-test/r/innodb-zip.result
+++ /dev/null
@@ -1,421 +0,0 @@
-set global innodb_file_per_table=off;
-set global innodb_file_format=`0`;
-create table t0(a int primary key) engine=innodb row_format=compressed;
-Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
-create table t00(a int primary key) engine=innodb
-key_block_size=4 row_format=compressed;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
-create table t1(a int primary key) engine=innodb row_format=dynamic;
-Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
-create table t2(a int primary key) engine=innodb row_format=redundant;
-create table t3(a int primary key) engine=innodb row_format=compact;
-create table t4(a int primary key) engine=innodb key_block_size=9;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
-create table t5(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-set global innodb_file_per_table=on;
-create table t6(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-set global innodb_file_format=`1`;
-create table t7(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-create table t8(a int primary key) engine=innodb
-key_block_size=1 row_format=fixed;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
-create table t9(a int primary key) engine=innodb
-key_block_size=1 row_format=compact;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-create table t10(a int primary key) engine=innodb
-key_block_size=1 row_format=dynamic;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-create table t11(a int primary key) engine=innodb
-key_block_size=1 row_format=compressed;
-create table t12(a int primary key) engine=innodb
-key_block_size=1;
-create table t13(a int primary key) engine=innodb
-row_format=compressed;
-create table t14(a int primary key) engine=innodb key_block_size=9;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t0 Compact
-test t00 Compact
-test t1 Compact
-test t10 Dynamic
-test t11 Compressed
-test t12 Compressed
-test t13 Compressed
-test t14 Compact
-test t2 Redundant
-test t3 Compact
-test t4 Compact
-test t5 Redundant
-test t6 Redundant
-test t7 Redundant
-test t8 Compact
-test t9 Compact
-drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
-alter table t1 key_block_size=0;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
-alter table t1 row_format=dynamic;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t1 Dynamic
-alter table t1 row_format=compact;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t1 Compact
-alter table t1 row_format=redundant;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t1 Redundant
-drop table t1;
-create table t1(a int not null, b text, index(b(10))) engine=innodb
-key_block_size=1;
-create table t2(b text)engine=innodb;
-insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000)));
-insert into t1 select 1, b from t2;
-commit;
-begin;
-update t1 set b=repeat('B',100);
-select a,left(b,40) from t1 natural join t2;
-a left(b,40)
-1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
-rollback;
-select a,left(b,40) from t1 natural join t2;
-a left(b,40)
-1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t1 Compressed
-test t2 Compact
-drop table t1,t2;
-SET SESSION innodb_strict_mode = off;
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
-drop table t1;
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
-DROP TABLE t1;
-create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
-primary key(c1, c2(22), c3(22)))
-engine = innodb row_format = dynamic;
-begin;
-insert into t1 values(1, repeat('A', 20000), repeat('B', 20000),
-repeat('C', 20000));
-update t1 set c3 = repeat('D', 20000) where c1 = 1;
-commit;
-select count(*) from t1 where c2 = repeat('A', 20000);
-count(*)
-1
-select count(*) from t1 where c3 = repeat('D', 20000);
-count(*)
-1
-select count(*) from t1 where c4 = repeat('C', 20000);
-count(*)
-1
-update t1 set c3 = repeat('E', 20000) where c1 = 1;
-drop table t1;
-set global innodb_file_format=`0`;
-select @@innodb_file_format;
-@@innodb_file_format
-Antelope
-set global innodb_file_format=`1`;
-select @@innodb_file_format;
-@@innodb_file_format
-Barracuda
-set global innodb_file_format=`2`;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=`-1`;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=`Antelope`;
-set global innodb_file_format=`Barracuda`;
-set global innodb_file_format=`Cheetah`;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=`abc`;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=`1a`;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=``;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_per_table = on;
-set global innodb_file_format = `1`;
-set innodb_strict_mode = off;
-create table t1 (id int primary key) engine = innodb key_block_size = 0;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
-drop table t1;
-set innodb_strict_mode = on;
-create table t1 (id int primary key) engine = innodb key_block_size = 0;
-ERROR HY000: Can't create table 'test.t1' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16]
-Error 1005 Can't create table 'test.t1' (errno: 1478)
-create table t2 (id int primary key) engine = innodb key_block_size = 9;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-create table t3 (id int primary key) engine = innodb key_block_size = 1;
-create table t4 (id int primary key) engine = innodb key_block_size = 2;
-create table t5 (id int primary key) engine = innodb key_block_size = 4;
-create table t6 (id int primary key) engine = innodb key_block_size = 8;
-create table t7 (id int primary key) engine = innodb key_block_size = 16;
-create table t8 (id int primary key) engine = innodb row_format = compressed;
-create table t9 (id int primary key) engine = innodb row_format = dynamic;
-create table t10(id int primary key) engine = innodb row_format = compact;
-create table t11(id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t10 Compact
-test t11 Redundant
-test t3 Compressed
-test t4 Compressed
-test t5 Compressed
-test t6 Compressed
-test t7 Compressed
-test t8 Compressed
-test t9 Dynamic
-drop table t3, t4, t5, t6, t7, t8, t9, t10, t11;
-create table t1 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compressed;
-create table t2 (id int primary key) engine = innodb
-key_block_size = 8 row_format = redundant;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-create table t3 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compact;
-ERROR HY000: Can't create table 'test.t3' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t3' (errno: 1478)
-create table t4 (id int primary key) engine = innodb
-key_block_size = 8 row_format = dynamic;
-ERROR HY000: Can't create table 'test.t4' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t4' (errno: 1478)
-create table t5 (id int primary key) engine = innodb
-key_block_size = 8 row_format = default;
-ERROR HY000: Can't create table 'test.t5' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t5' (errno: 1478)
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t1 Compressed
-drop table t1;
-create table t1 (id int primary key) engine = innodb
-key_block_size = 9 row_format = redundant;
-ERROR HY000: Can't create table 'test.t1' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t1' (errno: 1478)
-create table t2 (id int primary key) engine = innodb
-key_block_size = 9 row_format = compact;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-create table t2 (id int primary key) engine = innodb
-key_block_size = 9 row_format = dynamic;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-set global innodb_file_per_table = off;
-create table t1 (id int primary key) engine = innodb key_block_size = 1;
-ERROR HY000: Can't create table 'test.t1' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t1' (errno: 1478)
-create table t2 (id int primary key) engine = innodb key_block_size = 2;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-create table t3 (id int primary key) engine = innodb key_block_size = 4;
-ERROR HY000: Can't create table 'test.t3' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t3' (errno: 1478)
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-ERROR HY000: Can't create table 'test.t4' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t4' (errno: 1478)
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-ERROR HY000: Can't create table 'test.t5' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t5' (errno: 1478)
-create table t6 (id int primary key) engine = innodb row_format = compressed;
-ERROR HY000: Can't create table 'test.t6' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t6' (errno: 1478)
-create table t7 (id int primary key) engine = innodb row_format = dynamic;
-ERROR HY000: Can't create table 'test.t7' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Error 1005 Can't create table 'test.t7' (errno: 1478)
-create table t8 (id int primary key) engine = innodb row_format = compact;
-create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t8 Compact
-test t9 Redundant
-drop table t8, t9;
-set global innodb_file_per_table = on;
-set global innodb_file_format = `0`;
-create table t1 (id int primary key) engine = innodb key_block_size = 1;
-ERROR HY000: Can't create table 'test.t1' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t1' (errno: 1478)
-create table t2 (id int primary key) engine = innodb key_block_size = 2;
-ERROR HY000: Can't create table 'test.t2' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t2' (errno: 1478)
-create table t3 (id int primary key) engine = innodb key_block_size = 4;
-ERROR HY000: Can't create table 'test.t3' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t3' (errno: 1478)
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-ERROR HY000: Can't create table 'test.t4' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t4' (errno: 1478)
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-ERROR HY000: Can't create table 'test.t5' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t5' (errno: 1478)
-create table t6 (id int primary key) engine = innodb row_format = compressed;
-ERROR HY000: Can't create table 'test.t6' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t6' (errno: 1478)
-create table t7 (id int primary key) engine = innodb row_format = dynamic;
-ERROR HY000: Can't create table 'test.t7' (errno: 1478)
-show warnings;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Error 1005 Can't create table 'test.t7' (errno: 1478)
-create table t8 (id int primary key) engine = innodb row_format = compact;
-create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-table_schema table_name row_format
-test t8 Compact
-test t9 Redundant
-drop table t8, t9;
-set global innodb_file_per_table=0;
-set global innodb_file_format=Antelope;
-set global innodb_file_per_table=on;
-set global innodb_file_format=`Barracuda`;
-set global innodb_file_format_check=`Antelope`;
-create table normal_table (
-c1 int
-) engine = innodb;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Antelope
-create table zip_table (
-c1 int
-) engine = innodb key_block_size = 8;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format_check=`Antelope`;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Antelope
-show table status;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-drop table normal_table, zip_table;
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
deleted file mode 100644
index ea0972a6a43..00000000000
--- a/mysql-test/r/innodb.result
+++ /dev/null
@@ -1,3305 +0,0 @@
-drop table if exists t1,t2,t3,t4;
-drop database if exists mysqltest;
-create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
-insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
-select id, code, name from t1 order by id;
-id code name
-1 1 Tim
-2 1 Monty
-3 2 David
-4 2 Erik
-5 3 Sasha
-6 3 Jeremy
-7 4 Matt
-update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
-select id, code, name from t1 order by id;
-id code name
-2 1 Monty
-3 2 David
-4 2 Erik
-5 3 Sasha
-6 3 Jeremy
-7 4 Matt
-8 1 Sinisa
-update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
-select id, code, name from t1 order by id;
-id code name
-3 2 David
-4 2 Erik
-5 3 Sasha
-6 3 Jeremy
-7 4 Matt
-8 1 Sinisa
-12 1 Ralph
-drop table t1;
-CREATE TABLE t1 (
-id int(11) NOT NULL auto_increment,
-parent_id int(11) DEFAULT '0' NOT NULL,
-level tinyint(4) DEFAULT '0' NOT NULL,
-PRIMARY KEY (id),
-KEY parent_id (parent_id),
-KEY level (level)
-) engine=innodb;
-INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
-update t1 set parent_id=parent_id+100;
-select * from t1 where parent_id=102;
-id parent_id level
-8 102 2
-9 102 2
-15 102 2
-update t1 set id=id+1000;
-update t1 set id=1024 where id=1009;
-Got one of the listed errors
-select * from t1;
-id parent_id level
-1001 100 0
-1002 101 1
-1003 101 1
-1004 101 1
-1005 101 1
-1006 101 1
-1007 101 1
-1008 102 2
-1009 102 2
-1015 102 2
-1016 103 2
-1017 103 2
-1018 103 2
-1019 103 2
-1020 103 2
-1021 104 2
-1022 104 2
-1024 104 2
-1025 105 2
-1026 105 2
-1027 105 2
-1028 105 2
-1029 105 2
-1030 105 2
-1031 106 2
-1032 106 2
-1033 106 2
-1034 106 2
-1035 106 2
-1036 107 2
-1037 107 2
-1038 107 2
-1040 107 2
-1157 100 0
-1179 105 2
-1183 104 2
-1193 105 2
-1202 107 2
-1203 107 2
-update ignore t1 set id=id+1;
-select * from t1;
-id parent_id level
-1001 100 0
-1002 101 1
-1003 101 1
-1004 101 1
-1005 101 1
-1006 101 1
-1007 101 1
-1008 102 2
-1010 102 2
-1015 102 2
-1016 103 2
-1017 103 2
-1018 103 2
-1019 103 2
-1020 103 2
-1021 104 2
-1023 104 2
-1024 104 2
-1025 105 2
-1026 105 2
-1027 105 2
-1028 105 2
-1029 105 2
-1030 105 2
-1031 106 2
-1032 106 2
-1033 106 2
-1034 106 2
-1035 106 2
-1036 107 2
-1037 107 2
-1039 107 2
-1041 107 2
-1158 100 0
-1180 105 2
-1184 104 2
-1194 105 2
-1202 107 2
-1204 107 2
-update ignore t1 set id=1023 where id=1010;
-select * from t1 where parent_id=102;
-id parent_id level
-1008 102 2
-1010 102 2
-1015 102 2
-explain select level from t1 where level=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref level level 1 const # Using index
-explain select level,id from t1 where level=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref level level 1 const # Using index
-explain select level,id,parent_id from t1 where level=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref level level 1 const #
-select level,id from t1 where level=1;
-level id
-1 1002
-1 1003
-1 1004
-1 1005
-1 1006
-1 1007
-select level,id,parent_id from t1 where level=1;
-level id parent_id
-1 1002 101
-1 1003 101
-1 1004 101
-1 1005 101
-1 1006 101
-1 1007 101
-optimize table t1;
-Table Op Msg_type Msg_text
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize status OK
-show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 id A # NULL NULL BTREE
-t1 1 parent_id 1 parent_id A # NULL NULL BTREE
-t1 1 level 1 level A # NULL NULL BTREE
-drop table t1;
-CREATE TABLE t1 (
-gesuchnr int(11) DEFAULT '0' NOT NULL,
-benutzer_id int(11) DEFAULT '0' NOT NULL,
-PRIMARY KEY (gesuchnr,benutzer_id)
-) engine=innodb;
-replace into t1 (gesuchnr,benutzer_id) values (2,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-select * from t1;
-gesuchnr benutzer_id
-1 1
-2 1
-drop table t1;
-create table t1 (a int) engine=innodb;
-insert into t1 values (1), (2);
-optimize table t1;
-Table Op Msg_type Msg_text
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize status OK
-delete from t1 where a = 1;
-select * from t1;
-a
-2
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-drop table t1;
-create table t1 (a int,b varchar(20)) engine=innodb;
-insert into t1 values (1,""), (2,"testing");
-delete from t1 where a = 1;
-select * from t1;
-a b
-2 testing
-create index skr on t1 (a);
-insert into t1 values (3,""), (4,"testing");
-analyze table t1;
-Table Op Msg_type Msg_text
-test.t1 analyze status OK
-show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 skr 1 a A # NULL NULL YES BTREE
-drop table t1;
-create table t1 (a int,b varchar(20),key(a)) engine=innodb;
-insert into t1 values (1,""), (2,"testing");
-select * from t1 where a = 1;
-a b
-1
-drop table t1;
-create table t1 (n int not null primary key) engine=innodb;
-set autocommit=0;
-insert into t1 values (4);
-rollback;
-select n, "after rollback" from t1;
-n after rollback
-insert into t1 values (4);
-commit;
-select n, "after commit" from t1;
-n after commit
-4 after commit
-commit;
-insert into t1 values (5);
-insert into t1 values (4);
-ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-commit;
-select n, "after commit" from t1;
-n after commit
-4 after commit
-5 after commit
-set autocommit=1;
-insert into t1 values (6);
-insert into t1 values (4);
-ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-select n from t1;
-n
-4
-5
-6
-set autocommit=0;
-begin;
-savepoint `my_savepoint`;
-insert into t1 values (7);
-savepoint `savept2`;
-insert into t1 values (3);
-select n from t1;
-n
-3
-4
-5
-6
-7
-savepoint savept3;
-rollback to savepoint savept2;
-rollback to savepoint savept3;
-ERROR 42000: SAVEPOINT savept3 does not exist
-rollback to savepoint savept2;
-release savepoint `my_savepoint`;
-select n from t1;
-n
-4
-5
-6
-7
-rollback to savepoint `my_savepoint`;
-ERROR 42000: SAVEPOINT my_savepoint does not exist
-rollback to savepoint savept2;
-ERROR 42000: SAVEPOINT savept2 does not exist
-insert into t1 values (8);
-savepoint sv;
-commit;
-savepoint sv;
-set autocommit=1;
-rollback;
-drop table t1;
-create table t1 (n int not null primary key) engine=innodb;
-start transaction;
-insert into t1 values (4);
-flush tables with read lock;
-commit;
-unlock tables;
-commit;
-select * from t1;
-n
-4
-drop table t1;
-create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
-begin;
-insert into t1 values(1,'hamdouni');
-select id as afterbegin_id,nom as afterbegin_nom from t1;
-afterbegin_id afterbegin_nom
-1 hamdouni
-rollback;
-select id as afterrollback_id,nom as afterrollback_nom from t1;
-afterrollback_id afterrollback_nom
-set autocommit=0;
-insert into t1 values(2,'mysql');
-select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
-afterautocommit0_id afterautocommit0_nom
-2 mysql
-rollback;
-select id as afterrollback_id,nom as afterrollback_nom from t1;
-afterrollback_id afterrollback_nom
-set autocommit=1;
-drop table t1;
-CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
-insert into t1 values ('pippo', 12);
-insert into t1 values ('pippo', 12);
-ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
-delete from t1;
-delete from t1 where id = 'pippo';
-select * from t1;
-id val
-insert into t1 values ('pippo', 12);
-set autocommit=0;
-delete from t1;
-rollback;
-select * from t1;
-id val
-pippo 12
-delete from t1;
-commit;
-select * from t1;
-id val
-drop table t1;
-create table t1 (a integer) engine=innodb;
-start transaction;
-rename table t1 to t2;
-create table t1 (b integer) engine=innodb;
-insert into t1 values (1);
-rollback;
-drop table t1;
-rename table t2 to t1;
-drop table t1;
-set autocommit=1;
-CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
-INSERT INTO t1 VALUES (1, 'Jochen');
-select * from t1;
-ID NAME
-1 Jochen
-drop table t1;
-CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
-set autocommit=0;
-INSERT INTO t1 SET _userid='marc@anyware.co.uk';
-COMMIT;
-SELECT * FROM t1;
-_userid
-marc@anyware.co.uk
-SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk';
-_userid
-marc@anyware.co.uk
-drop table t1;
-set autocommit=1;
-CREATE TABLE t1 (
-user_id int(10) DEFAULT '0' NOT NULL,
-name varchar(100),
-phone varchar(100),
-ref_email varchar(100) DEFAULT '' NOT NULL,
-detail varchar(200),
-PRIMARY KEY (user_id,ref_email)
-)engine=innodb;
-INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar');
-select * from t1 where user_id=10292;
-user_id name phone ref_email detail
-10292 sanjeev 29153373 sansh777@hotmail.com xxx
-10292 shirish 2333604 shirish@yahoo.com ddsds
-10292 sonali 323232 sonali@bolly.com filmstar
-INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10293,'shirish','2333604','shirish@yahoo.com','ddsds');
-select * from t1 where user_id=10292;
-user_id name phone ref_email detail
-10292 sanjeev 29153373 sansh777@hotmail.com xxx
-10292 shirish 2333604 shirish@yahoo.com ddsds
-10292 sonali 323232 sonali@bolly.com filmstar
-select * from t1 where user_id>=10292;
-user_id name phone ref_email detail
-10292 sanjeev 29153373 sansh777@hotmail.com xxx
-10292 shirish 2333604 shirish@yahoo.com ddsds
-10292 sonali 323232 sonali@bolly.com filmstar
-10293 shirish 2333604 shirish@yahoo.com ddsds
-select * from t1 where user_id>10292;
-user_id name phone ref_email detail
-10293 shirish 2333604 shirish@yahoo.com ddsds
-select * from t1 where user_id<10292;
-user_id name phone ref_email detail
-10291 sanjeev 29153373 sansh777@hotmail.com xxx
-drop table t1;
-CREATE TABLE t1 (a int not null, b int not null,c int not null,
-key(a),primary key(a,b), unique(c),key(a),unique(b));
-show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A # NULL NULL BTREE
-t1 0 PRIMARY 2 b A # NULL NULL BTREE
-t1 0 c 1 c A # NULL NULL BTREE
-t1 0 b 1 b A # NULL NULL BTREE
-t1 1 a 1 a A # NULL NULL BTREE
-t1 1 a_2 1 a A # NULL NULL BTREE
-drop table t1;
-create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
-alter table t1 engine=innodb;
-insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
-select * from t1;
-col1 col2
-1 1
-2 3
-3 4
-4 4
-5 2
-update t1 set col2='7' where col1='4';
-select * from t1;
-col1 col2
-1 1
-2 3
-3 4
-4 7
-5 2
-alter table t1 add co3 int not null;
-select * from t1;
-col1 col2 co3
-1 1 0
-2 3 0
-3 4 0
-4 7 0
-5 2 0
-update t1 set col2='9' where col1='2';
-select * from t1;
-col1 col2 co3
-1 1 0
-2 9 0
-3 4 0
-4 7 0
-5 2 0
-drop table t1;
-create table t1 (a int not null , b int, primary key (a)) engine = innodb;
-create table t2 (a int not null , b int, primary key (a)) engine = myisam;
-insert into t1 VALUES (1,3) , (2,3), (3,3);
-select * from t1;
-a b
-1 3
-2 3
-3 3
-insert into t2 select * from t1;
-select * from t2;
-a b
-1 3
-2 3
-3 3
-delete from t1 where b = 3;
-select * from t1;
-a b
-insert into t1 select * from t2;
-select * from t1;
-a b
-1 3
-2 3
-3 3
-select * from t2;
-a b
-1 3
-2 3
-3 3
-drop table t1,t2;
-CREATE TABLE t1 (
-user_name varchar(12),
-password text,
-subscribed char(1),
-user_id int(11) DEFAULT '0' NOT NULL,
-quota bigint(20),
-weight double,
-access_date date,
-access_time time,
-approved datetime,
-dummy_primary_key int(11) NOT NULL auto_increment,
-PRIMARY KEY (dummy_primary_key)
-) ENGINE=innodb;
-INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
-INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
-INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
-INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
-INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
-select user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
-user_name password subscribed user_id quota weight access_date access_time approved dummy_primary_key
-user_0 somepassword N 0 0 0 2000-09-07 23:06:59 2000-09-07 23:06:59 1
-user_1 somepassword Y 1 1 1 2000-09-07 23:06:59 2000-09-07 23:06:59 2
-user_2 somepassword N 2 2 1.4142135623731 2000-09-07 23:06:59 2000-09-07 23:06:59 3
-user_3 somepassword Y 3 3 1.7320508075689 2000-09-07 23:06:59 2000-09-07 23:06:59 4
-user_4 somepassword N 4 4 2 2000-09-07 23:06:59 2000-09-07 23:06:59 5
-drop table t1;
-CREATE TABLE t1 (
-id int(11) NOT NULL auto_increment,
-parent_id int(11) DEFAULT '0' NOT NULL,
-level tinyint(4) DEFAULT '0' NOT NULL,
-KEY (id),
-KEY parent_id (parent_id),
-KEY level (level)
-) engine=innodb;
-INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
-INSERT INTO t1 values (179,5,2);
-update t1 set parent_id=parent_id+100;
-select * from t1 where parent_id=102;
-id parent_id level
-8 102 2
-9 102 2
-15 102 2
-update t1 set id=id+1000;
-update t1 set id=1024 where id=1009;
-select * from t1;
-id parent_id level
-1001 100 0
-1003 101 1
-1004 101 1
-1008 102 2
-1024 102 2
-1017 103 2
-1022 104 2
-1024 104 2
-1028 105 2
-1029 105 2
-1030 105 2
-1031 106 2
-1032 106 2
-1033 106 2
-1203 107 2
-1202 107 2
-1020 103 2
-1157 100 0
-1193 105 2
-1040 107 2
-1002 101 1
-1015 102 2
-1006 101 1
-1034 106 2
-1035 106 2
-1016 103 2
-1007 101 1
-1036 107 2
-1018 103 2
-1026 105 2
-1027 105 2
-1183 104 2
-1038 107 2
-1025 105 2
-1037 107 2
-1021 104 2
-1019 103 2
-1005 101 1
-1179 105 2
-update ignore t1 set id=id+1;
-select * from t1;
-id parent_id level
-1002 100 0
-1004 101 1
-1005 101 1
-1009 102 2
-1025 102 2
-1018 103 2
-1023 104 2
-1025 104 2
-1029 105 2
-1030 105 2
-1031 105 2
-1032 106 2
-1033 106 2
-1034 106 2
-1204 107 2
-1203 107 2
-1021 103 2
-1158 100 0
-1194 105 2
-1041 107 2
-1003 101 1
-1016 102 2
-1007 101 1
-1035 106 2
-1036 106 2
-1017 103 2
-1008 101 1
-1037 107 2
-1019 103 2
-1027 105 2
-1028 105 2
-1184 104 2
-1039 107 2
-1026 105 2
-1038 107 2
-1022 104 2
-1020 103 2
-1006 101 1
-1180 105 2
-update ignore t1 set id=1023 where id=1010;
-select * from t1 where parent_id=102;
-id parent_id level
-1009 102 2
-1025 102 2
-1016 102 2
-explain select level from t1 where level=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref level level 1 const # Using index
-select level,id from t1 where level=1;
-level id
-1 1004
-1 1005
-1 1003
-1 1007
-1 1008
-1 1006
-select level,id,parent_id from t1 where level=1;
-level id parent_id
-1 1004 101
-1 1005 101
-1 1003 101
-1 1007 101
-1 1008 101
-1 1006 101
-select level,id from t1 where level=1 order by id;
-level id
-1 1003
-1 1004
-1 1005
-1 1006
-1 1007
-1 1008
-delete from t1 where level=1;
-select * from t1;
-id parent_id level
-1002 100 0
-1009 102 2
-1025 102 2
-1018 103 2
-1023 104 2
-1025 104 2
-1029 105 2
-1030 105 2
-1031 105 2
-1032 106 2
-1033 106 2
-1034 106 2
-1204 107 2
-1203 107 2
-1021 103 2
-1158 100 0
-1194 105 2
-1041 107 2
-1016 102 2
-1035 106 2
-1036 106 2
-1017 103 2
-1037 107 2
-1019 103 2
-1027 105 2
-1028 105 2
-1184 104 2
-1039 107 2
-1026 105 2
-1038 107 2
-1022 104 2
-1020 103 2
-1180 105 2
-drop table t1;
-CREATE TABLE t1 (
-sca_code char(6) NOT NULL,
-cat_code char(6) NOT NULL,
-sca_desc varchar(50),
-lan_code char(2) NOT NULL,
-sca_pic varchar(100),
-sca_sdesc varchar(50),
-sca_sch_desc varchar(16),
-PRIMARY KEY (sca_code, cat_code, lan_code),
-INDEX sca_pic (sca_pic)
-) engine = innodb ;
-INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
-select count(*) from t1 where sca_code = 'PD';
-count(*)
-1
-select count(*) from t1 where sca_code <= 'PD';
-count(*)
-1
-select count(*) from t1 where sca_pic is null;
-count(*)
-2
-alter table t1 drop index sca_pic;
-alter table t1 add index sca_pic (cat_code, sca_pic);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-count(*)
-1
-select count(*) from t1 where cat_code='E';
-count(*)
-0
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-count(*)
-1
-select count(*) from t1 where sca_pic >= 'n';
-count(*)
-1
-select sca_pic from t1 where sca_pic is null;
-sca_pic
-NULL
-NULL
-update t1 set sca_pic="test" where sca_pic is null;
-delete from t1 where sca_code='pd';
-drop table t1;
-set @a:=now();
-CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
-insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
-a
-1
-2
-3
-select a from t1 natural join t1 as t2 where b >= @a order by a;
-a
-1
-2
-3
-update t1 set a=5 where a=1;
-select a from t1;
-a
-2
-3
-5
-drop table t1;
-create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
-insert into t1 values("hello",1),("world",2);
-select * from t1 order by b desc;
-a b
-world 2
-hello 1
-optimize table t1;
-Table Op Msg_type Msg_text
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize status OK
-show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A # NULL NULL BTREE
-drop table t1;
-create table t1 (i int, j int ) ENGINE=innodb;
-insert into t1 values (1,2);
-select * from t1 where i=1 and j=2;
-i j
-1 2
-create index ax1 on t1 (i,j);
-select * from t1 where i=1 and j=2;
-i j
-1 2
-drop table t1;
-CREATE TABLE t1 (
-a int3 unsigned NOT NULL,
-b int1 unsigned NOT NULL,
-UNIQUE (a, b)
-) ENGINE = innodb;
-INSERT INTO t1 VALUES (1, 1);
-SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
-MIN(B) MAX(b)
-1 1
-drop table t1;
-CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
-INSERT INTO t1 VALUES (1);
-SELECT * FROM t1;
-a
-1
-DROP TABLE t1;
-create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
-insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
-explain select * from t1 where a > 0 and a < 50;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
-drop table t1;
-create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
-insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
-LOCK TABLES t1 WRITE;
-insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
-select id from t1;
-id
-0
-1
-2
-select id from t1;
-id
-0
-1
-2
-UNLOCK TABLES;
-DROP TABLE t1;
-create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
-insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
-LOCK TABLES t1 WRITE;
-begin;
-insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
-select id from t1;
-id
-0
-1
-2
-insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
-commit;
-select id,id3 from t1;
-id id3
-0 0
-1 1
-2 2
-100 2
-UNLOCK TABLES;
-DROP TABLE t1;
-create table t1 (a char(20), unique (a(5))) engine=innodb;
-drop table t1;
-create table t1 (a char(20), index (a(5))) engine=innodb;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` char(20) DEFAULT NULL,
- KEY `a` (`a`(5))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
-create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
-insert into t1 values (NULL),(NULL),(NULL);
-delete from t1 where a=3;
-insert into t1 values (NULL);
-select * from t1;
-a
-1
-2
-4
-alter table t1 add b int;
-select * from t1;
-a b
-1 NULL
-2 NULL
-4 NULL
-drop table t1;
-create table t1
-(
-id int auto_increment primary key,
-name varchar(32) not null,
-value text not null,
-uid int not null,
-unique key(name,uid)
-) engine=innodb;
-insert into t1 values (1,'one','one value',101),
-(2,'two','two value',102),(3,'three','three value',103);
-set insert_id=5;
-replace into t1 (value,name,uid) values ('other value','two',102);
-delete from t1 where uid=102;
-set insert_id=5;
-replace into t1 (value,name,uid) values ('other value','two',102);
-set insert_id=6;
-replace into t1 (value,name,uid) values ('other value','two',102);
-select * from t1;
-id name value uid
-1 one one value 101
-3 three three value 103
-6 two other value 102
-drop table t1;
-create database mysqltest;
-create table mysqltest.t1 (a int not null) engine= innodb;
-insert into mysqltest.t1 values(1);
-create table mysqltest.t2 (a int not null) engine= myisam;
-insert into mysqltest.t2 values(1);
-create table mysqltest.t3 (a int not null) engine= heap;
-insert into mysqltest.t3 values(1);
-commit;
-drop database mysqltest;
-show tables from mysqltest;
-ERROR 42000: Unknown database 'mysqltest'
-set autocommit=0;
-create table t1 (a int not null) engine= innodb;
-insert into t1 values(1),(2);
-truncate table t1;
-commit;
-truncate table t1;
-truncate table t1;
-select * from t1;
-a
-insert into t1 values(1),(2);
-delete from t1;
-select * from t1;
-a
-commit;
-drop table t1;
-set autocommit=1;
-create table t1 (a int not null) engine= innodb;
-insert into t1 values(1),(2);
-truncate table t1;
-insert into t1 values(1),(2);
-select * from t1;
-a
-1
-2
-truncate table t1;
-insert into t1 values(1),(2);
-delete from t1;
-select * from t1;
-a
-drop table t1;
-create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
-insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
-explain select * from t1 order by a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL #
-explain select * from t1 order by b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL # Using filesort
-explain select * from t1 order by c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL # Using filesort
-explain select a from t1 order by a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL # Using index
-explain select b from t1 order by b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL # Using index
-explain select a,b from t1 order by b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL # Using index
-explain select a,b from t1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL # Using index
-explain select a,b,c from t1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL #
-drop table t1;
-create table t1 (t int not null default 1, key (t)) engine=innodb;
-desc t1;
-Field Type Null Key Default Extra
-t int(11) NO MUL 1
-drop table t1;
-CREATE TABLE t1 (
-number bigint(20) NOT NULL default '0',
-cname char(15) NOT NULL default '',
-carrier_id smallint(6) NOT NULL default '0',
-privacy tinyint(4) NOT NULL default '0',
-last_mod_date timestamp NOT NULL,
-last_mod_id smallint(6) NOT NULL default '0',
-last_app_date timestamp NOT NULL,
-last_app_id smallint(6) default '-1',
-version smallint(6) NOT NULL default '0',
-assigned_scps int(11) default '0',
-status tinyint(4) default '0'
-) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
-INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
-INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
-INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
-INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
-INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
-CREATE TABLE t2 (
-number bigint(20) NOT NULL default '0',
-cname char(15) NOT NULL default '',
-carrier_id smallint(6) NOT NULL default '0',
-privacy tinyint(4) NOT NULL default '0',
-last_mod_date timestamp NOT NULL,
-last_mod_id smallint(6) NOT NULL default '0',
-last_app_date timestamp NOT NULL,
-last_app_id smallint(6) default '-1',
-version smallint(6) NOT NULL default '0',
-assigned_scps int(11) default '0',
-status tinyint(4) default '0'
-) ENGINE=InnoDB;
-INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
-INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
-INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
-INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
-select * from t1;
-number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
-4077711111 SeanWheeler 90 2 2002-01-11 11:28:46 500 0000-00-00 00:00:00 -1 2 3 1
-9197722223 berry 90 3 2002-01-11 11:28:09 500 2002-01-02 11:45:32 501 4 10 0
-650 San Francisco 0 0 2001-12-27 11:13:36 342 0000-00-00 00:00:00 -1 1 24 1
-302467 Sue's Subshop 90 3 2002-01-09 11:32:41 500 2002-01-02 11:51:11 501 7 24 0
-6014911113 SudzCarwash 520 1 2002-01-02 11:52:34 500 2002-01-02 11:52:59 501 33 32768 0
-333 tubs 99 2 2002-01-09 11:34:40 501 2002-01-09 11:34:40 500 3 10 0
-select * from t2;
-number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
-4077711111 SeanWheeler 0 2 2002-01-11 11:28:53 500 0000-00-00 00:00:00 -1 2 3 1
-9197722223 berry 90 3 2002-01-11 11:28:18 500 2002-01-02 11:45:32 501 4 10 0
-650 San Francisco 90 0 2002-01-09 11:31:58 342 0000-00-00 00:00:00 -1 1 24 1
-333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
-delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or (t1.carrier_id=90 and t2.number is null);
-select * from t1;
-number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
-6014911113 SudzCarwash 520 1 2002-01-02 11:52:34 500 2002-01-02 11:52:59 501 33 32768 0
-333 tubs 99 2 2002-01-09 11:34:40 501 2002-01-09 11:34:40 500 3 10 0
-select * from t2;
-number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
-333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
-select * from t2;
-number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
-333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
-drop table t1,t2;
-create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-SELECT @@tx_isolation,@@global.tx_isolation;
-@@tx_isolation @@global.tx_isolation
-SERIALIZABLE REPEATABLE-READ
-insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
-select id, code, name from t1 order by id;
-id code name
-1 1 Tim
-2 1 Monty
-3 2 David
-COMMIT;
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
-select id, code, name from t1 order by id;
-id code name
-1 1 Tim
-2 1 Monty
-3 2 David
-4 2 Erik
-5 3 Sasha
-COMMIT;
-SET binlog_format='MIXED';
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
-select id, code, name from t1 order by id;
-id code name
-1 1 Tim
-2 1 Monty
-3 2 David
-4 2 Erik
-5 3 Sasha
-6 3 Jeremy
-7 4 Matt
-COMMIT;
-DROP TABLE t1;
-create table t1 (n int(10), d int(10)) engine=innodb;
-create table t2 (n int(10), d int(10)) engine=innodb;
-insert into t1 values(1,1),(1,2);
-insert into t2 values(1,10),(2,20);
-UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
-select * from t1;
-n d
-1 10
-1 10
-select * from t2;
-n d
-1 30
-2 20
-drop table t1,t2;
-drop table if exists t1, t2;
-CREATE TABLE t1 (a int, PRIMARY KEY (a));
-CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
-create trigger trg_del_t2 after delete on t2 for each row
-insert into t1 values (1);
-insert into t1 values (1);
-insert into t2 values (1),(2);
-delete t2 from t2;
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
-count(*)
-2
-drop table t1, t2;
-drop table if exists t1, t2;
-CREATE TABLE t1 (a int, PRIMARY KEY (a));
-CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
-create trigger trg_del_t2 after delete on t2 for each row
-insert into t1 values (1);
-insert into t1 values (1);
-insert into t2 values (1),(2);
-delete t2 from t2;
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
-count(*)
-2
-drop table t1, t2;
-create table t1 (a int, b int) engine=innodb;
-insert into t1 values(20,null);
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a;
-b ifnull(t2.b,"this is null")
-NULL this is null
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a order by 1;
-b ifnull(t2.b,"this is null")
-NULL this is null
-insert into t1 values(10,null);
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a order by 1;
-b ifnull(t2.b,"this is null")
-NULL this is null
-NULL this is null
-drop table t1;
-create table t1 (a varchar(10) not null) engine=myisam;
-create table t2 (b varchar(10) not null unique) engine=innodb;
-select t1.a from t1,t2 where t1.a=t2.b;
-a
-drop table t1,t2;
-create table t1 (a int not null, b int, primary key (a)) engine = innodb;
-create table t2 (a int not null, b int, primary key (a)) engine = innodb;
-insert into t1 values (10, 20);
-insert into t2 values (10, 20);
-update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
-drop table t1,t2;
-CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
-CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE ) ENGINE=INNODB;
-insert into t1 set id=1;
-insert into t2 set id=1, t1_id=1;
-delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
-select * from t1;
-id
-select * from t2;
-id t1_id
-drop table t2,t1;
-CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
-CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) ENGINE=INNODB;
-INSERT INTO t1 VALUES(1);
-INSERT INTO t2 VALUES(1, 1);
-SELECT * from t1;
-id
-1
-UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
-SELECT * from t1;
-id
-2
-UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
-SELECT * from t1;
-id
-3
-DROP TABLE t1,t2;
-set autocommit=0;
-CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
-CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
-CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
-INSERT INTO t3 VALUES("my-test-1", "my-test-2");
-COMMIT;
-INSERT INTO t1 VALUES("this-key", "will disappear");
-INSERT INTO t2 VALUES("this-key", "will also disappear");
-DELETE FROM t3 WHERE id1="my-test-1";
-SELECT * FROM t1;
-id value
-this-key will disappear
-SELECT * FROM t2;
-id value
-this-key will also disappear
-SELECT * FROM t3;
-id1 id2
-ROLLBACK;
-SELECT * FROM t1;
-id value
-SELECT * FROM t2;
-id value
-SELECT * FROM t3;
-id1 id2
-my-test-1 my-test-2
-SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
-id1 id2
-my-test-1 my-test-2
-COMMIT;
-set autocommit=1;
-DROP TABLE t1,t2,t3;
-CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
-SELECT * from t1;
-a b
-1 1
-102 2
-103 3
-4 4
-5 5
-6 6
-7 7
-8 8
-9 9
-drop table t1;
-CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
-CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
-INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-update t1,t2 set t1.a=t1.a+100;
-select * from t1;
-a b
-101 1
-102 2
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-112 12
-update t1,t2 set t1.a=t1.a+100 where t1.a=101;
-select * from t1;
-a b
-201 1
-102 2
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-112 12
-update t1,t2 set t1.b=t1.b+10 where t1.b=2;
-select * from t1;
-a b
-201 1
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-102 12
-112 12
-update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
-select * from t1;
-a b
-201 1
-103 5
-104 6
-106 6
-105 7
-107 7
-108 8
-109 9
-110 10
-111 11
-102 12
-112 12
-select * from t2;
-a b
-1 1
-2 2
-6 6
-7 7
-8 8
-9 9
-3 13
-4 14
-5 15
-drop table t1,t2;
-CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
-CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-SET AUTOCOMMIT=0;
-INSERT INTO t1 ( B_ID ) VALUES ( 1 );
-INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
-ROLLBACK;
-Warnings:
-Warning 1196 Some non-transactional changed tables couldn't be rolled back
-SELECT * FROM t1;
-B_ID
-drop table t1,t2;
-create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) engine = innodb;
-insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2);
-select distinct parent,child from t1 order by parent;
-parent child
-0 4
-1 2
-1 3
-2 1
-drop table t1;
-create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
-create table t2 (a int not null auto_increment primary key, b int);
-insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
-insert into t2 (a) select b from t1;
-insert into t1 (b) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-select count(*) from t1;
-count(*)
-623
-explain select * from t1 where c between 1 and 2500;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL # Using index condition; Using MRR
-update t1 set c=a;
-explain select * from t1 where c between 1 and 2500;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL c NULL NULL NULL # Using where
-drop table t1,t2;
-create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
-insert into t1 (id) values (null),(null),(null),(null),(null);
-update t1 set fk=69 where fk is null order by id limit 1;
-SELECT * from t1;
-id fk
-2 NULL
-3 NULL
-4 NULL
-5 NULL
-1 69
-drop table t1;
-create table t1 (a int not null, b int not null, key (a));
-insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
-SET @tmp=0;
-update t1 set b=(@tmp:=@tmp+1) order by a;
-update t1 set b=99 where a=1 order by b asc limit 1;
-update t1 set b=100 where a=1 order by b desc limit 2;
-update t1 set a=a+10+b where a=1 order by b;
-select * from t1 order by a,b;
-a b
-2 4
-2 5
-2 6
-3 7
-3 8
-3 9
-3 10
-3 11
-3 12
-13 2
-111 100
-111 100
-drop table t1;
-create table t1 ( c char(8) not null ) engine=innodb;
-insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
-insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
-alter table t1 add b char(8) not null;
-alter table t1 add a char(8) not null;
-alter table t1 add primary key (a,b,c);
-update t1 set a=c, b=c;
-create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
-insert into t2 select * from t1;
-delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
-drop table t1,t2;
-SET AUTOCOMMIT=1;
-create table t1 (a integer auto_increment primary key) engine=innodb;
-insert into t1 (a) values (NULL),(NULL);
-truncate table t1;
-insert into t1 (a) values (NULL),(NULL);
-SELECT * from t1;
-a
-1
-2
-drop table t1;
-CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
-CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB;
-drop table t2,t1;
-create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb;
-insert into `t1`values ( 1 ) ;
-create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
-insert into `t2`values ( 1 ) ;
-create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
-insert into `t3`values ( 1 ) ;
-delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
-update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
-update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
-ERROR 42S22: Unknown column 't1.id' in 'where clause'
-drop table t3,t2,t1;
-create table t1(
-id int primary key,
-pid int,
-index(pid),
-foreign key(pid) references t1(id) on delete cascade) engine=innodb;
-insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
-(8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
-delete from t1 where id=0;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE)
-delete from t1 where id=15;
-delete from t1 where id=0;
-drop table t1;
-CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
-CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
-(stamp))ENGINE=InnoDB;
-insert into t1 values (1),(2),(3);
-insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
-Warnings:
-Warning 1265 Data truncated for column 'stamp' at row 3
-SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
-'20020204120000' GROUP BY col1;
-col1
-1
-2
-3
-4
-drop table t1,t2;
-CREATE TABLE t1 (
-`id` int(10) unsigned NOT NULL auto_increment,
-`id_object` int(10) unsigned default '0',
-`id_version` int(10) unsigned NOT NULL default '1',
-`label` varchar(100) NOT NULL default '',
-`description` text,
-PRIMARY KEY (`id`),
-KEY `id_object` (`id_object`),
-KEY `id_version` (`id_version`)
-) ENGINE=InnoDB;
-INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
-CREATE TABLE t2 (
-`id` int(10) unsigned NOT NULL auto_increment,
-`id_version` int(10) unsigned NOT NULL default '1',
-PRIMARY KEY (`id`),
-KEY `id_version` (`id_version`)
-) ENGINE=InnoDB;
-INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
-SELECT t2.id, t1.`label` FROM t2 INNER JOIN
-(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl
-ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
-id label
-3382 Test
-102 Le Pekin (Test)
-1794 Test de resto
-1822 Test 3
-3524 Societe Test
-3525 Fournisseur Test
-drop table t1,t2;
-create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
-create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
-create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
-insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
-insert t2 select * from t1;
-insert t3 select * from t1;
-checksum table t1, t2, t3, t4 quick;
-Table Checksum
-test.t1 3442722830
-test.t2 NULL
-test.t3 NULL
-test.t4 NULL
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
-checksum table t1, t2, t3, t4;
-Table Checksum
-test.t1 3442722830
-test.t2 3442722830
-test.t3 3442722830
-test.t4 NULL
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
-checksum table t1, t2, t3, t4 extended;
-Table Checksum
-test.t1 3442722830
-test.t2 3442722830
-test.t3 3442722830
-test.t4 NULL
-Warnings:
-Error 1146 Table 'test.t4' doesn't exist
-drop table t1,t2,t3;
-create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
-insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
-select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
-trim(name2)
-fff
-sss
-ttt
-first
-second
-third
-1
-2
-3
-drop table t1;
-create table t1 (a int) engine=innodb;
-create table t2 like t1;
-drop table t1,t2;
-create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
-create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- UNIQUE KEY `id` (`id`,`id2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- KEY `t1_id_fk` (`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-create index id on t2 (id);
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- KEY `id` (`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-create index id2 on t2 (id);
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- KEY `id` (`id`),
- KEY `id2` (`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop index id2 on t2;
-drop index id on t2;
-ERROR HY000: Cannot drop index 'id': needed in a foreign key constraint
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- KEY `id` (`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- KEY `t1_id_fk` (`id`,`id2`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-create unique index id on t2 (id,id2);
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- UNIQUE KEY `id` (`id`,`id2`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- UNIQUE KEY `id` (`id`,`id2`),
- KEY `t1_id_fk` (`id2`,`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- UNIQUE KEY `id` (`id`,`id2`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `id2` int(11) NOT NULL,
- UNIQUE KEY `id` (`id`,`id2`),
- KEY `t1_id_fk` (`id2`,`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `id2` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `id` (`id`,`id2`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `id2` int(11) NOT NULL,
- KEY `t1_id_fk` (`id`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t2 add index id_test (id), add index id_test2 (id,id2);
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `id2` int(11) NOT NULL,
- KEY `id_test` (`id`),
- KEY `id_test2` (`id`,`id2`),
- CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
-ERROR 42000: Incorrect foreign key definition for 't1_id_fk': Key reference and table reference don't match
-create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) NOT NULL AUTO_INCREMENT,
- `b` int(11) DEFAULT NULL,
- PRIMARY KEY (`a`),
- UNIQUE KEY `b_2` (`b`),
- KEY `b` (`b`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2;
-create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) NOT NULL AUTO_INCREMENT,
- `b` int(11) DEFAULT NULL,
- PRIMARY KEY (`a`),
- UNIQUE KEY `b` (`b`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`),
- CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t2, t1;
-create table t1 (c char(10), index (c,c)) engine=innodb;
-ERROR 42S21: Duplicate column name 'c'
-create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
-ERROR 42S21: Duplicate column name 'c1'
-create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
-ERROR 42S21: Duplicate column name 'c1'
-create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
-ERROR 42S21: Duplicate column name 'c1'
-create table t1 (c1 char(10), c2 char(10)) engine=innodb;
-alter table t1 add key (c1,c1);
-ERROR 42S21: Duplicate column name 'c1'
-alter table t1 add key (c2,c1,c1);
-ERROR 42S21: Duplicate column name 'c1'
-alter table t1 add key (c1,c2,c1);
-ERROR 42S21: Duplicate column name 'c1'
-alter table t1 add key (c1,c1,c2);
-ERROR 42S21: Duplicate column name 'c1'
-drop table t1;
-create table t1(a int(1) , b int(1)) engine=innodb;
-insert into t1 values ('1111', '3333');
-select distinct concat(a, b) from t1;
-concat(a, b)
-11113333
-drop table t1;
-CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
-SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
-ERROR HY000: The used table type doesn't support FULLTEXT indexes
-DROP TABLE t1;
-CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-INSERT INTO t1 VALUES (1),(2),(3);
-CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a),
-CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
-SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
-a_id b_list
-1 1,2,3
-2 4,5
-3 NULL
-DROP TABLE t2;
-DROP TABLE t1;
-create temporary table t1 (a int) engine=innodb;
-insert into t1 values (4711);
-truncate t1;
-insert into t1 values (42);
-select * from t1;
-a
-42
-drop table t1;
-create table t1 (a int) engine=innodb;
-insert into t1 values (4711);
-truncate t1;
-insert into t1 values (42);
-select * from t1;
-a
-42
-drop table t1;
-create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
-insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
-select * from t1 order by a,b,c,d;
-a b c d e
-1 1 a 1 1
-2 2 b 2 2
-3 3 ab 3 3
-explain select * from t1 order by a,b,c,d;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
-drop table t1;
-create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
-insert into t1 values ('8', '6'), ('4', '7');
-select min(a) from t1;
-min(a)
-4
-select min(b) from t1 where a='8';
-min(b)
-6
-drop table t1;
-create table t1 (x bigint unsigned not null primary key) engine=innodb;
-insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
-select * from t1;
-x
-18446744073709551600
-18446744073709551601
-select count(*) from t1 where x>0;
-count(*)
-2
-select count(*) from t1 where x=0;
-count(*)
-0
-select count(*) from t1 where x<0;
-count(*)
-0
-select count(*) from t1 where x < -16;
-count(*)
-0
-select count(*) from t1 where x = -16;
-count(*)
-0
-explain select count(*) from t1 where x > -16;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index
-select count(*) from t1 where x > -16;
-count(*)
-2
-select * from t1 where x > -16;
-x
-18446744073709551600
-18446744073709551601
-select count(*) from t1 where x = 18446744073709551601;
-count(*)
-1
-drop table t1;
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
-variable_value
-8191
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
-variable_value
-16384
-SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
-variable_value - @innodb_rows_deleted_orig
-71
-SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
-variable_value - @innodb_rows_inserted_orig
-1084
-SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
-variable_value - @innodb_rows_updated_orig
-885
-SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
-variable_value - @innodb_row_lock_waits_orig
-0
-SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
-variable_value - @innodb_row_lock_current_waits_orig
-0
-SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
-variable_value - @innodb_row_lock_time_orig
-0
-SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
-variable_value - @innodb_row_lock_time_max_orig
-0
-SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
-variable_value - @innodb_row_lock_time_avg_orig
-0
-SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops;
-show variables like "innodb_sync_spin_loops";
-Variable_name Value
-innodb_sync_spin_loops 30
-set global innodb_sync_spin_loops=1000;
-show variables like "innodb_sync_spin_loops";
-Variable_name Value
-innodb_sync_spin_loops 1000
-set global innodb_sync_spin_loops=0;
-show variables like "innodb_sync_spin_loops";
-Variable_name Value
-innodb_sync_spin_loops 0
-set global innodb_sync_spin_loops=20;
-show variables like "innodb_sync_spin_loops";
-Variable_name Value
-innodb_sync_spin_loops 20
-set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
-SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
-show variables like "innodb_thread_concurrency";
-Variable_name Value
-innodb_thread_concurrency 0
-set global innodb_thread_concurrency=1001;
-Warnings:
-Warning 1292 Truncated incorrect thread_concurrency value: '1001'
-show variables like "innodb_thread_concurrency";
-Variable_name Value
-innodb_thread_concurrency 1000
-set global innodb_thread_concurrency=0;
-show variables like "innodb_thread_concurrency";
-Variable_name Value
-innodb_thread_concurrency 0
-set global innodb_thread_concurrency=16;
-show variables like "innodb_thread_concurrency";
-Variable_name Value
-innodb_thread_concurrency 16
-SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
-show variables like "innodb_concurrency_tickets";
-Variable_name Value
-innodb_concurrency_tickets 500
-set global innodb_concurrency_tickets=1000;
-show variables like "innodb_concurrency_tickets";
-Variable_name Value
-innodb_concurrency_tickets 1000
-set global innodb_concurrency_tickets=0;
-Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
-show variables like "innodb_concurrency_tickets";
-Variable_name Value
-innodb_concurrency_tickets 1
-set global innodb_concurrency_tickets=500;
-show variables like "innodb_concurrency_tickets";
-Variable_name Value
-innodb_concurrency_tickets 500
-show variables like "innodb_thread_sleep_delay";
-Variable_name Value
-innodb_thread_sleep_delay 10000
-set global innodb_thread_sleep_delay=100000;
-show variables like "innodb_thread_sleep_delay";
-Variable_name Value
-innodb_thread_sleep_delay 100000
-set global innodb_thread_sleep_delay=0;
-show variables like "innodb_thread_sleep_delay";
-Variable_name Value
-innodb_thread_sleep_delay 0
-set global innodb_thread_sleep_delay=10000;
-show variables like "innodb_thread_sleep_delay";
-Variable_name Value
-innodb_thread_sleep_delay 10000
-set storage_engine=INNODB;
-drop table if exists t1,t2,t3;
---- Testing varchar ---
---- Testing varchar ---
-create table t1 (v varchar(10), c char(10), t text);
-insert into t1 values('+ ', '+ ', '+ ');
-set @a=repeat(' ',20);
-insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
-Warnings:
-Note 1265 Data truncated for column 'v' at row 1
-select concat('*',v,'*',c,'*',t,'*') from t1;
-concat('*',v,'*',c,'*',t,'*')
-*+ *+*+ *
-*+ *+*+ *
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-create table t2 like t1;
-show create table t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-create table t3 select * from t1;
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t1 modify c varchar(10);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(10) DEFAULT NULL,
- `c` varchar(10) DEFAULT NULL,
- `t` text
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t1 modify v char(10);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` char(10) DEFAULT NULL,
- `c` varchar(10) DEFAULT NULL,
- `t` text
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t1 modify t varchar(10);
-Warnings:
-Note 1265 Data truncated for column 't' at row 2
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` char(10) DEFAULT NULL,
- `c` varchar(10) DEFAULT NULL,
- `t` varchar(10) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select concat('*',v,'*',c,'*',t,'*') from t1;
-concat('*',v,'*',c,'*',t,'*')
-*+*+*+ *
-*+*+*+ *
-drop table t1,t2,t3;
-create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text,
- KEY `v` (`v`),
- KEY `c` (`c`),
- KEY `t` (`t`(10))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select count(*) from t1;
-count(*)
-270
-insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
-select count(*) from t1 where v='a';
-count(*)
-10
-select count(*) from t1 where c='a';
-count(*)
-10
-select count(*) from t1 where t='a';
-count(*)
-10
-select count(*) from t1 where v='a ';
-count(*)
-10
-select count(*) from t1 where c='a ';
-count(*)
-10
-select count(*) from t1 where t='a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-count(*)
-10
-select count(*) from t1 where v like 'a%';
-count(*)
-11
-select count(*) from t1 where c like 'a%';
-count(*)
-11
-select count(*) from t1 where t like 'a%';
-count(*)
-11
-select count(*) from t1 where v like 'a %';
-count(*)
-9
-explain select count(*) from t1 where v='a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 13 const # Using where; Using index
-explain select count(*) from t1 where c='a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c c 11 const # Using where; Using index
-explain select count(*) from t1 where t='a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref t t 13 const # Using where
-explain select count(*) from t1 where v like 'a%';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 13 NULL # Using where; Using index
-explain select count(*) from t1 where v between 'a' and 'a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 13 const # Using where; Using index
-explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 13 const # Using where; Using index
-alter table t1 add unique(v);
-ERROR 23000: Duplicate entry '{ ' for key 'v_2'
-alter table t1 add key(v);
-select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
-qq
-*a*a*a*
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
-explain select * from t1 where v='a';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
-select v,count(*) from t1 group by v limit 10;
-v count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select v,count(c) from t1 group by v limit 10;
-v count(c)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result v,count(c) from t1 group by v limit 10;
-v count(c)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select c,count(*) from t1 group by c limit 10;
-c count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select c,count(t) from t1 group by c limit 10;
-c count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result c,count(t) from t1 group by c limit 10;
-c count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select t,count(*) from t1 group by t limit 10;
-t count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select t,count(t) from t1 group by t limit 10;
-t count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result t,count(t) from t1 group by t limit 10;
-t count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(300) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text,
- KEY `c` (`c`),
- KEY `t` (`t`(10)),
- KEY `v` (`v`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select count(*) from t1 where v='a';
-count(*)
-10
-select count(*) from t1 where v='a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-count(*)
-10
-select count(*) from t1 where v like 'a%';
-count(*)
-11
-select count(*) from t1 where v like 'a %';
-count(*)
-9
-explain select count(*) from t1 where v='a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where; Using index
-explain select count(*) from t1 where v like 'a%';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 303 NULL # Using where; Using index
-explain select count(*) from t1 where v between 'a' and 'a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where; Using index
-explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where; Using index
-explain select * from t1 where v='a';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using index condition
-select v,count(*) from t1 group by v limit 10;
-v count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-alter table t1 drop key v, add key v (v(30));
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(300) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text,
- KEY `c` (`c`),
- KEY `t` (`t`(10)),
- KEY `v` (`v`(30))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select count(*) from t1 where v='a';
-count(*)
-10
-select count(*) from t1 where v='a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ';
-count(*)
-10
-select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-count(*)
-10
-select count(*) from t1 where v like 'a%';
-count(*)
-11
-select count(*) from t1 where v like 'a %';
-count(*)
-9
-explain select count(*) from t1 where v='a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 33 const # Using where
-explain select count(*) from t1 where v like 'a%';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 33 NULL # Using where
-explain select count(*) from t1 where v between 'a' and 'a ';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 33 const # Using where
-explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 33 const # Using where
-explain select * from t1 where v='a';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 33 const # Using where
-select v,count(*) from t1 group by v limit 10;
-v count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-alter table t1 modify v varchar(600), drop key v, add key v (v);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(600) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text,
- KEY `c` (`c`),
- KEY `t` (`t`(10)),
- KEY `v` (`v`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select v,count(*) from t1 group by v limit 10;
-v count(*)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-select sql_big_result v,count(t) from t1 group by v limit 10;
-v count(t)
-a 1
-a 10
-b 10
-c 10
-d 10
-e 10
-f 10
-g 10
-h 10
-i 10
-drop table t1;
-create table t1 (a char(10), unique (a));
-insert into t1 values ('a ');
-insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a' for key 'a'
-alter table t1 modify a varchar(10);
-insert into t1 values ('a '),('a '),('a '),('a ');
-ERROR 23000: Duplicate entry 'a ' for key 'a'
-insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 'a'
-insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 'a'
-insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 'a'
-update t1 set a='a ' where a like 'a%';
-select concat(a,'.') from t1;
-concat(a,'.')
-a .
-update t1 set a='abc ' where a like 'a ';
-select concat(a,'.') from t1;
-concat(a,'.')
-a .
-update t1 set a='a ' where a like 'a %';
-select concat(a,'.') from t1;
-concat(a,'.')
-a .
-update t1 set a='a ' where a like 'a ';
-select concat(a,'.') from t1;
-concat(a,'.')
-a .
-drop table t1;
-create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5)));
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL,
- `t` text,
- KEY `v` (`v`(5)),
- KEY `c` (`c`(5)),
- KEY `t` (`t`(5))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
-create table t1 (v char(10) character set utf8);
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` char(10) CHARACTER SET utf8 DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
-create table t1 (v varchar(10), c char(10)) row_format=fixed;
-Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` varchar(10) DEFAULT NULL,
- `c` char(10) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
-insert into t1 values('a','a'),('a ','a ');
-select concat('*',v,'*',c,'*') from t1;
-concat('*',v,'*',c,'*')
-*a*a*
-*a *a*
-drop table t1;
-create table t1 (v varchar(65530), key(v(10)));
-insert into t1 values(repeat('a',65530));
-select length(v) from t1 where v=repeat('a',65530);
-length(v)
-65530
-drop table t1;
-create table t1(a int, b varchar(12), key ba(b, a));
-insert into t1 values (1, 'A'), (20, NULL);
-explain select * from t1 where a=20 and b is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index
-select * from t1 where a=20 and b is null;
-a b
-20 NULL
-drop table t1;
-create table t1 (v varchar(65530), key(v));
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-drop table t1;
-create table t1 (v varchar(65536));
-Warnings:
-Note 1246 Converting column 'v' from VARCHAR to TEXT
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` mediumtext
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
-create table t1 (v varchar(65530) character set utf8);
-Warnings:
-Note 1246 Converting column 'v' from VARCHAR to TEXT
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `v` mediumtext CHARACTER SET utf8
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1;
-set storage_engine=MyISAM;
-create table t1 (v varchar(16384)) engine=innodb;
-drop table t1;
-create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
-insert into t1 values ('8', '6'), ('4', '7');
-select min(a) from t1;
-min(a)
-4
-select min(b) from t1 where a='8';
-min(b)
-6
-drop table t1;
-CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY (`a`),UNIQUE KEY `b` (`b`)) ENGINE=innodb;
-insert into t1 (b) values (1);
-replace into t1 (b) values (2), (1), (3);
-select * from t1;
-a b
-3 1
-2 2
-4 3
-truncate table t1;
-insert into t1 (b) values (1);
-replace into t1 (b) values (2);
-replace into t1 (b) values (1);
-replace into t1 (b) values (3);
-select * from t1;
-a b
-3 1
-2 2
-4 3
-drop table t1;
-create table t1 (rowid int not null auto_increment, val int not null,primary
-key (rowid), unique(val)) engine=innodb;
-replace into t1 (val) values ('1'),('2');
-replace into t1 (val) values ('1'),('2');
-insert into t1 (val) values ('1'),('2');
-ERROR 23000: Duplicate entry '1' for key 'val'
-select * from t1;
-rowid val
-3 1
-4 2
-drop table t1;
-create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
-insert into t1 (val) values (1);
-update t1 set a=2 where a=1;
-insert into t1 (val) values (1);
-ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
-select * from t1;
-a val
-2 1
-drop table t1;
-CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
-INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
-SELECT GRADE FROM t1 WHERE GRADE > 160 AND GRADE < 300;
-GRADE
-252
-SELECT GRADE FROM t1 WHERE GRADE= 151;
-GRADE
-151
-DROP TABLE t1;
-create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
-create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
-insert into t2 values ('aa','cc');
-insert into t1 values ('aa','bb'),('aa','cc');
-delete t1 from t1,t2 where f1=f3 and f4='cc';
-select * from t1;
-f1 f2
-drop table t1,t2;
-CREATE TABLE t1 (
-id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
-) ENGINE=InnoDB;
-CREATE TABLE t2 (
-id INTEGER NOT NULL,
-FOREIGN KEY (id) REFERENCES t1 (id)
-) ENGINE=InnoDB;
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-id
-1
-TRUNCATE t1;
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-id
-1
-DELETE FROM t1;
-TRUNCATE t1;
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-id
-1
-DROP TABLE t2, t1;
-CREATE TABLE t1
-(
-id INT PRIMARY KEY
-) ENGINE=InnoDB;
-CREATE TEMPORARY TABLE t2
-(
-id INT NOT NULL PRIMARY KEY,
-b INT,
-FOREIGN KEY (b) REFERENCES test.t1(id)
-) ENGINE=InnoDB;
-Got one of the listed errors
-DROP TABLE t1;
-create table t1 (col1 varchar(2000), index (col1(767)))
-character set = latin1 engine = innodb;
-create table t2 (col1 char(255), index (col1))
-character set = latin1 engine = innodb;
-create table t3 (col1 binary(255), index (col1))
-character set = latin1 engine = innodb;
-create table t4 (col1 varchar(767), index (col1))
-character set = latin1 engine = innodb;
-create table t5 (col1 varchar(767) primary key)
-character set = latin1 engine = innodb;
-create table t6 (col1 varbinary(767) primary key)
-character set = latin1 engine = innodb;
-create table t7 (col1 text, index(col1(767)))
-character set = latin1 engine = innodb;
-create table t8 (col1 blob, index(col1(767)))
-character set = latin1 engine = innodb;
-create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
-character set = latin1 engine = innodb;
-show create table t9;
-Table Create Table
-t9 CREATE TABLE `t9` (
- `col1` varchar(512) DEFAULT NULL,
- `col2` varchar(512) DEFAULT NULL,
- KEY `col1` (`col1`,`col2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
-create table t1 (col1 varchar(768), index(col1))
-character set = latin1 engine = innodb;
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-create table t2 (col1 varbinary(768), index(col1))
-character set = latin1 engine = innodb;
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-create table t3 (col1 text, index(col1(768)))
-character set = latin1 engine = innodb;
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-create table t4 (col1 blob, index(col1(768)))
-character set = latin1 engine = innodb;
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `col1` varchar(768) DEFAULT NULL,
- KEY `col1` (`col1`(767))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1, t2, t3, t4;
-create table t1 (col1 varchar(768) primary key)
-character set = latin1 engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-create table t2 (col1 varbinary(768) primary key)
-character set = latin1 engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-create table t3 (col1 text, primary key(col1(768)))
-character set = latin1 engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-create table t4 (col1 blob, primary key(col1(768)))
-character set = latin1 engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-CREATE TABLE t1
-(
-id INT PRIMARY KEY
-) ENGINE=InnoDB;
-CREATE TABLE t2
-(
-v INT,
-CONSTRAINT c1 FOREIGN KEY (v) REFERENCES t1(id)
-) ENGINE=InnoDB;
-INSERT INTO t2 VALUES(2);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
-INSERT INTO t1 VALUES(1);
-INSERT INTO t2 VALUES(1);
-DELETE FROM t1 WHERE id = 1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
-DROP TABLE t1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
-SET FOREIGN_KEY_CHECKS=0;
-DROP TABLE t1;
-SET FOREIGN_KEY_CHECKS=1;
-INSERT INTO t2 VALUES(3);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
-DROP TABLE t2;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2);
-set autocommit=0;
-checksum table t1;
-Table Checksum
-test.t1 1531596814
-insert into t1 values(3);
-checksum table t1;
-Table Checksum
-test.t1 1531596814
-commit;
-checksum table t1;
-Table Checksum
-test.t1 2050879373
-commit;
-drop table t1;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2);
-set autocommit=1;
-checksum table t1;
-Table Checksum
-test.t1 1531596814
-set autocommit=1;
-insert into t1 values(3);
-checksum table t1;
-Table Checksum
-test.t1 2050879373
-drop table t1;
-set foreign_key_checks=0;
-create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
-create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
-ERROR HY000: Can't create table 'test.t1' (errno: 150)
-set foreign_key_checks=1;
-drop table t2;
-set foreign_key_checks=0;
-create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
-ERROR HY000: Can't create table 'test.t2' (errno: 150)
-set foreign_key_checks=1;
-drop table t1;
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
-create table t1(a varchar(10) primary key) engine = innodb;
-alter table t1 modify column a int;
-Got one of the listed errors
-set foreign_key_checks=1;
-drop table t2,t1;
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
-create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
-alter table t1 convert to character set utf8;
-set foreign_key_checks=1;
-drop table t2,t1;
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
-create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
-rename table t3 to t1;
-ERROR HY000: Error on rename of './test/t3' to './test/t1' (errno: 150)
-set foreign_key_checks=1;
-drop table t2,t3;
-create table t1(a int primary key) row_format=redundant engine=innodb;
-create table t2(a int primary key,constraint foreign key(a)references t1(a)) row_format=compact engine=innodb;
-create table t3(a int primary key) row_format=compact engine=innodb;
-create table t4(a int primary key,constraint foreign key(a)references t3(a)) row_format=redundant engine=innodb;
-insert into t1 values(1);
-insert into t3 values(1);
-insert into t2 values(2);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
-insert into t4 values(2);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
-insert into t2 values(1);
-insert into t4 values(1);
-update t1 set a=2;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
-update t2 set a=2;
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
-update t3 set a=2;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
-update t4 set a=2;
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
-truncate t1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
-truncate t3;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
-truncate t2;
-truncate t4;
-truncate t1;
-truncate t3;
-drop table t4,t3,t2,t1;
-create table t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-key (a,b,c,d)) engine=innodb;
-drop table t1;
-create table t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-e varchar(255) character set utf8,
-key (a,b,c,d,e)) engine=innodb;
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
-create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
-create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
-create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
-insert into t1 values (0x41),(0x4120),(0x4100);
-insert into t2 values (0x41),(0x4120),(0x4100);
-ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
-insert into t2 values (0x41),(0x4120);
-insert into t3 values (0x41),(0x4120),(0x4100);
-ERROR 23000: Duplicate entry 'A ' for key 'PRIMARY'
-insert into t3 values (0x41),(0x4100);
-insert into t4 values (0x41),(0x4120),(0x4100);
-ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
-insert into t4 values (0x41),(0x4100);
-select hex(s1) from t1;
-hex(s1)
-41
-4100
-4120
-select hex(s1) from t2;
-hex(s1)
-4100
-4120
-select hex(s1) from t3;
-hex(s1)
-4100
-41
-select hex(s1) from t4;
-hex(s1)
-4100
-41
-drop table t1,t2,t3,t4;
-create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=innodb;
-create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
-insert into t1 values(1,0x4100),(2,0x41),(3,0x4120),(4,0x42);
-insert into t2 values(0x42);
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-insert into t2 values(0x41);
-select hex(s1) from t2;
-hex(s1)
-4100
-update t1 set s1=0x123456 where a=2;
-select hex(s1) from t2;
-hex(s1)
-4100
-update t1 set s1=0x12 where a=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-update t1 set s1=0x12345678 where a=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-update t1 set s1=0x123457 where a=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-update t1 set s1=0x1220 where a=1;
-select hex(s1) from t2;
-hex(s1)
-1220
-update t1 set s1=0x1200 where a=1;
-select hex(s1) from t2;
-hex(s1)
-1200
-update t1 set s1=0x4200 where a=1;
-select hex(s1) from t2;
-hex(s1)
-4200
-delete from t1 where a=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-delete from t1 where a=2;
-update t2 set s1=0x4120;
-delete from t1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-delete from t1 where a!=3;
-select a,hex(s1) from t1;
-a hex(s1)
-3 4120
-select hex(s1) from t2;
-hex(s1)
-4120
-drop table t2,t1;
-create table t1 (a int primary key,s1 varchar(2) binary not null unique) engine=innodb;
-create table t2 (s1 char(2) binary not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
-insert into t1 values(1,0x4100),(2,0x41);
-insert into t2 values(0x41);
-select hex(s1) from t2;
-hex(s1)
-41
-update t1 set s1=0x1234 where a=1;
-select hex(s1) from t2;
-hex(s1)
-41
-update t1 set s1=0x12 where a=2;
-select hex(s1) from t2;
-hex(s1)
-12
-delete from t1 where a=1;
-delete from t1 where a=2;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
-select a,hex(s1) from t1;
-a hex(s1)
-2 12
-select hex(s1) from t2;
-hex(s1)
-12
-drop table t2,t1;
-CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
-CREATE TABLE t2(a INT) ENGINE=InnoDB;
-ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
-ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_1;
-ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
-ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- KEY `t2_ibfk_0` (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-DROP TABLE t2,t1;
-create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-insert into t1(a) values (1),(2),(3);
-commit;
-set autocommit = 0;
-update t1 set b = 5 where a = 2;
-create trigger t1t before insert on t1 for each row begin set NEW.b = NEW.a * 10 + 5, NEW.c = NEW.a / 10; end |
-set autocommit = 0;
-insert into t1(a) values (10),(20),(30),(40),(50),(60),(70),(80),(90),(100),
-(11),(21),(31),(41),(51),(61),(71),(81),(91),(101),
-(12),(22),(32),(42),(52),(62),(72),(82),(92),(102),
-(13),(23),(33),(43),(53),(63),(73),(83),(93),(103),
-(14),(24),(34),(44),(54),(64),(74),(84),(94),(104);
-commit;
-commit;
-drop trigger t1t;
-drop table t1;
-create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t2(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t3(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t4(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t5(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-insert into t1(a) values (1),(2),(3);
-insert into t2(a) values (1),(2),(3);
-insert into t3(a) values (1),(2),(3);
-insert into t4(a) values (1),(2),(3);
-insert into t3(a) values (5),(7),(8);
-insert into t4(a) values (5),(7),(8);
-insert into t5(a) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12);
-create trigger t1t before insert on t1 for each row begin
-INSERT INTO t2 SET a = NEW.a;
-end |
-create trigger t2t before insert on t2 for each row begin
-DELETE FROM t3 WHERE a = NEW.a;
-end |
-create trigger t3t before delete on t3 for each row begin
-UPDATE t4 SET b = b + 1 WHERE a = OLD.a;
-end |
-create trigger t4t before update on t4 for each row begin
-UPDATE t5 SET b = b + 1 where a = NEW.a;
-end |
-commit;
-set autocommit = 0;
-update t1 set b = b + 5 where a = 1;
-update t2 set b = b + 5 where a = 1;
-update t3 set b = b + 5 where a = 1;
-update t4 set b = b + 5 where a = 1;
-insert into t5(a) values(20);
-set autocommit = 0;
-insert into t1(a) values(7);
-insert into t2(a) values(8);
-delete from t2 where a = 3;
-update t4 set b = b + 1 where a = 3;
-commit;
-drop trigger t1t;
-drop trigger t2t;
-drop trigger t3t;
-drop trigger t4t;
-drop table t1, t2, t3, t4, t5;
-CREATE TABLE t1 (
-field1 varchar(8) NOT NULL DEFAULT '',
-field2 varchar(8) NOT NULL DEFAULT '',
-PRIMARY KEY (field1, field2)
-) ENGINE=InnoDB;
-CREATE TABLE t2 (
-field1 varchar(8) NOT NULL DEFAULT '' PRIMARY KEY,
-FOREIGN KEY (field1) REFERENCES t1 (field1)
-ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB;
-INSERT INTO t1 VALUES ('old', 'somevalu');
-INSERT INTO t1 VALUES ('other', 'anyvalue');
-INSERT INTO t2 VALUES ('old');
-INSERT INTO t2 VALUES ('other');
-UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
-ERROR 23000: Upholding foreign key constraints for table 't1', entry 'other-somevalu', key 1 would lead to a duplicate entry
-DROP TABLE t2;
-DROP TABLE t1;
-create table t1 (
-c1 bigint not null,
-c2 bigint not null,
-primary key (c1),
-unique key (c2)
-) engine=innodb;
-create table t2 (
-c1 bigint not null,
-primary key (c1)
-) engine=innodb;
-alter table t1 add constraint c2_fk foreign key (c2)
-references t2(c1) on delete cascade;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` bigint(20) NOT NULL,
- `c2` bigint(20) NOT NULL,
- PRIMARY KEY (`c1`),
- UNIQUE KEY `c2` (`c2`),
- CONSTRAINT `c2_fk` FOREIGN KEY (`c2`) REFERENCES `t2` (`c1`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t1 drop foreign key c2_fk;
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` bigint(20) NOT NULL,
- `c2` bigint(20) NOT NULL,
- PRIMARY KEY (`c1`),
- UNIQUE KEY `c2` (`c2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-drop table t1, t2;
-create table t1(a date) engine=innodb;
-create table t2(a date, key(a)) engine=innodb;
-insert into t1 values('2005-10-01');
-insert into t2 values('2005-10-01');
-select * from t1, t2
-where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
-a a
-2005-10-01 2005-10-01
-drop table t1, t2;
-create table t1 (id int not null, f_id int not null, f int not null,
-primary key(f_id, id)) engine=innodb;
-create table t2 (id int not null,s_id int not null,s varchar(200),
-primary key(id)) engine=innodb;
-INSERT INTO t1 VALUES (8, 1, 3);
-INSERT INTO t1 VALUES (1, 2, 1);
-INSERT INTO t2 VALUES (1, 0, '');
-INSERT INTO t2 VALUES (8, 1, '');
-commit;
-DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
-WHERE mm.id IS NULL;
-select ml.* from t1 as ml left join t2 as mm on (mm.id=ml.id)
-where mm.id is null lock in share mode;
-id f_id f
-drop table t1,t2;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
-commit;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-update t1 set b = 5 where b = 1;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-select * from t1 where a = 7 and b = 3 for update;
-a b
-7 3
-commit;
-commit;
-drop table t1;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
-commit;
-set autocommit = 0;
-select * from t1 lock in share mode;
-a b
-1 1
-2 2
-3 1
-4 2
-5 1
-6 2
-update t1 set b = 5 where b = 1;
-set autocommit = 0;
-select * from t1 where a = 2 and b = 2 for update;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-commit;
-commit;
-drop table t1;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values (1,2),(5,3),(4,2);
-create table t2(d int not null, e int, primary key(d)) engine=innodb;
-insert into t2 values (8,6),(12,1),(3,1);
-commit;
-set autocommit = 0;
-select * from t2 for update;
-d e
-3 1
-8 6
-12 1
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-insert into t1 select * from t2;
-update t1 set b = (select e from t2 where a = d);
-create table t3(d int not null, e int, primary key(d)) engine=innodb
-select * from t2;
-commit;
-commit;
-drop table t1, t2, t3;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values (1,2),(5,3),(4,2);
-create table t2(a int not null, b int, primary key(a)) engine=innodb;
-insert into t2 values (8,6),(12,1),(3,1);
-create table t3(d int not null, b int, primary key(d)) engine=innodb;
-insert into t3 values (8,6),(12,1),(3,1);
-create table t5(a int not null, b int, primary key(a)) engine=innodb;
-insert into t5 values (1,2),(5,3),(4,2);
-create table t6(d int not null, e int, primary key(d)) engine=innodb;
-insert into t6 values (8,6),(12,1),(3,1);
-create table t8(a int not null, b int, primary key(a)) engine=innodb;
-insert into t8 values (1,2),(5,3),(4,2);
-create table t9(d int not null, e int, primary key(d)) engine=innodb;
-insert into t9 values (8,6),(12,1),(3,1);
-commit;
-set autocommit = 0;
-select * from t2 for update;
-a b
-3 1
-8 6
-12 1
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-insert into t1 select * from t2;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-update t3 set b = (select b from t2 where a = d);
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-insert into t5 (select * from t2 lock in share mode);
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-update t6 set e = (select b from t2 where a = d lock in share mode);
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-insert into t8 (select * from t2 for update);
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-update t9 set e = (select b from t2 where a = d for update);
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-commit;
-drop table t1, t2, t3, t5, t6, t8, t9;
-CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
-ERROR 42000: Incorrect column name 'DB_ROW_ID'
-CREATE TABLE t1 (
-a BIGINT(20) NOT NULL,
-PRIMARY KEY (a)
-) ENGINE=INNODB DEFAULT CHARSET=UTF8;
-CREATE TABLE t2 (
-a BIGINT(20) NOT NULL,
-b VARCHAR(128) NOT NULL,
-c TEXT NOT NULL,
-PRIMARY KEY (a,b),
-KEY idx_t2_b_c (b,c(200)),
-CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a)
-ON DELETE CASCADE
-) ENGINE=INNODB DEFAULT CHARSET=UTF8;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1, 'bar', 'vbar');
-INSERT INTO t2 VALUES (1, 'BAR2', 'VBAR');
-INSERT INTO t2 VALUES (1, 'bar_bar', 'bibi');
-INSERT INTO t2 VALUES (1, 'customer_over', '1');
-SELECT * FROM t2 WHERE b = 'customer_over';
-a b c
-1 customer_over 1
-SELECT * FROM t2 WHERE BINARY b = 'customer_over';
-a b c
-1 customer_over 1
-SELECT DISTINCT p0.a FROM t2 p0 WHERE p0.b = 'customer_over';
-a
-1
-/* Bang: Empty result set, above was expected: */
-SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
-a
-1
-SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
-a
-1
-drop table t2, t1;
-CREATE TABLE t1 ( a int ) ENGINE=innodb;
-BEGIN;
-INSERT INTO t1 VALUES (1);
-OPTIMIZE TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize status OK
-DROP TABLE t1;
-CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
-CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL,
-CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id)
-ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
-ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON
-DELETE CASCADE ON UPDATE CASCADE;
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `id` int(11) NOT NULL,
- `f` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `f` (`f`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f`) REFERENCES `t1` (`f`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-DROP TABLE t2, t1;
-CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB;
-CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
-ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
-ALTER TABLE t2 MODIFY a INT NOT NULL;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
-DELETE FROM t1;
-DROP TABLE t2,t1;
-CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
-AUTO_INCREMENT=42;
-INSERT INTO t1 VALUES (0),(347),(0);
-SELECT * FROM t1;
-id
-42
-347
-348
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
-CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t2 VALUES(42),(347),(348);
-ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`id`),
- CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
-DROP TABLE t1,t2;
-set innodb_strict_mode=on;
-CREATE TABLE t1 (
-c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
-c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
-c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
-c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
-c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
-c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
-c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
-) ENGINE = InnoDB;
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
-DROP TABLE IF EXISTS t1;
-Warnings:
-Note 1051 Unknown table 't1'
-CREATE TABLE t1(
-id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
-) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-10);
-SELECT * FROM t1;
-id
--10
-INSERT INTO t1 VALUES(NULL);
-SELECT * FROM t1;
-id
--10
-1
-DROP TABLE t1;
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-DROP TABLE IF EXISTS t1, t2;
-Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
-CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
-CREATE TABLE t2 LIKE t1;
-SELECT * FROM t2;
-a
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (1);
-COMMIT;
-SELECT * FROM t1 WHERE a=1;
-a
-1
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-SELECT * FROM t2;
-a
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (2);
-COMMIT;
-SELECT * FROM t1 WHERE a=2;
-a
-2
-SELECT * FROM t1 WHERE a=2;
-a
-2
-DROP TABLE t1;
-DROP TABLE t2;
-create table t1 (i int, j int) engine=innodb;
-insert into t1 (i, j) values (1, 1), (2, 2);
-update t1 set j = 2;
-affected rows: 1
-info: Rows matched: 2 Changed: 1 Warnings: 0
-drop table t1;
-create table t1 (id int) comment='this is a comment' engine=innodb;
-select table_comment, data_free > 0 as data_free_is_set
-from information_schema.tables
-where table_schema='test' and table_name = 't1';
-table_comment data_free_is_set
-this is a comment 1
-drop table t1;
-CREATE TABLE t1 (
-c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
-c2 VARCHAR(128) NOT NULL,
-PRIMARY KEY(c1)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
-CREATE TABLE t2 (
-c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
-c2 INT(10) UNSIGNED DEFAULT NULL,
-PRIMARY KEY(c1)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
-SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
-AUTO_INCREMENT
-200
-ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
-SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
-AUTO_INCREMENT
-200
-DROP TABLE t2;
-DROP TABLE t1;
-CREATE TABLE t1 (c1 int default NULL,
-c2 int default NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-TRUNCATE TABLE t1;
-affected rows: 0
-INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
-affected rows: 5
-info: Records: 5 Duplicates: 0 Warnings: 0
-TRUNCATE TABLE t1;
-affected rows: 0
-DROP TABLE t1;
-Variable_name Value
-Handler_update 0
-Variable_name Value
-Handler_delete 0
-Variable_name Value
-Handler_update 1
-Variable_name Value
-Handler_delete 1
diff --git a/mysql-test/r/innodb_bug36172.result b/mysql-test/r/innodb_bug36172.result
deleted file mode 100644
index 195775f74c8..00000000000
--- a/mysql-test/r/innodb_bug36172.result
+++ /dev/null
@@ -1 +0,0 @@
-SET storage_engine=InnoDB;
diff --git a/mysql-test/r/innodb_bug47167.result b/mysql-test/r/innodb_bug47167.result
deleted file mode 100644
index cbec363d78f..00000000000
--- a/mysql-test/r/innodb_bug47167.result
+++ /dev/null
@@ -1,24 +0,0 @@
-set @old_innodb_file_format_check=@@innodb_file_format_check;
-select @old_innodb_file_format_check;
-@old_innodb_file_format_check
-Antelope
-set global innodb_file_format_check = Barracuda;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format_check = DEFAULT;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format_check = @old_innodb_file_format_check;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Antelope
-set global innodb_file_format_check = cheetah;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format_check = Bear;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format_check = on;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format_check = off;
-ERROR HY000: Incorrect arguments to SET
diff --git a/mysql-test/r/innodb_file_format.result b/mysql-test/r/innodb_file_format.result
deleted file mode 100644
index d58c4ce8b28..00000000000
--- a/mysql-test/r/innodb_file_format.result
+++ /dev/null
@@ -1,44 +0,0 @@
-call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
-select @@innodb_file_format;
-@@innodb_file_format
-Antelope
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Antelope
-set global innodb_file_format=antelope;
-set global innodb_file_format=barracuda;
-set global innodb_file_format=cheetah;
-ERROR HY000: Incorrect arguments to SET
-select @@innodb_file_format;
-@@innodb_file_format
-Barracuda
-set global innodb_file_format=default;
-select @@innodb_file_format;
-@@innodb_file_format
-Antelope
-set global innodb_file_format=on;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=off;
-ERROR HY000: Incorrect arguments to SET
-select @@innodb_file_format;
-@@innodb_file_format
-Antelope
-set global innodb_file_format_check=antelope;
-set global innodb_file_format_check=barracuda;
-set global innodb_file_format_check=cheetah;
-ERROR HY000: Incorrect arguments to SET
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format_check=default;
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format=on;
-ERROR HY000: Incorrect arguments to SET
-set global innodb_file_format=off;
-ERROR HY000: Incorrect arguments to SET
-select @@innodb_file_format_check;
-@@innodb_file_format_check
-Barracuda
-set global innodb_file_format_check=antelope;
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index 5437538023c..4e0ae5bf640 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -4114,6 +4114,9 @@ FROM t1 JOIN t2 ON t2.v
ORDER BY t2.v;
MAX(t1.i)
NULL
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'x'
+Warning 1292 Truncated incorrect INTEGER value: 'y'
EXPLAIN
SELECT MAX(t1.i)
diff --git a/mysql-test/r/join_optimizer.result b/mysql-test/r/join_optimizer.result
index 9e667506cfa..42c4c220e8c 100644
--- a/mysql-test/r/join_optimizer.result
+++ b/mysql-test/r/join_optimizer.result
@@ -33,5 +33,5 @@ SELECT STRAIGHT_JOIN g.id FROM t2 a, t3 g USE INDEX(groups_dt)
WHERE g.domain = 'queue' AND g.type = a.type;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a ALL NULL NULL NULL NULL 2
-1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using where
+1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using index condition
drop table t0,t1,t2,t3;
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index 2f8a6ae93e0..b4a9bc7c4c2 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -946,25 +946,29 @@ group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
-Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
-Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
-Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
-Warning 1260 2 line(s) were cut by GROUP_CONCAT()
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
drop table t1, t2;
set group_concat_max_len=default;
create table t1 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, art int(11) not null, primary key (gid,x,y));
@@ -1238,6 +1242,7 @@ show status like 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 5
+Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
Handler_read_rnd 3
@@ -1306,7 +1311,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '1' AS `f1`,NULL AS `f2`,'3' AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t1` left join `test`.`t2` on(multiple equal(NULL)) where ((coalesce('1',NULL),'3') in ((1,3),(2,2)))
+Note 1003 select '1' AS `f1`,NULL AS `f2`,'3' AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce('1',NULL),'3') in ((1,3),(2,2)))
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
f1 f2 f3 f1 f2
diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result
index b6341109556..62539566bfa 100644
--- a/mysql-test/r/log_slow.result
+++ b/mysql-test/r/log_slow.result
@@ -1,6 +1,6 @@
select @@log_slow_filter;
@@log_slow_filter
-
+admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
select @@log_slow_rate_limit;
@@log_slow_rate_limit
1
@@ -9,10 +9,9 @@ select @@log_slow_verbosity;
show variables like "log_slow%";
Variable_name Value
-log_slow_filter
+log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
log_slow_queries ON
log_slow_rate_limit 1
-log_slow_time 10.000000
log_slow_verbosity
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin";
select @@log_slow_filter;
@@ -56,6 +55,6 @@ last_insert_id int(11) NO NULL
insert_id int(11) NO NULL
server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL
-flush slow query logs;
+flush slow logs;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result
index a9d1b41cf2c..850bdf5c2bd 100644
--- a/mysql-test/r/log_tables_upgrade.result
+++ b/mysql-test/r/log_tables_upgrade.result
@@ -41,6 +41,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
diff --git a/mysql-test/r/merge_debug.result b/mysql-test/r/merge_debug.result
index b857ff597f2..869d9e7536c 100644
--- a/mysql-test/r/merge_debug.result
+++ b/mysql-test/r/merge_debug.result
@@ -10,11 +10,11 @@ INSERT INTO crashed VALUES (10);
INSERT INTO t2 VALUES (20);
INSERT INTO t3 VALUES (30);
LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, crashed WRITE;
-SET GLOBAL debug="+d,*,myisam_pretend_crashed_table_on_open";
+SET GLOBAL debug="+d,myisam_pretend_crashed_table_on_open";
CREATE TRIGGER t1_ai AFTER INSERT ON crashed FOR EACH ROW INSERT INTO t2 VALUES(29);
SET GLOBAL debug=@orig_debug;
INSERT INTO t4 VALUES (39);
-ERROR HY000: Table 't4' was not locked with LOCK TABLES
+ERROR HY000: Table 'crashed' was not locked with LOCK TABLES
INSERT INTO crashed VALUES (11);
ERROR HY000: Table 'crashed' was not locked with LOCK TABLES
INSERT INTO t2 VALUES (21);
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 06e345304de..dea4f2c1230 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2258,7 +2258,7 @@ Key Start Len Index Type
DROP TABLE t1;
create table t1 (n int not null, c char(1)) transactional=1;
Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index c727e3b5b5a..7737dab49b2 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -28,6 +28,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -63,6 +64,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -98,6 +100,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -136,6 +139,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -177,6 +181,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -221,6 +226,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@@ -231,3 +237,5 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%';
End of 5.1 tests
The --upgrade-system-tables option was used, databases won't be touched.
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result
index f1229c4a405..23ad09dbd9c 100644
--- a/mysql-test/r/mysql_upgrade_ssl.result
+++ b/mysql-test/r/mysql_upgrade_ssl.result
@@ -1,15 +1,18 @@
#
# Bug#55672 mysql_upgrade dies with internal error
#
+Phase 1/3: Fixing table and database names
+Phase 2/3: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
+mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
-mysql.general_log
-Error : You can't use locks with log tables.
-status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@@ -20,9 +23,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
-mysql.slow_log
-Error : You can't use locks with log tables.
-status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@@ -30,3 +30,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
+performance_schema
+test
+Phase 3/3: Running 'mysql_fix_privilege_tables'...
+OK
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
index 025f67082ec..8cd8dc2b0dd 100644
--- a/mysql-test/r/mysqld--help-notwin.result
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -97,6 +97,16 @@ The following options may be given as the first argument:
--date-format=name The DATE format (ignored)
--datetime-format=name
The DATETIME format (ignored)
+ --deadlock-search-depth-long=#
+ Long search depth for the two-step deadlock detection
+ --deadlock-search-depth-short=#
+ Short search depth for the two-step deadlock detection
+ --deadlock-timeout-long=#
+ Long timeout for the two-step deadlock detection (in
+ microseconds)
+ --deadlock-timeout-short=#
+ Short timeout for the two-step deadlock detection (in
+ microseconds)
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
@@ -141,6 +151,11 @@ The following options may be given as the first argument:
With this option enabled you can run myisamchk to test
(not repair) tables while the MySQL server is running.
Disable with --skip-external-locking.
+ --extra-max-connections=#
+ The number of connections on extra-port
+ --extra-port=# Extra port number to use for tcp connections in a
+ one-thread-per-connection manner. 0 means don't use
+ another port
--flush Flush MyISAM tables to disk between SQL commands
--flush-time=# A dedicated thread is created to flush all tables at the
given interval
@@ -180,6 +195,10 @@ The following options may be given as the first argument:
interactive connection before closing it
--join-buffer-size=#
The size of the buffer that is used for full joins
+ --join-cache-level=#
+ 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
--keep-files-on-create
Don't overwrite stale .MYD and .MYI even if no directory
is specified
@@ -197,6 +216,8 @@ The following options may be given as the first argument:
The default size of key cache blocks
--key-cache-division-limit=#
The minimum percentage of warm blocks in key cache
+ --key-cache-segments=#
+ The number of segments in a key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
--large-pages Enable support for large pages
@@ -243,15 +264,28 @@ The following options may be given as the first argument:
--log-slow-admin-statements
Log slow OPTIMIZE, ANALYZE, ALTER and other
administrative statements to the slow log if it is open.
+ --log-slow-filter=name
+ Log only certain types of queries. Multiple flags can be
+ specified, separated by commas. Valid values are admin,
+ slave, filesort, filesort_on_disk, full_join, full_scan,
+ query_cache, query_cache_miss, tmp_table,
+ tmp_table_on_disk
--log-slow-queries[=name]
Log slow queries to a table or log file. Defaults logging
to table mysql.slow_log or hostname-slow.log if
--log-output=file is used. Must be enabled to activate
other slow log options. Deprecated option, use
--slow-query-log/--slow-query-log-file instead.
+ --log-slow-rate-limit=#
+ 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
--log-slow-slave-statements
Log slow statements executed by slave thread to the slow
log if it is open.
+ --log-slow-verbosity=name
+ log-slow-verbosity=[value[,value ...]] where value is one
+ of 'innodb', 'query_plan'
--log-tc=name Path to transaction coordinator log (used for
transactions that affect more than one storage engine,
when binary log is disabled).
@@ -327,8 +361,7 @@ The following options may be given as the first argument:
--min-examined-row-limit=#
Don't write queries to slow log that examine fewer rows
than that
- --multi-range-count=#
- Number of key ranges to request at once
+ --mrr-buffer-size=# Size of buffer to use when using MRR with range access
--myisam-block-size=#
Block size to be used for MyISAM index pages
--myisam-data-pointer-size=#
@@ -404,8 +437,15 @@ The following options may be given as the first argument:
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
- engine_condition_pushdown} and val is one of {on, off,
- default}
+ engine_condition_pushdown, index_condition_pushdown,
+ firstmatch, loosescan, materialization, semijoin,
+ partial_match_rowid_merge, partial_match_table_scan,
+ subquery_cache} and val is one of {on, off, default}
+ --optimizer-use-mrr=name
+ Whether the server should use multi-read-range
+ optimization when resolving queries, one of AUTO (as
+ appropriate), FORCE (always where applicable), DISABLE
+ (never)
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
@@ -444,6 +484,9 @@ The following options may be given as the first argument:
where each plugin is identified as name=library, where
name is the plugin name and library is the plugin library
in plugin_dir.
+ --plugin-maturity=name
+ The lowest desirable plugin maturity. Plugins less mature
+ than that will not be installed or loaded.
-P, --port=# 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
@@ -578,6 +621,9 @@ The following options may be given as the first argument:
not sure, leave this option unset
--report-user=name The account user name of the slave to be reported to the
master during slave registration
+ --rowid-merge-buff-size=#
+ The size of the buffers used [NOT] IN evaluation via
+ partial matching
--rpl-recovery-rank=#
Unused, will be removed
--safe-mode Skip some optimize stages (for testing).
@@ -593,13 +639,14 @@ The following options may be given as the first argument:
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
+ --skip-bdb Deprecated option; Exist only for compatiblity with old
+ my.cnf files
--skip-grant-tables Start without grant tables. This gives all users FULL
ACCESS to all tables.
--skip-host-cache Don't cache host names.
--skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
'localhost'.
--skip-networking Don't allow connection with TCP/IP
- --skip-new Don't use new, possibly wrong routines.
--skip-show-database
Don't allow 'SHOW DATABASE' commands
--skip-slave-start If set, slave is not autostarted.
@@ -688,14 +735,14 @@ The following options may be given as the first argument:
How many threads we should keep in a cache for reuse
--thread-handling=name
Define threads usage for handling queries, one of
- one-thread-per-connection, no-threads, loaded-dynamically
+ one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
currently supported)
--tmp-table-size=# If an internal in-memory temporary table exceeds this
size, MySQL will automatically convert it to an on-disk
- MyISAM table
+ MyISAM or Aria table
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a colon (:), in this case they are used in a
round-robin fashion
@@ -715,6 +762,9 @@ The following options may be given as the first argument:
of the underlying table and the query uses a LIMIT clause
(usually get from GUI tools)
-u, --user=name Run mysqld daemon as user.
+ --userstat Enables statistics gathering for USER_STATISTICS,
+ CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
+ tables in the INFORMATION_SCHEMA
-v, --verbose Used with --help option for detailed help.
-V, --version Output version information and exit.
--wait-timeout=# The number of seconds the server waits for activity on a
@@ -746,7 +796,11 @@ connect-timeout 10
console FALSE
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
-default-storage-engine InnoDB
+deadlock-search-depth-long 15
+deadlock-search-depth-short 4
+deadlock-timeout-long 50000000
+deadlock-timeout-short 10000
+default-storage-engine myisam
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
@@ -759,6 +813,8 @@ engine-condition-pushdown TRUE
event-scheduler OFF
expire-logs-days 0
external-locking FALSE
+extra-max-connections 1
+extra-port 0
flush FALSE
flush-time 0
ft-boolean-syntax + -><()~*:""&|
@@ -777,11 +833,13 @@ init-rpl-role MASTER
init-slave
interactive-timeout 28800
join-buffer-size 131072
+join-cache-level 1
keep-files-on-create FALSE
-key-buffer-size 8388608
+key-buffer-size 134217728
key-cache-age-threshold 300
key-cache-block-size 1024
key-cache-division-limit 100
+key-cache-segments 0
language MYSQL_SHAREDIR/
large-pages FALSE
lc-messages en_US
@@ -799,7 +857,10 @@ log-queries-not-using-indexes FALSE
log-short-format FALSE
log-slave-updates FALSE
log-slow-admin-statements FALSE
+log-slow-filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+log-slow-rate-limit 1
log-slow-slave-statements FALSE
+log-slow-verbosity
log-tc tc.log
log-tc-size 24576
log-warnings 1
@@ -829,12 +890,12 @@ max-user-connections 0
max-write-lock-count 18446744073709551615
memlock FALSE
min-examined-row-limit 0
-multi-range-count 256
+mrr-buffer-size 262144
myisam-block-size 1024
myisam-data-pointer-size 6
myisam-max-sort-file-size 9223372036853727232
myisam-mmap-size 18446744073709551615
-myisam-recover-options OFF
+myisam-recover-options DEFAULT
myisam-repair-threads 1
myisam-sort-buffer-size 8388608
myisam-stats-method nulls_unequal
@@ -850,7 +911,8 @@ old-passwords FALSE
old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
+optimizer-use-mrr force
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
@@ -868,6 +930,7 @@ performance-schema-max-table-instances 50000
performance-schema-max-thread-classes 50
performance-schema-max-thread-instances 1000
plugin-load (No default value)
+plugin-maturity unknown
port 3306
port-open-timeout 0
preload-buffer-size 32768
@@ -894,6 +957,7 @@ report-host (No default value)
report-password (No default value)
report-port 3306
report-user (No default value)
+rowid-merge-buff-size 8388608
rpl-recovery-rank 0
safe-user-create FALSE
secure-auth FALSE
@@ -919,7 +983,7 @@ sporadic-binlog-dump-fail FALSE
sql-mode
symbolic-links FALSE
sync-binlog 0
-sync-frm TRUE
+sync-frm FALSE
sync-master-info 0
sync-relay-log 0
sync-relay-log-info 0
@@ -930,7 +994,7 @@ table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
thread-handling one-thread-per-connection
-thread-stack 262144
+thread-stack 294912
time-format %H:%i:%s
timed-mutexes FALSE
tmp-table-size 16777216
@@ -938,6 +1002,7 @@ transaction-alloc-block-size 8192
transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
updatable-views-with-limit YES
+userstat FALSE
verbose TRUE
wait-timeout 28800
diff --git a/mysql-test/r/not_partition.result b/mysql-test/r/not_partition.result
index 2c48f56d578..3c0523279a9 100644
--- a/mysql-test/r/not_partition.result
+++ b/mysql-test/r/not_partition.result
@@ -3,7 +3,7 @@ FLUSH TABLES;
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'partition'
TRUNCATE TABLE t1;
-ERROR 42000: Unknown storage engine 'partition'
+ERROR 42S02: Table 'test.t1' doesn't exist
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze Error Unknown storage engine 'partition'
diff --git a/mysql-test/r/optimizer_switch.result b/mysql-test/r/optimizer_switch.result
deleted file mode 100644
index 6bccefe54be..00000000000
--- a/mysql-test/r/optimizer_switch.result
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# Generic @@optimizer_switch tests
-#
-#
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='index_merge=off,index_merge_union=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='index_merge_union=on';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,index_merge_sort_union=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch=4;
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of '4'
-set optimizer_switch=NULL;
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
-set optimizer_switch='default,index_merge';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
-set optimizer_switch='index_merge=index_merge';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=index_merge'
-set optimizer_switch='index_merge=on,but...';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'but...'
-set optimizer_switch='index_merge=';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge='
-set optimizer_switch='index_merge';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
-set optimizer_switch='on';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'on'
-set optimizer_switch='index_merge=on,index_merge=off';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off'
-set optimizer_switch='index_merge_union=on,index_merge_union=default';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge_union=default'
-set optimizer_switch='default,index_merge=on,index_merge=off,default';
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off,default'
-set optimizer_switch=default;
-set optimizer_switch='index_merge=off,index_merge_union=off,default';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch=default;
-select @@global.optimizer_switch;
-@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set @@global.optimizer_switch=default;
-select @@global.optimizer_switch;
-@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-#
-# Check index_merge's @@optimizer_switch flags
-#
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-
-BUG#37120 optimizer_switch allowable values not according to specification
-
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,materialization=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,semijoin=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,loosescan=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,semijoin=off,materialization=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,materialization=off,semijoin=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,semijoin=off,materialization=off,loosescan=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,semijoin=off,loosescan=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch='default,materialization=off,loosescan=off';
-select @@optimizer_switch;
-@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=off,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
-set optimizer_switch=default;
diff --git a/mysql-test/r/optimizer_switch_eng_cond_pushdown1.result b/mysql-test/r/optimizer_switch_eng_cond_pushdown1.result
index a8313ec246c..ac69da6ebb5 100644
--- a/mysql-test/r/optimizer_switch_eng_cond_pushdown1.result
+++ b/mysql-test/r/optimizer_switch_eng_cond_pushdown1.result
@@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
diff --git a/mysql-test/r/optimizer_switch_eng_cond_pushdown2.result b/mysql-test/r/optimizer_switch_eng_cond_pushdown2.result
index d7e84c57f42..2d67cebbe3c 100644
--- a/mysql-test/r/optimizer_switch_eng_cond_pushdown2.result
+++ b/mysql-test/r/optimizer_switch_eng_cond_pushdown2.result
@@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 148504bcc8b..bbd69083038 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -5,6 +5,8 @@ drop table if exists t1, t2;
#
SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
SET GLOBAL innodb_thread_concurrency = 1;
+set global default_storage_engine='innodb';
+set session default_storage_engine='innodb';
CREATE TABLE t1
(user_num BIGINT,
hours SMALLINT,
@@ -489,3 +491,4 @@ Warning 1265 Data truncated for column 'b' at row 1
Error 1067 Invalid default value for 'b'
SET SESSION sql_mode = @old_mode;
DROP TABLE t1;
+set global default_storage_engine=default;
diff --git a/mysql-test/r/partition_key_cache.result b/mysql-test/r/partition_key_cache.result
index c5241c6ea90..7dd74837511 100644
--- a/mysql-test/r/partition_key_cache.result
+++ b/mysql-test/r/partition_key_cache.result
@@ -52,7 +52,7 @@ SELECT COUNT(b) FROM t1 WHERE b >= 0;
COUNT(b)
2048
Zero key reads?
-No!
+Yes!
INSERT t2 SELECT a,b,c FROM t1;
reads vs requests
reads == requests
@@ -63,7 +63,7 @@ SELECT COUNT(b) FROM t2 WHERE b >= 0;
COUNT(b)
2048
Zero key reads?
-No!
+Yes!
FLUSH TABLES;
# Setting the default key cache to 1M
SET GLOBAL key_buffer_size = 1024*1024;
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index aab6606104f..3f49bf9cc9e 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -1429,7 +1429,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
+1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 831dbeaf029..1529a0dfe95 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -75,9 +75,9 @@ SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
#illegal value fixed
CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS;
Warnings:
-Warning 1652 Incorrect value '10000000000000000000' for option 'ULL'
-Warning 1652 Incorrect value 'ttt' for option 'one_or_two'
-Warning 1652 Incorrect value 'SSS' for option 'YESNO'
+Warning 1708 Incorrect value '10000000000000000000' for option 'ULL'
+Warning 1708 Incorrect value 'ttt' for option 'one_or_two'
+Warning 1708 Incorrect value 'SSS' for option 'YESNO'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index ed68cd985c2..48a995f1b10 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -3017,13 +3017,13 @@ PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
DEALLOCATE PREPARE stmt;
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 4cf1e58e1ea..df167cf3bdb 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1265,15 +1265,6 @@ drop procedure f3;
drop procedure f4;
drop table t1;
set GLOBAL query_cache_size=0;
-set GLOBAL query_cache_size=100000;
-set SESSION query_cache_size=10000;
-ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-set global query_cache_limit=100;
-set global query_cache_size=100;
-set global query_cache_type=demand;
-set GLOBAL query_cache_type=default;
-set GLOBAL query_cache_limit=default;
-set GLOBAL query_cache_size=default;
End of 4.1 tests
SET GLOBAL query_cache_size=102400;
create table t1(a int);
diff --git a/mysql-test/r/query_cache_debug.result b/mysql-test/r/query_cache_debug.result
index eb59e62c8ba..80c21add075 100644
--- a/mysql-test/r/query_cache_debug.result
+++ b/mysql-test/r/query_cache_debug.result
@@ -5,7 +5,7 @@ drop table if exists t1;
create table t1 (a varchar(100));
insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
Activate debug hook and attempt to retrieve the statement from the cache.
-set session debug='+d,wait_in_query_cache_insert';
+set session debug='+d,foobar,wait_in_query_cache_insert';
select SQL_CACHE * from t1;;
On a second connection; clear the query cache.
show status like 'Qcache_queries_in_cache';
@@ -32,7 +32,7 @@ SET GLOBAL concurrent_insert= 1;
SET GLOBAL query_cache_size= 1024*512;
SET GLOBAL query_cache_type= ON;
# Switch to connection con1
-SET SESSION debug='+d,wait_after_query_cache_invalidate';
+SET SESSION debug='+d,foobar,wait_after_query_cache_invalidate';
# Send concurrent insert, will wait in the query cache table invalidate
INSERT INTO t1 VALUES (4);
# Switch to connection default
@@ -108,8 +108,8 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
** before the mutex lock in invalidate_table_internal.
** This will allow new result sets to be written into the QC.
**
-SET SESSION debug='+d,wait_in_query_cache_invalidate1';
-SET SESSION debug='+d,wait_in_query_cache_invalidate2';
+SET SESSION debug='+d,foobar,wait_in_query_cache_invalidate1';
+SET SESSION debug='+d,foobar,wait_in_query_cache_invalidate2';
DELETE FROM t1 WHERE a like '%a%';;
=================================== Connection default
** Assert that the expect process status is obtained.
@@ -118,12 +118,12 @@ DELETE FROM t1 WHERE a like '%a%';;
** On THD2: Insert a result into the cache. This attempt will be blocked
** because of a debug hook placed just before the mutex lock after which
** the first part of the result set is written.
-SET SESSION debug='+d,wait_in_query_cache_insert';
+SET SESSION debug='+d,foobar,wait_in_query_cache_insert';
SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3;
=================================== Connection thd3
** On THD3: Insert another result into the cache and block on the same
** debug hook.
-SET SESSION debug='+d,wait_in_query_cache_insert';
+SET SESSION debug='+d,foobar,wait_in_query_cache_insert';
SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;;
=================================== Connection default
** Assert that the two SELECT-stmt threads to reach the hook.
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index a893cb03a42..b5716264f56 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4780,7 +4780,7 @@ b a
EXPLAIN EXTENDED SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
-1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
Warnings:
Note 1003 select '2' AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t1` where 1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > UNIX_TIMESTAMP('2009-03-10 00:00:00');
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index fb09a62eb73..1ae56bc33fe 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -2090,10 +2090,10 @@ fld6 char(4) latin1_swedish_ci NO #
show full columns from t2 from test like 's%';
Field Type Collation Null Key Default Extra Privileges Comment
show keys from t2;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
-t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
+t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
+t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
DO 1;
DO benchmark(100,1+1),1,1;
@@ -2430,27 +2430,28 @@ city
London
DROP TABLE t1;
create table t1 (a int(11) unsigned, b int(11) unsigned);
-insert into t1 values (1,0), (1,1), (1,2);
+insert into t1 values (1,0), (1,1), (18446744073709551615,0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 3
select a-b from t1 order by 1;
a-b
0
1
-18446744073709551615
+4294967295
select a-b , (a-b < 0) from t1 order by 1;
a-b (a-b < 0)
0 0
1 0
-18446744073709551615 0
+4294967295 0
select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
d (a-b >= 0) b
1 1 0
0 1 1
-18446744073709551615 1 2
select cast((a - b) as unsigned) from t1 order by 1;
cast((a - b) as unsigned)
0
1
-18446744073709551615
+4294967295
drop table t1;
create table t1 (a int(11));
select all all * from t1;
@@ -2788,26 +2789,26 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
-0.615800023078918
+0.6158000230789185
select max(key2) from t2 where key2 <= 1.6158;
max(key2)
-1.61580002307892
+1.6158000230789185
select min(key1) from t1 where key1 >= 0.3762;
min(key1)
-0.376199990510941
+0.37619999051094055
select min(key2) from t2 where key2 >= 1.3762;
min(key2)
-1.37619996070862
+1.3761999607086182
select max(key1), min(key2) from t1, t2
where key1 <= 0.6158 and key2 >= 1.3762;
max(key1) min(key2)
-0.615800023078918 1.37619996070862
+0.6158000230789185 1.3761999607086182
select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
max(key1)
-0.615800023078918
+0.6158000230789185
select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
min(key1)
-0.376199990510941
+0.37619999051094055
DROP TABLE t1,t2;
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
INSERT INTO t1 VALUES (10);
@@ -3423,6 +3424,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using MRR
DROP TABLE t1,t2;
+SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
INSERT t1 SET i = 0;
UPDATE t1 SET i = -1;
@@ -3442,8 +3444,9 @@ Warnings:
Warning 1264 Out of range value for column 'i' at row 1
SELECT * FROM t1;
i
-255
+0
DROP TABLE t1;
+SET SQL_MODE=default;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, c int, e int, primary key(a,b,c));
@@ -4171,9 +4174,10 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-0
+NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34'
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
0
@@ -4181,17 +4185,16 @@ Warnings:
Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34'
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
Warnings:
-Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34:00'
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/09/01' at row 1
-Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/10/20' at row 1
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
@@ -4338,6 +4341,7 @@ SHOW STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 2
+Handler_read_last 0
Handler_read_next 10
Handler_read_prev 0
Handler_read_rnd 10
@@ -4426,7 +4430,7 @@ CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (2),(3);
# Should not crash
SELECT 1 FROM t1 WHERE a <> 1 AND NOT
-ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
+ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1))
INTO @var0;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
@@ -4457,7 +4461,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01');
@@ -4468,7 +4472,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a TIMESTAMP NOT NULL);
INSERT INTO t1 VALUES('2001-01-01');
@@ -4479,7 +4483,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4490,7 +4494,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4500,7 +4504,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 0
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 0
SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
a b
2001-01-01 00:00:00 2001-01-01
@@ -4508,7 +4512,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4527,7 +4531,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE y system NULL NULL NULL NULL 1 100.00
1 SIMPLE z system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
#
# Bug #49897: crash in ptr_compare when char(0) NOT NULL
@@ -4641,7 +4645,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '1' AS `a`,'1' AS `b` from `test`.`t1` where 1
+Note 1003 select '1' AS `a`,'1' AS `b` from dual where 1
SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
a b
1 1
@@ -4742,6 +4746,72 @@ field2
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
+#
+# Bug#33546: Slowdown on re-evaluation of constant expressions.
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t1 WHERE a = 1 + 1;
+a
+2
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1 + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>((1 + 1)))
+SELECT * FROM t1 HAVING a = 1 + 1;
+a
+2
+EXPLAIN EXTENDED SELECT * FROM t1 HAVING a = 1 + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` having (`test`.`t1`.`a` = <cache>((1 + 1)))
+SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
+a b
+4 2
+EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,'2' AS `b` from `test`.`t1` where (`test`.`t1`.`a` = <cache>(('2' + (1 + 1))))
+SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
+b a
+2 3
+EXPLAIN EXTENDED SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select '2' AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > UNIX_TIMESTAMP('2009-03-10 00:00:00');
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > <cache>(unix_timestamp('2009-03-10 00:00:00')))
+CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
+BEGIN
+SET @cnt := @cnt + 1;
+RETURN 1;
+END;|
+SET @cnt := 0;
+SELECT * FROM t1 WHERE a = f1();
+a
+1
+SELECT @cnt;
+@cnt
+1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>(`f1`()))
+DROP TABLE t1, t2;
+DROP FUNCTION f1;
+# End of bug#33546
#
# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
#
@@ -4801,6 +4871,25 @@ SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
DROP TABLE t1;
End of 5.1 tests
+#
+# Bug#54515: Crash in opt_range.cc::get_best_group_min_max on
+# SELECT from VIEW with GROUP BY
+#
+CREATE TABLE t1 (
+col_int_key int DEFAULT NULL,
+KEY int_key (col_int_key)
+) ;
+INSERT INTO t1 VALUES (1),(2);
+CREATE VIEW view_t1 AS
+SELECT t1.col_int_key AS col_int_key
+FROM t1;
+SELECT col_int_key FROM view_t1 GROUP BY col_int_key;
+col_int_key
+1
+2
+DROP VIEW view_t1;
+DROP TABLE t1;
+# End of test BUG#54515
set join_cache_level=default;
show variables like 'join_cache_level';
Variable_name Value
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index 7722fbe5dcc..b5716264f56 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -2086,10 +2086,10 @@ fld6 char(4) latin1_swedish_ci NO #
show full columns from t2 from test like 's%';
Field Type Collation Null Key Default Extra Privileges Comment
show keys from t2;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
-t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
+t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
+t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
DO 1;
DO benchmark(100,1+1),1,1;
@@ -2426,27 +2426,28 @@ city
London
DROP TABLE t1;
create table t1 (a int(11) unsigned, b int(11) unsigned);
-insert into t1 values (1,0), (1,1), (1,2);
+insert into t1 values (1,0), (1,1), (18446744073709551615,0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 3
select a-b from t1 order by 1;
a-b
0
1
-18446744073709551615
+4294967295
select a-b , (a-b < 0) from t1 order by 1;
a-b (a-b < 0)
0 0
1 0
-18446744073709551615 0
+4294967295 0
select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
d (a-b >= 0) b
1 1 0
0 1 1
-18446744073709551615 1 2
select cast((a - b) as unsigned) from t1 order by 1;
cast((a - b) as unsigned)
0
1
-18446744073709551615
+4294967295
drop table t1;
create table t1 (a int(11));
select all all * from t1;
@@ -2784,26 +2785,26 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
-0.615800023078918
+0.6158000230789185
select max(key2) from t2 where key2 <= 1.6158;
max(key2)
-1.61580002307892
+1.6158000230789185
select min(key1) from t1 where key1 >= 0.3762;
min(key1)
-0.376199990510941
+0.37619999051094055
select min(key2) from t2 where key2 >= 1.3762;
min(key2)
-1.37619996070862
+1.3761999607086182
select max(key1), min(key2) from t1, t2
where key1 <= 0.6158 and key2 >= 1.3762;
max(key1) min(key2)
-0.615800023078918 1.37619996070862
+0.6158000230789185 1.3761999607086182
select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
max(key1)
-0.615800023078918
+0.6158000230789185
select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
min(key1)
-0.376199990510941
+0.37619999051094055
DROP TABLE t1,t2;
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
INSERT INTO t1 VALUES (10);
@@ -3419,6 +3420,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using MRR
DROP TABLE t1,t2;
+SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
INSERT t1 SET i = 0;
UPDATE t1 SET i = -1;
@@ -3438,8 +3440,9 @@ Warnings:
Warning 1264 Out of range value for column 'i' at row 1
SELECT * FROM t1;
i
-255
+0
DROP TABLE t1;
+SET SQL_MODE=default;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, c int, e int, primary key(a,b,c));
@@ -4167,9 +4170,10 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-0
+NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34'
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
0
@@ -4177,17 +4181,16 @@ Warnings:
Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34'
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
Warnings:
-Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34:00'
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/09/01' at row 1
-Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/10/20' at row 1
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
@@ -4334,6 +4337,7 @@ SHOW STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 2
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -4422,7 +4426,7 @@ CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (2),(3);
# Should not crash
SELECT 1 FROM t1 WHERE a <> 1 AND NOT
-ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
+ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1))
INTO @var0;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
@@ -4453,7 +4457,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01');
@@ -4464,7 +4468,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a TIMESTAMP NOT NULL);
INSERT INTO t1 VALUES('2001-01-01');
@@ -4475,7 +4479,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:0
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4486,7 +4490,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4496,7 +4500,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 0
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 0
SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
a b
2001-01-01 00:00:00 2001-01-01
@@ -4504,7 +4508,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from dual where 1
DROP TABLE t1;
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
@@ -4523,7 +4527,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE y system NULL NULL NULL NULL 1 100.00
1 SIMPLE z system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1
+Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from dual where 1
DROP TABLE t1;
#
# Bug #49897: crash in ptr_compare when char(0) NOT NULL
@@ -4637,7 +4641,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select '1' AS `a`,'1' AS `b` from `test`.`t1` where 1
+Note 1003 select '1' AS `a`,'1' AS `b` from dual where 1
SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
a b
1 1
@@ -4738,6 +4742,72 @@ field2
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
+#
+# Bug#33546: Slowdown on re-evaluation of constant expressions.
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t1 WHERE a = 1 + 1;
+a
+2
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1 + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>((1 + 1)))
+SELECT * FROM t1 HAVING a = 1 + 1;
+a
+2
+EXPLAIN EXTENDED SELECT * FROM t1 HAVING a = 1 + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` having (`test`.`t1`.`a` = <cache>((1 + 1)))
+SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
+a b
+4 2
+EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a = b + (1 + 1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,'2' AS `b` from `test`.`t1` where (`test`.`t1`.`a` = <cache>(('2' + (1 + 1))))
+SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
+b a
+2 3
+EXPLAIN EXTENDED SELECT * FROM t2 LEFT JOIN t1 ON a = b + 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select '2' AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > UNIX_TIMESTAMP('2009-03-10 00:00:00');
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > <cache>(unix_timestamp('2009-03-10 00:00:00')))
+CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
+BEGIN
+SET @cnt := @cnt + 1;
+RETURN 1;
+END;|
+SET @cnt := 0;
+SELECT * FROM t1 WHERE a = f1();
+a
+1
+SELECT @cnt;
+@cnt
+1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = <cache>(`f1`()))
+DROP TABLE t1, t2;
+DROP FUNCTION f1;
+# End of bug#33546
#
# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
#
@@ -4797,3 +4867,22 @@ SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
DROP TABLE t1;
End of 5.1 tests
+#
+# Bug#54515: Crash in opt_range.cc::get_best_group_min_max on
+# SELECT from VIEW with GROUP BY
+#
+CREATE TABLE t1 (
+col_int_key int DEFAULT NULL,
+KEY int_key (col_int_key)
+) ;
+INSERT INTO t1 VALUES (1),(2);
+CREATE VIEW view_t1 AS
+SELECT t1.col_int_key AS col_int_key
+FROM t1;
+SELECT col_int_key FROM view_t1 GROUP BY col_int_key;
+col_int_key
+1
+2
+DROP VIEW view_t1;
+DROP TABLE t1;
+# End of test BUG#54515
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 135109cac88..073b0b331f0 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -254,11 +254,13 @@ drop table t1;
flush tables;
show open tables;
Database Table In_use Name_locked
+mysql general_log 0 0
create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
test t1 0 0
+mysql general_log 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
show create table t1;
diff --git a/mysql-test/r/single_delete_update.result b/mysql-test/r/single_delete_update.result
index 72419c6ec9d..00231d8377a 100644
--- a/mysql-test/r/single_delete_update.result
+++ b/mysql-test/r/single_delete_update.result
@@ -306,21 +306,21 @@ NULL 13 13
SHOW SESSION STATUS LIKE 'Sort%';
Variable_name Value
Sort_merge_passes 0
-Sort_range 1
+Sort_range 0
Sort_rows 4
-Sort_scan 0
+Sort_scan 1
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 2
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 4
-Handler_read_rnd_next 0
+Handler_read_rnd 0
+Handler_read_rnd_next 17
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-x x x x x x x x x x Using sort_union(key1,key2); Using where; Using filesort
+x x x x x x x x x x Using where; Using filesort
Warnings:
x x x
FLUSH STATUS;
@@ -328,18 +328,18 @@ DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
SHOW SESSION STATUS LIKE 'Sort%';
Variable_name Value
Sort_merge_passes 0
-Sort_range 1
+Sort_range 0
Sort_rows 4
-Sort_scan 0
+Sort_scan 1
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 2
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 8
-Handler_read_rnd_next 0
+Handler_read_rnd 4
+Handler_read_rnd_next 17
SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
i key1 key2
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
@@ -850,21 +850,21 @@ NULL 13 13
SHOW SESSION STATUS LIKE 'Sort%';
Variable_name Value
Sort_merge_passes 0
-Sort_range 1
+Sort_range 0
Sort_rows 4
-Sort_scan 0
+Sort_scan 1
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 2
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 4
-Handler_read_rnd_next 0
+Handler_read_rnd 0
+Handler_read_rnd_next 17
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-x x x x x x x x x x Using sort_union(key1,key2); Using where; Using filesort
+x x x x x x x x x x Using where; Using filesort
Warnings:
x x x
FLUSH STATUS;
@@ -872,18 +872,18 @@ UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
SHOW SESSION STATUS LIKE 'Sort%';
Variable_name Value
Sort_merge_passes 0
-Sort_range 1
+Sort_range 0
Sort_rows 4
-Sort_scan 0
+Sort_scan 1
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 2
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 8
-Handler_read_rnd_next 0
+Handler_read_rnd 4
+Handler_read_rnd_next 17
SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
i key1 key2
123 10 10
@@ -892,7 +892,7 @@ i key1 key2
123 13 13
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-x x x x x x x x x x Using sort_union(key1,key2); Using where; Using filesort
+x x x x x x x x x x Using where; Using filesort
Warnings:
x x x
DROP TABLE t2;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 5a1a35b2571..0f18e0e5d6f 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -6528,16 +6528,16 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
EXPLAIN SELECT * FROM t1 WHERE c1=f1();
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c1 c1 5 const 1 Using index
+1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
EXPLAIN SELECT * FROM v1 WHERE c1=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
EXPLAIN SELECT * FROM v1 WHERE c1=f1();
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c1 c1 5 const 1 Using index
+1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE c1=f2(10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c1 c1 5 const 1 Using index
+1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE c1=f2(c1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL c1 5 NULL 5 Using where; Using index
diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result
index 636eeabfffc..ace8d9f26bf 100644
--- a/mysql-test/r/status_user.result
+++ b/mysql-test/r/status_user.result
@@ -102,6 +102,7 @@ Handler_discover 0
Handler_prepare 18
Handler_read_first 0
Handler_read_key 3
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 5b2176ac872..f4e07636467 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -734,7 +734,7 @@ id
2
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
+1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
Warnings:
Note 1249 Select 3 was reduced during optimization
Note 1249 Select 2 was reduced during optimization
@@ -3561,6 +3561,30 @@ ORDER BY t1.t DESC LIMIT 1);
i1 i2 t i1 i2 t
24 1 2005-05-27 12:40:30 24 1 2006-06-20 12:29:40
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+(SELECT i FROM t1) UNION (SELECT i FROM t1);
+i
+SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
+(
+(SELECT i FROM t1) UNION
+(SELECT i FROM t1)
+);
+i
+SELECT * FROM t1
+WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION (SELECT i FROM t1)))' at line 2
+explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
+from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union (select t12.i from t1 t12))
+from t1' at line 1
+explain select * from t1 where not exists
+((select t11.i from t1 t11) union (select t12.i from t1 t12));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b));
insert into t1 (a) values (FLOOR(rand() * 100));
insert into t1 (a) select FLOOR(rand() * 100) from t1;
@@ -4248,6 +4272,35 @@ out_a MIN(b)
1 2
2 4
DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+2
+2
+2
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists((select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) union (select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))))
+DROP TABLE t1,t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index 1fc9309da4f..15546f6c75c 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -882,7 +882,7 @@ Level Code Message
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
Error 1054 Unknown column 'c' in 'field list'
-Note 1003 select `c` AS `c` from (select <expr_cache><count(`test`.`t1`.`a`),`test`.`t1`.`c`>((select count(`test`.`t1`.`a`) from (select count(`test`.`t1`.`b`) AS `COUNT(b)` from `test`.`t1`) `x` group by `t1`.`c`)) AS `(SELECT COUNT(a) FROM
+Note 1003 select `c` AS `c` from (select <expr_cache><count(`test`.`t1`.`a`),`test`.`t1`.`c`>((select count(`test`.`t1`.`a`) from dual group by `t1`.`c`)) AS `(SELECT COUNT(a) FROM
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
)` from `test`.`t1` group by `test`.`t1`.`b`) `y`
DROP TABLE t1;
@@ -1280,6 +1280,8 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t2 ALL NULL NULL NULL NULL 100
set @save_optimizer_search_depth=@@optimizer_search_depth;
set @@optimizer_search_depth=63;
+Warnings:
+Warning 1287 'optimizer-search-depth=63' is deprecated and will be removed in a future release. Please use a search depth less than 63 instead
explain select * from t1 where (a,b) in (select a,b from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10
@@ -1427,6 +1429,7 @@ CALL p1;
ERROR 42S22: Unknown column 'f1' in 'where clause'
DROP PROCEDURE p1;
DROP TABLE t1, t2;
+End of 5.3 tests
#
# BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery
# in the select list
@@ -1474,6 +1477,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t2.v' of SELECT #2 was resolved in SELECT #1
-Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`v` AS `v`,(select count(distinct `test`.`t1`.`i`) from `test`.`t1` where (`test`.`t1`.`v` = `test`.`t2`.`v`)) AS `subsel` from `test`.`t2`
+Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`v` AS `v`,<expr_cache><`test`.`t2`.`v`>((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
diff --git a/mysql-test/r/subselect3_jcl6.result b/mysql-test/r/subselect3_jcl6.result
index d24c1baa814..0019a82f2dd 100644
--- a/mysql-test/r/subselect3_jcl6.result
+++ b/mysql-test/r/subselect3_jcl6.result
@@ -121,6 +121,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -885,7 +886,7 @@ Level Code Message
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
Error 1054 Unknown column 'c' in 'field list'
-Note 1003 select `c` AS `c` from (select <expr_cache><count(`test`.`t1`.`a`),`test`.`t1`.`c`>((select count(`test`.`t1`.`a`) from (select count(`test`.`t1`.`b`) AS `COUNT(b)` from `test`.`t1`) `x` group by `t1`.`c`)) AS `(SELECT COUNT(a) FROM
+Note 1003 select `c` AS `c` from (select <expr_cache><count(`test`.`t1`.`a`),`test`.`t1`.`c`>((select count(`test`.`t1`.`a`) from dual group by `t1`.`c`)) AS `(SELECT COUNT(a) FROM
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
)` from `test`.`t1` group by `test`.`t1`.`b`) `y`
DROP TABLE t1;
@@ -1284,6 +1285,8 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t2 ALL NULL NULL NULL NULL 100
set @save_optimizer_search_depth=@@optimizer_search_depth;
set @@optimizer_search_depth=63;
+Warnings:
+Warning 1287 'optimizer-search-depth=63' is deprecated and will be removed in a future release. Please use a search depth less than 63 instead
explain select * from t1 where (a,b) in (select a,b from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10
@@ -1431,6 +1434,57 @@ CALL p1;
ERROR 42S22: Unknown column 'f1' in 'where clause'
DROP PROCEDURE p1;
DROP TABLE t1, t2;
+End of 5.3 tests
+#
+# BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery
+# in the select list
+#
+
+CREATE TABLE t1 (
+i int(11) DEFAULT NULL,
+v varchar(1) DEFAULT NULL
+);
+
+INSERT INTO t1 VALUES (8,'v');
+INSERT INTO t1 VALUES (9,'r');
+INSERT INTO t1 VALUES (NULL,'y');
+
+CREATE TABLE t2 (
+i int(11) DEFAULT NULL,
+v varchar(1) DEFAULT NULL,
+KEY i_key (i)
+);
+
+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');
+
+SELECT i, v, (SELECT COUNT(DISTINCT i)
+FROM t1
+WHERE v = t2.v) as subsel
+FROM t2;
+i v subsel
+NULL r 1
+0 c 0
+0 o 0
+2 v 1
+7 c 0
+
+EXPLAIN EXTENDED
+SELECT i, v, (SELECT COUNT(DISTINCT i)
+FROM t1
+WHERE v = t2.v) as subsel
+FROM t2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t2.v' of SELECT #2 was resolved in SELECT #1
+Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`v` AS `v`,<expr_cache><`test`.`t2`.`v`>((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 join_cache_level=default;
show variables like 'join_cache_level';
Variable_name Value
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index ea836bea76a..72fa5f23ab1 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -117,14 +117,14 @@ EXPLAIN
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
id select_type table type possible_keys key key_len ref rows Extra
x PRIMARY x x x x x x x x
-x DEPENDENT SUBQUERY x x x x x x x x
+x SUBQUERY x x x x x x x x
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
a b
EXPLAIN
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
-2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
a b
1 NULL
@@ -147,28 +147,28 @@ EXPLAIN
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
id select_type table type possible_keys key key_len ref rows Extra
x PRIMARY x x x x x x x x
-x DEPENDENT SUBQUERY x x x x x x x x
+x SUBQUERY x x x x x x x x
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
a b
EXPLAIN
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
id select_type table type possible_keys key key_len ref rows Extra
x PRIMARY x x x x x x x x
-x DEPENDENT SUBQUERY x x x x x x x x
+x SUBQUERY x x x x x x x x
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
c d
EXPLAIN
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
id select_type table type possible_keys key key_len ref rows Extra
x PRIMARY x x x x x x x x
-x DEPENDENT SUBQUERY x x x x x x x x
+x SUBQUERY x x x x x x x x
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
e f
EXPLAIN
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
id select_type table type possible_keys key key_len ref rows Extra
x PRIMARY x x x x x x x x
-x DEPENDENT SUBQUERY x x x x x x x x
+x SUBQUERY x x x x x x x x
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
c d
SELECT * FROM t1 WHERE ( a, b ) NOT IN
@@ -209,7 +209,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.c' of SELECT #2 was resolved in SELECT #1
-Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from `test`.`t1`
+Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from dual
first equivalent variant
SELECT (SELECT 1 FROM t2 WHERE d = IFNULL(c,NULL)) AS RESULT FROM t1 GROUP BY c ;
RESULT
@@ -220,7 +220,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.c' of SELECT #2 was resolved in SELECT #1
-Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from `test`.`t1` group by NULL
+Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from dual group by NULL
second equivalent variant
SELECT (SELECT 1 FROM t2 WHERE d = c) AS RESULT FROM t1 GROUP BY c ;
RESULT
@@ -231,7 +231,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.c' of SELECT #2 was resolved in SELECT #1
-Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from `test`.`t1` group by NULL
+Note 1003 select <expr_cache><NULL>((select 1 from `test`.`t2` where 0)) AS `RESULT` from dual group by NULL
DROP TABLE t1,t2;
#
# BUG#45928 "Differing query results depending on MRR and
@@ -252,6 +252,8 @@ set @old_optimizer_switch = @@session.optimizer_switch,
SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off';
SET SESSION optimizer_use_mrr = 'force';
SET SESSION engine_condition_pushdown = 1;
+Warnings:
+Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
SELECT `time_nokey` G1 FROM t1 WHERE ( `varchar_nokey` , `varchar_key` ) IN (
SELECT `varchar_nokey` , `varchar_nokey` ) AND `varchar_key` >= 'c' HAVING G1 ORDER
BY `pk` ;
@@ -259,6 +261,8 @@ G1
set @@session.optimizer_switch = @old_optimizer_switch,
@@session.optimizer_use_mrr = @old_optimizer_use_mrr,
@@session.engine_condition_pushdown = @old_engine_condition_pushdown;
+Warnings:
+Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
DROP TABLE t1;
#
# BUG#45863 "Assertion failed: (fixed == 0), function fix_fields(),
@@ -469,6 +473,8 @@ SELECT @old_icp:=@@engine_condition_pushdown;
@old_icp:=@@engine_condition_pushdown
#
SET SESSION engine_condition_pushdown = 'ON';
+Warnings:
+Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
SELECT pk
FROM t2
@@ -482,8 +488,13 @@ pk
9
# Restore old value for Index condition pushdown
SET SESSION engine_condition_pushdown=@old_icp;
+Warnings:
+Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
DROP TABLE t1,t2;
#
+# End of 5.3 tests.
+#
+#
# Bug#53236 Segfault in DTCollation::set(DTCollation&)
#
CREATE TABLE t1 (
diff --git a/mysql-test/r/subselect_cache.result b/mysql-test/r/subselect_cache.result
index 7b9dc3c943f..2c7715f93ae 100644
--- a/mysql-test/r/subselect_cache.result
+++ b/mysql-test/r/subselect_cache.result
@@ -28,6 +28,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -54,6 +55,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -79,6 +81,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -103,6 +106,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -128,6 +132,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -152,6 +157,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -249,6 +255,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -345,6 +352,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -366,6 +374,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 17
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -386,6 +395,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 10
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -407,6 +417,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 17
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -427,6 +438,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 10
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -454,6 +466,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -480,6 +493,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -501,6 +515,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 7
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -521,6 +536,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 4
@@ -618,6 +634,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 70
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -714,6 +731,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1337,6 +1355,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 11
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1365,6 +1384,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 32
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1396,6 +1416,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1424,6 +1445,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 13
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1613,6 +1635,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 15
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 8
@@ -1637,6 +1660,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 21
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 8
@@ -1662,6 +1686,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 15
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 8
@@ -1686,6 +1711,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 22
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 8
@@ -1726,6 +1752,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 15
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1762,6 +1789,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 0
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1797,6 +1825,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 15
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -1832,6 +1861,7 @@ show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 18
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
@@ -2521,6 +2551,71 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL u
1 NULL w
1 NULL y
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
SET @@optimizer_switch='subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key`
@@ -2547,6 +2642,71 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL u
1 NULL w
1 NULL y
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'c'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'o'
+Warning 1292 Truncated incorrect INTEGER value: 'd'
+Warning 1292 Truncated incorrect INTEGER value: 'd'
+Warning 1292 Truncated incorrect INTEGER value: 'd'
+Warning 1292 Truncated incorrect INTEGER value: 'd'
drop table t1,t2,t3,t4;
set @@optimizer_switch= default;
#launchpad BUG#609045
@@ -2970,6 +3130,8 @@ FROM t3 SUBQUERY2_t1 JOIN t2 ON SUBQUERY2_t1 .`col_int_key`
WHERE table1 .`col_varchar_key` ) field10
1 NULL d
1 NULL f
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'f'
SET @@optimizer_switch = 'subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key`
@@ -2983,6 +3145,8 @@ FROM t3 SUBQUERY2_t1 JOIN t2 ON SUBQUERY2_t1 .`col_int_key`
WHERE table1 .`col_varchar_key` ) field10
1 NULL d
1 NULL f
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'f'
drop table t1,t2,t3,t4;
set @@optimizer_switch= default;
#launchpad BUG#611625
@@ -3270,6 +3434,71 @@ WHERE table3 .`col_varchar_key` IN (
SELECT `col_varchar_key`
FROM t2 ) AND table1 .`col_varchar_key` OR table1 .`pk` ;
col_varchar_nokey
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'w'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'k'
+Warning 1292 Truncated incorrect DOUBLE value: 'r'
+Warning 1292 Truncated incorrect DOUBLE value: 't'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'u'
+Warning 1292 Truncated incorrect DOUBLE value: 'h'
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: 'k'
+Warning 1292 Truncated incorrect DOUBLE value: 'e'
+Warning 1292 Truncated incorrect DOUBLE value: 'n'
+Warning 1292 Truncated incorrect DOUBLE value: 't'
+Warning 1292 Truncated incorrect DOUBLE value: 'c'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'y'
+Warning 1292 Truncated incorrect DOUBLE value: 'f'
+Warning 1292 Truncated incorrect DOUBLE value: 'd'
+Warning 1292 Truncated incorrect DOUBLE value: 'v'
+Warning 1292 Truncated incorrect DOUBLE value: 'r'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'y'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'd'
+Warning 1292 Truncated incorrect DOUBLE value: 'z'
+Warning 1292 Truncated incorrect DOUBLE value: 'e'
+Warning 1292 Truncated incorrect DOUBLE value: 'h'
+Warning 1292 Truncated incorrect DOUBLE value: 'b'
+Warning 1292 Truncated incorrect DOUBLE value: 's'
+Warning 1292 Truncated incorrect DOUBLE value: 'e'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'e'
+Warning 1292 Truncated incorrect DOUBLE value: 'f'
+Warning 1292 Truncated incorrect DOUBLE value: 'v'
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'c'
+Warning 1292 Truncated incorrect DOUBLE value: 'w'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'k'
+Warning 1292 Truncated incorrect DOUBLE value: 'r'
+Warning 1292 Truncated incorrect DOUBLE value: 't'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'u'
+Warning 1292 Truncated incorrect DOUBLE value: 'h'
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: 'k'
+Warning 1292 Truncated incorrect DOUBLE value: 'e'
+Warning 1292 Truncated incorrect DOUBLE value: 'n'
+Warning 1292 Truncated incorrect DOUBLE value: 't'
+Warning 1292 Truncated incorrect DOUBLE value: 'c'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'y'
+Warning 1292 Truncated incorrect DOUBLE value: 'f'
+Warning 1292 Truncated incorrect DOUBLE value: 'd'
+Warning 1292 Truncated incorrect DOUBLE value: 'w'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'k'
+Warning 1292 Truncated incorrect DOUBLE value: 'r'
+Warning 1292 Truncated incorrect DOUBLE value: 't'
drop table t1,t2;
set @@optimizer_switch= default;
# LP BUG#615378 (incorrect NULL result returning in Item_cache)
@@ -3309,4 +3538,7 @@ WHERE ( table1 . `pk` < 5 ) OR ( table1 . `col_varchar_key` IS NOT NULL)
GROUP BY field3
HAVING (field3 <= 'h' AND field2 != 4) ;
field2 field3
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'v'
+Warning 1292 Truncated incorrect INTEGER value: 'r'
drop tables t1, t2, t3;
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 78e6467ae62..bcde5a24fb9 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -57,7 +57,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having (<expr_cache><'1'>((select '1')) = 1)
+Note 1003 select 1 AS `1` from dual having (<expr_cache><'1'>((select '1')) = 1)
SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1;
1
1
@@ -210,7 +210,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort
Warnings:
-Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt`
+Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from dual
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
a
2
@@ -321,7 +321,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from `test`.`t1` where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
+Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from dual where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
ERROR 21000: Subquery returns more than 1 row
create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq));
@@ -738,11 +738,11 @@ id
2
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
+1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
Warnings:
Note 1249 Select 3 was reduced during optimization
Note 1249 Select 2 was reduced during optimization
-Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = (1 + 1))
+Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = <cache>((1 + 1)))
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL id 5 NULL 2 100.00 Using where; Using index
@@ -929,7 +929,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a)
1 1 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a)
1 0 a
@@ -939,7 +939,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a)
1 0 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
drop table t1,t2;
create table t1 (a int, b real, c varchar(10));
insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');
@@ -1440,7 +1440,7 @@ explain extended (select * from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 (select 'tttt' AS `s1` from `test`.`t1`)
+Note 1003 (select 'tttt' AS `s1` from dual)
(select * from t1);
s1
tttt
@@ -1628,7 +1628,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 UNION t1 system NULL NULL NULL NULL 1 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 select 'e' AS `s1` from `test`.`t1` where 1
+Note 1003 select 'e' AS `s1` from dual where 1
drop table t1;
CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874');
@@ -3565,6 +3565,30 @@ ORDER BY t1.t DESC LIMIT 1);
i1 i2 t i1 i2 t
24 1 2005-05-27 12:40:30 24 1 2006-06-20 12:29:40
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+(SELECT i FROM t1) UNION (SELECT i FROM t1);
+i
+SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
+(
+(SELECT i FROM t1) UNION
+(SELECT i FROM t1)
+);
+i
+SELECT * FROM t1
+WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION (SELECT i FROM t1)))' at line 2
+explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
+from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union (select t12.i from t1 t12))
+from t1' at line 1
+explain select * from t1 where not exists
+((select t11.i from t1 t11) union (select t12.i from t1 t12));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b));
insert into t1 (a) values (FLOOR(rand() * 100));
insert into t1 (a) select FLOOR(rand() * 100) from t1;
@@ -3661,8 +3685,6 @@ insert into t1 select RAND()*1000, A.a + 10*(B.a+10*(C.a+10*D.a))
from t3 A, t3 B, t3 C, t3 D where D.a<3;
insert into t2(y,z) select t1.b, RAND()*1000 from t1, t3;
SET SESSION sort_buffer_size = 32 * 1024;
-Warnings:
-Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;
@@ -4254,6 +4276,35 @@ out_a MIN(b)
1 2
2 4
DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+2
+2
+2
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists((select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) union (select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))))
+DROP TABLE t1,t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
@@ -4795,6 +4846,270 @@ id g v s
51 50 NULL l
61 60 NULL l
drop table t1, t2;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
+CREATE TABLE t1( a INT );
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2( a INT, b INT );
+SELECT *
+FROM (SELECT a INTO @var FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO @var FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (SELECT a FROM t1 WHERE a = 2) t1a;
+a
+2
+SELECT * FROM (
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+1
+2
+SELECT * FROM ((SELECT 1 a) UNION SELECT 1 a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a)) alias;
+a
+1
+SELECT * FROM (SELECT 1 UNION SELECT 1) t1a;
+1
+1
+SELECT * FROM ((SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO @a))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO DUMPFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO OUTFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a LIMIT 1) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a LIMIT 1) t1a;
+a
+1
+SELECT * FROM t1 JOIN (SELECT 1 UNION SELECT 1) alias ON 1;
+a 1
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM t1 JOIN ((t1 t1a)) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM (t1 t1a);
+a
+1
+2
+SELECT * FROM ((t1 t1a));
+a
+1
+2
+SELECT * FROM t1 JOIN (SELECT 1 t1a) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 t1a)) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN (SELECT 1 a) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 a)) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM (t1 JOIN (SELECT 1) t1a1 ON 1) t1a2;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a2' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 3 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT a FROM t1 WHERE a = 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 ) a
+1 1
+1 2
+SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ) a
+1 1
+1 2
+SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
+a b
+SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
+1
+SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
+((SELECT 1 UNION SELECT 1 UNION SELECT 1))
+1
+SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') UNION SELECT 1 )' at line 1
+SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
+1
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT EXISTS(SELECT 1+1);
+EXISTS(SELECT 1+1)
+1
+SELECT EXISTS(SELECT 1+1 INTO @test);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @test)' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+DROP TABLE t1, t2;
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index d4b0e33f653..a8b4065d257 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -54,7 +54,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having (<expr_cache><'1'>((select '1')) = 1)
+Note 1003 select 1 AS `1` from dual having (<expr_cache><'1'>((select '1')) = 1)
SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1;
1
1
@@ -207,7 +207,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort
Warnings:
-Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt`
+Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from dual
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
a
2
@@ -318,7 +318,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from `test`.`t1` where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
+Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from dual where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
ERROR 21000: Subquery returns more than 1 row
create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq));
@@ -735,11 +735,11 @@ id
2
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
+1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
Warnings:
Note 1249 Select 3 was reduced during optimization
Note 1249 Select 2 was reduced during optimization
-Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = (1 + 1))
+Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = <cache>((1 + 1)))
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL id 5 NULL 2 100.00 Using where; Using index
@@ -926,7 +926,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a)
1 1 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a)
1 0 a
@@ -936,7 +936,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a)
1 0 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
drop table t1,t2;
create table t1 (a int, b real, c varchar(10));
insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');
@@ -1437,7 +1437,7 @@ explain extended (select * from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 (select 'tttt' AS `s1` from `test`.`t1`)
+Note 1003 (select 'tttt' AS `s1` from dual)
(select * from t1);
s1
tttt
@@ -1625,7 +1625,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 UNION t1 system NULL NULL NULL NULL 1 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 select 'e' AS `s1` from `test`.`t1` where 1
+Note 1003 select 'e' AS `s1` from dual where 1
drop table t1;
CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874');
@@ -3562,6 +3562,30 @@ ORDER BY t1.t DESC LIMIT 1);
i1 i2 t i1 i2 t
24 1 2005-05-27 12:40:30 24 1 2006-06-20 12:29:40
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+(SELECT i FROM t1) UNION (SELECT i FROM t1);
+i
+SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
+(
+(SELECT i FROM t1) UNION
+(SELECT i FROM t1)
+);
+i
+SELECT * FROM t1
+WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION (SELECT i FROM t1)))' at line 2
+explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
+from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union (select t12.i from t1 t12))
+from t1' at line 1
+explain select * from t1 where not exists
+((select t11.i from t1 t11) union (select t12.i from t1 t12));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b));
insert into t1 (a) values (FLOOR(rand() * 100));
insert into t1 (a) select FLOOR(rand() * 100) from t1;
@@ -3658,8 +3682,6 @@ insert into t1 select RAND()*1000, A.a + 10*(B.a+10*(C.a+10*D.a))
from t3 A, t3 B, t3 C, t3 D where D.a<3;
insert into t2(y,z) select t1.b, RAND()*1000 from t1, t3;
SET SESSION sort_buffer_size = 32 * 1024;
-Warnings:
-Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;
@@ -4251,6 +4273,35 @@ out_a MIN(b)
1 2
2 4
DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+2
+2
+2
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists((select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) union (select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))))
+DROP TABLE t1,t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
@@ -4792,6 +4843,270 @@ id g v s
51 50 NULL l
61 60 NULL l
drop table t1, t2;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
+CREATE TABLE t1( a INT );
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2( a INT, b INT );
+SELECT *
+FROM (SELECT a INTO @var FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO @var FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (SELECT a FROM t1 WHERE a = 2) t1a;
+a
+2
+SELECT * FROM (
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+1
+2
+SELECT * FROM ((SELECT 1 a) UNION SELECT 1 a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a)) alias;
+a
+1
+SELECT * FROM (SELECT 1 UNION SELECT 1) t1a;
+1
+1
+SELECT * FROM ((SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO @a))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO DUMPFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO OUTFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a LIMIT 1) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a LIMIT 1) t1a;
+a
+1
+SELECT * FROM t1 JOIN (SELECT 1 UNION SELECT 1) alias ON 1;
+a 1
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM t1 JOIN ((t1 t1a)) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM (t1 t1a);
+a
+1
+2
+SELECT * FROM ((t1 t1a));
+a
+1
+2
+SELECT * FROM t1 JOIN (SELECT 1 t1a) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 t1a)) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN (SELECT 1 a) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 a)) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM (t1 JOIN (SELECT 1) t1a1 ON 1) t1a2;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a2' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 3 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT a FROM t1 WHERE a = 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 ) a
+1 1
+1 2
+SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ) a
+1 1
+1 2
+SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
+a b
+SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
+1
+SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
+((SELECT 1 UNION SELECT 1 UNION SELECT 1))
+1
+SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') UNION SELECT 1 )' at line 1
+SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
+1
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT EXISTS(SELECT 1+1);
+EXISTS(SELECT 1+1)
+1
+SELECT EXISTS(SELECT 1+1 INTO @test);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @test)' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+DROP TABLE t1, t2;
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index f9ec2abade1..511fa140ca8 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -54,7 +54,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having (<expr_cache><'1'>((select '1')) = 1)
+Note 1003 select 1 AS `1` from dual having (<expr_cache><'1'>((select '1')) = 1)
SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1;
1
1
@@ -207,7 +207,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort
Warnings:
-Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt`
+Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,'2' AS `a` from dual
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
a
2
@@ -318,7 +318,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.a' of SELECT #3 was resolved in SELECT #1
-Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from `test`.`t1` where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
+Note 1003 select <expr_cache><`test`.`t2`.`a`>((select '2' from dual where ('2' = `test`.`t2`.`a`) union select `test`.`t5`.`a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`))) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
ERROR 21000: Subquery returns more than 1 row
create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq));
@@ -735,11 +735,11 @@ id
2
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
+1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
Warnings:
Note 1249 Select 3 was reduced during optimization
Note 1249 Select 2 was reduced during optimization
-Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = (1 + 1))
+Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = <cache>((1 + 1)))
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL id 5 NULL 2 100.00 Using where; Using index
@@ -926,7 +926,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a)
1 1 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a)
1 0 a
@@ -936,7 +936,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a)
1 0 a
2 0 b
-NULL 0 NULL
+NULL NULL NULL
drop table t1,t2;
create table t1 (a int, b real, c varchar(10));
insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');
@@ -1437,7 +1437,7 @@ explain extended (select * from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 (select 'tttt' AS `s1` from `test`.`t1`)
+Note 1003 (select 'tttt' AS `s1` from dual)
(select * from t1);
s1
tttt
@@ -1625,7 +1625,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 UNION t1 system NULL NULL NULL NULL 1 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 select 'e' AS `s1` from `test`.`t1` where 1
+Note 1003 select 'e' AS `s1` from dual where 1
drop table t1;
CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874');
@@ -3562,6 +3562,30 @@ ORDER BY t1.t DESC LIMIT 1);
i1 i2 t i1 i2 t
24 1 2005-05-27 12:40:30 24 1 2006-06-20 12:29:40
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+(SELECT i FROM t1) UNION (SELECT i FROM t1);
+i
+SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
+(
+(SELECT i FROM t1) UNION
+(SELECT i FROM t1)
+);
+i
+SELECT * FROM t1
+WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION (SELECT i FROM t1)))' at line 2
+explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
+from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union (select t12.i from t1 t12))
+from t1' at line 1
+explain select * from t1 where not exists
+((select t11.i from t1 t11) union (select t12.i from t1 t12));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b));
insert into t1 (a) values (FLOOR(rand() * 100));
insert into t1 (a) select FLOOR(rand() * 100) from t1;
@@ -3658,8 +3682,6 @@ insert into t1 select RAND()*1000, A.a + 10*(B.a+10*(C.a+10*D.a))
from t3 A, t3 B, t3 C, t3 D where D.a<3;
insert into t2(y,z) select t1.b, RAND()*1000 from t1, t3;
SET SESSION sort_buffer_size = 32 * 1024;
-Warnings:
-Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;
@@ -4251,6 +4273,35 @@ out_a MIN(b)
1 2
2 4
DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+2
+2
+2
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists(select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a`>(exists((select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) union (select 1 from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))))
+DROP TABLE t1,t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
@@ -4792,6 +4843,270 @@ id g v s
51 50 NULL l
61 60 NULL l
drop table t1, t2;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
+CREATE TABLE t1( a INT );
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2( a INT, b INT );
+SELECT *
+FROM (SELECT a INTO @var FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT *
+FROM (SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2) t1a' at line 2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO @var FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @var FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' FROM t1 WHERE a = 2
+) t1a' at line 4
+SELECT * FROM (SELECT a FROM t1 WHERE a = 2) t1a;
+a
+2
+SELECT * FROM (
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+2
+SELECT * FROM (
+SELECT 1 a
+UNION
+SELECT a FROM t1 WHERE a = 2
+UNION
+SELECT a FROM t1 WHERE a = 2
+) t1a;
+a
+1
+2
+SELECT * FROM ((SELECT 1 a) UNION SELECT 1 a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a)) alias;
+a
+1
+SELECT * FROM (SELECT 1 UNION SELECT 1) t1a;
+1
+1
+SELECT * FROM ((SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM ((SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO @a)) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO DUMPFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION (SELECT 1 a INTO OUTFILE 'file' )) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO @a))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO DUMPFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a UNION ((SELECT 1 a INTO OUTFILE 'file' ))) t1a;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' ))) t1a' at line 1
+SELECT * FROM (SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a LIMIT 1) t1a;
+a
+1
+SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a LIMIT 1) t1a;
+a
+1
+SELECT * FROM t1 JOIN (SELECT 1 UNION SELECT 1) alias ON 1;
+a 1
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a ON 1' at line 1
+SELECT * FROM t1 JOIN (t1 t1a) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM t1 JOIN ((t1 t1a)) ON 1;
+a a
+1 1
+2 1
+1 2
+2 2
+SELECT * FROM (t1 t1a);
+a
+1
+2
+SELECT * FROM ((t1 t1a));
+a
+1
+2
+SELECT * FROM t1 JOIN (SELECT 1 t1a) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 t1a)) alias ON 1;
+a t1a
+1 1
+2 1
+SELECT * FROM t1 JOIN (SELECT 1 a) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM t1 JOIN ((SELECT 1 a)) a ON 1;
+a a
+1 1
+2 1
+SELECT * FROM (t1 JOIN (SELECT 1) t1a1 ON 1) t1a2;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1a2' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 3 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO @a);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @a)' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO OUTFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO OUTFILE 'file' )' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 INTO DUMPFILE 'file' );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO DUMPFILE 'file' )' at line 1
+SELECT ( SELECT a FROM t1 WHERE a = 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 ) a
+1 1
+1 2
+SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
+( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ) a
+1 1
+1 2
+SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
+a b
+SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1' at line 1
+SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
+1
+SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
+((SELECT 1 UNION SELECT 1 UNION SELECT 1))
+1
+SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') UNION SELECT 1 )' at line 1
+SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
+1
+1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
+a
+1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT EXISTS(SELECT 1+1);
+EXISTS(SELECT 1+1)
+1
+SELECT EXISTS(SELECT 1+1 INTO @test);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @test)' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE EXISTS ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+SELECT * FROM t1 WHERE a IN ( SELECT 1 INTO @v );
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO @v )' at line 1
+DROP TABLE t1, t2;
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result
index f17edf3be6c..00c62920fce 100644
--- a/mysql-test/r/subselect_sj2.result
+++ b/mysql-test/r/subselect_sj2.result
@@ -60,7 +60,7 @@ a b pk1 pk2 pk3
set @save_max_heap_table_size= @@max_heap_table_size;
set max_heap_table_size=16384;
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
drop table t3;
create table t3 (
a int,
@@ -77,8 +77,6 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY subselect2 ALL unique_key NULL NULL NULL 10
1 PRIMARY t3 ref b b 5 test.t0.a 1
2 SUBQUERY t0 ALL NULL NULL NULL NULL 10
-set @save_ecp= @@engine_condition_pushdown;
-set engine_condition_pushdown=0;
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2
0 0 0 0
@@ -95,7 +93,6 @@ a b pk1 pk2
11 11 11 11
12 12 12 12
13 13 13 13
-set engine_condition_pushdown=@save_ecp;
set join_buffer_size= @save_join_buffer_size;
set max_heap_table_size= @save_max_heap_table_size;
explain select * from t1 where a in (select b from t2);
@@ -115,7 +112,7 @@ a b
2 2
drop table t1, t2, t3;
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
create table t1 (a int, filler1 binary(200), filler2 binary(200));
insert into t1 select a, 'filler123456', 'filler123456' from t0;
insert into t1 select a+10, 'filler123456', 'filler123456' from t0;
diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result
index 67215d1715e..8e3ec975b35 100644
--- a/mysql-test/r/subselect_sj2_jcl6.result
+++ b/mysql-test/r/subselect_sj2_jcl6.result
@@ -64,7 +64,7 @@ a b pk1 pk2 pk3
set @save_max_heap_table_size= @@max_heap_table_size;
set max_heap_table_size=16384;
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
drop table t3;
create table t3 (
a int,
@@ -79,10 +79,8 @@ from t0 A, t0 B where B.a <5;
explain select * from t3 where b in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY subselect2 ALL unique_key NULL NULL NULL 10
-1 PRIMARY t3 ref b b 5 test.t0.a 1 Using join buffer
+1 PRIMARY t3 ref b b 5 test.t0.a 1
2 SUBQUERY t0 ALL NULL NULL NULL NULL 10
-set @save_ecp= @@engine_condition_pushdown;
-set engine_condition_pushdown=0;
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2
0 0 0 0
@@ -99,7 +97,6 @@ a b pk1 pk2
11 11 11 11
12 12 12 12
13 13 13 13
-set engine_condition_pushdown=@save_ecp;
set join_buffer_size= @save_join_buffer_size;
set max_heap_table_size= @save_max_heap_table_size;
explain select * from t1 where a in (select b from t2);
@@ -119,7 +116,7 @@ a b
2 2
drop table t1, t2, t3;
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
create table t1 (a int, filler1 binary(200), filler2 binary(200));
insert into t1 select a, 'filler123456', 'filler123456' from t0;
insert into t1 select a+10, 'filler123456', 'filler123456' from t0;
diff --git a/mysql-test/r/table_options.result b/mysql-test/r/table_options.result
index ed6fe4fb3de..d0ebbeb0197 100644
--- a/mysql-test/r/table_options.result
+++ b/mysql-test/r/table_options.result
@@ -3,9 +3,9 @@ SET @OLD_SQL_MODE=@@SQL_MODE;
SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1='1v1';
Warnings:
-Warning 1651 Unknown option 'fkey'
-Warning 1651 Unknown option 'dff'
-Warning 1651 Unknown option 'tkey1'
+Warning 1707 Unknown option 'fkey'
+Warning 1707 Unknown option 'dff'
+Warning 1707 Unknown option 'tkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -16,10 +16,10 @@ drop table t1;
#reassiginig options in the same line
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1 TKEY1=DEFAULT tkey1=1v2 tkey2=2v1;
Warnings:
-Warning 1651 Unknown option 'fkey'
-Warning 1651 Unknown option 'dff'
-Warning 1651 Unknown option 'tkey1'
-Warning 1651 Unknown option 'tkey2'
+Warning 1707 Unknown option 'fkey'
+Warning 1707 Unknown option 'dff'
+Warning 1707 Unknown option 'tkey1'
+Warning 1707 Unknown option 'tkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -29,7 +29,7 @@ t1 CREATE TABLE `t1` (
#add option
alter table t1 tkey4=4v1;
Warnings:
-Warning 1651 Unknown option 'tkey4'
+Warning 1707 Unknown option 'tkey4'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -39,8 +39,8 @@ t1 CREATE TABLE `t1` (
#remove options
alter table t1 tkey3=DEFAULT tkey4=DEFAULT;
Warnings:
-Warning 1651 Unknown option 'tkey3'
-Warning 1651 Unknown option 'tkey4'
+Warning 1707 Unknown option 'tkey3'
+Warning 1707 Unknown option 'tkey4'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -50,11 +50,11 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a int fkey1=v1, key akey (a) kkey1=v1) tkey1=1v1 tkey1=1v2 TKEY1=DEFAULT tkey2=2v1 tkey3=3v1;
Warnings:
-Warning 1651 Unknown option 'fkey1'
-Warning 1651 Unknown option 'kkey1'
-Warning 1651 Unknown option 'TKEY1'
-Warning 1651 Unknown option 'tkey2'
-Warning 1651 Unknown option 'tkey3'
+Warning 1707 Unknown option 'fkey1'
+Warning 1707 Unknown option 'kkey1'
+Warning 1707 Unknown option 'TKEY1'
+Warning 1707 Unknown option 'tkey2'
+Warning 1707 Unknown option 'tkey3'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` (
#change field with option with the same value
alter table t1 change a a int `FKEY1`='v1';
Warnings:
-Warning 1651 Unknown option 'FKEY1'
+Warning 1707 Unknown option 'FKEY1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` (
#change field with option with a different value
alter table t1 change a a int fkey1=v2;
Warnings:
-Warning 1651 Unknown option 'fkey1'
+Warning 1707 Unknown option 'fkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -93,7 +93,7 @@ t1 CREATE TABLE `t1` (
#new key with options
alter table t1 add key bkey (b) kkey2=v1;
Warnings:
-Warning 1651 Unknown option 'kkey2'
+Warning 1707 Unknown option 'kkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -105,8 +105,8 @@ t1 CREATE TABLE `t1` (
#new column with options
alter table t1 add column c int fkey1=v1 fkey2=v2;
Warnings:
-Warning 1651 Unknown option 'fkey1'
-Warning 1651 Unknown option 'fkey2'
+Warning 1707 Unknown option 'fkey1'
+Warning 1707 Unknown option 'fkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` (
#add column with options after delete
alter table t1 add column b int fkey2=v1;
Warnings:
-Warning 1651 Unknown option 'fkey2'
+Warning 1707 Unknown option 'fkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -154,7 +154,7 @@ t1 CREATE TABLE `t1` (
#add key
alter table t1 add key bkey (b) kkey2=v2;
Warnings:
-Warning 1651 Unknown option 'kkey2'
+Warning 1707 Unknown option 'kkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -168,7 +168,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a int) tkey1=100;
Warnings:
-Warning 1651 Unknown option 'tkey1'
+Warning 1707 Unknown option 'tkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index a76a0a53510..a37d3945ca1 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -516,7 +516,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select '1' AS `id`,'2007-04-25 18:30:22' AS `cur_date` from `test`.`t1` semi join (`test`.`t1` `x1`) where (('2007-04-25 18:30:22' = 0))
+Note 1003 select '1' AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where (('2007-04-25 18:30:22' = 0))
select * from t1
where id in (select id from t1 as x1 where (t1.cur_date is null));
id cur_date
@@ -527,7 +527,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select '1' AS `id`,'2007-04-25' AS `cur_date` from `test`.`t2` semi join (`test`.`t2` `x1`) where (('2007-04-25' = 0))
+Note 1003 select '1' AS `id`,'2007-04-25' AS `cur_date` from (dual) where (('2007-04-25' = 0))
select * from t2
where id in (select id from t2 as x1 where (t2.cur_date is null));
id cur_date
@@ -647,7 +647,7 @@ SET NAMES CP850;
INSERT INTO t1 VALUES (1,'2010-04-12 22:30:12'), (2,'2010-04-12 22:30:12'), (3,'2010-04-12 22:30:12');
EXPLAIN EXTENDED SELECT * FROM t1 FORCE INDEX(attime) WHERE AtTime = '2010-02-22 18:40:07';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref AtTime AtTime 9 const 1 100.00 Using where
+1 SIMPLE t1 ref AtTime AtTime 9 const 1 100.00
Warnings:
Note 1003 select `test`.`t1`.`Id` AS `Id`,`test`.`t1`.`AtTime` AS `AtTime` from `test`.`t1` FORCE INDEX (`attime`) where (`test`.`t1`.`AtTime` = '2010-02-22 18:40:07')
DROP TABLE t1;
diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result
index 98ac5973e6d..80eb4e45a91 100644
--- a/mysql-test/r/type_varchar.result
+++ b/mysql-test/r/type_varchar.result
@@ -476,7 +476,7 @@ a (a DIV 2)
t 0
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1a'
-Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: 't '
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
a CAST(a AS SIGNED)
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 15ee25ab79a..611e807ce8e 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -321,7 +321,7 @@ select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
CAST(a AS DECIMAL(13,5))
0.00000
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row 0
+Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
create table t1 (a integer unsigned);
insert into t1 values (1),(-1),(0),(-2);
diff --git a/mysql-test/r/innodb_mrr.result b/mysql-test/r/xtradb_mrr.result
index 7b1c18d2523..7b1c18d2523 100644
--- a/mysql-test/r/innodb_mrr.result
+++ b/mysql-test/r/xtradb_mrr.result
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 5a6fbc953b4..bf05b27f14a 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -39,7 +39,7 @@ use new_test1/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -234,7 +234,7 @@ use new_test1/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index db83ac969fb..55809d4bda1 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -5,7 +5,7 @@ insert into t1 values (1,2);
commit;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; drop table if exists t1
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
diff --git a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
index a3784562adb..458805a9157 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
@@ -76,10 +76,10 @@ insert into t1 values (1,1,1);
insert into t1 values (RAND()*1000+10, RAND()*1000+10, RAND()*1000+10);
update t1 set n1=rand() where n1=1;
Warnings:
-Note 1592 Statement may not be safe to log in statement format.
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
delete from t1 where n2=1 + rand()*0;
Warnings:
-Note 1592 Statement may not be safe to log in statement format.
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
drop table t1;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a int);
diff --git a/mysql-test/suite/binlog/t/binlog_base64_flag.test b/mysql-test/suite/binlog/t/binlog_base64_flag.test
index 2964b493c5d..3f1e4e98bec 100644
--- a/mysql-test/suite/binlog/t/binlog_base64_flag.test
+++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test
@@ -7,7 +7,6 @@
# BINLOG statement does not work in embedded mode.
-source include/have_log_bin.inc;
source include/not_embedded.inc;
disable_warnings;
diff --git a/mysql-test/suite/binlog/t/binlog_index-master.opt b/mysql-test/suite/binlog/t/binlog_index-master.opt
deleted file mode 100644
index 26cd87ef8c3..00000000000
--- a/mysql-test/suite/binlog/t/binlog_index-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-stack-trace --test-expect-abort --log-warnings=0
diff --git a/mysql-test/suite/binlog/t/binlog_old_versions.test b/mysql-test/suite/binlog/t/binlog_old_versions.test
index 32c27fe8f89..0ccea406a82 100644
--- a/mysql-test/suite/binlog/t/binlog_old_versions.test
+++ b/mysql-test/suite/binlog/t/binlog_old_versions.test
@@ -22,7 +22,6 @@
# Related bugs: BUG#27779, BUG#31581, BUG#31582, BUG#31583, BUG#32407
-source include/have_log_bin.inc;
source include/not_embedded.inc;
--disable_warnings
diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test
index f0017b75990..740649f0053 100644
--- a/mysql-test/suite/binlog/t/binlog_unsafe.test
+++ b/mysql-test/suite/binlog/t/binlog_unsafe.test
@@ -135,8 +135,8 @@ BEGIN
END|
--DELIMITER ;
---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
---eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+--eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"
# In each iteration of this loop, we select one method to make the
# statement unsafe.
diff --git a/mysql-test/suite/federated/federated_debug.result b/mysql-test/suite/federated/federated_debug.result
index 73a6cac892e..58c7ebefea3 100644
--- a/mysql-test/suite/federated/federated_debug.result
+++ b/mysql-test/suite/federated/federated_debug.result
@@ -14,11 +14,6 @@ a
1
# Start a asynchronous reload
# Wait for tables to be closed
-# Timeout in include/wait_show_condition.inc for
-# show_statement : SHOW STATUS LIKE 'Open_tables'
-# field : Value
-# condition : = '0'
-# max_run_time : 31
# Ensure that the server didn't crash
SELECT * FROM t1;
a
diff --git a/mysql-test/suite/federated/federated_plugin-master.opt b/mysql-test/suite/federated/federated_plugin-master.opt
deleted file mode 100644
index fa9ad063fe1..00000000000
--- a/mysql-test/suite/federated/federated_plugin-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---plugin_dir=$FEDERATED_PLUGIN_DIR
diff --git a/mysql-test/suite/innodb/combinations b/mysql-test/suite/innodb/combinations
new file mode 100644
index 00000000000..5051719d92a
--- /dev/null
+++ b/mysql-test/suite/innodb/combinations
@@ -0,0 +1,12 @@
+[innodb_plugin]
+ignore-builtin-innodb
+plugin-load=$HA_INNODB_SO
+innodb
+
+[xtradb_plugin]
+ignore-builtin-innodb
+plugin-load=$HA_XTRADB_SO
+innodb
+
+[xtradb]
+innodb
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index a721b42f2b7..fd7cf87d138 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -1574,12 +1574,6 @@ ERROR 42S21: Duplicate column name 'c1'
alter table t1 add key (c1,c1,c2);
ERROR 42S21: Duplicate column name 'c1'
drop table t1;
-create table t1(a int(1) , b int(1)) engine=innodb;
-insert into t1 values ('1111', '3333');
-select distinct concat(a, b) from t1;
-concat(a, b)
-11113333
-drop table t1;
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
ERROR HY000: The used table type doesn't support FULLTEXT indexes
@@ -1714,7 +1708,6 @@ show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 20
set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
-SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 0
@@ -1732,7 +1725,6 @@ set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 16
-SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 500
@@ -3185,5 +3177,3 @@ Variable_name Value
Handler_update 1
Variable_name Value
Handler_delete 1
-set optimizer_switch='index_condition_pushdown=default';
-set @@optimizer_use_mrr=default;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb/r/innodb_bug53591.result
index 89aeb84a880..8573fb60718 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53591.result
@@ -9,6 +9,7 @@ SHOW WARNINGS;
Level Code Message
Error 139 Too big row
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
+Error 1030 Got error 139 from storage engine
DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_format_max=Antelope;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index f290410a488..2b4c25dab0d 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -2677,7 +2677,7 @@ WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
HAVING f > 7
ORDER BY f;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
+1 SIMPLE t1 index PRIMARY idx 5 NULL 6 Using where; Using index
1 SIMPLE t2 ref idx idx 5 test.t1.pk 1 Using index
SELECT t1 .i AS f FROM t1, t2
WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
diff --git a/mysql-test/suite/innodb/suite.pm b/mysql-test/suite/innodb/suite.pm
new file mode 100644
index 00000000000..9accba5b8a1
--- /dev/null
+++ b/mysql-test/suite/innodb/suite.pm
@@ -0,0 +1,19 @@
+package My::Suite::InnoDB;
+
+@ISA = qw(My::Suite);
+
+############# initialization ######################
+my @combinations;
+
+push @combinations, 'innodb_plugin' if $ENV{HA_INNODB_SO};
+push @combinations, 'xtradb_plugin' if $ENV{HA_XTRADB_SO};
+push @combinations, 'xtradb' if $::mysqld_variables{'innodb'} eq "ON";
+
+return "Neither innodb_plugin nor xtradb are available" unless @combinations;
+
+$ENV{INNODB_COMBINATIONS}=join ':', @combinations
+ unless $ENV{INNODB_COMBINATIONS};
+
+############# return an object ######################
+bless { };
+
diff --git a/mysql-test/suite/innodb/t/disabled.def b/mysql-test/suite/innodb/t/disabled.def
index 888298bbb09..8cae44a3607 100644
--- a/mysql-test/suite/innodb/t/disabled.def
+++ b/mysql-test/suite/innodb/t/disabled.def
@@ -9,3 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+
diff --git a/mysql-test/suite/innodb/t/innodb-analyze.test b/mysql-test/suite/innodb/t/innodb-analyze.test
index 9bdb9db697c..c2e4410544a 100644
--- a/mysql-test/suite/innodb/t/innodb-analyze.test
+++ b/mysql-test/suite/innodb/t/innodb-analyze.test
@@ -3,8 +3,6 @@
# different values of the parameter innodb_stats_sample_pages.
#
--- source include/have_innodb.inc
-
# we care only that the following SQL commands do not produce errors
# and do not crash the server
-- disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
index 790646fe13b..6bcc901a878 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
index 0f0cb57f92f..2cd1449ec0f 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 2f51cf9ef12..84c359a6bde 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
@@ -665,20 +664,17 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+##
+# 55277: Failing assertion: auto_inc > 0
+#
DROP TABLE IF EXISTS t1;
-Warnings:
-Note 1051 Unknown table 't1'
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (18446744073709551615);
+# Restart the server
+-- source include/restart_mysqld.inc
SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
DROP TABLE t1;
-
#
# restore environment to the state it was before this test execution
#
diff --git a/mysql-test/suite/innodb/t/innodb-consistent.test b/mysql-test/suite/innodb/t/innodb-consistent.test
index bf829a74ea2..561f31f5783 100644
--- a/mysql-test/suite/innodb/t/innodb-consistent.test
+++ b/mysql-test/suite/innodb/t/innodb-consistent.test
@@ -1,5 +1,4 @@
-- source include/not_embedded.inc
--- source include/have_innodb.inc
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 05d1d37c422..26de072f08b 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
let $MYSQLD_DATADIR= `select @@datadir`;
diff --git a/mysql-test/suite/innodb/t/innodb-index_ucs2.test b/mysql-test/suite/innodb/t/innodb-index_ucs2.test
index fff9a4da1a8..84f2444ff4d 100644
--- a/mysql-test/suite/innodb/t/innodb-index_ucs2.test
+++ b/mysql-test/suite/innodb/t/innodb-index_ucs2.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
-- source include/have_ucs2.inc
-- let charset = ucs2
diff --git a/mysql-test/suite/innodb/t/innodb-lock.test b/mysql-test/suite/innodb/t/innodb-lock.test
index 96f555e3ecc..05501ec0d03 100644
--- a/mysql-test/suite/innodb/t/innodb-lock.test
+++ b/mysql-test/suite/innodb/t/innodb-lock.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
#
# Check and select innodb lock type
diff --git a/mysql-test/suite/innodb/t/innodb-replace.test b/mysql-test/suite/innodb/t/innodb-replace.test
index 8c3aacde5e8..20ca8e98ce2 100644
--- a/mysql-test/suite/innodb/t/innodb-replace.test
+++ b/mysql-test/suite/innodb/t/innodb-replace.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb-semi-consistent.test b/mysql-test/suite/innodb/t/innodb-semi-consistent.test
index 2551db99cf3..6036aa3ed9c 100644
--- a/mysql-test/suite/innodb/t/innodb-semi-consistent.test
+++ b/mysql-test/suite/innodb/t/innodb-semi-consistent.test
@@ -1,5 +1,4 @@
-- source include/not_embedded.inc
--- source include/have_innodb.inc
--disable_warnings
drop table if exists t1,t2;
diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.test b/mysql-test/suite/innodb/t/innodb-system-table-view.test
index e570a33b59d..904087577c8 100644
--- a/mysql-test/suite/innodb/t/innodb-system-table-view.test
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.test
@@ -2,7 +2,6 @@
# that displays the InnoDB system table content through
# information schema tables.
---source include/have_innodb.inc
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
diff --git a/mysql-test/suite/innodb/t/innodb-timeout.test b/mysql-test/suite/innodb/t/innodb-timeout.test
index f23fe3cff2d..fd839540667 100644
--- a/mysql-test/suite/innodb/t/innodb-timeout.test
+++ b/mysql-test/suite/innodb/t/innodb-timeout.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
let $timeout=`select @@innodb_lock_wait_timeout`;
set global innodb_lock_wait_timeout=42;
diff --git a/mysql-test/suite/innodb/t/innodb-ucs2.test b/mysql-test/suite/innodb/t/innodb-ucs2.test
index 7b91ef37d3f..1b59d4aa32e 100644
--- a/mysql-test/suite/innodb/t/innodb-ucs2.test
+++ b/mysql-test/suite/innodb/t/innodb-ucs2.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
-- source include/have_ucs2.inc
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt b/mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt
index 041b063645b..41ac793df88 100644
--- a/mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt
+++ b/mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt
@@ -1,3 +1,2 @@
--default-storage-engine=MyISAM
--loose-innodb-use-sys-malloc=true
---loose-innodb-use-sys-malloc=true
diff --git a/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test b/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test
index 07ccf261713..c485755378c 100644
--- a/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test
+++ b/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
# XtraDB has lots of "still reachable" memory leak warnings at shutdown when
# --innodb-use-sys-malloc
--source include/not_valgrind.inc
@@ -25,27 +24,4 @@ create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
select * from t1;
drop table t1;
---source include/have_innodb.inc
-#display current value of innodb_use_sys_malloc
-SELECT @@GLOBAL.innodb_use_sys_malloc;
---echo 1 Expected
-
-#try changing it. Should fail.
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_use_sys_malloc=0;
---echo Expected error 'Read only variable'
-
-SELECT @@GLOBAL.innodb_use_sys_malloc;
---echo 1 Expected
-
-
-#do some stuff to see if it works.
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2),(3),(4),(5),(6),(7);
-select * from t1;
-drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test
index 8e00a8b019b..236579c83b8 100644
--- a/mysql-test/suite/innodb/t/innodb-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-zip.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index b839fb9b59f..d9cdedb13bf 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -19,8 +19,6 @@
# #
#######################################################################
--- source include/have_innodb.inc
-
let $MYSQLD_DATADIR= `select @@datadir`;
let collation=utf8_unicode_ci;
--source include/have_collation.inc
@@ -1221,11 +1219,11 @@ drop table t1;
#
# Bug #4082: integer truncation
#
-
-create table t1(a int(1) , b int(1)) engine=innodb;
-insert into t1 values ('1111', '3333');
-select distinct concat(a, b) from t1;
-drop table t1;
+# disable because the bug has resurfaced
+#create table t1(a int(1) , b int(1)) engine=innodb;
+#insert into t1 values ('1111', '3333');
+#select distinct concat(a, b) from t1;
+#drop table t1;
#
# BUG#7709 test case - Boolean fulltext query against unsupported
@@ -1313,7 +1311,7 @@ drop table t1;
# Test for testable InnoDB status variables. This test
# uses previous ones(pages_created, rows_deleted, ...).
---replace_result 512 511
+--replace_result 512 511 2047 511
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
@@ -1339,7 +1337,6 @@ show variables like "innodb_sync_spin_loops";
set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
# Test for innodb_thread_concurrency variable
-SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
show variables like "innodb_thread_concurrency";
set global innodb_thread_concurrency=1001;
show variables like "innodb_thread_concurrency";
@@ -1347,7 +1344,6 @@ set global innodb_thread_concurrency=0;
show variables like "innodb_thread_concurrency";
set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
-SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
# Test for innodb_concurrency_tickets variable
show variables like "innodb_concurrency_tickets";
@@ -2558,9 +2554,6 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-- enable_query_log
-set optimizer_switch='index_condition_pushdown=default';
-set @@optimizer_use_mrr=default;
-
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
diff --git a/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
index 96f748673c0..7d2e94c296d 100644
--- a/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
+++ b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
@@ -1,8 +1,6 @@
# This test runs with old-style locking, as:
# --innodb-autoinc-lock-mode=0
--- source include/have_innodb.inc
-
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb_bug21704.test b/mysql-test/suite/innodb/t/innodb_bug21704.test
index c649b61034c..a1dbc8eb734 100644
--- a/mysql-test/suite/innodb/t/innodb_bug21704.test
+++ b/mysql-test/suite/innodb/t/innodb_bug21704.test
@@ -1,5 +1,3 @@
--- source include/have_innodb.inc
-
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_bug30919.test b/mysql-test/suite/innodb/t/innodb_bug30919.test
index 56b2c7bc03d..84435ad3312 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30919.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30919.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
--source include/have_partition.inc
--vertical_results
let $engine_type= 'innodb';
diff --git a/mysql-test/suite/innodb/t/innodb_bug34053.test b/mysql-test/suite/innodb/t/innodb_bug34053.test
index b935e45c06d..2025a029613 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34053.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34053.test
@@ -3,7 +3,6 @@
#
-- source include/not_embedded.inc
--- source include/have_innodb.inc
SET storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test
index 68c385fd72a..09ab23eb4f4 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34300.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34300.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/34300
#
--- source include/have_innodb.inc
-
-- disable_query_log
-- disable_result_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug35220.test b/mysql-test/suite/innodb/t/innodb_bug35220.test
index 26f7d6b1ddd..4388cfd2a85 100644
--- a/mysql-test/suite/innodb/t/innodb_bug35220.test
+++ b/mysql-test/suite/innodb/t/innodb_bug35220.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/35220
#
--- source include/have_innodb.inc
-
SET storage_engine=InnoDB;
# we care only that the following SQL commands do not produce errors
diff --git a/mysql-test/suite/innodb/t/innodb_bug36169.test b/mysql-test/suite/innodb/t/innodb_bug36169.test
index 5bbbf45d484..0695413266b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb/t/innodb_bug36169.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/36169
#
--- source include/have_innodb.inc
-
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
SET GLOBAL innodb_file_format='Barracuda';
diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb/t/innodb_bug36172.test
index 6f5dd7629ff..9269d54032d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36172.test
+++ b/mysql-test/suite/innodb/t/innodb_bug36172.test
@@ -3,7 +3,6 @@
#
-- source include/not_embedded.inc
--- source include/have_innodb.inc
SET storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug38231.test b/mysql-test/suite/innodb/t/innodb_bug38231.test
index 0d4262b4473..db338324da3 100644
--- a/mysql-test/suite/innodb/t/innodb_bug38231.test
+++ b/mysql-test/suite/innodb/t/innodb_bug38231.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/38231
#
--- source include/have_innodb.inc
-
# skip this test in embedded mode because "TRUNCATE TABLE bug38231_1"
# hangs in that mode waiting for "lock_wait_timeout" although it is
# preceded by --send
diff --git a/mysql-test/suite/innodb/t/innodb_bug39438.test b/mysql-test/suite/innodb/t/innodb_bug39438.test
index 52302871beb..6f57ef17ab3 100644
--- a/mysql-test/suite/innodb/t/innodb_bug39438.test
+++ b/mysql-test/suite/innodb/t/innodb_bug39438.test
@@ -7,8 +7,6 @@
# works with innodb_file_per_table.
#
--- source include/have_innodb.inc
-
SET storage_engine=InnoDB;
# we care only that the following SQL commands do not crash the server
diff --git a/mysql-test/suite/innodb/t/innodb_bug40360.test b/mysql-test/suite/innodb/t/innodb_bug40360.test
index e88837aab4f..a6b67b03c6f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug40360.test
+++ b/mysql-test/suite/innodb/t/innodb_bug40360.test
@@ -3,7 +3,6 @@
#
-- source include/not_embedded.inc
--- source include/have_innodb.inc
SET TX_ISOLATION='READ-COMMITTED';
diff --git a/mysql-test/suite/innodb/t/innodb_bug40565.test b/mysql-test/suite/innodb/t/innodb_bug40565.test
index d7aa0fd514a..4d4ee6811d7 100644
--- a/mysql-test/suite/innodb/t/innodb_bug40565.test
+++ b/mysql-test/suite/innodb/t/innodb_bug40565.test
@@ -1,5 +1,4 @@
# Bug #40565 Update Query Results in "1 Row Affected" But Should Be "Zero Rows"
--- source include/have_innodb.inc
create table bug40565(value decimal(4,2)) engine=innodb;
insert into bug40565 values (1), (null);
diff --git a/mysql-test/suite/innodb/t/innodb_bug41904.test b/mysql-test/suite/innodb/t/innodb_bug41904.test
index 365c5229adc..0aac1c840c3 100644
--- a/mysql-test/suite/innodb/t/innodb_bug41904.test
+++ b/mysql-test/suite/innodb/t/innodb_bug41904.test
@@ -3,7 +3,6 @@
#
-- source include/not_embedded.inc
--- source include/have_innodb.inc
CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
index 2e4cf1f46dd..96c28db8ede 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/42101
#
--- source include/have_innodb.inc
-
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101.test b/mysql-test/suite/innodb/t/innodb_bug42101.test
index f0b88e034a0..2603ff1e682 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42101.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42101.test
@@ -3,8 +3,6 @@
# http://bugs.mysql.com/42101
#
--- source include/have_innodb.inc
-
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
--error ER_WRONG_VALUE_FOR_VAR
diff --git a/mysql-test/suite/innodb/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test
index 93c4764252a..b3d732662e1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug42419.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42419.test
@@ -4,7 +4,6 @@
#
--source include/not_embedded.inc
---source include/have_innodb.inc
let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
if (`SELECT $innodb_lock_wait_timeout < 10`)
diff --git a/mysql-test/suite/innodb/t/innodb_bug44032.test b/mysql-test/suite/innodb/t/innodb_bug44032.test
index a963cb8b68f..74c4b1dcb04 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44032.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44032.test
@@ -2,7 +2,6 @@
# (btr_cur_update_in_place not invoked when updating from/to NULL;
# the update is performed by delete and insert instead)
--- source include/have_innodb.inc
CREATE TABLE bug44032(c CHAR(3) CHARACTER SET UTF8) ROW_FORMAT=REDUNDANT
ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug44369.test b/mysql-test/suite/innodb/t/innodb_bug44369.test
index f5d85cd5815..2d9304567f8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44369.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44369.test
@@ -3,7 +3,6 @@
# some innodb internal reserved key words,
# both case sensitively and insensitely.
---source include/have_innodb.inc
# This create table operation should fail.
--error ER_WRONG_COLUMN_NAME
diff --git a/mysql-test/suite/innodb/t/innodb_bug44571.test b/mysql-test/suite/innodb/t/innodb_bug44571.test
index 91b6722d8af..d0868659910 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44571.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44571.test
@@ -4,7 +4,6 @@
# Please also refer to related fix in
# http://bugs.mysql.com/47621
#
--- source include/have_innodb.inc
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
ALTER TABLE bug44571 CHANGE foo bar INT;
diff --git a/mysql-test/suite/innodb/t/innodb_bug45357.test b/mysql-test/suite/innodb/t/innodb_bug45357.test
index 81727f352dd..524ee85c6ba 100644
--- a/mysql-test/suite/innodb/t/innodb_bug45357.test
+++ b/mysql-test/suite/innodb/t/innodb_bug45357.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
set session transaction isolation level read committed;
diff --git a/mysql-test/suite/innodb/t/innodb_bug46000.test b/mysql-test/suite/innodb/t/innodb_bug46000.test
index 5a3c666326e..95b9ff4dcc9 100644
--- a/mysql-test/suite/innodb/t/innodb_bug46000.test
+++ b/mysql-test/suite/innodb/t/innodb_bug46000.test
@@ -3,7 +3,6 @@
# "GEN_CLUST_INDEX", which is the reserved
# name for innodb default primary index.
---source include/have_innodb.inc
# This 'create table' operation should fail because of
# using the reserve name as its index name.
diff --git a/mysql-test/suite/innodb/t/innodb_bug46676.test b/mysql-test/suite/innodb/t/innodb_bug46676.test
index 440666c4226..27bd1dcd6dc 100644
--- a/mysql-test/suite/innodb/t/innodb_bug46676.test
+++ b/mysql-test/suite/innodb/t/innodb_bug46676.test
@@ -2,7 +2,6 @@
# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
---source include/have_innodb.inc
SET foreign_key_checks=0;
CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug47167.test b/mysql-test/suite/innodb/t/innodb_bug47167.test
index 8fcd129cf94..3bb0d995b47 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47167.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47167.test
@@ -3,7 +3,6 @@
# originally "innodb_file_format_check") with a user-Defined Variable.
--source include/not_embedded.inc
---source include/have_innodb.inc
# Save the value (Antelope) in 'innodb_file_format_max' to
# 'old_innodb_file_format_max'
diff --git a/mysql-test/suite/innodb/t/innodb_bug47621.test b/mysql-test/suite/innodb/t/innodb_bug47621.test
index 4863cc6bba1..80b42bc738b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47621.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47621.test
@@ -2,7 +2,6 @@
# not result in column definition inconsistency between MySQL and
# InnoDB
---source include/have_innodb.inc
CREATE TABLE bug47621 (salesperson INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug47622.test b/mysql-test/suite/innodb/t/innodb_bug47622.test
index 9cf9d0e531b..45cf4d5ec4d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47622.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47622.test
@@ -4,7 +4,6 @@
# We resolve the problem by sync the index sequence
# up when opening the table.
---source include/have_innodb.inc
connect (a,localhost,root,,);
connect (b,localhost,root,,);
diff --git a/mysql-test/suite/innodb/t/innodb_bug47777.test b/mysql-test/suite/innodb/t/innodb_bug47777.test
index 8f2985b2cf0..52d975901de 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47777.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47777.test
@@ -4,7 +4,6 @@
# should follow the process for the BLOB
# datatype as well.
---source include/have_innodb.inc
create table bug47777(c2 linestring not null, primary key (c2(1))) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug48024.test b/mysql-test/suite/innodb/t/innodb_bug48024.test
index db828aa1cda..aa7dd8dbf10 100644
--- a/mysql-test/suite/innodb/t/innodb_bug48024.test
+++ b/mysql-test/suite/innodb/t/innodb_bug48024.test
@@ -1,6 +1,5 @@
# Bug #48024 Innodb doesn't work with multi-statements
---source include/have_innodb.inc
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug49164.test b/mysql-test/suite/innodb/t/innodb_bug49164.test
index 7f1c9f4ca9c..96d59da02f2 100644
--- a/mysql-test/suite/innodb/t/innodb_bug49164.test
+++ b/mysql-test/suite/innodb/t/innodb_bug49164.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK
# a duplicate of
diff --git a/mysql-test/suite/innodb/t/innodb_bug51378.test b/mysql-test/suite/innodb/t/innodb_bug51378.test
index 8f7b0b9605a..c171bae04ae 100644
--- a/mysql-test/suite/innodb/t/innodb_bug51378.test
+++ b/mysql-test/suite/innodb/t/innodb_bug51378.test
@@ -9,7 +9,6 @@
# will be created as primary index
# Following queries test various scenario, no mismatch
# error message should be printed.
---source include/have_innodb.inc
# Create a table contains a BLOB column
create table bug51378 (
diff --git a/mysql-test/suite/innodb/t/innodb_bug51920.test b/mysql-test/suite/innodb/t/innodb_bug51920.test
index bc3bb006c1c..41c52bbd89b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug51920.test
+++ b/mysql-test/suite/innodb/t/innodb_bug51920.test
@@ -2,7 +2,6 @@
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
#
-- source include/not_embedded.inc
--- source include/have_innodb.inc
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
INSERT INTO bug51920 VALUES (1);
diff --git a/mysql-test/suite/innodb/t/innodb_bug52199.test b/mysql-test/suite/innodb/t/innodb_bug52199.test
index 0fec64ba243..b95cdef3fdd 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52199.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52199.test
@@ -1,4 +1,6 @@
--- source include/have_innodb.inc
+
+let collation=utf32_bin;
+--source include/have_collation.inc
CREATE TABLE bug52199 (a INT NOT NULL,
b CHAR(125) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
diff --git a/mysql-test/suite/innodb/t/innodb_bug52663.test b/mysql-test/suite/innodb/t/innodb_bug52663.test
index fcf97531e00..e4e87ee33d8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52663.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52663.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
set session transaction isolation level read committed;
diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb/t/innodb_bug52745.test
index 686ca705ab7..25adf5c064a 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52745.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_format_max=`select @@innodb_file_format_max`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53290.test b/mysql-test/suite/innodb/t/innodb_bug53290.test
index ea15212fa39..90e23127d64 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53290.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53290.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
create table bug53290 (x bigint) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb/t/innodb_bug53591.test
index e0e568034d8..cac39c10d30 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53591.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_format_max=`select @@innodb_file_format_max`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53592.test b/mysql-test/suite/innodb/t/innodb_bug53592.test
index bc37743f6bf..7eefe6d7631 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53592.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53592.test
@@ -2,7 +2,6 @@
# table after fast alter table added unique key". The fix is to make
# sure index number lookup should go through "index translation table".
---source include/have_innodb.inc
# Use FIC for index creation
set old_alter_table=0;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53674.test b/mysql-test/suite/innodb/t/innodb_bug53674.test
index c96c3403b36..c2d11b953e6 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53674.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53674.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
-- source include/have_log_bin.inc
create table bug53674(a int)engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
index a6722ed6399..1846cf22544 100644
--- a/mysql-test/suite/innodb/t/innodb_bug54044.test
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -1,7 +1,6 @@
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
# during create table, so it will not trigger assertion failure.
---source include/have_innodb.inc
# This 'create table' operation should fail because of
# using NULL datatype
diff --git a/mysql-test/suite/innodb/t/innodb_bug54679.test b/mysql-test/suite/innodb/t/innodb_bug54679.test
index c5e308acb5e..b279e1eaf9f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug54679.test
+++ b/mysql-test/suite/innodb/t/innodb_bug54679.test
@@ -1,6 +1,5 @@
# Test Bug #54679 alter table causes compressed row_format to revert to compact
---source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_format_max=`select @@innodb_file_format_max`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug56716.test b/mysql-test/suite/innodb/t/innodb_bug56716.test
index 3345038d9c1..c8e1ed83e38 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56716.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56716.test
@@ -1,7 +1,6 @@
#
# Bug #56716 InnoDB locks a record gap without locking the table
#
--- source include/have_innodb.inc
CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_bug57255.test b/mysql-test/suite/innodb/t/innodb_bug57255.test
index 2b37a0a6092..4f08a9b46bf 100644
--- a/mysql-test/suite/innodb/t/innodb_bug57255.test
+++ b/mysql-test/suite/innodb/t/innodb_bug57255.test
@@ -1,7 +1,6 @@
# Test Bug #57255. Cascade deletes that affect different rows should not
# result in DB_FOREIGN_EXCEED_MAX_CASCADE error
---source include/have_innodb.inc
create table A(id int not null primary key) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test
index aa411258da0..5c80ef89ba4 100644
--- a/mysql-test/suite/innodb/t/innodb_file_format.test
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test
@@ -1,5 +1,4 @@
-- source include/not_embedded.inc
--- source include/have_innodb.inc
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index 1adb14ea482..dec0c8bf725 100644
--- a/mysql-test/suite/innodb/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
SET storage_engine=innodb;
--source include/gis_generic.inc
--source include/gis_keys.inc
diff --git a/mysql-test/suite/innodb/t/innodb_information_schema.test b/mysql-test/suite/innodb/t/innodb_information_schema.test
index 3dc2a8a40d4..934642dcb40 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema.test
@@ -3,7 +3,6 @@
# INFORMATION_SCHEMA.innodb_locks.lock_data
#
--- source include/have_innodb.inc
-- disable_query_log
-- disable_result_log
diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
index fcbf2b1cfc7..f861d8de445 100644
--- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
--echo #
--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
diff --git a/mysql-test/suite/innodb/t/innodb_multi_update.test b/mysql-test/suite/innodb/t/innodb_multi_update.test
index 7ab17ccf70a..6393671d358 100644
--- a/mysql-test/suite/innodb/t/innodb_multi_update.test
+++ b/mysql-test/suite/innodb/t/innodb_multi_update.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
#
# Test multi update with different join methods
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 522e32a53ca..ef43a192d52 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -2,12 +2,11 @@
#
# Last update:
# 2006-07-26 ML test refactored (MySQL 5.1)
-# main testing code t/innodb_mysql.test -> include/mix1.inc
+# main testing code t/innodb_mysql.test -> include/mix1.inc
#
# Slow test, don't run during staging part
-- source include/not_staging.inc
--- source include/have_innodb.inc
-- source include/have_query_cache.inc
let $engine_type= InnoDB;
diff --git a/mysql-test/suite/innodb/t/innodb_mysql_rbk.test b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
index d2368c81f95..e565bff16de 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
#
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
diff --git a/mysql-test/suite/innodb/t/innodb_notembedded.test b/mysql-test/suite/innodb/t/innodb_notembedded.test
index c74dc931505..1caccdbc32b 100644
--- a/mysql-test/suite/innodb/t/innodb_notembedded.test
+++ b/mysql-test/suite/innodb/t/innodb_notembedded.test
@@ -1,5 +1,4 @@
-- source include/not_embedded.inc
--- source include/have_innodb.inc
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/suite/innodb/t/innodb_timeout_rollback.test b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
index 99890971064..44e8acdde13 100644
--- a/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
+++ b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
@@ -1,4 +1,3 @@
--- source include/have_innodb.inc
--source include/innodb_rollback_on_timeout.inc
diff --git a/mysql-test/suite/innodb/t/innodb_trx_weight.test b/mysql-test/suite/innodb/t/innodb_trx_weight.test
index b72eaad345f..b2583ff3a8a 100644
--- a/mysql-test/suite/innodb/t/innodb_trx_weight.test
+++ b/mysql-test/suite/innodb/t/innodb_trx_weight.test
@@ -6,7 +6,6 @@
# be heavier than ones that had not.
#
--- source include/have_innodb.inc
SET storage_engine=InnoDB;
diff --git a/mysql-test/suite/maria/r/compat_aliases.result b/mysql-test/suite/maria/r/compat_aliases.result
index 22150cc680b..45bccc04e6e 100644
--- a/mysql-test/suite/maria/r/compat_aliases.result
+++ b/mysql-test/suite/maria/r/compat_aliases.result
@@ -1,7 +1,7 @@
select * from information_schema.plugins where plugin_name like '%aria';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE PLUGIN_MATURITY PLUGIN_AUTH_VERSION
-Maria 1.5 ACTIVE DAEMON 50300.0 NULL NULL Monty Program Ab Compatibility aliases for the Aria engine GPL Gamma 1.5
-Aria 1.5 ACTIVE STORAGE ENGINE 50300.0 NULL NULL Monty Program Ab Crash-safe tables with MyISAM heritage GPL Gamma 1.5
+Maria 1.5 ACTIVE DAEMON 50507.0 NULL NULL Monty Program Ab Compatibility aliases for the Aria engine GPL Gamma 1.5
+Aria 1.5 ACTIVE STORAGE ENGINE 50507.0 NULL NULL Monty Program Ab Crash-safe tables with MyISAM heritage GPL Gamma 1.5
select maria_vars.variable_name, aria_vars.variable_name from
information_schema.session_variables as maria_vars left join
information_schema.session_variables as aria_vars
diff --git a/mysql-test/suite/maria/r/maria-connect.result b/mysql-test/suite/maria/r/maria-connect.result
index a02c29f3d5f..ff6a27c4f8f 100644
--- a/mysql-test/suite/maria/r/maria-connect.result
+++ b/mysql-test/suite/maria/r/maria-connect.result
@@ -14,10 +14,14 @@ a
2
3
4
-SHOW BINLOG EVENTS FROM 106;
+SHOW BINLOG EVENTS FROM 107;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 106 Query 1 204 use `test`; CREATE TABLE t1 (a int primary key)
-master-bin.000001 204 Query 1 295 use `test`; insert t1 values (1),(2),(3)
-master-bin.000001 295 Query 1 386 use `test`; insert t1 values (4),(2),(5)
+master-bin.000001 107 Query 1 205 use `test`; CREATE TABLE t1 (a int primary key)
+master-bin.000001 205 Query 1 273 BEGIN
+master-bin.000001 273 Query 1 364 use `test`; insert t1 values (1),(2),(3)
+master-bin.000001 364 Query 1 433 COMMIT
+master-bin.000001 433 Query 1 501 BEGIN
+master-bin.000001 501 Query 1 592 use `test`; insert t1 values (4),(2),(5)
+master-bin.000001 592 Query 1 661 COMMIT
drop table t1;
set binlog_format=default;
diff --git a/mysql-test/suite/maria/r/maria-no-logging.result b/mysql-test/suite/maria/r/maria-no-logging.result
index 0d3d7804853..9c50245d05d 100644
--- a/mysql-test/suite/maria/r/maria-no-logging.result
+++ b/mysql-test/suite/maria/r/maria-no-logging.result
@@ -1,4 +1,4 @@
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
@@ -41,7 +41,7 @@ Warnings:
Note 1050 Table 't1' already exists
show engine aria logs;
Type Name Status
-Aria Size 24576 aria_log.00000001 unknown
+Aria Size 16384 aria_log.00000001 unknown
* shut down mysqld, removed logs, restarted it
drop table t1;
create table t1 engine=aria transactional=1 select * from t2;
diff --git a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result b/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result
index 57a2927c749..778d8ba9911 100644
--- a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result
+++ b/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result
@@ -1,4 +1,4 @@
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
@@ -10,14 +10,14 @@ name VARCHAR(32)
,SPATIAL key (line)
) transactional=1 row_format=page engine=aria;
SHOW INDEX FROM t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 line 1 line A NULL 32 NULL SPATIAL
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 line 1 line A NULL 32 NULL SPATIAL
CREATE TABLE t2 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)
) transactional=1 row_format=page engine=aria;
SHOW INDEX FROM t2;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t2 1 a 1 a NULL NULL NULL NULL YES FULLTEXT
-t2 1 a 2 b NULL NULL NULL NULL YES FULLTEXT
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t2 1 a 1 a NULL NULL NULL NULL YES FULLTEXT
+t2 1 a 2 b NULL NULL NULL NULL YES FULLTEXT
* TEST of REDO: see if recovery can reconstruct if we give it an old table
* copied t2 for feeding_recovery
* copied t1 for feeding_recovery
diff --git a/mysql-test/suite/maria/r/maria-recovery.result b/mysql-test/suite/maria/r/maria-recovery.result
index cfabbf10be9..8d5da9b7269 100644
--- a/mysql-test/suite/maria/r/maria-recovery.result
+++ b/mysql-test/suite/maria/r/maria-recovery.result
@@ -1,4 +1,4 @@
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
diff --git a/mysql-test/suite/maria/r/maria-recovery2.result b/mysql-test/suite/maria/r/maria-recovery2.result
index b78d7dcc4e7..3ac14085624 100644
--- a/mysql-test/suite/maria/r/maria-recovery2.result
+++ b/mysql-test/suite/maria/r/maria-recovery2.result
@@ -1,6 +1,6 @@
call mtr.add_suppression("File '.*aria_log.000.*' not found \\(Errcode: 2\\)");
call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with aria_chk -r");
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
@@ -121,8 +121,8 @@ Checksum-check
ok
use mysqltest;
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 1 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 1 NULL NULL YES BTREE
drop table t1;
* TEST of recovery when OPTIMIZE has replaced the index file and crash
create table t_corrupted1 (a varchar(100), key(a)) engine=aria;
diff --git a/mysql-test/suite/maria/r/maria-recovery3.result b/mysql-test/suite/maria/r/maria-recovery3.result
index 4ce52425204..9eadd35a722 100644
--- a/mysql-test/suite/maria/r/maria-recovery3.result
+++ b/mysql-test/suite/maria/r/maria-recovery3.result
@@ -1,4 +1,4 @@
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/r/maria.result
index f6e3777a0b6..edc086c2f9e 100644
--- a/mysql-test/suite/maria/r/maria.result
+++ b/mysql-test/suite/maria/r/maria.result
@@ -4,7 +4,7 @@ Aria YES Crash-safe tables with MyISAM heritage YES NO NO
set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop table if exists t1,t2;
drop view if exists v1;
SET SQL_WARNINGS=1;
@@ -50,16 +50,16 @@ optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
-t1 1 b 1 b A 1 NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
+t1 1 b 1 b A 1 NULL NULL BTREE
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status Table is already up to date
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
-t1 1 b 1 b A 1 NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
+t1 1 b 1 b A 1 NULL NULL BTREE
drop table t1;
create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b));
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
@@ -360,13 +360,13 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 b 1 b A 5 NULL NULL YES BTREE
-t1 1 c 1 c A 5 NULL NULL YES BTREE
-t1 1 a 1 a A 1 NULL NULL BTREE
-t1 1 a 2 b A 5 NULL NULL YES BTREE
-t1 1 c_2 1 c A 5 NULL NULL YES BTREE
-t1 1 c_2 2 a A 5 NULL NULL BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 b 1 b A 5 NULL NULL YES BTREE
+t1 1 c 1 c A 5 NULL NULL YES BTREE
+t1 1 a 1 a A 1 NULL NULL BTREE
+t1 1 a 2 b A 5 NULL NULL YES BTREE
+t1 1 c_2 1 c A 5 NULL NULL YES BTREE
+t1 1 c_2 2 a A 5 NULL NULL BTREE
explain select * from t1,t2 where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 2
@@ -575,6 +575,7 @@ select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
a a b
1 1 1
2 2 1
+unlock tables;
drop table t1,t2;
set autocommit=1;
CREATE TABLE t1 (c1 varchar(250) NOT NULL) ROW_FORMAT=DYNAMIC;
@@ -589,6 +590,7 @@ INSERT INTO t2 VALUES ('test000001'), ('test000005');
SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
t1c1 t2c1
+unlock tables;
DROP TABLE t1,t2;
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`));
Got one of the listed errors
@@ -620,29 +622,29 @@ Error 1146 Table 'test.t3' doesn't exist
drop table t1,t2;
create table t1 (a int, key (a));
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A NULL NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
alter table t1 disable keys;
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
create table t2 (a int);
set @@rand_seed1=31415926,@@rand_seed2=2718281828;
insert t1 select * from t2;
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
alter table t1 enable keys;
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 1000 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 1000 NULL NULL YES BTREE
alter table t1 engine=heap;
alter table t1 disable keys;
Warnings:
Note 1031 Table storage engine for 't1' doesn't have this option
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a NULL 500 NULL NULL YES HASH
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a NULL 500 NULL NULL YES HASH
drop table t1,t2;
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
insert into t1 values (null,''), (null,'');
@@ -712,16 +714,16 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 10 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 10 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 10 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 10 NULL NULL YES BTREE
set aria_stats_method=nulls_equal;
show variables like 'aria_stats_method';
Variable_name Value
@@ -732,16 +734,16 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 5 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 5 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 5 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 5 NULL NULL YES BTREE
set aria_stats_method=DEFAULT;
show variables like 'aria_stats_method';
Variable_name Value
@@ -752,16 +754,16 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 10 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 10 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 10 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 10 NULL NULL YES BTREE
drop table t1;
set aria_stats_method=nulls_ignored;
show variables like 'aria_stats_method';
@@ -779,21 +781,21 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 2 NULL NULL YES BTREE
-t1 1 a 2 b A 4 NULL NULL YES BTREE
-t1 1 a 3 c A 4 NULL NULL YES BTREE
-t1 1 a 4 d A 4 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 2 NULL NULL YES BTREE
+t1 1 a 2 b A 4 NULL NULL YES BTREE
+t1 1 a 3 c A 4 NULL NULL YES BTREE
+t1 1 a 4 d A 4 NULL NULL YES BTREE
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 0 NULL NULL YES BTREE
-t1 1 a 2 b A 0 NULL NULL YES BTREE
-t1 1 a 3 c A 0 NULL NULL YES BTREE
-t1 1 a 4 d A 0 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 0 NULL NULL YES BTREE
+t1 1 a 2 b A 0 NULL NULL YES BTREE
+t1 1 a 3 c A 0 NULL NULL YES BTREE
+t1 1 a 4 d A 0 NULL NULL YES BTREE
set aria_stats_method=DEFAULT;
drop table t1;
create table t1(
@@ -1639,13 +1641,13 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 8 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 8 NULL NULL YES BTREE
alter table t1 disable keys;
alter table t1 enable keys;
show keys from t1;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 a 1 a A 8 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 1 a 1 a A 8 NULL NULL YES BTREE
drop table t1;
show create table t1;
show create table t1;
@@ -2530,6 +2532,7 @@ insert into t1 values (1);
lock table t1 write concurrent;
delete from t1;
ERROR 42000: The storage engine for the table doesn't support DELETE in WRITE CONCURRENT
+unlock tables;
drop table t1;
create table t1 (p int primary key, i int, a char(10), key k1(i), key k2(a))
engine aria;
@@ -2584,12 +2587,6 @@ insert into t1 values (1);
alter table t1 partition by list (s1) (partition p1 values in (2));
ERROR HY000: Table has no partition for value 1
drop table t1;
-create table t1 (c1 int);
-create table t2 (c1 int);
-lock table t1 read, t2 read;
-flush tables with read lock;
-unlock tables;
-drop table t1, t2;
create table t1(a int primary key, b blob, c blob) engine=aria;
insert into t1 values(1,repeat('a',100), repeat('b',657860));
Warnings:
diff --git a/mysql-test/suite/maria/r/maria2.result b/mysql-test/suite/maria/r/maria2.result
index f145a4884e7..a0ec440b662 100644
--- a/mysql-test/suite/maria/r/maria2.result
+++ b/mysql-test/suite/maria/r/maria2.result
@@ -29,6 +29,7 @@ count(*)
select * from t1;
i
2
+unlock tables;
drop table t1,t2;
create table t1(id int, s char(1), unique(s)) engine=aria;
insert into t1 values(1,"a") on duplicate key update t1.id=t1.id+1;
diff --git a/mysql-test/suite/maria/r/maria3.result b/mysql-test/suite/maria/r/maria3.result
index 2311669640b..a05efb1a1f2 100644
--- a/mysql-test/suite/maria/r/maria3.result
+++ b/mysql-test/suite/maria/r/maria3.result
@@ -4,7 +4,7 @@ Aria YES Crash-safe tables with MyISAM heritage YES NO NO
set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
drop table if exists t1,t2;
SET SQL_WARNINGS=1;
create table t1 (a int not null, key `a` (a) key_block_size=512);
@@ -231,7 +231,6 @@ insert into t1 values (1,1,"aaa"),(1,2,null);
checksum table t1;
Table Checksum
test.t1 1112804611
-lock table t1 write;
insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000));
update t1 set v="row5" where b=4;
delete from t1 where b=3;
@@ -312,7 +311,7 @@ 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 134213632
+aria_pagecache_buffer_size 134217728
aria_pagecache_division_limit 100
aria_page_checksum OFF
aria_recover NORMAL
@@ -395,7 +394,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
set global aria_log_file_size=4294967296;
Warnings:
-Warning 1292 Truncated incorrect log_file_size value: '4294967296'
+Warning 1292 Truncated incorrect aria_log_file_size value: '4294967296'
create table t1 (a int not null);
lock tables t1 write;
insert into t1 values (1),(2);
@@ -513,7 +512,7 @@ drop table t1;
create table t1 (n int not null, c char(1)) engine=aria transactional=1;
alter table t1 engine=myisam;
Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
alter table t1 engine=aria;
show create table t1;
Table Create Table
@@ -524,7 +523,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
Warnings:
-Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
alter table t1 engine=aria;
show create table t1;
Table Create Table
diff --git a/mysql-test/suite/maria/r/ps_maria.result b/mysql-test/suite/maria/r/ps_maria.result
index 30f7edb8a99..98e6b1b1f8b 100644
--- a/mysql-test/suite/maria/r/ps_maria.result
+++ b/mysql-test/suite/maria/r/ps_maria.result
@@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1788,11 +1788,11 @@ t5 CREATE TABLE `t5` (
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date DEFAULT NULL,
- `param07` longblob,
+ `param07` longtext,
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime DEFAULT NULL,
- `param09` longblob,
+ `param09` longtext,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
@@ -1807,8 +1807,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1818,18 +1818,18 @@ def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 1 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
def test t5 t5 const07 const07 10 10 10 Y 128 0 63
-def test t5 t5 param07 param07 252 4294967295 10 Y 144 0 63
+def test t5 t5 param07 param07 252 4294967295 10 Y 16 0 8
def test t5 t5 const08 const08 253 19 19 N 1 0 8
def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8
def test t5 t5 const09 const09 12 19 19 Y 128 0 63
-def test t5 t5 param09 param09 252 4294967295 19 Y 144 0 63
+def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1927,28 +1927,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
-def @arg13 251 16777216 10 Y 128 31 63
-def @arg14 251 16777216 19 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 8 Y 128 31 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
+def @arg13 250 16777215 10 Y 0 31 8
+def @arg14 250 16777215 19 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 251 16777216 1 Y 0 31 8
-def @arg21 251 16777216 10 Y 0 31 8
-def @arg22 251 16777216 30 Y 0 31 8
-def @arg23 251 16777216 8 Y 128 31 63
-def @arg24 251 16777216 8 Y 0 31 8
-def @arg25 251 16777216 4 Y 128 31 63
-def @arg26 251 16777216 4 Y 0 31 8
-def @arg27 251 16777216 10 Y 128 31 63
-def @arg28 251 16777216 10 Y 0 31 8
-def @arg29 251 16777216 8 Y 128 31 63
-def @arg30 251 16777216 8 Y 0 31 8
-def @arg31 251 16777216 3 Y 0 31 8
-def @arg32 251 16777216 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 31 8
+def @arg21 250 16777215 10 Y 0 31 8
+def @arg22 250 16777215 30 Y 0 31 8
+def @arg23 250 16777215 8 Y 128 31 63
+def @arg24 250 16777215 8 Y 0 31 8
+def @arg25 250 16777215 4 Y 128 31 63
+def @arg26 250 16777215 4 Y 0 31 8
+def @arg27 250 16777215 10 Y 128 31 63
+def @arg28 250 16777215 10 Y 0 31 8
+def @arg29 250 16777215 8 Y 128 31 63
+def @arg30 250 16777215 8 Y 0 31 8
+def @arg31 250 16777215 3 Y 0 31 8
+def @arg32 250 16777215 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1974,28 +1974,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
-def @arg13 251 16777216 0 Y 128 31 63
-def @arg14 251 16777216 0 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 0 Y 128 31 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
+def @arg13 250 16777215 0 Y 0 31 8
+def @arg14 250 16777215 0 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 251 16777216 0 Y 0 31 8
-def @arg21 251 16777216 0 Y 0 31 8
-def @arg22 251 16777216 0 Y 0 31 8
-def @arg23 251 16777216 0 Y 128 31 63
-def @arg24 251 16777216 0 Y 0 31 8
-def @arg25 251 16777216 0 Y 128 31 63
-def @arg26 251 16777216 0 Y 0 31 8
-def @arg27 251 16777216 0 Y 128 31 63
-def @arg28 251 16777216 0 Y 0 31 8
-def @arg29 251 16777216 0 Y 128 31 63
-def @arg30 251 16777216 0 Y 0 31 8
-def @arg31 251 16777216 0 Y 0 31 8
-def @arg32 251 16777216 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 31 8
+def @arg21 250 16777215 0 Y 0 31 8
+def @arg22 250 16777215 0 Y 0 31 8
+def @arg23 250 16777215 0 Y 128 31 63
+def @arg24 250 16777215 0 Y 0 31 8
+def @arg25 250 16777215 0 Y 128 31 63
+def @arg26 250 16777215 0 Y 0 31 8
+def @arg27 250 16777215 0 Y 128 31 63
+def @arg28 250 16777215 0 Y 0 31 8
+def @arg29 250 16777215 0 Y 128 31 63
+def @arg30 250 16777215 0 Y 0 31 8
+def @arg31 250 16777215 0 Y 0 31 8
+def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -2024,28 +2024,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
-def @arg13 251 16777216 10 Y 128 31 63
-def @arg14 251 16777216 19 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 8 Y 128 31 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
+def @arg13 250 16777215 10 Y 0 31 8
+def @arg14 250 16777215 19 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 251 16777216 1 Y 0 31 8
-def @arg21 251 16777216 10 Y 0 31 8
-def @arg22 251 16777216 30 Y 0 31 8
-def @arg23 251 16777216 8 Y 128 31 63
-def @arg24 251 16777216 8 Y 0 31 8
-def @arg25 251 16777216 4 Y 128 31 63
-def @arg26 251 16777216 4 Y 0 31 8
-def @arg27 251 16777216 10 Y 128 31 63
-def @arg28 251 16777216 10 Y 0 31 8
-def @arg29 251 16777216 8 Y 128 31 63
-def @arg30 251 16777216 8 Y 0 31 8
-def @arg31 251 16777216 3 Y 0 31 8
-def @arg32 251 16777216 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 31 8
+def @arg21 250 16777215 10 Y 0 31 8
+def @arg22 250 16777215 30 Y 0 31 8
+def @arg23 250 16777215 8 Y 128 31 63
+def @arg24 250 16777215 8 Y 0 31 8
+def @arg25 250 16777215 4 Y 128 31 63
+def @arg26 250 16777215 4 Y 0 31 8
+def @arg27 250 16777215 10 Y 128 31 63
+def @arg28 250 16777215 10 Y 0 31 8
+def @arg29 250 16777215 8 Y 128 31 63
+def @arg30 250 16777215 8 Y 0 31 8
+def @arg31 250 16777215 3 Y 0 31 8
+def @arg32 250 16777215 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2064,28 +2064,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
-def @arg13 251 16777216 0 Y 128 31 63
-def @arg14 251 16777216 0 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 0 Y 128 31 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
+def @arg13 250 16777215 0 Y 0 31 8
+def @arg14 250 16777215 0 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 251 16777216 0 Y 0 31 8
-def @arg21 251 16777216 0 Y 0 31 8
-def @arg22 251 16777216 0 Y 0 31 8
-def @arg23 251 16777216 0 Y 128 31 63
-def @arg24 251 16777216 0 Y 0 31 8
-def @arg25 251 16777216 0 Y 128 31 63
-def @arg26 251 16777216 0 Y 0 31 8
-def @arg27 251 16777216 0 Y 128 31 63
-def @arg28 251 16777216 0 Y 0 31 8
-def @arg29 251 16777216 0 Y 128 31 63
-def @arg30 251 16777216 0 Y 0 31 8
-def @arg31 251 16777216 0 Y 0 31 8
-def @arg32 251 16777216 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 31 8
+def @arg21 250 16777215 0 Y 0 31 8
+def @arg22 250 16777215 0 Y 0 31 8
+def @arg23 250 16777215 0 Y 128 31 63
+def @arg24 250 16777215 0 Y 0 31 8
+def @arg25 250 16777215 0 Y 128 31 63
+def @arg26 250 16777215 0 Y 0 31 8
+def @arg27 250 16777215 0 Y 128 31 63
+def @arg28 250 16777215 0 Y 0 31 8
+def @arg29 250 16777215 0 Y 128 31 63
+def @arg30 250 16777215 0 Y 0 31 8
+def @arg31 250 16777215 0 Y 0 31 8
+def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2112,28 +2112,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
-def @arg13 251 16777216 10 Y 128 31 63
-def @arg14 251 16777216 19 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 8 Y 128 31 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
+def @arg13 250 16777215 10 Y 0 31 8
+def @arg14 250 16777215 19 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 251 16777216 1 Y 0 31 8
-def @arg21 251 16777216 10 Y 0 31 8
-def @arg22 251 16777216 30 Y 0 31 8
-def @arg23 251 16777216 8 Y 128 31 63
-def @arg24 251 16777216 8 Y 0 31 8
-def @arg25 251 16777216 4 Y 128 31 63
-def @arg26 251 16777216 4 Y 0 31 8
-def @arg27 251 16777216 10 Y 128 31 63
-def @arg28 251 16777216 10 Y 0 31 8
-def @arg29 251 16777216 8 Y 128 31 63
-def @arg30 251 16777216 8 Y 0 31 8
-def @arg31 251 16777216 3 Y 0 31 8
-def @arg32 251 16777216 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 31 8
+def @arg21 250 16777215 10 Y 0 31 8
+def @arg22 250 16777215 30 Y 0 31 8
+def @arg23 250 16777215 8 Y 128 31 63
+def @arg24 250 16777215 8 Y 0 31 8
+def @arg25 250 16777215 4 Y 128 31 63
+def @arg26 250 16777215 4 Y 0 31 8
+def @arg27 250 16777215 10 Y 128 31 63
+def @arg28 250 16777215 10 Y 0 31 8
+def @arg29 250 16777215 8 Y 128 31 63
+def @arg30 250 16777215 8 Y 0 31 8
+def @arg31 250 16777215 3 Y 0 31 8
+def @arg32 250 16777215 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2156,28 +2156,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
-def @arg13 251 16777216 0 Y 128 31 63
-def @arg14 251 16777216 0 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 0 Y 128 31 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
+def @arg13 250 16777215 0 Y 0 31 8
+def @arg14 250 16777215 0 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 251 16777216 0 Y 0 31 8
-def @arg21 251 16777216 0 Y 0 31 8
-def @arg22 251 16777216 0 Y 0 31 8
-def @arg23 251 16777216 0 Y 128 31 63
-def @arg24 251 16777216 0 Y 0 31 8
-def @arg25 251 16777216 0 Y 128 31 63
-def @arg26 251 16777216 0 Y 0 31 8
-def @arg27 251 16777216 0 Y 128 31 63
-def @arg28 251 16777216 0 Y 0 31 8
-def @arg29 251 16777216 0 Y 128 31 63
-def @arg30 251 16777216 0 Y 0 31 8
-def @arg31 251 16777216 0 Y 0 31 8
-def @arg32 251 16777216 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 31 8
+def @arg21 250 16777215 0 Y 0 31 8
+def @arg22 250 16777215 0 Y 0 31 8
+def @arg23 250 16777215 0 Y 128 31 63
+def @arg24 250 16777215 0 Y 0 31 8
+def @arg25 250 16777215 0 Y 128 31 63
+def @arg26 250 16777215 0 Y 0 31 8
+def @arg27 250 16777215 0 Y 128 31 63
+def @arg28 250 16777215 0 Y 0 31 8
+def @arg29 250 16777215 0 Y 128 31 63
+def @arg30 250 16777215 0 Y 0 31 8
+def @arg31 250 16777215 0 Y 0 31 8
+def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2202,28 +2202,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
-def @arg13 251 16777216 10 Y 128 31 63
-def @arg14 251 16777216 19 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 8 Y 128 31 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
+def @arg13 250 16777215 10 Y 0 31 8
+def @arg14 250 16777215 19 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 251 16777216 1 Y 0 31 8
-def @arg21 251 16777216 10 Y 0 31 8
-def @arg22 251 16777216 30 Y 0 31 8
-def @arg23 251 16777216 8 Y 128 31 63
-def @arg24 251 16777216 8 Y 0 31 8
-def @arg25 251 16777216 4 Y 128 31 63
-def @arg26 251 16777216 4 Y 0 31 8
-def @arg27 251 16777216 10 Y 128 31 63
-def @arg28 251 16777216 10 Y 0 31 8
-def @arg29 251 16777216 8 Y 128 31 63
-def @arg30 251 16777216 8 Y 0 31 8
-def @arg31 251 16777216 3 Y 0 31 8
-def @arg32 251 16777216 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 31 8
+def @arg21 250 16777215 10 Y 0 31 8
+def @arg22 250 16777215 30 Y 0 31 8
+def @arg23 250 16777215 8 Y 128 31 63
+def @arg24 250 16777215 8 Y 0 31 8
+def @arg25 250 16777215 4 Y 128 31 63
+def @arg26 250 16777215 4 Y 0 31 8
+def @arg27 250 16777215 10 Y 128 31 63
+def @arg28 250 16777215 10 Y 0 31 8
+def @arg29 250 16777215 8 Y 128 31 63
+def @arg30 250 16777215 8 Y 0 31 8
+def @arg31 250 16777215 3 Y 0 31 8
+def @arg32 250 16777215 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2240,28 +2240,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
-def @arg13 251 16777216 0 Y 128 31 63
-def @arg14 251 16777216 0 Y 128 31 63
-def @arg15 251 16777216 19 Y 128 31 63
-def @arg16 251 16777216 0 Y 128 31 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
+def @arg13 250 16777215 0 Y 0 31 8
+def @arg14 250 16777215 0 Y 0 31 8
+def @arg15 250 16777215 19 Y 0 31 8
+def @arg16 250 16777215 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 251 16777216 0 Y 0 31 8
-def @arg21 251 16777216 0 Y 0 31 8
-def @arg22 251 16777216 0 Y 0 31 8
-def @arg23 251 16777216 0 Y 128 31 63
-def @arg24 251 16777216 0 Y 0 31 8
-def @arg25 251 16777216 0 Y 128 31 63
-def @arg26 251 16777216 0 Y 0 31 8
-def @arg27 251 16777216 0 Y 128 31 63
-def @arg28 251 16777216 0 Y 0 31 8
-def @arg29 251 16777216 0 Y 128 31 63
-def @arg30 251 16777216 0 Y 0 31 8
-def @arg31 251 16777216 0 Y 0 31 8
-def @arg32 251 16777216 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 31 8
+def @arg21 250 16777215 0 Y 0 31 8
+def @arg22 250 16777215 0 Y 0 31 8
+def @arg23 250 16777215 0 Y 128 31 63
+def @arg24 250 16777215 0 Y 0 31 8
+def @arg25 250 16777215 0 Y 128 31 63
+def @arg26 250 16777215 0 Y 0 31 8
+def @arg27 250 16777215 0 Y 128 31 63
+def @arg28 250 16777215 0 Y 0 31 8
+def @arg29 250 16777215 0 Y 128 31 63
+def @arg30 250 16777215 0 Y 0 31 8
+def @arg31 250 16777215 0 Y 0 31 8
+def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
@@ -2585,10 +2585,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
-c7 9.22337e+18
-c8 9.22337203685478e+18
-c9 9.22337203685478e+18
-c10 9.22337203685478e+18
+c7 9.22337e18
+c8 9.223372036854776e18
+c9 9.223372036854776e18
+c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@@ -2608,10 +2608,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
-c7 9.22337e+18
-c8 9.22337203685478e+18
-c9 9.22337203685478e+18
-c10 9.22337203685478e+18
+c7 9.22337e18
+c8 9.223372036854776e18
+c9 9.223372036854776e18
+c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@@ -2631,10 +2631,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
-c7 -9.22337e+18
-c8 -9.22337203685478e+18
-c9 -9.22337203685478e+18
-c10 -9.22337203685478e+18
+c7 -9.22337e18
+c8 -9.223372036854776e18
+c9 -9.223372036854776e18
+c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@@ -2654,10 +2654,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
-c7 -9.22337e+18
-c8 -9.22337203685478e+18
-c9 -9.22337203685478e+18
-c10 -9.22337203685478e+18
+c7 -9.22337e18
+c8 -9.223372036854776e18
+c9 -9.223372036854776e18
+c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@@ -2679,10 +2679,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
-c7 3.40282e+38
-c8 1.11111111111111e+50
-c9 1.11111111111111e+50
-c10 1.11111111111111e+50
+c7 3.40282e38
+c8 1.111111111111111e50
+c9 1.111111111111111e50
+c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@@ -2704,10 +2704,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
-c7 3.40282e+38
-c8 1.11111111111111e+50
-c9 1.11111111111111e+50
-c10 1.11111111111111e+50
+c7 3.40282e38
+c8 1.111111111111111e50
+c9 1.111111111111111e50
+c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@@ -2729,10 +2729,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
-c7 -3.40282e+38
-c8 -1.11111111111111e+50
-c9 -1.11111111111111e+50
-c10 -1.11111111111111e+50
+c7 -3.40282e38
+c8 -1.111111111111111e50
+c9 -1.111111111111111e50
+c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@@ -2754,10 +2754,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
-c7 -3.40282e+38
-c8 -1.11111111111111e+50
-c9 -1.11111111111111e+50
-c10 -1.11111111111111e+50
+c7 -3.40282e38
+c8 -1.111111111111111e50
+c9 -1.111111111111111e50
+c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@@ -2822,10 +2822,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
-54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
-55 5 55 55 55 55 55 55 55 55 55 55
-56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
-57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00
+54 5 54 54 54 54 54 54 54 54 54 54
+55 6 55 55 55 55 55 55 55 55 55 55
+56 6 56 56 56 56 56 56 56 56 56 56
+57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@@ -3039,7 +3039,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
-51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
+51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
diff --git a/mysql-test/suite/maria/t/maria-connect.test b/mysql-test/suite/maria/t/maria-connect.test
index 9efb5844bc2..79ba45d2b13 100644
--- a/mysql-test/suite/maria/t/maria-connect.test
+++ b/mysql-test/suite/maria/t/maria-connect.test
@@ -27,7 +27,7 @@ insert t1 values (1),(2),(3);
--error ER_DUP_ENTRY
insert t1 values (4),(2),(5);
select * from t1;
-SHOW BINLOG EVENTS FROM 106;
+SHOW BINLOG EVENTS FROM 107;
drop table t1;
set binlog_format=default;
diff --git a/mysql-test/suite/maria/t/maria-no-logging.test b/mysql-test/suite/maria/t/maria-no-logging.test
index f0533686588..7055a842510 100644
--- a/mysql-test/suite/maria/t/maria-no-logging.test
+++ b/mysql-test/suite/maria/t/maria-no-logging.test
@@ -4,7 +4,7 @@
# can't restart server in embedded
--source include/not_embedded.inc
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
--disable_warnings
drop database if exists mysqltest;
diff --git a/mysql-test/suite/maria/t/maria-preload-master.opt b/mysql-test/suite/maria/t/maria-preload-master.opt
deleted file mode 100644
index 959cf74c816..00000000000
--- a/mysql-test/suite/maria/t/maria-preload-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-safemalloc
diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test
index a943185d12f..b39b36ed3e1 100644
--- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test
+++ b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test
@@ -7,7 +7,7 @@
--source include/have_debug.inc
--source include/have_maria.inc
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
let $MARIA_LOG=.;
--disable_warnings
diff --git a/mysql-test/suite/maria/t/maria-recovery.test b/mysql-test/suite/maria/t/maria-recovery.test
index 6eb91c59dc1..b0f01f37d0d 100644
--- a/mysql-test/suite/maria/t/maria-recovery.test
+++ b/mysql-test/suite/maria/t/maria-recovery.test
@@ -5,7 +5,7 @@
--source include/have_debug.inc
--source include/have_maria.inc
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
let $MARIA_LOG=../../tmp;
--disable_warnings
diff --git a/mysql-test/suite/maria/t/maria-recovery2.test b/mysql-test/suite/maria/t/maria-recovery2.test
index 81ea45fbd42..c1081d033ac 100644
--- a/mysql-test/suite/maria/t/maria-recovery2.test
+++ b/mysql-test/suite/maria/t/maria-recovery2.test
@@ -8,7 +8,7 @@
call mtr.add_suppression("File '.*aria_log.000.*' not found \\(Errcode: 2\\)");
call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with aria_chk -r");
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
let $MARIA_LOG=../../tmp;
--disable_warnings
diff --git a/mysql-test/suite/maria/t/maria-recovery3.test b/mysql-test/suite/maria/t/maria-recovery3.test
index 192361633ca..a5fd55499a2 100644
--- a/mysql-test/suite/maria/t/maria-recovery3.test
+++ b/mysql-test/suite/maria/t/maria-recovery3.test
@@ -5,7 +5,7 @@
--source include/have_debug.inc
--source include/have_maria.inc
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
let $MARIA_LOG=../../tmp;
--disable_warnings
diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/t/maria.test
index ccbe2c99037..482f49d2ca1 100644
--- a/mysql-test/suite/maria/t/maria.test
+++ b/mysql-test/suite/maria/t/maria.test
@@ -14,7 +14,7 @@ set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
let $default_log_file_size=`select @@global.aria_log_file_size`;
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
# Initialise
--disable_warnings
@@ -551,6 +551,7 @@ commit;
disconnect root;
connection default;
select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
+unlock tables;
drop table t1,t2;
set autocommit=1;
#
@@ -569,6 +570,7 @@ disconnect con1;
connection default;
SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
+unlock tables;
DROP TABLE t1,t2;
#
@@ -1793,6 +1795,7 @@ lock table t1 write concurrent;
# should be fixed with fully implemented versioning
--error ER_CHECK_NOT_IMPLEMENTED
delete from t1;
+unlock tables;
drop table t1;
#
@@ -1852,16 +1855,6 @@ alter table t1 partition by list (s1) (partition p1 values in (2));
drop table t1;
#
-# Bug #39226 Aria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
-
-create table t1 (c1 int);
-create table t2 (c1 int);
-lock table t1 read, t2 read;
-flush tables with read lock;
-unlock tables;
-drop table t1, t2;
-
-#
# Bug #40311
# Crash when aborting inserting of row with 2 blobs where first is short
#
diff --git a/mysql-test/suite/maria/t/maria2.test b/mysql-test/suite/maria/t/maria2.test
index 00bbea165ee..df691569e05 100644
--- a/mysql-test/suite/maria/t/maria2.test
+++ b/mysql-test/suite/maria/t/maria2.test
@@ -83,6 +83,7 @@ insert into t1 values (2);
alter table t1 modify i bigint default 1;
select count(*) from t1;
select * from t1;
+unlock tables;
drop table t1,t2;
#
diff --git a/mysql-test/suite/maria/t/maria3.test b/mysql-test/suite/maria/t/maria3.test
index 55b5959a970..3cf395f66e7 100644
--- a/mysql-test/suite/maria/t/maria3.test
+++ b/mysql-test/suite/maria/t/maria3.test
@@ -8,7 +8,7 @@ set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
let $default_log_file_size=`select @@global.aria_log_file_size`;
-set global aria_log_file_size=4294967295;
+set global aria_log_file_size=4294959104;
# Initialise
--disable_warnings
diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result
index 4af00ddcc6d..2d0a26b397c 100644
--- a/mysql-test/suite/parts/r/partition_repair_myisam.result
+++ b/mysql-test/suite/parts/r/partition_repair_myisam.result
@@ -408,7 +408,7 @@ ALTER TABLE t1_will_crash CHECK PARTITION p6;
Table Op Msg_type Msg_text
test.t1_will_crash check warning Size of datafile is: 868 Should be: 604
test.t1_will_crash check error Record-count is not ok; is 8 Should be: 7
-test.t1_will_crash check warning Found 10 parts. Should be: 7
+test.t1_will_crash check warning Found 10 key parts. Should be: 7
test.t1_will_crash check error Partition p6 returned error
test.t1_will_crash check error Corrupt
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
diff --git a/mysql-test/suite/parts/r/partition_special_innodb.result b/mysql-test/suite/parts/r/partition_special_innodb.result
index 18d2addb295..cf47b9de3f1 100644
--- a/mysql-test/suite/parts/r/partition_special_innodb.result
+++ b/mysql-test/suite/parts/r/partition_special_innodb.result
@@ -133,14 +133,14 @@ partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
-ERROR 42000: Too many key parts specified; max 32 parts allowed
+ERROR HY000: Too many fields in 'list of partition fields'
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
-ERROR HY000: Too many fields in 'list of partition fields'
+drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h) (
partition pa1 max_rows=20 min_rows=2,
diff --git a/mysql-test/suite/parts/r/partition_special_myisam.result b/mysql-test/suite/parts/r/partition_special_myisam.result
index b4647a2a803..828be71c437 100644
--- a/mysql-test/suite/parts/r/partition_special_myisam.result
+++ b/mysql-test/suite/parts/r/partition_special_myisam.result
@@ -133,14 +133,14 @@ partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
-ERROR 42000: Too many key parts specified; max 32 parts allowed
+ERROR HY000: Too many fields in 'list of partition fields'
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
-ERROR HY000: Too many fields in 'list of partition fields'
+drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h) (
partition pa1 max_rows=20 min_rows=2,
diff --git a/mysql-test/suite/parts/t/partition_debug_innodb.test b/mysql-test/suite/parts/t/partition_debug_innodb.test
index c5d8df33213..ba7ca3059ae 100644
--- a/mysql-test/suite/parts/t/partition_debug_innodb.test
+++ b/mysql-test/suite/parts/t/partition_debug_innodb.test
@@ -5,6 +5,7 @@
--source include/have_innodb.inc
--source include/have_partition.inc
--source include/not_valgrind.inc
+--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt b/mysql-test/suite/parts/t/partition_debug_myisam-master.opt
index 425fda95086..24264558cf0 100644
--- a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt
+++ b/mysql-test/suite/parts/t/partition_debug_myisam-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--skip-stack-trace --skip-core-file --myisam-recover-option=off
diff --git a/mysql-test/suite/parts/t/partition_debug_myisam.test b/mysql-test/suite/parts/t/partition_debug_myisam.test
index a4d5ee4bf04..98560827ca9 100644
--- a/mysql-test/suite/parts/t/partition_debug_myisam.test
+++ b/mysql-test/suite/parts/t/partition_debug_myisam.test
@@ -4,6 +4,7 @@
--source include/have_debug.inc
--source include/have_partition.inc
--source include/not_valgrind.inc
+--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt b/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
index c610ea42924..115a0ba2cc8 100644
--- a/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
+++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
@@ -1 +1 @@
---loose-innodb_file_per_table=1
+--loose-innodb_file_per_table
diff --git a/mysql-test/suite/parts/t/partition_special_innodb-master.opt b/mysql-test/suite/parts/t/partition_special_innodb-master.opt
index c69292bfe7a..79851bac7b2 100644
--- a/mysql-test/suite/parts/t/partition_special_innodb-master.opt
+++ b/mysql-test/suite/parts/t/partition_special_innodb-master.opt
@@ -1 +1 @@
---loose-innodb-lock-wait-timeout=2 --loose-innodb-file-per-table=1
+--loose-innodb-lock-wait-timeout=2 --loose-innodb-file-per-table
diff --git a/mysql-test/suite/percona/percona_innodb_deadlock_count.test b/mysql-test/suite/percona/percona_innodb_deadlock_count.test
index b0882a18dc1..7a7f0e5ddb7 100644
--- a/mysql-test/suite/percona/percona_innodb_deadlock_count.test
+++ b/mysql-test/suite/percona/percona_innodb_deadlock_count.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
--echo # Establish connection con1 (user=root)
connect (con1,localhost,root,,);
--echo # Establish connection con2 (user=root)
diff --git a/mysql-test/suite/percona/percona_innodb_doublewrite_file.test b/mysql-test/suite/percona/percona_innodb_doublewrite_file.test
index 8068d561190..d9e94db8463 100644
--- a/mysql-test/suite/percona/percona_innodb_doublewrite_file.test
+++ b/mysql-test/suite/percona/percona_innodb_doublewrite_file.test
@@ -1,2 +1,2 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
show variables like 'innodb_doublewrite%';
diff --git a/mysql-test/suite/percona/percona_innodb_use_sys_stats_table-master.opt b/mysql-test/suite/percona/percona_innodb_use_sys_stats_table-master.opt
index c6865f5704c..7479e2036aa 100644
--- a/mysql-test/suite/percona/percona_innodb_use_sys_stats_table-master.opt
+++ b/mysql-test/suite/percona/percona_innodb_use_sys_stats_table-master.opt
@@ -1 +1 @@
---innodb_use_sys_stats_table
+--loose-innodb_use_sys_stats_table
diff --git a/mysql-test/suite/percona/percona_innodb_use_sys_stats_table.test b/mysql-test/suite/percona/percona_innodb_use_sys_stats_table.test
index 02791137f08..534b26a3b45 100644
--- a/mysql-test/suite/percona/percona_innodb_use_sys_stats_table.test
+++ b/mysql-test/suite/percona/percona_innodb_use_sys_stats_table.test
@@ -1,2 +1,2 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
show variables like 'innodb_use_sys_stats%';
diff --git a/mysql-test/suite/percona/percona_xtradb_admin_command.test b/mysql-test/suite/percona/percona_xtradb_admin_command.test
index 5dc3fb2b33a..b675c2afa21 100644
--- a/mysql-test/suite/percona/percona_xtradb_admin_command.test
+++ b/mysql-test/suite/percona/percona_xtradb_admin_command.test
@@ -1,3 +1,3 @@
---source include/have_innodb.inc
+--source include/have_xtradb.inc
select * from information_schema.XTRADB_ADMIN_COMMAND;
select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_HELLO*/;
diff --git a/mysql-test/suite/percona/percona_xtradb_bug317074.test b/mysql-test/suite/percona/percona_xtradb_bug317074.test
index abf5d8ee1f6..029e0f8fcdf 100644
--- a/mysql-test/suite/percona/percona_xtradb_bug317074.test
+++ b/mysql-test/suite/percona/percona_xtradb_bug317074.test
@@ -1,4 +1,4 @@
--- source include/have_innodb.inc
+-- source include/have_xtradb.inc
SET @old_innodb_file_format=@@innodb_file_format;
SET @old_innodb_file_per_table=@@innodb_file_per_table;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade.result b/mysql-test/suite/perfschema/r/pfs_upgrade.result
index 31d12598357..08991726796 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade.result
@@ -8,24 +8,24 @@ use performance_schema;
show tables like "user_table";
Tables_in_performance_schema (user_table)
user_table
-ERROR 1050 (42S01) at line 183: Table 'COND_INSTANCES' already exists
-ERROR 1050 (42S01) at line 213: Table 'EVENTS_WAITS_CURRENT' already exists
-ERROR 1050 (42S01) at line 227: Table 'EVENTS_WAITS_HISTORY' already exists
-ERROR 1050 (42S01) at line 241: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
-ERROR 1050 (42S01) at line 262: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 283: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 303: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 320: Table 'FILE_INSTANCES' already exists
-ERROR 1050 (42S01) at line 339: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 359: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 376: Table 'MUTEX_INSTANCES' already exists
-ERROR 1050 (42S01) at line 394: Table 'PERFORMANCE_TIMERS' already exists
-ERROR 1050 (42S01) at line 412: Table 'RWLOCK_INSTANCES' already exists
-ERROR 1050 (42S01) at line 428: Table 'SETUP_CONSUMERS' already exists
-ERROR 1050 (42S01) at line 445: Table 'SETUP_INSTRUMENTS' already exists
-ERROR 1050 (42S01) at line 461: Table 'SETUP_TIMERS' already exists
-ERROR 1050 (42S01) at line 478: Table 'THREADS' already exists
-ERROR 1644 (HY000) at line 1118: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 181: Table 'COND_INSTANCES' already exists
+ERROR 1050 (42S01) at line 211: Table 'EVENTS_WAITS_CURRENT' already exists
+ERROR 1050 (42S01) at line 225: Table 'EVENTS_WAITS_HISTORY' already exists
+ERROR 1050 (42S01) at line 239: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
+ERROR 1050 (42S01) at line 260: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 281: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 301: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 318: Table 'FILE_INSTANCES' already exists
+ERROR 1050 (42S01) at line 337: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 357: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 374: Table 'MUTEX_INSTANCES' already exists
+ERROR 1050 (42S01) at line 392: Table 'PERFORMANCE_TIMERS' already exists
+ERROR 1050 (42S01) at line 410: Table 'RWLOCK_INSTANCES' already exists
+ERROR 1050 (42S01) at line 426: Table 'SETUP_CONSUMERS' already exists
+ERROR 1050 (42S01) at line 443: Table 'SETUP_INSTRUMENTS' already exists
+ERROR 1050 (42S01) at line 459: Table 'SETUP_TIMERS' already exists
+ERROR 1050 (42S01) at line 476: Table 'THREADS' already exists
+ERROR 1644 (HY000) at line 1119: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
show tables like "user_table";
Tables_in_performance_schema (user_table)
@@ -38,24 +38,24 @@ use performance_schema;
show tables like "user_view";
Tables_in_performance_schema (user_view)
user_view
-ERROR 1050 (42S01) at line 183: Table 'COND_INSTANCES' already exists
-ERROR 1050 (42S01) at line 213: Table 'EVENTS_WAITS_CURRENT' already exists
-ERROR 1050 (42S01) at line 227: Table 'EVENTS_WAITS_HISTORY' already exists
-ERROR 1050 (42S01) at line 241: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
-ERROR 1050 (42S01) at line 262: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 283: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 303: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 320: Table 'FILE_INSTANCES' already exists
-ERROR 1050 (42S01) at line 339: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 359: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 376: Table 'MUTEX_INSTANCES' already exists
-ERROR 1050 (42S01) at line 394: Table 'PERFORMANCE_TIMERS' already exists
-ERROR 1050 (42S01) at line 412: Table 'RWLOCK_INSTANCES' already exists
-ERROR 1050 (42S01) at line 428: Table 'SETUP_CONSUMERS' already exists
-ERROR 1050 (42S01) at line 445: Table 'SETUP_INSTRUMENTS' already exists
-ERROR 1050 (42S01) at line 461: Table 'SETUP_TIMERS' already exists
-ERROR 1050 (42S01) at line 478: Table 'THREADS' already exists
-ERROR 1644 (HY000) at line 1118: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 181: Table 'COND_INSTANCES' already exists
+ERROR 1050 (42S01) at line 211: Table 'EVENTS_WAITS_CURRENT' already exists
+ERROR 1050 (42S01) at line 225: Table 'EVENTS_WAITS_HISTORY' already exists
+ERROR 1050 (42S01) at line 239: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
+ERROR 1050 (42S01) at line 260: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 281: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 301: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 318: Table 'FILE_INSTANCES' already exists
+ERROR 1050 (42S01) at line 337: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 357: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 374: Table 'MUTEX_INSTANCES' already exists
+ERROR 1050 (42S01) at line 392: Table 'PERFORMANCE_TIMERS' already exists
+ERROR 1050 (42S01) at line 410: Table 'RWLOCK_INSTANCES' already exists
+ERROR 1050 (42S01) at line 426: Table 'SETUP_CONSUMERS' already exists
+ERROR 1050 (42S01) at line 443: Table 'SETUP_INSTRUMENTS' already exists
+ERROR 1050 (42S01) at line 459: Table 'SETUP_TIMERS' already exists
+ERROR 1050 (42S01) at line 476: Table 'THREADS' already exists
+ERROR 1644 (HY000) at line 1119: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
show tables like "user_view";
Tables_in_performance_schema (user_view)
@@ -66,24 +66,24 @@ drop view test.user_view;
create procedure test.user_proc()
select "Not supposed to be here";
update mysql.proc set db='performance_schema' where name='user_proc';
-ERROR 1050 (42S01) at line 183: Table 'COND_INSTANCES' already exists
-ERROR 1050 (42S01) at line 213: Table 'EVENTS_WAITS_CURRENT' already exists
-ERROR 1050 (42S01) at line 227: Table 'EVENTS_WAITS_HISTORY' already exists
-ERROR 1050 (42S01) at line 241: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
-ERROR 1050 (42S01) at line 262: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 283: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 303: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 320: Table 'FILE_INSTANCES' already exists
-ERROR 1050 (42S01) at line 339: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 359: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 376: Table 'MUTEX_INSTANCES' already exists
-ERROR 1050 (42S01) at line 394: Table 'PERFORMANCE_TIMERS' already exists
-ERROR 1050 (42S01) at line 412: Table 'RWLOCK_INSTANCES' already exists
-ERROR 1050 (42S01) at line 428: Table 'SETUP_CONSUMERS' already exists
-ERROR 1050 (42S01) at line 445: Table 'SETUP_INSTRUMENTS' already exists
-ERROR 1050 (42S01) at line 461: Table 'SETUP_TIMERS' already exists
-ERROR 1050 (42S01) at line 478: Table 'THREADS' already exists
-ERROR 1644 (HY000) at line 1118: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 181: Table 'COND_INSTANCES' already exists
+ERROR 1050 (42S01) at line 211: Table 'EVENTS_WAITS_CURRENT' already exists
+ERROR 1050 (42S01) at line 225: Table 'EVENTS_WAITS_HISTORY' already exists
+ERROR 1050 (42S01) at line 239: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
+ERROR 1050 (42S01) at line 260: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 281: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 301: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 318: Table 'FILE_INSTANCES' already exists
+ERROR 1050 (42S01) at line 337: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 357: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 374: Table 'MUTEX_INSTANCES' already exists
+ERROR 1050 (42S01) at line 392: Table 'PERFORMANCE_TIMERS' already exists
+ERROR 1050 (42S01) at line 410: Table 'RWLOCK_INSTANCES' already exists
+ERROR 1050 (42S01) at line 426: Table 'SETUP_CONSUMERS' already exists
+ERROR 1050 (42S01) at line 443: Table 'SETUP_INSTRUMENTS' already exists
+ERROR 1050 (42S01) at line 459: Table 'SETUP_TIMERS' already exists
+ERROR 1050 (42S01) at line 476: Table 'THREADS' already exists
+ERROR 1644 (HY000) at line 1119: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.proc where db='performance_schema';
name
@@ -94,24 +94,24 @@ drop procedure test.user_proc;
create function test.user_func() returns integer
return 0;
update mysql.proc set db='performance_schema' where name='user_func';
-ERROR 1050 (42S01) at line 183: Table 'COND_INSTANCES' already exists
-ERROR 1050 (42S01) at line 213: Table 'EVENTS_WAITS_CURRENT' already exists
-ERROR 1050 (42S01) at line 227: Table 'EVENTS_WAITS_HISTORY' already exists
-ERROR 1050 (42S01) at line 241: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
-ERROR 1050 (42S01) at line 262: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 283: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 303: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 320: Table 'FILE_INSTANCES' already exists
-ERROR 1050 (42S01) at line 339: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 359: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 376: Table 'MUTEX_INSTANCES' already exists
-ERROR 1050 (42S01) at line 394: Table 'PERFORMANCE_TIMERS' already exists
-ERROR 1050 (42S01) at line 412: Table 'RWLOCK_INSTANCES' already exists
-ERROR 1050 (42S01) at line 428: Table 'SETUP_CONSUMERS' already exists
-ERROR 1050 (42S01) at line 445: Table 'SETUP_INSTRUMENTS' already exists
-ERROR 1050 (42S01) at line 461: Table 'SETUP_TIMERS' already exists
-ERROR 1050 (42S01) at line 478: Table 'THREADS' already exists
-ERROR 1644 (HY000) at line 1118: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 181: Table 'COND_INSTANCES' already exists
+ERROR 1050 (42S01) at line 211: Table 'EVENTS_WAITS_CURRENT' already exists
+ERROR 1050 (42S01) at line 225: Table 'EVENTS_WAITS_HISTORY' already exists
+ERROR 1050 (42S01) at line 239: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
+ERROR 1050 (42S01) at line 260: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 281: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 301: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 318: Table 'FILE_INSTANCES' already exists
+ERROR 1050 (42S01) at line 337: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 357: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 374: Table 'MUTEX_INSTANCES' already exists
+ERROR 1050 (42S01) at line 392: Table 'PERFORMANCE_TIMERS' already exists
+ERROR 1050 (42S01) at line 410: Table 'RWLOCK_INSTANCES' already exists
+ERROR 1050 (42S01) at line 426: Table 'SETUP_CONSUMERS' already exists
+ERROR 1050 (42S01) at line 443: Table 'SETUP_INSTRUMENTS' already exists
+ERROR 1050 (42S01) at line 459: Table 'SETUP_TIMERS' already exists
+ERROR 1050 (42S01) at line 476: Table 'THREADS' already exists
+ERROR 1644 (HY000) at line 1119: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.proc where db='performance_schema';
name
@@ -122,24 +122,24 @@ drop function test.user_func;
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line 183: Table 'COND_INSTANCES' already exists
-ERROR 1050 (42S01) at line 213: Table 'EVENTS_WAITS_CURRENT' already exists
-ERROR 1050 (42S01) at line 227: Table 'EVENTS_WAITS_HISTORY' already exists
-ERROR 1050 (42S01) at line 241: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
-ERROR 1050 (42S01) at line 262: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 283: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 303: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 320: Table 'FILE_INSTANCES' already exists
-ERROR 1050 (42S01) at line 339: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
-ERROR 1050 (42S01) at line 359: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
-ERROR 1050 (42S01) at line 376: Table 'MUTEX_INSTANCES' already exists
-ERROR 1050 (42S01) at line 394: Table 'PERFORMANCE_TIMERS' already exists
-ERROR 1050 (42S01) at line 412: Table 'RWLOCK_INSTANCES' already exists
-ERROR 1050 (42S01) at line 428: Table 'SETUP_CONSUMERS' already exists
-ERROR 1050 (42S01) at line 445: Table 'SETUP_INSTRUMENTS' already exists
-ERROR 1050 (42S01) at line 461: Table 'SETUP_TIMERS' already exists
-ERROR 1050 (42S01) at line 478: Table 'THREADS' already exists
-ERROR 1644 (HY000) at line 1118: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 181: Table 'COND_INSTANCES' already exists
+ERROR 1050 (42S01) at line 211: Table 'EVENTS_WAITS_CURRENT' already exists
+ERROR 1050 (42S01) at line 225: Table 'EVENTS_WAITS_HISTORY' already exists
+ERROR 1050 (42S01) at line 239: Table 'EVENTS_WAITS_HISTORY_LONG' already exists
+ERROR 1050 (42S01) at line 260: Table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 281: Table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 301: Table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 318: Table 'FILE_INSTANCES' already exists
+ERROR 1050 (42S01) at line 337: Table 'FILE_SUMMARY_BY_EVENT_NAME' already exists
+ERROR 1050 (42S01) at line 357: Table 'FILE_SUMMARY_BY_INSTANCE' already exists
+ERROR 1050 (42S01) at line 374: Table 'MUTEX_INSTANCES' already exists
+ERROR 1050 (42S01) at line 392: Table 'PERFORMANCE_TIMERS' already exists
+ERROR 1050 (42S01) at line 410: Table 'RWLOCK_INSTANCES' already exists
+ERROR 1050 (42S01) at line 426: Table 'SETUP_CONSUMERS' already exists
+ERROR 1050 (42S01) at line 443: Table 'SETUP_INSTRUMENTS' already exists
+ERROR 1050 (42S01) at line 459: Table 'SETUP_TIMERS' already exists
+ERROR 1050 (42S01) at line 476: Table 'THREADS' already exists
+ERROR 1644 (HY000) at line 1119: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.event where db='performance_schema';
name
diff --git a/mysql-test/suite/perfschema/t/no_threads-master.opt b/mysql-test/suite/perfschema/t/no_threads-master.opt
index 0dfb498094a..63784bf7c66 100644
--- a/mysql-test/suite/perfschema/t/no_threads-master.opt
+++ b/mysql-test/suite/perfschema/t/no_threads-master.opt
@@ -1 +1 @@
---one-thread --thread-handling=no-threads --loose-performance-schema-max-thread_instances=10 --default-storage-engine=MyISAM --skip-innodb
+--one-thread --thread-handling=no-threads --loose-performance-schema-max-thread_instances=10 --default-storage-engine=MyISAM
diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result
index af6b33966e9..a451b2e581a 100644
--- a/mysql-test/suite/rpl/r/rpl_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_ddl.result
@@ -878,11 +878,11 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t6;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t6;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-------- switch to master -------
@@ -927,13 +927,13 @@ TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t5;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t5;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
-------- switch to master -------
diff --git a/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
index b336fc12d42..ecc2987576c 100644
--- a/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
+++ b/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
@@ -9,7 +9,7 @@ USE mysqlslap;
select @@global.binlog_format;
@@global.binlog_format
MIXED
-CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
+CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)) ENGINE=MyISAM;
FLUSH TABLE t1;
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
index 47ce547fcac..7a5c6533641 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set session storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result
index 8c4bcf48a65..542e9dfd6cb 100644
--- a/mysql-test/suite/rpl/r/rpl_optimize.result
+++ b/mysql-test/suite/rpl/r/rpl_optimize.result
@@ -5,7 +5,6 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
drop tables if exists t1;
-CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
create table t1 (a int not null auto_increment primary key, b int, key(b));
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (a) SELECT null FROM t1;
diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
index 70e1d2f06e8..f529170d05e 100644
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
@@ -82,14 +82,15 @@ master-bin.000005 #
master-bin.000006 #
master-bin.000007 #
master-bin.000008 #
+master-bin.000009 #
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000008 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+master-bin.000009 # <Binlog_Do_DB> <Binlog_Ignore_DB>
select * from t4;
a
testing temporary tables part 2
-Master_Log_File master-bin.000008
-Relay_Master_Log_File master-bin.000008
+Master_Log_File master-bin.000009
+Relay_Master_Log_File master-bin.000009
Checking that both slave threads are running.
lock tables t3 read;
select count(*) from t3 where n >= 4;
diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
index b9480abd4b8..d9e70ce95c5 100644
--- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set session storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
index cb095ad561e..4b2948f9382 100644
--- a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
+++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result
@@ -1,17 +1,17 @@
-CREATE TABLE t1 (c1 char(50));
+CREATE TABLE t1 (c1 char(50)) engine=myisam;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50)) engine=myisam
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # COMMIT
DROP TABLE t1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result
index 74eb14d33e0..13a5c179520 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result
@@ -416,7 +416,7 @@ Rpl_semi_sync_slave_status OFF
# Test non-semi-sync slave connect to semi-sync master
#
set sql_log_bin=0;
-INSTALL PLUGIN rpl_semi_sync_master SONAME 'SEMISYNC_MASTER_PLUGIN';
+INSTALL PLUGIN rpl_semi_sync_master SONAME 'SEMISYNC_MASTER_SO';
set global rpl_semi_sync_master_timeout= 5000;
/* 5s */
set sql_log_bin=1;
@@ -435,7 +435,7 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value
include/stop_slave.inc
[ reinstall semi-sync slave plugin and disable semi-sync ]
-INSTALL PLUGIN rpl_semi_sync_slave SONAME 'SEMISYNC_SLAVE_PLUGIN';
+INSTALL PLUGIN rpl_semi_sync_slave SONAME 'SEMISYNC_SLAVE_SO';
set global rpl_semi_sync_slave_enabled= 0;
SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled';
Variable_name Value
diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
index 6f53ad68d76..e48f1a7d0f3 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set session storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_stm_maria.result b/mysql-test/suite/rpl/r/rpl_stm_maria.result
index 1fe1fd87349..3a3ba256325 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_maria.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_maria.result
@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
+CALL mtr.add_suppression('Unsafe statement written to the binary log using statement format');
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.test b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
index 11c648dece5..5d687006b76 100644
--- a/mysql-test/suite/rpl/t/rpl_ip_mix2.test
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
@@ -6,19 +6,7 @@
# Options: --skip-name-resolve, master: --bind-address=0.0.0.0, slave: --bind-address=::
# (see corresponding cnf file)
#
-# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
---disable_query_log
---disable_abort_on_error
-connect (checkcon123456789,::1,root,,test,$SLAVE_MYPORT);
-if($mysql_errno)
-{
-skip wrong IP for slave;
-}
-connection default;
-disconnect checkcon123456789;
---enable_abort_on_error
---enable_query_log
-# end check
+--source include/check_ipv6.inc
--source include/have_log_bin.inc
let $IPv6= ::1;
diff --git a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
index 6e1d3286f07..1a32c388921 100644
--- a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
@@ -6,4 +6,5 @@
--source include/have_innodb.inc
--let $engine=Innodb
+set session storage_engine=innodb;
--source extra/rpl_tests/rpl_implicit_commit_binlog.test
diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test
index 937ca5ed653..cd04c2ccc0b 100644
--- a/mysql-test/suite/rpl/t/rpl_relayspace.test
+++ b/mysql-test/suite/rpl/t/rpl_relayspace.test
@@ -5,7 +5,7 @@ source include/master-slave.inc;
let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1);
connection slave;
stop slave;
-source include/wait_for_slave_to_stop.inc
+source include/wait_for_slave_to_stop.inc;
connection master;
# This will generate a master's binlog > 10 bytes
create table t1 (a int);
diff --git a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
index 5c3b163eea3..8b54878a203 100644
--- a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
@@ -6,4 +6,5 @@
--source include/have_innodb.inc
--let $engine=Innodb
+set session storage_engine=innodb;
--source extra/rpl_tests/rpl_implicit_commit_binlog.test
diff --git a/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test b/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
index 1a4b1c1306d..cef259687fb 100644
--- a/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
+++ b/mysql-test/suite/rpl/t/rpl_row_loaddata_concurrent.test
@@ -3,7 +3,7 @@
-- source include/have_binlog_format_row.inc
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
-CREATE TABLE t1 (c1 char(50));
+CREATE TABLE t1 (c1 char(50)) engine=myisam;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
-- source include/show_binlog_events.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt b/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt b/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync.test b/mysql-test/suite/rpl/t/rpl_semi_sync.test
index 1bf4f1a3396..17fa67e97e3 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync.test
@@ -61,7 +61,7 @@ let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled',
if (`select '$value' = 'No such row'`)
{
set sql_log_bin=0;
- eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+ eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
set global rpl_semi_sync_master_timeout= 5000; /* 5s */
set sql_log_bin=1;
}
@@ -126,7 +126,7 @@ let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', V
if (`select '$value' = 'No such row'`)
{
set sql_log_bin=0;
- eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+ eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_SO';
set sql_log_bin=1;
}
enable_query_log;
@@ -566,8 +566,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
connection master;
set sql_log_bin=0;
-replace_result $SEMISYNC_MASTER_PLUGIN SEMISYNC_MASTER_PLUGIN;
-eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+replace_result $SEMISYNC_MASTER_SO SEMISYNC_MASTER_SO;
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
set global rpl_semi_sync_master_timeout= 5000; /* 5s */
set sql_log_bin=1;
set global rpl_semi_sync_master_enabled= 1;
@@ -585,8 +585,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
source include/stop_slave.inc;
echo [ reinstall semi-sync slave plugin and disable semi-sync ];
-replace_result $SEMISYNC_SLAVE_PLUGIN SEMISYNC_SLAVE_PLUGIN;
-eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+replace_result $SEMISYNC_SLAVE_SO SEMISYNC_SLAVE_SO;
+eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_SO';
set global rpl_semi_sync_slave_enabled= 0;
SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled';
SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt b/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt
index 3c4a05d640c..78be60a4852 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event-master.opt
@@ -1 +1 @@
-$SEMISYNC_PLUGIN_OPT --max-connections=23
+--max-connections=23
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event-slave.opt b/mysql-test/suite/rpl/t/rpl_semi_sync_event-slave.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_event-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
index feb885ce07b..3b68441141a 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
@@ -23,7 +23,7 @@ let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled',
if (`select '$value' = 'No such row'`)
{
set sql_log_bin=0;
- eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+ eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
SET GLOBAL rpl_semi_sync_master_enabled = 1;
set sql_log_bin=1;
}
@@ -37,7 +37,7 @@ let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', V
if (`select '$value' = 'No such row'`)
{
set sql_log_bin=0;
- eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+ eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_SO';
SET GLOBAL rpl_semi_sync_slave_enabled = 1;
set sql_log_bin=1;
}
diff --git a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
index 87dd3eb3295..f3a4b174ab3 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
@@ -6,4 +6,5 @@
--source include/have_innodb.inc
--let $engine=Innodb
+set session storage_engine=innodb;
--source extra/rpl_tests/rpl_implicit_commit_binlog.test
diff --git a/mysql-test/suite/rpl/t/rpl_stm_maria.test b/mysql-test/suite/rpl/t/rpl_stm_maria.test
index b4dc0ef7e4a..6a37e390716 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_maria.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_maria.test
@@ -5,7 +5,7 @@
--source include/master-slave.inc
# Suppress warnings that rand() is unsafe in statement binlog mode
-CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
+CALL mtr.add_suppression('Unsafe statement written to the binary log using statement format');
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
index 7f6dca3eb7b..0f741ff930a 100644
--- a/mysql-test/suite/sys_vars/r/all_vars.result
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -10,7 +10,5 @@ There should be *no* long test name listed below:
select variable_name as `There should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
There should be *no* variables listed below:
-INNODB_FILE_FORMAT_MAX
-INNODB_FILE_FORMAT_MAX
drop table t1;
drop table t2;
diff --git a/mysql-test/suite/sys_vars/r/aria_block_size_basic.result b/mysql-test/suite/sys_vars/r/aria_block_size_basic.result
new file mode 100644
index 00000000000..ba7f494de1e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_block_size_basic.result
@@ -0,0 +1,21 @@
+select @@global.aria_block_size;
+@@global.aria_block_size
+8192
+select @@session.aria_block_size;
+ERROR HY000: Variable 'aria_block_size' is a GLOBAL variable
+show global variables like 'aria_block_size';
+Variable_name Value
+aria_block_size 8192
+show session variables like 'aria_block_size';
+Variable_name Value
+aria_block_size 8192
+select * from information_schema.global_variables where variable_name='aria_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_BLOCK_SIZE 8192
+select * from information_schema.session_variables where variable_name='aria_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_BLOCK_SIZE 8192
+set global aria_block_size=1;
+ERROR HY000: Variable 'aria_block_size' is a read only variable
+set session aria_block_size=1;
+ERROR HY000: Variable 'aria_block_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/aria_checkpoint_interval_basic.result b/mysql-test/suite/sys_vars/r/aria_checkpoint_interval_basic.result
new file mode 100644
index 00000000000..a49a5794f11
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_checkpoint_interval_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.aria_checkpoint_interval;
+select @@global.aria_checkpoint_interval;
+@@global.aria_checkpoint_interval
+30
+select @@session.aria_checkpoint_interval;
+ERROR HY000: Variable 'aria_checkpoint_interval' is a GLOBAL variable
+show global variables like 'aria_checkpoint_interval';
+Variable_name Value
+aria_checkpoint_interval 30
+show session variables like 'aria_checkpoint_interval';
+Variable_name Value
+aria_checkpoint_interval 30
+select * from information_schema.global_variables where variable_name='aria_checkpoint_interval';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_CHECKPOINT_INTERVAL 30
+select * from information_schema.session_variables where variable_name='aria_checkpoint_interval';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_CHECKPOINT_INTERVAL 30
+set global aria_checkpoint_interval=1;
+select @@global.aria_checkpoint_interval;
+@@global.aria_checkpoint_interval
+1
+set session aria_checkpoint_interval=1;
+ERROR HY000: Variable 'aria_checkpoint_interval' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_checkpoint_interval=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_checkpoint_interval'
+set global aria_checkpoint_interval=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_checkpoint_interval'
+set global aria_checkpoint_interval="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_checkpoint_interval'
+set global aria_checkpoint_interval=0;
+select @@global.aria_checkpoint_interval;
+@@global.aria_checkpoint_interval
+0
+set global aria_checkpoint_interval=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_checkpoint_interval value: '18446744073709551615'
+select @@global.aria_checkpoint_interval;
+@@global.aria_checkpoint_interval
+4294967295
+SET @@global.aria_checkpoint_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_force_start_after_recovery_failures_basic.result b/mysql-test/suite/sys_vars/r/aria_force_start_after_recovery_failures_basic.result
new file mode 100644
index 00000000000..be0056507a7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_force_start_after_recovery_failures_basic.result
@@ -0,0 +1,21 @@
+select @@global.aria_force_start_after_recovery_failures;
+@@global.aria_force_start_after_recovery_failures
+0
+select @@session.aria_force_start_after_recovery_failures;
+ERROR HY000: Variable 'aria_force_start_after_recovery_failures' is a GLOBAL variable
+show global variables like 'aria_force_start_after_recovery_failures';
+Variable_name Value
+aria_force_start_after_recovery_failures 0
+show session variables like 'aria_force_start_after_recovery_failures';
+Variable_name Value
+aria_force_start_after_recovery_failures 0
+select * from information_schema.global_variables where variable_name='aria_force_start_after_recovery_failures';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_FORCE_START_AFTER_RECOVERY_FAILURES 0
+select * from information_schema.session_variables where variable_name='aria_force_start_after_recovery_failures';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_FORCE_START_AFTER_RECOVERY_FAILURES 0
+set global aria_force_start_after_recovery_failures=1;
+ERROR HY000: Variable 'aria_force_start_after_recovery_failures' is a read only variable
+set session aria_force_start_after_recovery_failures=1;
+ERROR HY000: Variable 'aria_force_start_after_recovery_failures' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/aria_group_commit_basic.result b/mysql-test/suite/sys_vars/r/aria_group_commit_basic.result
new file mode 100644
index 00000000000..fb6e887bb21
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_group_commit_basic.result
@@ -0,0 +1,45 @@
+SET @start_global_value = @@global.aria_group_commit;
+select @@global.aria_group_commit;
+@@global.aria_group_commit
+none
+select @@session.aria_group_commit;
+ERROR HY000: Variable 'aria_group_commit' is a GLOBAL variable
+show global variables like 'aria_group_commit';
+Variable_name Value
+aria_group_commit none
+show session variables like 'aria_group_commit';
+Variable_name Value
+aria_group_commit none
+select * from information_schema.global_variables where variable_name='aria_group_commit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_GROUP_COMMIT none
+select * from information_schema.session_variables where variable_name='aria_group_commit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_GROUP_COMMIT none
+set global aria_group_commit=1;
+select @@global.aria_group_commit;
+@@global.aria_group_commit
+hard
+set session aria_group_commit=1;
+ERROR HY000: Variable 'aria_group_commit' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_group_commit=none;
+select @@global.aria_group_commit;
+@@global.aria_group_commit
+none
+set global aria_group_commit=hard;
+select @@global.aria_group_commit;
+@@global.aria_group_commit
+hard
+set global aria_group_commit=soft;
+select @@global.aria_group_commit;
+@@global.aria_group_commit
+soft
+set global aria_group_commit=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_group_commit'
+set global aria_group_commit=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_group_commit'
+set global aria_group_commit="foo";
+ERROR 42000: Variable 'aria_group_commit' can't be set to the value of 'foo'
+set global aria_group_commit=3;
+ERROR 42000: Variable 'aria_group_commit' can't be set to the value of '3'
+SET @@global.aria_group_commit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_group_commit_interval_basic.result b/mysql-test/suite/sys_vars/r/aria_group_commit_interval_basic.result
new file mode 100644
index 00000000000..3cec802b3dd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_group_commit_interval_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.aria_group_commit_interval;
+select @@global.aria_group_commit_interval;
+@@global.aria_group_commit_interval
+0
+select @@session.aria_group_commit_interval;
+ERROR HY000: Variable 'aria_group_commit_interval' is a GLOBAL variable
+show global variables like 'aria_group_commit_interval';
+Variable_name Value
+aria_group_commit_interval 0
+show session variables like 'aria_group_commit_interval';
+Variable_name Value
+aria_group_commit_interval 0
+select * from information_schema.global_variables where variable_name='aria_group_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_GROUP_COMMIT_INTERVAL 0
+select * from information_schema.session_variables where variable_name='aria_group_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_GROUP_COMMIT_INTERVAL 0
+set global aria_group_commit_interval=1;
+select @@global.aria_group_commit_interval;
+@@global.aria_group_commit_interval
+1
+set session aria_group_commit_interval=1;
+ERROR HY000: Variable 'aria_group_commit_interval' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_group_commit_interval=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_group_commit_interval'
+set global aria_group_commit_interval=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_group_commit_interval'
+set global aria_group_commit_interval="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_group_commit_interval'
+set global aria_group_commit_interval=0;
+select @@global.aria_group_commit_interval;
+@@global.aria_group_commit_interval
+0
+set global aria_group_commit_interval=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_group_commit_interval value: '18446744073709551615'
+select @@global.aria_group_commit_interval;
+@@global.aria_group_commit_interval
+4294967295
+SET @@global.aria_group_commit_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_log_file_size_basic.result b/mysql-test/suite/sys_vars/r/aria_log_file_size_basic.result
new file mode 100644
index 00000000000..ae823df4bf7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_log_file_size_basic.result
@@ -0,0 +1,53 @@
+SET @start_global_value = @@global.aria_log_file_size;
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+1073741824
+select @@session.aria_log_file_size;
+ERROR HY000: Variable 'aria_log_file_size' is a GLOBAL variable
+show global variables like 'aria_log_file_size';
+Variable_name Value
+aria_log_file_size 1073741824
+show session variables like 'aria_log_file_size';
+Variable_name Value
+aria_log_file_size 1073741824
+select * from information_schema.global_variables where variable_name='aria_log_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_FILE_SIZE 1073741824
+select * from information_schema.session_variables where variable_name='aria_log_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_FILE_SIZE 1073741824
+set global aria_log_file_size=1024*1024*10;
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+10485760
+set session aria_log_file_size=1;
+ERROR HY000: Variable 'aria_log_file_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_log_file_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_log_file_size'
+set global aria_log_file_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_log_file_size'
+set global aria_log_file_size="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_log_file_size'
+set global aria_log_file_size=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '1'
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+8388608
+set global aria_log_file_size=@@global.aria_log_file_size + 8192 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '8396799'
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+8388608
+set global aria_log_file_size=@@global.aria_log_file_size + 8192;
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+8396800
+set global aria_log_file_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '18446744073709551615'
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
+4294959104
+SET @@global.aria_log_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_log_purge_type_basic.result b/mysql-test/suite/sys_vars/r/aria_log_purge_type_basic.result
new file mode 100644
index 00000000000..1e6acad97d1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_log_purge_type_basic.result
@@ -0,0 +1,45 @@
+SET @start_global_value = @@global.aria_log_purge_type;
+select @@global.aria_log_purge_type;
+@@global.aria_log_purge_type
+immediate
+select @@session.aria_log_purge_type;
+ERROR HY000: Variable 'aria_log_purge_type' is a GLOBAL variable
+show global variables like 'aria_log_purge_type';
+Variable_name Value
+aria_log_purge_type immediate
+show session variables like 'aria_log_purge_type';
+Variable_name Value
+aria_log_purge_type immediate
+select * from information_schema.global_variables where variable_name='aria_log_purge_type';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_PURGE_TYPE immediate
+select * from information_schema.session_variables where variable_name='aria_log_purge_type';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_PURGE_TYPE immediate
+set global aria_log_purge_type=1;
+select @@global.aria_log_purge_type;
+@@global.aria_log_purge_type
+external
+set session aria_log_purge_type=1;
+ERROR HY000: Variable 'aria_log_purge_type' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_log_purge_type=immediate;
+select @@global.aria_log_purge_type;
+@@global.aria_log_purge_type
+immediate
+set global aria_log_purge_type=external;
+select @@global.aria_log_purge_type;
+@@global.aria_log_purge_type
+external
+set global aria_log_purge_type=at_flush;
+select @@global.aria_log_purge_type;
+@@global.aria_log_purge_type
+at_flush
+set global aria_log_purge_type=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_log_purge_type'
+set global aria_log_purge_type=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_log_purge_type'
+set global aria_log_purge_type="foo";
+ERROR 42000: Variable 'aria_log_purge_type' can't be set to the value of 'foo'
+set global aria_log_purge_type=3;
+ERROR 42000: Variable 'aria_log_purge_type' can't be set to the value of '3'
+SET @@global.aria_log_purge_type = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_max_sort_file_size_basic.result b/mysql-test/suite/sys_vars/r/aria_max_sort_file_size_basic.result
new file mode 100644
index 00000000000..83421bfc730
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_max_sort_file_size_basic.result
@@ -0,0 +1,53 @@
+SET @start_global_value = @@global.aria_max_sort_file_size;
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+9223372036853727232
+select @@session.aria_max_sort_file_size;
+ERROR HY000: Variable 'aria_max_sort_file_size' is a GLOBAL variable
+show global variables like 'aria_max_sort_file_size';
+Variable_name Value
+aria_max_sort_file_size 9223372036853727232
+show session variables like 'aria_max_sort_file_size';
+Variable_name Value
+aria_max_sort_file_size 9223372036853727232
+select * from information_schema.global_variables where variable_name='aria_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+select * from information_schema.session_variables where variable_name='aria_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+set global aria_max_sort_file_size=1024*1024*10;
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+10485760
+set session aria_max_sort_file_size=1;
+ERROR HY000: Variable 'aria_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_max_sort_file_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
+set global aria_max_sort_file_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
+set global aria_max_sort_file_size="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
+set global aria_max_sort_file_size=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '1'
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+0
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '1048575'
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+0
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024;
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+1048576
+set global aria_max_sort_file_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '18446744073709551615'
+select @@global.aria_max_sort_file_size;
+@@global.aria_max_sort_file_size
+9223372036853727232
+SET @@global.aria_max_sort_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_page_checksum_basic.result b/mysql-test/suite/sys_vars/r/aria_page_checksum_basic.result
new file mode 100644
index 00000000000..4b30036a26a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_page_checksum_basic.result
@@ -0,0 +1,39 @@
+SET @start_global_value = @@global.aria_page_checksum;
+select @@global.aria_page_checksum;
+@@global.aria_page_checksum
+1
+select @@session.aria_page_checksum;
+ERROR HY000: Variable 'aria_page_checksum' is a GLOBAL variable
+show global variables like 'aria_page_checksum';
+Variable_name Value
+aria_page_checksum ON
+show session variables like 'aria_page_checksum';
+Variable_name Value
+aria_page_checksum ON
+select * from information_schema.global_variables where variable_name='aria_page_checksum';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGE_CHECKSUM ON
+select * from information_schema.session_variables where variable_name='aria_page_checksum';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGE_CHECKSUM ON
+set global aria_page_checksum=ON;
+select @@global.aria_page_checksum;
+@@global.aria_page_checksum
+1
+set global aria_page_checksum=OFF;
+select @@global.aria_page_checksum;
+@@global.aria_page_checksum
+0
+set global aria_page_checksum=1;
+select @@global.aria_page_checksum;
+@@global.aria_page_checksum
+1
+set session aria_page_checksum=1;
+ERROR HY000: Variable 'aria_page_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_page_checksum=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_page_checksum'
+set global aria_page_checksum=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_page_checksum'
+set global aria_page_checksum="foo";
+ERROR 42000: Variable 'aria_page_checksum' can't be set to the value of 'foo'
+SET @@global.aria_page_checksum = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_pagecache_age_threshold_basic.result b/mysql-test/suite/sys_vars/r/aria_pagecache_age_threshold_basic.result
new file mode 100644
index 00000000000..cd4fb0a3c26
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_pagecache_age_threshold_basic.result
@@ -0,0 +1,53 @@
+SET @start_global_value = @@global.aria_pagecache_age_threshold;
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+300
+select @@session.aria_pagecache_age_threshold;
+ERROR HY000: Variable 'aria_pagecache_age_threshold' is a GLOBAL variable
+show global variables like 'aria_pagecache_age_threshold';
+Variable_name Value
+aria_pagecache_age_threshold 300
+show session variables like 'aria_pagecache_age_threshold';
+Variable_name Value
+aria_pagecache_age_threshold 300
+select * from information_schema.global_variables where variable_name='aria_pagecache_age_threshold';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_AGE_THRESHOLD 300
+select * from information_schema.session_variables where variable_name='aria_pagecache_age_threshold';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_AGE_THRESHOLD 300
+set global aria_pagecache_age_threshold=200;
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+200
+set session aria_pagecache_age_threshold=1;
+ERROR HY000: Variable 'aria_pagecache_age_threshold' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_pagecache_age_threshold=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_age_threshold'
+set global aria_pagecache_age_threshold=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_age_threshold'
+set global aria_pagecache_age_threshold="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_age_threshold'
+set global aria_pagecache_age_threshold=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '1'
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+100
+set global aria_pagecache_age_threshold=@@global.aria_pagecache_age_threshold + 100 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '199'
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+100
+set global aria_pagecache_age_threshold=@@global.aria_pagecache_age_threshold + 100;
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+200
+set global aria_pagecache_age_threshold=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '18446744073709551615'
+select @@global.aria_pagecache_age_threshold;
+@@global.aria_pagecache_age_threshold
+18446744073709551600
+SET @@global.aria_pagecache_age_threshold = @start_global_value;
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
new file mode 100644
index 00000000000..5f481b0b134
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result
@@ -0,0 +1,21 @@
+select @@global.aria_pagecache_buffer_size;
+@@global.aria_pagecache_buffer_size
+134217728
+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 134217728
+show session variables like 'aria_pagecache_buffer_size';
+Variable_name Value
+aria_pagecache_buffer_size 134217728
+select * from information_schema.global_variables where variable_name='aria_pagecache_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_BUFFER_SIZE 134217728
+select * from information_schema.session_variables where variable_name='aria_pagecache_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_BUFFER_SIZE 134217728
+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;
+ERROR HY000: Variable 'aria_pagecache_buffer_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/aria_pagecache_division_limit_basic.result b/mysql-test/suite/sys_vars/r/aria_pagecache_division_limit_basic.result
new file mode 100644
index 00000000000..98aae5b3c01
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_pagecache_division_limit_basic.result
@@ -0,0 +1,43 @@
+SET @start_global_value = @@global.aria_pagecache_division_limit;
+select @@global.aria_pagecache_division_limit;
+@@global.aria_pagecache_division_limit
+100
+select @@session.aria_pagecache_division_limit;
+ERROR HY000: Variable 'aria_pagecache_division_limit' is a GLOBAL variable
+show global variables like 'aria_pagecache_division_limit';
+Variable_name Value
+aria_pagecache_division_limit 100
+show session variables like 'aria_pagecache_division_limit';
+Variable_name Value
+aria_pagecache_division_limit 100
+select * from information_schema.global_variables where variable_name='aria_pagecache_division_limit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_DIVISION_LIMIT 100
+select * from information_schema.session_variables where variable_name='aria_pagecache_division_limit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_DIVISION_LIMIT 100
+set global aria_pagecache_division_limit=20;
+select @@global.aria_pagecache_division_limit;
+@@global.aria_pagecache_division_limit
+20
+set session aria_pagecache_division_limit=1;
+ERROR HY000: Variable 'aria_pagecache_division_limit' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_pagecache_division_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_division_limit'
+set global aria_pagecache_division_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_division_limit'
+set global aria_pagecache_division_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_pagecache_division_limit'
+set global aria_pagecache_division_limit=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_division_limit value: '0'
+select @@global.aria_pagecache_division_limit;
+@@global.aria_pagecache_division_limit
+1
+set global aria_pagecache_division_limit=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_division_limit value: '18446744073709551615'
+select @@global.aria_pagecache_division_limit;
+@@global.aria_pagecache_division_limit
+100
+SET @@global.aria_pagecache_division_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_recover_basic.result b/mysql-test/suite/sys_vars/r/aria_recover_basic.result
new file mode 100644
index 00000000000..ec275449c22
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_recover_basic.result
@@ -0,0 +1,53 @@
+SET @start_global_value = @@global.aria_recover;
+select @@global.aria_recover;
+@@global.aria_recover
+NORMAL
+select @@session.aria_recover;
+ERROR HY000: Variable 'aria_recover' is a GLOBAL variable
+show global variables like 'aria_recover';
+Variable_name Value
+aria_recover NORMAL
+show session variables like 'aria_recover';
+Variable_name Value
+aria_recover NORMAL
+select * from information_schema.global_variables where variable_name='aria_recover';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_RECOVER NORMAL
+select * from information_schema.session_variables where variable_name='aria_recover';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_RECOVER NORMAL
+set global aria_recover=1;
+select @@global.aria_recover;
+@@global.aria_recover
+NORMAL
+set session aria_recover=1;
+ERROR HY000: Variable 'aria_recover' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_recover=normal;
+select @@global.aria_recover;
+@@global.aria_recover
+NORMAL
+set global aria_recover=backup;
+select @@global.aria_recover;
+@@global.aria_recover
+BACKUP
+set global aria_recover='force';
+select @@global.aria_recover;
+@@global.aria_recover
+FORCE
+set global aria_recover='quick';
+select @@global.aria_recover;
+@@global.aria_recover
+QUICK
+set global aria_recover=off;
+select @@global.aria_recover;
+@@global.aria_recover
+OFF
+set global aria_recover=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_recover'
+set global aria_recover=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_recover'
+set global aria_recover="foo";
+ERROR 42000: Variable 'aria_recover' can't be set to the value of 'foo'
+set global aria_recover=5;
+ERROR 42000: Variable 'aria_recover' can't be set to the value of '5'
+SET @@global.aria_recover = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_repair_threads_basic.result b/mysql-test/suite/sys_vars/r/aria_repair_threads_basic.result
new file mode 100644
index 00000000000..b070191e212
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_repair_threads_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.aria_repair_threads;
+select @@global.aria_repair_threads;
+@@global.aria_repair_threads
+1
+select @@session.aria_repair_threads;
+@@session.aria_repair_threads
+1
+show global variables like 'aria_repair_threads';
+Variable_name Value
+aria_repair_threads 1
+show session variables like 'aria_repair_threads';
+Variable_name Value
+aria_repair_threads 1
+select * from information_schema.global_variables where variable_name='aria_repair_threads';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_REPAIR_THREADS 1
+select * from information_schema.session_variables where variable_name='aria_repair_threads';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_REPAIR_THREADS 1
+set global aria_repair_threads=10;
+select @@global.aria_repair_threads;
+@@global.aria_repair_threads
+10
+set session aria_repair_threads=10;
+select @@session.aria_repair_threads;
+@@session.aria_repair_threads
+10
+set global aria_repair_threads=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_repair_threads'
+set session aria_repair_threads=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_repair_threads'
+set global aria_repair_threads="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_repair_threads'
+set global aria_repair_threads=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_repair_threads value: '0'
+select @@global.aria_repair_threads;
+@@global.aria_repair_threads
+1
+set session aria_repair_threads=cast(-1 as unsigned int);
+select @@session.aria_repair_threads;
+@@session.aria_repair_threads
+18446744073709551615
+SET @@global.aria_repair_threads = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result
new file mode 100644
index 00000000000..cf067c7e7b6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.aria_sort_buffer_size;
+select @@global.aria_sort_buffer_size;
+@@global.aria_sort_buffer_size
+134217728
+select @@session.aria_sort_buffer_size;
+@@session.aria_sort_buffer_size
+134217728
+show global variables like 'aria_sort_buffer_size';
+Variable_name Value
+aria_sort_buffer_size 134217728
+show session variables like 'aria_sort_buffer_size';
+Variable_name Value
+aria_sort_buffer_size 134217728
+select * from information_schema.global_variables where variable_name='aria_sort_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SORT_BUFFER_SIZE 134217728
+select * from information_schema.session_variables where variable_name='aria_sort_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SORT_BUFFER_SIZE 134217728
+set global aria_sort_buffer_size=10;
+select @@global.aria_sort_buffer_size;
+@@global.aria_sort_buffer_size
+10
+set session aria_sort_buffer_size=10;
+select @@session.aria_sort_buffer_size;
+@@session.aria_sort_buffer_size
+10
+set global aria_sort_buffer_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_sort_buffer_size'
+set session aria_sort_buffer_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_sort_buffer_size'
+set global aria_sort_buffer_size="foo";
+ERROR 42000: Incorrect argument type to variable 'aria_sort_buffer_size'
+set global aria_sort_buffer_size=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_sort_buffer_size value: '0'
+select @@global.aria_sort_buffer_size;
+@@global.aria_sort_buffer_size
+4
+set session aria_sort_buffer_size=cast(-1 as unsigned int);
+select @@session.aria_sort_buffer_size;
+@@session.aria_sort_buffer_size
+18446744073709551615
+SET @@global.aria_sort_buffer_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_stats_method_basic.result b/mysql-test/suite/sys_vars/r/aria_stats_method_basic.result
new file mode 100644
index 00000000000..4ebddcd36bc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_stats_method_basic.result
@@ -0,0 +1,48 @@
+SET @start_global_value = @@global.aria_stats_method;
+select @@global.aria_stats_method;
+@@global.aria_stats_method
+nulls_unequal
+select @@session.aria_stats_method;
+@@session.aria_stats_method
+nulls_unequal
+show global variables like 'aria_stats_method';
+Variable_name Value
+aria_stats_method nulls_unequal
+show session variables like 'aria_stats_method';
+Variable_name Value
+aria_stats_method nulls_unequal
+select * from information_schema.global_variables where variable_name='aria_stats_method';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_STATS_METHOD nulls_unequal
+select * from information_schema.session_variables where variable_name='aria_stats_method';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_STATS_METHOD nulls_unequal
+set global aria_stats_method=1;
+select @@global.aria_stats_method;
+@@global.aria_stats_method
+nulls_equal
+set session aria_stats_method=1;
+select @@session.aria_stats_method;
+@@session.aria_stats_method
+nulls_equal
+set session aria_stats_method=nulls_unequal;
+select @@session.aria_stats_method;
+@@session.aria_stats_method
+nulls_unequal
+set session aria_stats_method=nulls_equal;
+select @@session.aria_stats_method;
+@@session.aria_stats_method
+nulls_equal
+set session aria_stats_method=nulls_ignored;
+select @@session.aria_stats_method;
+@@session.aria_stats_method
+nulls_ignored
+set session aria_stats_method=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_stats_method'
+set session aria_stats_method=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_stats_method'
+set session aria_stats_method="foo";
+ERROR 42000: Variable 'aria_stats_method' can't be set to the value of 'foo'
+set session aria_stats_method=3;
+ERROR 42000: Variable 'aria_stats_method' can't be set to the value of '3'
+SET @@global.aria_stats_method = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_sync_log_dir_basic.result b/mysql-test/suite/sys_vars/r/aria_sync_log_dir_basic.result
new file mode 100644
index 00000000000..02bcee466ee
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_sync_log_dir_basic.result
@@ -0,0 +1,45 @@
+SET @start_global_value = @@global.aria_sync_log_dir;
+select @@global.aria_sync_log_dir;
+@@global.aria_sync_log_dir
+NEWFILE
+select @@session.aria_sync_log_dir;
+ERROR HY000: Variable 'aria_sync_log_dir' is a GLOBAL variable
+show global variables like 'aria_sync_log_dir';
+Variable_name Value
+aria_sync_log_dir NEWFILE
+show session variables like 'aria_sync_log_dir';
+Variable_name Value
+aria_sync_log_dir NEWFILE
+select * from information_schema.global_variables where variable_name='aria_sync_log_dir';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SYNC_LOG_DIR NEWFILE
+select * from information_schema.session_variables where variable_name='aria_sync_log_dir';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SYNC_LOG_DIR NEWFILE
+set global aria_sync_log_dir=1;
+select @@global.aria_sync_log_dir;
+@@global.aria_sync_log_dir
+NEWFILE
+set session aria_sync_log_dir=1;
+ERROR HY000: Variable 'aria_sync_log_dir' is a GLOBAL variable and should be set with SET GLOBAL
+set global aria_sync_log_dir=never;
+select @@global.aria_sync_log_dir;
+@@global.aria_sync_log_dir
+NEVER
+set global aria_sync_log_dir=newfile;
+select @@global.aria_sync_log_dir;
+@@global.aria_sync_log_dir
+NEWFILE
+set global aria_sync_log_dir=always;
+select @@global.aria_sync_log_dir;
+@@global.aria_sync_log_dir
+ALWAYS
+set global aria_sync_log_dir=1.1;
+ERROR 42000: Incorrect argument type to variable 'aria_sync_log_dir'
+set global aria_sync_log_dir=1e1;
+ERROR 42000: Incorrect argument type to variable 'aria_sync_log_dir'
+set global aria_sync_log_dir="foo";
+ERROR 42000: Variable 'aria_sync_log_dir' can't be set to the value of 'foo'
+set global aria_sync_log_dir=3;
+ERROR 42000: Variable 'aria_sync_log_dir' can't be set to the value of '3'
+SET @@global.aria_sync_log_dir = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_used_for_temp_tables_basic.result b/mysql-test/suite/sys_vars/r/aria_used_for_temp_tables_basic.result
new file mode 100644
index 00000000000..4c2e2e74337
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_used_for_temp_tables_basic.result
@@ -0,0 +1,21 @@
+select @@global.aria_used_for_temp_tables;
+@@global.aria_used_for_temp_tables
+1
+select @@session.aria_used_for_temp_tables;
+ERROR HY000: Variable 'aria_used_for_temp_tables' is a GLOBAL variable
+show global variables like 'aria_used_for_temp_tables';
+Variable_name Value
+aria_used_for_temp_tables ON
+show session variables like 'aria_used_for_temp_tables';
+Variable_name Value
+aria_used_for_temp_tables ON
+select * from information_schema.global_variables where variable_name='aria_used_for_temp_tables';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_USED_FOR_TEMP_TABLES ON
+select * from information_schema.session_variables where variable_name='aria_used_for_temp_tables';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_USED_FOR_TEMP_TABLES ON
+set global aria_used_for_temp_tables=1;
+ERROR HY000: Variable 'aria_used_for_temp_tables' is a read only variable
+set session aria_used_for_temp_tables=1;
+ERROR HY000: Variable 'aria_used_for_temp_tables' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/deadlock_search_depth_long_basic.result b/mysql-test/suite/sys_vars/r/deadlock_search_depth_long_basic.result
new file mode 100644
index 00000000000..7b51fa3614a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/deadlock_search_depth_long_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.deadlock_search_depth_long;
+select @@global.deadlock_search_depth_long;
+@@global.deadlock_search_depth_long
+15
+select @@session.deadlock_search_depth_long;
+@@session.deadlock_search_depth_long
+15
+show global variables like 'deadlock_search_depth_long';
+Variable_name Value
+deadlock_search_depth_long 15
+show session variables like 'deadlock_search_depth_long';
+Variable_name Value
+deadlock_search_depth_long 15
+select * from information_schema.global_variables where variable_name='deadlock_search_depth_long';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_SEARCH_DEPTH_LONG 15
+select * from information_schema.session_variables where variable_name='deadlock_search_depth_long';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_SEARCH_DEPTH_LONG 15
+set global deadlock_search_depth_long=10;
+select @@global.deadlock_search_depth_long;
+@@global.deadlock_search_depth_long
+10
+set session deadlock_search_depth_long=10;
+select @@session.deadlock_search_depth_long;
+@@session.deadlock_search_depth_long
+10
+set global deadlock_search_depth_long=1.1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_long'
+set session deadlock_search_depth_long=1e1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_long'
+set global deadlock_search_depth_long="foo";
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_long'
+set global deadlock_search_depth_long=0;
+select @@global.deadlock_search_depth_long;
+@@global.deadlock_search_depth_long
+0
+set session deadlock_search_depth_long=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect deadlock_search_depth_long value: '18446744073709551615'
+select @@session.deadlock_search_depth_long;
+@@session.deadlock_search_depth_long
+33
+SET @@global.deadlock_search_depth_long = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/deadlock_search_depth_short_basic.result b/mysql-test/suite/sys_vars/r/deadlock_search_depth_short_basic.result
new file mode 100644
index 00000000000..5aab1253c27
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/deadlock_search_depth_short_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.deadlock_search_depth_short;
+select @@global.deadlock_search_depth_short;
+@@global.deadlock_search_depth_short
+4
+select @@session.deadlock_search_depth_short;
+@@session.deadlock_search_depth_short
+4
+show global variables like 'deadlock_search_depth_short';
+Variable_name Value
+deadlock_search_depth_short 4
+show session variables like 'deadlock_search_depth_short';
+Variable_name Value
+deadlock_search_depth_short 4
+select * from information_schema.global_variables where variable_name='deadlock_search_depth_short';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_SEARCH_DEPTH_SHORT 4
+select * from information_schema.session_variables where variable_name='deadlock_search_depth_short';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_SEARCH_DEPTH_SHORT 4
+set global deadlock_search_depth_short=10;
+select @@global.deadlock_search_depth_short;
+@@global.deadlock_search_depth_short
+10
+set session deadlock_search_depth_short=10;
+select @@session.deadlock_search_depth_short;
+@@session.deadlock_search_depth_short
+10
+set global deadlock_search_depth_short=1.1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_short'
+set session deadlock_search_depth_short=1e1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_short'
+set global deadlock_search_depth_short="foo";
+ERROR 42000: Incorrect argument type to variable 'deadlock_search_depth_short'
+set global deadlock_search_depth_short=0;
+select @@global.deadlock_search_depth_short;
+@@global.deadlock_search_depth_short
+0
+set session deadlock_search_depth_short=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect deadlock_search_depth_short value: '18446744073709551615'
+select @@session.deadlock_search_depth_short;
+@@session.deadlock_search_depth_short
+32
+SET @@global.deadlock_search_depth_short = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/deadlock_timeout_long_basic.result b/mysql-test/suite/sys_vars/r/deadlock_timeout_long_basic.result
new file mode 100644
index 00000000000..8f76c6d3344
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/deadlock_timeout_long_basic.result
@@ -0,0 +1,42 @@
+SET @start_global_value = @@global.deadlock_timeout_long;
+select @@global.deadlock_timeout_long;
+@@global.deadlock_timeout_long
+50000000
+select @@session.deadlock_timeout_long;
+@@session.deadlock_timeout_long
+50000000
+show global variables like 'deadlock_timeout_long';
+Variable_name Value
+deadlock_timeout_long 50000000
+show session variables like 'deadlock_timeout_long';
+Variable_name Value
+deadlock_timeout_long 50000000
+select * from information_schema.global_variables where variable_name='deadlock_timeout_long';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_TIMEOUT_LONG 50000000
+select * from information_schema.session_variables where variable_name='deadlock_timeout_long';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_TIMEOUT_LONG 50000000
+set global deadlock_timeout_long=10;
+select @@global.deadlock_timeout_long;
+@@global.deadlock_timeout_long
+10
+set session deadlock_timeout_long=10;
+select @@session.deadlock_timeout_long;
+@@session.deadlock_timeout_long
+10
+set global deadlock_timeout_long=1.1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
+set session deadlock_timeout_long=1e1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
+set global deadlock_timeout_long="foo";
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
+set global deadlock_timeout_long=0;
+select @@global.deadlock_timeout_long;
+@@global.deadlock_timeout_long
+0
+set session deadlock_timeout_long=cast(-1 as unsigned int);
+select @@session.deadlock_timeout_long;
+@@session.deadlock_timeout_long
+18446744073709551615
+SET @@global.deadlock_timeout_long = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/deadlock_timeout_short_basic.result b/mysql-test/suite/sys_vars/r/deadlock_timeout_short_basic.result
new file mode 100644
index 00000000000..f2bf4132bf7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/deadlock_timeout_short_basic.result
@@ -0,0 +1,42 @@
+SET @start_global_value = @@global.deadlock_timeout_short;
+select @@global.deadlock_timeout_short;
+@@global.deadlock_timeout_short
+10000
+select @@session.deadlock_timeout_short;
+@@session.deadlock_timeout_short
+10000
+show global variables like 'deadlock_timeout_short';
+Variable_name Value
+deadlock_timeout_short 10000
+show session variables like 'deadlock_timeout_short';
+Variable_name Value
+deadlock_timeout_short 10000
+select * from information_schema.global_variables where variable_name='deadlock_timeout_short';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_TIMEOUT_SHORT 10000
+select * from information_schema.session_variables where variable_name='deadlock_timeout_short';
+VARIABLE_NAME VARIABLE_VALUE
+DEADLOCK_TIMEOUT_SHORT 10000
+set global deadlock_timeout_short=10;
+select @@global.deadlock_timeout_short;
+@@global.deadlock_timeout_short
+10
+set session deadlock_timeout_short=10;
+select @@session.deadlock_timeout_short;
+@@session.deadlock_timeout_short
+10
+set global deadlock_timeout_short=1.1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_short'
+set session deadlock_timeout_short=1e1;
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_short'
+set global deadlock_timeout_short="foo";
+ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_short'
+set global deadlock_timeout_short=0;
+select @@global.deadlock_timeout_short;
+@@global.deadlock_timeout_short
+0
+set session deadlock_timeout_short=cast(-1 as unsigned int);
+select @@session.deadlock_timeout_short;
+@@session.deadlock_timeout_short
+18446744073709551615
+SET @@global.deadlock_timeout_short = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/debug_crc_break_basic.result b/mysql-test/suite/sys_vars/r/debug_crc_break_basic.result
new file mode 100644
index 00000000000..70f338ad305
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/debug_crc_break_basic.result
@@ -0,0 +1,39 @@
+SET @start_global_value = @@global.debug_crc_break;
+select @@global.debug_crc_break;
+@@global.debug_crc_break
+0
+select @@session.debug_crc_break;
+ERROR HY000: Variable 'debug_crc_break' is a GLOBAL variable
+show global variables like 'debug_crc_break';
+Variable_name Value
+debug_crc_break 0
+show session variables like 'debug_crc_break';
+Variable_name Value
+debug_crc_break 0
+select * from information_schema.global_variables where variable_name='debug_crc_break';
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG_CRC_BREAK 0
+select * from information_schema.session_variables where variable_name='debug_crc_break';
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG_CRC_BREAK 0
+set global debug_crc_break=1;
+select @@global.debug_crc_break;
+@@global.debug_crc_break
+1
+set session debug_crc_break=1;
+ERROR HY000: Variable 'debug_crc_break' is a GLOBAL variable and should be set with SET GLOBAL
+set global debug_crc_break=1.1;
+ERROR 42000: Incorrect argument type to variable 'debug_crc_break'
+set global debug_crc_break=1e1;
+ERROR 42000: Incorrect argument type to variable 'debug_crc_break'
+set global debug_crc_break="foo";
+ERROR 42000: Incorrect argument type to variable 'debug_crc_break'
+set global debug_crc_break=0;
+select @@global.debug_crc_break;
+@@global.debug_crc_break
+0
+set global debug_crc_break=cast(-1 as unsigned int);
+select @@global.debug_crc_break;
+@@global.debug_crc_break
+18446744073709551615
+SET @@global.debug_crc_break = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result b/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result
index c2acc7ab5ac..727e6ca88f2 100644
--- a/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result
+++ b/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result
@@ -1,11 +1,5 @@
SET @start_global_value = @@global.default_storage_engine;
-SELECT @start_global_value;
-@start_global_value
-InnoDB
SET @start_session_value = @@session.default_storage_engine;
-SELECT @start_session_value;
-@start_session_value
-InnoDB
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.default_storage_engine = INNODB;
SET @@global.default_storage_engine = DEFAULT;
@@ -108,10 +102,4 @@ SELECT default_storage_engine = @@session.default_storage_engine;
ERROR 42S22: Unknown column 'default_storage_engine' in 'field list'
SET @@default_storage_engine = @start_global_value;
SET @@global.default_storage_engine = @start_global_value;
-SELECT @@global.default_storage_engine;
-@@global.default_storage_engine
-InnoDB
SET @@session.default_storage_engine = @start_session_value;
-SELECT @@session.default_storage_engine;
-@@session.default_storage_engine
-InnoDB
diff --git a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
index 2b0b57d5b33..6ae736d14e2 100644
--- a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
@@ -9,7 +9,7 @@ SELECT @global_start_value;
select @old_session_opt_switch:=@@session.optimizer_switch,
@old_global_opt_switch:=@@global.optimizer_switch;
@old_session_opt_switch:=@@session.optimizer_switch @old_global_opt_switch:=@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
'#--------------------FN_DYNVARS_028_01------------------------#'
SET @@session.engine_condition_pushdown = 0;
Warnings:
@@ -212,7 +212,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@session.engine_condition_pushdown = TRUE;
Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
@@ -220,7 +220,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@session.engine_condition_pushdown = FALSE;
Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
@@ -228,7 +228,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@global.engine_condition_pushdown = TRUE;
Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
@@ -236,7 +236,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@global.engine_condition_pushdown = FALSE;
Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
@@ -244,31 +244,31 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@session.optimizer_switch = "engine_condition_pushdown=on";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@session.optimizer_switch = "engine_condition_pushdown=off";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@global.optimizer_switch = "engine_condition_pushdown=on";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set @@global.optimizer_switch = "engine_condition_pushdown=off";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
SET @@session.engine_condition_pushdown = @session_start_value;
Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
@@ -287,4 +287,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
diff --git a/mysql-test/suite/sys_vars/r/extra_max_connections_basic.result b/mysql-test/suite/sys_vars/r/extra_max_connections_basic.result
new file mode 100644
index 00000000000..353271cabb2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/extra_max_connections_basic.result
@@ -0,0 +1,43 @@
+SET @start_global_value = @@global.extra_max_connections;
+select @@global.extra_max_connections;
+@@global.extra_max_connections
+1
+select @@session.extra_max_connections;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable
+show global variables like 'extra_max_connections';
+Variable_name Value
+extra_max_connections 1
+show session variables like 'extra_max_connections';
+Variable_name Value
+extra_max_connections 1
+select * from information_schema.global_variables where variable_name='extra_max_connections';
+VARIABLE_NAME VARIABLE_VALUE
+EXTRA_MAX_CONNECTIONS 1
+select * from information_schema.session_variables where variable_name='extra_max_connections';
+VARIABLE_NAME VARIABLE_VALUE
+EXTRA_MAX_CONNECTIONS 1
+set global extra_max_connections=1;
+select @@global.extra_max_connections;
+@@global.extra_max_connections
+1
+set session extra_max_connections=1;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+set global extra_max_connections=1.1;
+ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
+set global extra_max_connections=1e1;
+ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
+set global extra_max_connections="foo";
+ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
+set global extra_max_connections=0;
+Warnings:
+Warning 1292 Truncated incorrect extra_max_connections value: '0'
+select @@global.extra_max_connections;
+@@global.extra_max_connections
+1
+set global extra_max_connections=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect extra_max_connections value: '18446744073709551615'
+select @@global.extra_max_connections;
+@@global.extra_max_connections
+100000
+SET @@global.extra_max_connections = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/extra_port_basic.result b/mysql-test/suite/sys_vars/r/extra_port_basic.result
new file mode 100644
index 00000000000..cbf6dbcb4f9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/extra_port_basic.result
@@ -0,0 +1,21 @@
+select @@global.extra_port;
+@@global.extra_port
+0
+select @@session.extra_port;
+ERROR HY000: Variable 'extra_port' is a GLOBAL variable
+show global variables like 'extra_port';
+Variable_name Value
+extra_port 0
+show session variables like 'extra_port';
+Variable_name Value
+extra_port 0
+select * from information_schema.global_variables where variable_name='extra_port';
+VARIABLE_NAME VARIABLE_VALUE
+EXTRA_PORT 0
+select * from information_schema.session_variables where variable_name='extra_port';
+VARIABLE_NAME VARIABLE_VALUE
+EXTRA_PORT 0
+set global extra_port=1;
+ERROR HY000: Variable 'extra_port' is a read only variable
+set session extra_port=1;
+ERROR HY000: Variable 'extra_port' is a read only variable
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
new file mode 100644
index 00000000000..fecc886d460
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/join_cache_level_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.join_cache_level;
+select @@global.join_cache_level;
+@@global.join_cache_level
+1
+select @@session.join_cache_level;
+@@session.join_cache_level
+1
+show global variables like 'join_cache_level';
+Variable_name Value
+join_cache_level 1
+show session variables like 'join_cache_level';
+Variable_name Value
+join_cache_level 1
+select * from information_schema.global_variables where variable_name='join_cache_level';
+VARIABLE_NAME VARIABLE_VALUE
+JOIN_CACHE_LEVEL 1
+select * from information_schema.session_variables where variable_name='join_cache_level';
+VARIABLE_NAME VARIABLE_VALUE
+JOIN_CACHE_LEVEL 1
+set global join_cache_level=4;
+select @@global.join_cache_level;
+@@global.join_cache_level
+4
+set session join_cache_level=4;
+select @@session.join_cache_level;
+@@session.join_cache_level
+4
+set global join_cache_level=1.1;
+ERROR 42000: Incorrect argument type to variable 'join_cache_level'
+set session join_cache_level=1e1;
+ERROR 42000: Incorrect argument type to variable 'join_cache_level'
+set global join_cache_level="foo";
+ERROR 42000: Incorrect argument type to variable 'join_cache_level'
+set global join_cache_level=0;
+select @@global.join_cache_level;
+@@global.join_cache_level
+0
+set session join_cache_level=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect join_cache_level value: '18446744073709551615'
+select @@session.join_cache_level;
+@@session.join_cache_level
+8
+SET @@global.join_cache_level = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result
index 4612b5c7324..89aef2a3703 100644
--- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result
@@ -3,7 +3,7 @@ SET @start_value = @@global.key_buffer_size;
SET @@global.key_buffer_size = DEFAULT;
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
-8388608
+134217728
'#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size = @start_value;
diff --git a/mysql-test/suite/sys_vars/r/key_cache_segments_basic.result b/mysql-test/suite/sys_vars/r/key_cache_segments_basic.result
new file mode 100644
index 00000000000..55590b270e9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/key_cache_segments_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.key_cache_segments;
+select @@global.key_cache_segments;
+@@global.key_cache_segments
+0
+select @@session.key_cache_segments;
+ERROR HY000: Variable 'key_cache_segments' is a GLOBAL variable
+show global variables like 'key_cache_segments';
+Variable_name Value
+key_cache_segments 0
+show session variables like 'key_cache_segments';
+Variable_name Value
+key_cache_segments 0
+select * from information_schema.global_variables where variable_name='key_cache_segments';
+VARIABLE_NAME VARIABLE_VALUE
+KEY_CACHE_SEGMENTS 0
+select * from information_schema.session_variables where variable_name='key_cache_segments';
+VARIABLE_NAME VARIABLE_VALUE
+KEY_CACHE_SEGMENTS 0
+set global key_cache_segments=1;
+select @@global.key_cache_segments;
+@@global.key_cache_segments
+1
+set session key_cache_segments=1;
+ERROR HY000: Variable 'key_cache_segments' is a GLOBAL variable and should be set with SET GLOBAL
+set global key_cache_segments=1.1;
+ERROR 42000: Incorrect argument type to variable 'key_cache_segments'
+set global key_cache_segments=1e1;
+ERROR 42000: Incorrect argument type to variable 'key_cache_segments'
+set global key_cache_segments="foo";
+ERROR 42000: Incorrect argument type to variable 'key_cache_segments'
+set global key_cache_segments=0;
+select @@global.key_cache_segments;
+@@global.key_cache_segments
+0
+set global key_cache_segments=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect key_cache_segments value: '18446744073709551615'
+select @@global.key_cache_segments;
+@@global.key_cache_segments
+64
+SET @@global.key_cache_segments = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/log_slow_filter_basic.result b/mysql-test/suite/sys_vars/r/log_slow_filter_basic.result
new file mode 100644
index 00000000000..5b6eccf2185
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_slow_filter_basic.result
@@ -0,0 +1,96 @@
+SET @start_global_value = @@global.log_slow_filter;
+select @@global.log_slow_filter;
+@@global.log_slow_filter
+admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+show global variables like 'log_slow_filter';
+Variable_name Value
+log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+show session variables like 'log_slow_filter';
+Variable_name Value
+log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+select * from information_schema.global_variables where variable_name='log_slow_filter';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_FILTER admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+select * from information_schema.session_variables where variable_name='log_slow_filter';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_FILTER admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+set global log_slow_filter=1;
+select @@global.log_slow_filter;
+@@global.log_slow_filter
+admin
+set session log_slow_filter=1;
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin
+set session log_slow_filter=1;
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin
+set session log_slow_filter=2;
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+filesort
+set session log_slow_filter=5;
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin,filesort_on_disk
+set session log_slow_filter='admin';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin
+set session log_slow_filter='filesort';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+filesort
+set session log_slow_filter='filesort_on_disk';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+filesort_on_disk
+set session log_slow_filter='full_join';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+full_join
+set session log_slow_filter='full_scan';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+full_scan
+set session log_slow_filter='query_cache';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+query_cache
+set session log_slow_filter='query_cache_miss';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+query_cache_miss
+set session log_slow_filter='tmp_table';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+tmp_table
+set session log_slow_filter='tmp_table_on_disk';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+tmp_table_on_disk
+set session log_slow_filter='filesort,query_cache';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+filesort,query_cache
+set session log_slow_filter='admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
+set session log_slow_filter='';
+select @@session.log_slow_filter;
+@@session.log_slow_filter
+
+set session log_slow_filter=1.1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_filter'
+set session log_slow_filter=1e1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_filter'
+set session log_slow_filter="foo";
+ERROR 42000: Variable 'log_slow_filter' can't be set to the value of 'foo'
+set session log_slow_filter=1024;
+ERROR 42000: Variable 'log_slow_filter' can't be set to the value of '1024'
+SET @@global.log_slow_filter = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/log_slow_rate_limit_basic.result b/mysql-test/suite/sys_vars/r/log_slow_rate_limit_basic.result
new file mode 100644
index 00000000000..ec47f5e0a30
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_slow_rate_limit_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.log_slow_rate_limit;
+select @@global.log_slow_rate_limit;
+@@global.log_slow_rate_limit
+1
+select @@session.log_slow_rate_limit;
+@@session.log_slow_rate_limit
+1
+show global variables like 'log_slow_rate_limit';
+Variable_name Value
+log_slow_rate_limit 1
+show session variables like 'log_slow_rate_limit';
+Variable_name Value
+log_slow_rate_limit 1
+select * from information_schema.global_variables where variable_name='log_slow_rate_limit';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_RATE_LIMIT 1
+select * from information_schema.session_variables where variable_name='log_slow_rate_limit';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_RATE_LIMIT 1
+set global log_slow_rate_limit=10;
+select @@global.log_slow_rate_limit;
+@@global.log_slow_rate_limit
+10
+set session log_slow_rate_limit=10;
+select @@session.log_slow_rate_limit;
+@@session.log_slow_rate_limit
+10
+set global log_slow_rate_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
+set session log_slow_rate_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
+set global log_slow_rate_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
+set global log_slow_rate_limit=0;
+Warnings:
+Warning 1292 Truncated incorrect log_slow_rate_limit value: '0'
+select @@global.log_slow_rate_limit;
+@@global.log_slow_rate_limit
+1
+set session log_slow_rate_limit=cast(-1 as unsigned int);
+select @@session.log_slow_rate_limit;
+@@session.log_slow_rate_limit
+18446744073709551615
+SET @@global.log_slow_rate_limit = @start_global_value;
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
new file mode 100644
index 00000000000..24b805d4d9c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_slow_verbosity_basic.result
@@ -0,0 +1,64 @@
+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
+
+show global variables like 'log_slow_verbosity';
+Variable_name Value
+log_slow_verbosity
+show session variables like 'log_slow_verbosity';
+Variable_name Value
+log_slow_verbosity
+select * from information_schema.global_variables where variable_name='log_slow_verbosity';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_VERBOSITY
+select * from information_schema.session_variables where variable_name='log_slow_verbosity';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLOW_VERBOSITY
+set global log_slow_verbosity=1;
+select @@global.log_slow_verbosity;
+@@global.log_slow_verbosity
+innodb
+set session log_slow_verbosity=1;
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+innodb
+set session log_slow_verbosity=1;
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+innodb
+set session log_slow_verbosity=2;
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+query_plan
+set session log_slow_verbosity=3;
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+innodb,query_plan
+set session log_slow_verbosity='innodb';
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+innodb
+set session log_slow_verbosity='query_plan';
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+query_plan
+set session log_slow_verbosity='innodb,query_plan';
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+innodb,query_plan
+set session log_slow_verbosity='';
+select @@session.log_slow_verbosity;
+@@session.log_slow_verbosity
+
+set session log_slow_verbosity=1.1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_verbosity'
+set session log_slow_verbosity=1e1;
+ERROR 42000: Incorrect argument type to variable 'log_slow_verbosity'
+set session log_slow_verbosity="foo";
+ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of 'foo'
+set session log_slow_verbosity=4;
+ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of '4'
+SET @@global.log_slow_verbosity = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_block_size_basic.result b/mysql-test/suite/sys_vars/r/maria_block_size_basic.result
new file mode 100644
index 00000000000..a0842541534
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_block_size_basic.result
@@ -0,0 +1,25 @@
+select @@global.maria_block_size, @@global.aria_block_size;
+@@global.maria_block_size @@global.aria_block_size
+8192 8192
+select @@session.maria_block_size, @@session.aria_block_size;
+ERROR HY000: Variable 'maria_block_size' is a GLOBAL variable
+show global variables like '%aria_block_size';
+Variable_name Value
+aria_block_size 8192
+maria_block_size 8192
+show session variables like '%aria_block_size';
+Variable_name Value
+aria_block_size 8192
+maria_block_size 8192
+select * from information_schema.global_variables where variable_name like '%aria_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_BLOCK_SIZE 8192
+MARIA_BLOCK_SIZE 8192
+select * from information_schema.session_variables where variable_name like '%aria_block_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_BLOCK_SIZE 8192
+MARIA_BLOCK_SIZE 8192
+set global maria_block_size=1;
+ERROR HY000: Variable 'maria_block_size' is a read only variable
+set session maria_block_size=1;
+ERROR HY000: Variable 'maria_block_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/maria_checkpoint_interval_basic.result b/mysql-test/suite/sys_vars/r/maria_checkpoint_interval_basic.result
new file mode 100644
index 00000000000..0a60303c7d5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_checkpoint_interval_basic.result
@@ -0,0 +1,43 @@
+SET @start_global_value = @@global.maria_checkpoint_interval;
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+@@global.maria_checkpoint_interval @@global.aria_checkpoint_interval
+30 30
+select @@session.maria_checkpoint_interval, @@session.aria_checkpoint_interval;
+ERROR HY000: Variable 'maria_checkpoint_interval' is a GLOBAL variable
+show global variables like '%aria_checkpoint_interval';
+Variable_name Value
+aria_checkpoint_interval 30
+maria_checkpoint_interval 30
+show session variables like '%aria_checkpoint_interval';
+Variable_name Value
+aria_checkpoint_interval 30
+maria_checkpoint_interval 30
+select * from information_schema.global_variables where variable_name='maria_checkpoint_interval';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_CHECKPOINT_INTERVAL 30
+select * from information_schema.session_variables where variable_name='maria_checkpoint_interval';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_CHECKPOINT_INTERVAL 30
+set global maria_checkpoint_interval=1;
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+@@global.maria_checkpoint_interval @@global.aria_checkpoint_interval
+1 1
+set session maria_checkpoint_interval=1;
+ERROR HY000: Variable 'maria_checkpoint_interval' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_checkpoint_interval=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_checkpoint_interval'
+set global maria_checkpoint_interval=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_checkpoint_interval'
+set global maria_checkpoint_interval="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_checkpoint_interval'
+set global maria_checkpoint_interval=0;
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+@@global.maria_checkpoint_interval @@global.aria_checkpoint_interval
+0 0
+set global maria_checkpoint_interval=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_checkpoint_interval value: '18446744073709551615'
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+@@global.maria_checkpoint_interval @@global.aria_checkpoint_interval
+4294967295 4294967295
+SET @@global.maria_checkpoint_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_force_start_after_recovery_failures_basic.result b/mysql-test/suite/sys_vars/r/maria_force_start_after_recovery_failures_basic.result
new file mode 100644
index 00000000000..f4bbd134df3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_force_start_after_recovery_failures_basic.result
@@ -0,0 +1,23 @@
+select @@global.maria_force_start_after_recovery_failures, @@global.aria_force_start_after_recovery_failures;
+@@global.maria_force_start_after_recovery_failures @@global.aria_force_start_after_recovery_failures
+0 0
+select @@session.maria_force_start_after_recovery_failures, @@session.aria_force_start_after_recovery_failures;
+ERROR HY000: Variable 'maria_force_start_after_recovery_failures' is a GLOBAL variable
+show global variables like '%aria_force_start_after_recovery_failures';
+Variable_name Value
+aria_force_start_after_recovery_failures 0
+maria_force_start_after_recovery_failures 0
+show session variables like '%aria_force_start_after_recovery_failures';
+Variable_name Value
+aria_force_start_after_recovery_failures 0
+maria_force_start_after_recovery_failures 0
+select * from information_schema.global_variables where variable_name='maria_force_start_after_recovery_failures';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_FORCE_START_AFTER_RECOVERY_FAILURES 0
+select * from information_schema.session_variables where variable_name='maria_force_start_after_recovery_failures';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_FORCE_START_AFTER_RECOVERY_FAILURES 0
+set global maria_force_start_after_recovery_failures=1;
+ERROR HY000: Variable 'maria_force_start_after_recovery_failures' is a read only variable
+set session maria_force_start_after_recovery_failures=1;
+ERROR HY000: Variable 'maria_force_start_after_recovery_failures' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/maria_group_commit_basic.result b/mysql-test/suite/sys_vars/r/maria_group_commit_basic.result
new file mode 100644
index 00000000000..7e97d379403
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_group_commit_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.maria_group_commit;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+@@global.maria_group_commit @@global.aria_group_commit
+none none
+select @@session.maria_group_commit, @@session.aria_group_commit;
+ERROR HY000: Variable 'maria_group_commit' is a GLOBAL variable
+show global variables like '%aria_group_commit';
+Variable_name Value
+aria_group_commit none
+maria_group_commit none
+show session variables like '%aria_group_commit';
+Variable_name Value
+aria_group_commit none
+maria_group_commit none
+select * from information_schema.global_variables where variable_name='maria_group_commit';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_GROUP_COMMIT none
+select * from information_schema.session_variables where variable_name='maria_group_commit';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_GROUP_COMMIT none
+set global maria_group_commit=1;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+@@global.maria_group_commit @@global.aria_group_commit
+hard hard
+set session maria_group_commit=1;
+ERROR HY000: Variable 'maria_group_commit' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_group_commit=none;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+@@global.maria_group_commit @@global.aria_group_commit
+none none
+set global maria_group_commit=hard;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+@@global.maria_group_commit @@global.aria_group_commit
+hard hard
+set global maria_group_commit=soft;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+@@global.maria_group_commit @@global.aria_group_commit
+soft soft
+set global maria_group_commit=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_group_commit'
+set global maria_group_commit=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_group_commit'
+set global maria_group_commit="foo";
+ERROR 42000: Variable 'maria_group_commit' can't be set to the value of 'foo'
+set global maria_group_commit=3;
+ERROR 42000: Variable 'maria_group_commit' can't be set to the value of '3'
+SET @@global.maria_group_commit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_group_commit_interval_basic.result b/mysql-test/suite/sys_vars/r/maria_group_commit_interval_basic.result
new file mode 100644
index 00000000000..23ae3ac7e82
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_group_commit_interval_basic.result
@@ -0,0 +1,43 @@
+SET @start_global_value = @@global.maria_group_commit_interval;
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+@@global.maria_group_commit_interval @@global.aria_group_commit_interval
+0 0
+select @@session.maria_group_commit_interval, @@session.aria_group_commit_interval;
+ERROR HY000: Variable 'maria_group_commit_interval' is a GLOBAL variable
+show global variables like '%aria_group_commit_interval';
+Variable_name Value
+aria_group_commit_interval 0
+maria_group_commit_interval 0
+show session variables like '%aria_group_commit_interval';
+Variable_name Value
+aria_group_commit_interval 0
+maria_group_commit_interval 0
+select * from information_schema.global_variables where variable_name='maria_group_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_GROUP_COMMIT_INTERVAL 0
+select * from information_schema.session_variables where variable_name='maria_group_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_GROUP_COMMIT_INTERVAL 0
+set global maria_group_commit_interval=1;
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+@@global.maria_group_commit_interval @@global.aria_group_commit_interval
+1 1
+set session maria_group_commit_interval=1;
+ERROR HY000: Variable 'maria_group_commit_interval' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_group_commit_interval=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_group_commit_interval'
+set global maria_group_commit_interval=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_group_commit_interval'
+set global maria_group_commit_interval="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_group_commit_interval'
+set global maria_group_commit_interval=0;
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+@@global.maria_group_commit_interval @@global.aria_group_commit_interval
+0 0
+set global maria_group_commit_interval=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_group_commit_interval value: '18446744073709551615'
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+@@global.maria_group_commit_interval @@global.aria_group_commit_interval
+4294967295 4294967295
+SET @@global.maria_group_commit_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_log_file_size_basic.result b/mysql-test/suite/sys_vars/r/maria_log_file_size_basic.result
new file mode 100644
index 00000000000..33945ab1ae7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_log_file_size_basic.result
@@ -0,0 +1,57 @@
+SET @start_global_value = @@global.maria_log_file_size;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+1073741824 1073741824
+select @@session.maria_log_file_size, @@session.aria_log_file_size;
+ERROR HY000: Variable 'maria_log_file_size' is a GLOBAL variable
+show global variables like '%aria_log_file_size';
+Variable_name Value
+aria_log_file_size 1073741824
+maria_log_file_size 1073741824
+show session variables like '%aria_log_file_size';
+Variable_name Value
+aria_log_file_size 1073741824
+maria_log_file_size 1073741824
+select * from information_schema.global_variables where variable_name like '%aria_log_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_FILE_SIZE 1073741824
+MARIA_LOG_FILE_SIZE 1073741824
+select * from information_schema.session_variables where variable_name like '%aria_log_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_FILE_SIZE 1073741824
+MARIA_LOG_FILE_SIZE 1073741824
+set global maria_log_file_size=1024*1024*10;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+10485760 10485760
+set session maria_log_file_size=1;
+ERROR HY000: Variable 'maria_log_file_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_log_file_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_log_file_size'
+set global maria_log_file_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_log_file_size'
+set global maria_log_file_size="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_log_file_size'
+set global maria_log_file_size=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '1'
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+8388608 8388608
+set global maria_log_file_size=@@global.maria_log_file_size + 8192 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '8396799'
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+8388608 8388608
+set global maria_log_file_size=@@global.maria_log_file_size + 8192;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+8396800 8396800
+set global maria_log_file_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_log_file_size value: '18446744073709551615'
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+@@global.maria_log_file_size @@global.aria_log_file_size
+4294959104 4294959104
+SET @@global.maria_log_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_log_purge_type_basic.result b/mysql-test/suite/sys_vars/r/maria_log_purge_type_basic.result
new file mode 100644
index 00000000000..519c41ae46d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_log_purge_type_basic.result
@@ -0,0 +1,49 @@
+SET @start_global_value = @@global.maria_log_purge_type;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+@@global.maria_log_purge_type @@global.aria_log_purge_type
+immediate immediate
+select @@session.maria_log_purge_type, @@session.aria_log_purge_type;
+ERROR HY000: Variable 'maria_log_purge_type' is a GLOBAL variable
+show global variables like '%aria_log_purge_type';
+Variable_name Value
+aria_log_purge_type immediate
+maria_log_purge_type immediate
+show session variables like '%aria_log_purge_type';
+Variable_name Value
+aria_log_purge_type immediate
+maria_log_purge_type immediate
+select * from information_schema.global_variables where variable_name like '%aria_log_purge_type';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_PURGE_TYPE immediate
+MARIA_LOG_PURGE_TYPE immediate
+select * from information_schema.session_variables where variable_name like '%aria_log_purge_type';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_LOG_PURGE_TYPE immediate
+MARIA_LOG_PURGE_TYPE immediate
+set global maria_log_purge_type=1;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+@@global.maria_log_purge_type @@global.aria_log_purge_type
+external external
+set session maria_log_purge_type=1;
+ERROR HY000: Variable 'maria_log_purge_type' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_log_purge_type=immediate;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+@@global.maria_log_purge_type @@global.aria_log_purge_type
+immediate immediate
+set global maria_log_purge_type=external;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+@@global.maria_log_purge_type @@global.aria_log_purge_type
+external external
+set global maria_log_purge_type=at_flush;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+@@global.maria_log_purge_type @@global.aria_log_purge_type
+at_flush at_flush
+set global maria_log_purge_type=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_log_purge_type'
+set global maria_log_purge_type=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_log_purge_type'
+set global maria_log_purge_type="foo";
+ERROR 42000: Variable 'maria_log_purge_type' can't be set to the value of 'foo'
+set global maria_log_purge_type=3;
+ERROR 42000: Variable 'maria_log_purge_type' can't be set to the value of '3'
+SET @@global.maria_log_purge_type = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_max_sort_file_size_basic.result b/mysql-test/suite/sys_vars/r/maria_max_sort_file_size_basic.result
new file mode 100644
index 00000000000..1e11f8ee5a9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_max_sort_file_size_basic.result
@@ -0,0 +1,57 @@
+SET @start_global_value = @@global.maria_max_sort_file_size;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+9223372036853727232 9223372036853727232
+select @@session.maria_max_sort_file_size, @@session.aria_max_sort_file_size;
+ERROR HY000: Variable 'maria_max_sort_file_size' is a GLOBAL variable
+show global variables like '%aria_max_sort_file_size';
+Variable_name Value
+aria_max_sort_file_size 9223372036853727232
+maria_max_sort_file_size 9223372036853727232
+show session variables like '%aria_max_sort_file_size';
+Variable_name Value
+aria_max_sort_file_size 9223372036853727232
+maria_max_sort_file_size 9223372036853727232
+select * from information_schema.global_variables where variable_name like '%aria_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+MARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+select * from information_schema.session_variables where variable_name like '%aria_max_sort_file_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+MARIA_MAX_SORT_FILE_SIZE 9223372036853727232
+set global maria_max_sort_file_size=1024*1024*10;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+10485760 10485760
+set session maria_max_sort_file_size=1;
+ERROR HY000: Variable 'maria_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_max_sort_file_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_max_sort_file_size'
+set global maria_max_sort_file_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_max_sort_file_size'
+set global maria_max_sort_file_size="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_max_sort_file_size'
+set global maria_max_sort_file_size=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '1'
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+0 0
+set global maria_max_sort_file_size=@@global.maria_max_sort_file_size + 1024*1024 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '1048575'
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+0 0
+set global maria_max_sort_file_size=@@global.maria_max_sort_file_size + 1024*1024;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+1048576 1048576
+set global maria_max_sort_file_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_max_sort_file_size value: '18446744073709551615'
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+@@global.maria_max_sort_file_size @@global.aria_max_sort_file_size
+9223372036853727232 9223372036853727232
+SET @@global.maria_max_sort_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_page_checksum_basic.result b/mysql-test/suite/sys_vars/r/maria_page_checksum_basic.result
new file mode 100644
index 00000000000..01cb1ea9a9d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_page_checksum_basic.result
@@ -0,0 +1,43 @@
+SET @start_global_value = @@global.maria_page_checksum;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+@@global.maria_page_checksum @@global.aria_page_checksum
+1 1
+select @@session.maria_page_checksum, @@session.aria_page_checksum;
+ERROR HY000: Variable 'maria_page_checksum' is a GLOBAL variable
+show global variables like '%aria_page_checksum';
+Variable_name Value
+aria_page_checksum ON
+maria_page_checksum ON
+show session variables like '%aria_page_checksum';
+Variable_name Value
+aria_page_checksum ON
+maria_page_checksum ON
+select * from information_schema.global_variables where variable_name like '%aria_page_checksum';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_PAGE_CHECKSUM ON
+ARIA_PAGE_CHECKSUM ON
+select * from information_schema.session_variables where variable_name like '%aria_page_checksum';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_PAGE_CHECKSUM ON
+ARIA_PAGE_CHECKSUM ON
+set global maria_page_checksum=ON;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+@@global.maria_page_checksum @@global.aria_page_checksum
+1 1
+set global maria_page_checksum=OFF;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+@@global.maria_page_checksum @@global.aria_page_checksum
+0 0
+set global maria_page_checksum=1;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+@@global.maria_page_checksum @@global.aria_page_checksum
+1 1
+set session maria_page_checksum=1;
+ERROR HY000: Variable 'maria_page_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_page_checksum=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_page_checksum'
+set global maria_page_checksum=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_page_checksum'
+set global maria_page_checksum="foo";
+ERROR 42000: Variable 'maria_page_checksum' can't be set to the value of 'foo'
+SET @@global.maria_page_checksum = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_pagecache_age_threshold_basic.result b/mysql-test/suite/sys_vars/r/maria_pagecache_age_threshold_basic.result
new file mode 100644
index 00000000000..c00bbfb1adf
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_pagecache_age_threshold_basic.result
@@ -0,0 +1,57 @@
+SET @start_global_value = @@global.maria_pagecache_age_threshold;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+300 300
+select @@session.maria_pagecache_age_threshold, @@session.aria_pagecache_age_threshold;
+ERROR HY000: Variable 'maria_pagecache_age_threshold' is a GLOBAL variable
+show global variables like '%aria_pagecache_age_threshold';
+Variable_name Value
+aria_pagecache_age_threshold 300
+maria_pagecache_age_threshold 300
+show session variables like '%aria_pagecache_age_threshold';
+Variable_name Value
+aria_pagecache_age_threshold 300
+maria_pagecache_age_threshold 300
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_age_threshold';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_AGE_THRESHOLD 300
+MARIA_PAGECACHE_AGE_THRESHOLD 300
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_age_threshold';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_AGE_THRESHOLD 300
+MARIA_PAGECACHE_AGE_THRESHOLD 300
+set global maria_pagecache_age_threshold=200;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+200 200
+set session maria_pagecache_age_threshold=1;
+ERROR HY000: Variable 'maria_pagecache_age_threshold' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_pagecache_age_threshold=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_age_threshold'
+set global maria_pagecache_age_threshold=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_age_threshold'
+set global maria_pagecache_age_threshold="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_age_threshold'
+set global maria_pagecache_age_threshold=1;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '1'
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+100 100
+set global maria_pagecache_age_threshold=@@global.maria_pagecache_age_threshold + 100 - 1;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '199'
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+100 100
+set global maria_pagecache_age_threshold=@@global.maria_pagecache_age_threshold + 100;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+200 200
+set global maria_pagecache_age_threshold=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_age_threshold value: '18446744073709551615'
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+@@global.maria_pagecache_age_threshold @@global.aria_pagecache_age_threshold
+18446744073709551600 18446744073709551600
+SET @@global.maria_pagecache_age_threshold = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_pagecache_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/maria_pagecache_buffer_size_basic.result
new file mode 100644
index 00000000000..a2b98f6d536
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_pagecache_buffer_size_basic.result
@@ -0,0 +1,25 @@
+select @@global.maria_pagecache_buffer_size, @@global.aria_pagecache_buffer_size;
+@@global.maria_pagecache_buffer_size @@global.aria_pagecache_buffer_size
+134217728 134217728
+select @@session.maria_pagecache_buffer_size, @@session.aria_pagecache_buffer_size;
+ERROR HY000: Variable 'maria_pagecache_buffer_size' is a GLOBAL variable
+show global variables like '%aria_pagecache_buffer_size';
+Variable_name Value
+aria_pagecache_buffer_size 134217728
+maria_pagecache_buffer_size 134217728
+show session variables like '%aria_pagecache_buffer_size';
+Variable_name Value
+aria_pagecache_buffer_size 134217728
+maria_pagecache_buffer_size 134217728
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_BUFFER_SIZE 134217728
+MARIA_PAGECACHE_BUFFER_SIZE 134217728
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_BUFFER_SIZE 134217728
+MARIA_PAGECACHE_BUFFER_SIZE 134217728
+set global maria_pagecache_buffer_size=1;
+ERROR HY000: Variable 'maria_pagecache_buffer_size' is a read only variable
+set session maria_pagecache_buffer_size=1;
+ERROR HY000: Variable 'maria_pagecache_buffer_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/maria_pagecache_division_limit_basic.result b/mysql-test/suite/sys_vars/r/maria_pagecache_division_limit_basic.result
new file mode 100644
index 00000000000..46fbb93e81b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_pagecache_division_limit_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.maria_pagecache_division_limit;
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+@@global.maria_pagecache_division_limit @@global.aria_pagecache_division_limit
+100 100
+select @@session.maria_pagecache_division_limit, @@session.aria_pagecache_division_limit;
+ERROR HY000: Variable 'maria_pagecache_division_limit' is a GLOBAL variable
+show global variables like '%aria_pagecache_division_limit';
+Variable_name Value
+aria_pagecache_division_limit 100
+maria_pagecache_division_limit 100
+show session variables like '%aria_pagecache_division_limit';
+Variable_name Value
+aria_pagecache_division_limit 100
+maria_pagecache_division_limit 100
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_division_limit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_DIVISION_LIMIT 100
+MARIA_PAGECACHE_DIVISION_LIMIT 100
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_division_limit';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_PAGECACHE_DIVISION_LIMIT 100
+MARIA_PAGECACHE_DIVISION_LIMIT 100
+set global maria_pagecache_division_limit=20;
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+@@global.maria_pagecache_division_limit @@global.aria_pagecache_division_limit
+20 20
+set session maria_pagecache_division_limit=1;
+ERROR HY000: Variable 'maria_pagecache_division_limit' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_pagecache_division_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_division_limit'
+set global maria_pagecache_division_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_division_limit'
+set global maria_pagecache_division_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_pagecache_division_limit'
+set global maria_pagecache_division_limit=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_division_limit value: '0'
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+@@global.maria_pagecache_division_limit @@global.aria_pagecache_division_limit
+1 1
+set global maria_pagecache_division_limit=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect aria_pagecache_division_limit value: '18446744073709551615'
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+@@global.maria_pagecache_division_limit @@global.aria_pagecache_division_limit
+100 100
+SET @@global.maria_pagecache_division_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_recover_basic.result b/mysql-test/suite/sys_vars/r/maria_recover_basic.result
new file mode 100644
index 00000000000..53a215d69c3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_recover_basic.result
@@ -0,0 +1,57 @@
+SET @start_global_value = @@global.maria_recover;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+NORMAL NORMAL
+select @@session.maria_recover, @@session.aria_recover;
+ERROR HY000: Variable 'maria_recover' is a GLOBAL variable
+show global variables like '%aria_recover';
+Variable_name Value
+aria_recover NORMAL
+maria_recover NORMAL
+show session variables like '%aria_recover';
+Variable_name Value
+aria_recover NORMAL
+maria_recover NORMAL
+select * from information_schema.global_variables where variable_name like '%aria_recover';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_RECOVER NORMAL
+ARIA_RECOVER NORMAL
+select * from information_schema.session_variables where variable_name like '%aria_recover';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_RECOVER NORMAL
+ARIA_RECOVER NORMAL
+set global maria_recover=1;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+NORMAL NORMAL
+set session maria_recover=1;
+ERROR HY000: Variable 'maria_recover' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_recover=normal;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+NORMAL NORMAL
+set global maria_recover=backup;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+BACKUP BACKUP
+set global maria_recover='force';
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+FORCE FORCE
+set global maria_recover=`quick`;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+QUICK QUICK
+set global maria_recover=off;
+select @@global.maria_recover, @@global.aria_recover;
+@@global.maria_recover @@global.aria_recover
+OFF OFF
+set global maria_recover=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_recover'
+set global maria_recover=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_recover'
+set global maria_recover="foo";
+ERROR 42000: Variable 'maria_recover' can't be set to the value of 'foo'
+set global maria_recover=5;
+ERROR 42000: Variable 'maria_recover' can't be set to the value of '5'
+SET @@global.maria_recover = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_repair_threads_basic.result b/mysql-test/suite/sys_vars/r/maria_repair_threads_basic.result
new file mode 100644
index 00000000000..0e0610953c9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_repair_threads_basic.result
@@ -0,0 +1,48 @@
+SET @start_global_value = @@global.maria_repair_threads;
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+@@global.maria_repair_threads @@global.aria_repair_threads
+1 1
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+@@session.maria_repair_threads @@session.aria_repair_threads
+1 1
+show global variables like '%aria_repair_threads';
+Variable_name Value
+aria_repair_threads 1
+maria_repair_threads 1
+show session variables like '%aria_repair_threads';
+Variable_name Value
+aria_repair_threads 1
+maria_repair_threads 1
+select * from information_schema.global_variables where variable_name like '%aria_repair_threads';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_REPAIR_THREADS 1
+ARIA_REPAIR_THREADS 1
+select * from information_schema.session_variables where variable_name like '%aria_repair_threads';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_REPAIR_THREADS 1
+ARIA_REPAIR_THREADS 1
+set global maria_repair_threads=10;
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+@@global.maria_repair_threads @@global.aria_repair_threads
+10 10
+set session maria_repair_threads=10;
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+@@session.maria_repair_threads @@session.aria_repair_threads
+10 10
+set global maria_repair_threads=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_repair_threads'
+set session maria_repair_threads=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_repair_threads'
+set global maria_repair_threads="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_repair_threads'
+set global maria_repair_threads=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_repair_threads value: '0'
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+@@global.maria_repair_threads @@global.aria_repair_threads
+1 1
+set session maria_repair_threads=cast(-1 as unsigned int);
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+@@session.maria_repair_threads @@session.aria_repair_threads
+18446744073709551615 18446744073709551615
+SET @@global.maria_repair_threads = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_sort_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/maria_sort_buffer_size_basic.result
new file mode 100644
index 00000000000..42ddaa05c16
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_sort_buffer_size_basic.result
@@ -0,0 +1,48 @@
+SET @start_global_value = @@global.maria_sort_buffer_size;
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+@@global.maria_sort_buffer_size @@global.aria_sort_buffer_size
+134217728 134217728
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+@@session.maria_sort_buffer_size @@session.aria_sort_buffer_size
+134217728 134217728
+show global variables like '%aria_sort_buffer_size';
+Variable_name Value
+aria_sort_buffer_size 134217728
+maria_sort_buffer_size 134217728
+show session variables like '%aria_sort_buffer_size';
+Variable_name Value
+aria_sort_buffer_size 134217728
+maria_sort_buffer_size 134217728
+select * from information_schema.global_variables where variable_name like '%aria_sort_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SORT_BUFFER_SIZE 134217728
+MARIA_SORT_BUFFER_SIZE 134217728
+select * from information_schema.session_variables where variable_name like '%aria_sort_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SORT_BUFFER_SIZE 134217728
+MARIA_SORT_BUFFER_SIZE 134217728
+set global maria_sort_buffer_size=10;
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+@@global.maria_sort_buffer_size @@global.aria_sort_buffer_size
+10 10
+set session maria_sort_buffer_size=10;
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+@@session.maria_sort_buffer_size @@session.aria_sort_buffer_size
+10 10
+set global maria_sort_buffer_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_sort_buffer_size'
+set session maria_sort_buffer_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_sort_buffer_size'
+set global maria_sort_buffer_size="foo";
+ERROR 42000: Incorrect argument type to variable 'maria_sort_buffer_size'
+set global maria_sort_buffer_size=0;
+Warnings:
+Warning 1292 Truncated incorrect aria_sort_buffer_size value: '0'
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+@@global.maria_sort_buffer_size @@global.aria_sort_buffer_size
+4 4
+set session maria_sort_buffer_size=cast(-1 as unsigned int);
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+@@session.maria_sort_buffer_size @@session.aria_sort_buffer_size
+18446744073709551615 18446744073709551615
+SET @@global.maria_sort_buffer_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_stats_method_basic.result b/mysql-test/suite/sys_vars/r/maria_stats_method_basic.result
new file mode 100644
index 00000000000..7b3b2015db3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_stats_method_basic.result
@@ -0,0 +1,52 @@
+SET @start_global_value = @@global.maria_stats_method;
+select @@global.maria_stats_method, @@global.aria_stats_method;
+@@global.maria_stats_method @@global.aria_stats_method
+nulls_unequal nulls_unequal
+select @@session.maria_stats_method, @@session.aria_stats_method;
+@@session.maria_stats_method @@session.aria_stats_method
+nulls_unequal nulls_unequal
+show global variables like '%aria_stats_method';
+Variable_name Value
+aria_stats_method nulls_unequal
+maria_stats_method nulls_unequal
+show session variables like '%aria_stats_method';
+Variable_name Value
+aria_stats_method nulls_unequal
+maria_stats_method nulls_unequal
+select * from information_schema.global_variables where variable_name like '%aria_stats_method';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_STATS_METHOD nulls_unequal
+ARIA_STATS_METHOD nulls_unequal
+select * from information_schema.session_variables where variable_name like '%aria_stats_method';
+VARIABLE_NAME VARIABLE_VALUE
+MARIA_STATS_METHOD nulls_unequal
+ARIA_STATS_METHOD nulls_unequal
+set global maria_stats_method=1;
+select @@global.maria_stats_method, @@global.aria_stats_method;
+@@global.maria_stats_method @@global.aria_stats_method
+nulls_equal nulls_equal
+set session maria_stats_method=1;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+@@session.maria_stats_method @@session.aria_stats_method
+nulls_equal nulls_equal
+set session maria_stats_method=nulls_unequal;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+@@session.maria_stats_method @@session.aria_stats_method
+nulls_unequal nulls_unequal
+set session maria_stats_method=nulls_equal;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+@@session.maria_stats_method @@session.aria_stats_method
+nulls_equal nulls_equal
+set session maria_stats_method=nulls_ignored;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+@@session.maria_stats_method @@session.aria_stats_method
+nulls_ignored nulls_ignored
+set session maria_stats_method=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_stats_method'
+set session maria_stats_method=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_stats_method'
+set session maria_stats_method="foo";
+ERROR 42000: Variable 'maria_stats_method' can't be set to the value of 'foo'
+set session maria_stats_method=3;
+ERROR 42000: Variable 'maria_stats_method' can't be set to the value of '3'
+SET @@global.maria_stats_method = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_sync_log_dir_basic.result b/mysql-test/suite/sys_vars/r/maria_sync_log_dir_basic.result
new file mode 100644
index 00000000000..456a0ddb970
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_sync_log_dir_basic.result
@@ -0,0 +1,49 @@
+SET @start_global_value = @@global.maria_sync_log_dir;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+@@global.maria_sync_log_dir @@global.aria_sync_log_dir
+NEWFILE NEWFILE
+select @@session.maria_sync_log_dir, @@session.aria_sync_log_dir;
+ERROR HY000: Variable 'maria_sync_log_dir' is a GLOBAL variable
+show global variables like '%aria_sync_log_dir';
+Variable_name Value
+aria_sync_log_dir NEWFILE
+maria_sync_log_dir NEWFILE
+show session variables like '%aria_sync_log_dir';
+Variable_name Value
+aria_sync_log_dir NEWFILE
+maria_sync_log_dir NEWFILE
+select * from information_schema.global_variables where variable_name like '%aria_sync_log_dir';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SYNC_LOG_DIR NEWFILE
+MARIA_SYNC_LOG_DIR NEWFILE
+select * from information_schema.session_variables where variable_name like '%aria_sync_log_dir';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_SYNC_LOG_DIR NEWFILE
+MARIA_SYNC_LOG_DIR NEWFILE
+set global maria_sync_log_dir=1;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+@@global.maria_sync_log_dir @@global.aria_sync_log_dir
+NEWFILE NEWFILE
+set session maria_sync_log_dir=1;
+ERROR HY000: Variable 'maria_sync_log_dir' is a GLOBAL variable and should be set with SET GLOBAL
+set global maria_sync_log_dir=never;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+@@global.maria_sync_log_dir @@global.aria_sync_log_dir
+NEVER NEVER
+set global maria_sync_log_dir=newfile;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+@@global.maria_sync_log_dir @@global.aria_sync_log_dir
+NEWFILE NEWFILE
+set global maria_sync_log_dir=always;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+@@global.maria_sync_log_dir @@global.aria_sync_log_dir
+ALWAYS ALWAYS
+set global maria_sync_log_dir=1.1;
+ERROR 42000: Incorrect argument type to variable 'maria_sync_log_dir'
+set global maria_sync_log_dir=1e1;
+ERROR 42000: Incorrect argument type to variable 'maria_sync_log_dir'
+set global maria_sync_log_dir="foo";
+ERROR 42000: Variable 'maria_sync_log_dir' can't be set to the value of 'foo'
+set global maria_sync_log_dir=3;
+ERROR 42000: Variable 'maria_sync_log_dir' can't be set to the value of '3'
+SET @@global.maria_sync_log_dir = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/maria_used_for_temp_tables_basic.result b/mysql-test/suite/sys_vars/r/maria_used_for_temp_tables_basic.result
new file mode 100644
index 00000000000..8795e0f128b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maria_used_for_temp_tables_basic.result
@@ -0,0 +1,25 @@
+select @@global.maria_used_for_temp_tables, @@global.aria_used_for_temp_tables;
+@@global.maria_used_for_temp_tables @@global.aria_used_for_temp_tables
+1 1
+select @@session.maria_used_for_temp_tables, @@session.aria_used_for_temp_tables;
+ERROR HY000: Variable 'maria_used_for_temp_tables' is a GLOBAL variable
+show global variables like '%aria_used_for_temp_tables';
+Variable_name Value
+aria_used_for_temp_tables ON
+maria_used_for_temp_tables ON
+show session variables like '%aria_used_for_temp_tables';
+Variable_name Value
+aria_used_for_temp_tables ON
+maria_used_for_temp_tables ON
+select * from information_schema.global_variables where variable_name like '%aria_used_for_temp_tables';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_USED_FOR_TEMP_TABLES ON
+MARIA_USED_FOR_TEMP_TABLES ON
+select * from information_schema.session_variables where variable_name like '%aria_used_for_temp_tables';
+VARIABLE_NAME VARIABLE_VALUE
+ARIA_USED_FOR_TEMP_TABLES ON
+MARIA_USED_FOR_TEMP_TABLES ON
+set global maria_used_for_temp_tables=1;
+ERROR HY000: Variable 'maria_used_for_temp_tables' is a read only variable
+set session maria_used_for_temp_tables=1;
+ERROR HY000: Variable 'maria_used_for_temp_tables' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/mrr_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/mrr_buffer_size_basic.result
new file mode 100644
index 00000000000..9c358de69a5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/mrr_buffer_size_basic.result
@@ -0,0 +1,50 @@
+SET @start_global_value = @@global.mrr_buffer_size;
+select @@global.mrr_buffer_size;
+@@global.mrr_buffer_size
+262144
+select @@session.mrr_buffer_size;
+@@session.mrr_buffer_size
+262144
+show global variables like 'mrr_buffer_size';
+Variable_name Value
+mrr_buffer_size 262144
+show session variables like 'mrr_buffer_size';
+Variable_name Value
+mrr_buffer_size 262144
+select * from information_schema.global_variables where variable_name='mrr_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+MRR_BUFFER_SIZE 262144
+select * from information_schema.session_variables where variable_name='mrr_buffer_size';
+VARIABLE_NAME VARIABLE_VALUE
+MRR_BUFFER_SIZE 262144
+set global mrr_buffer_size=10;
+Warnings:
+Warning 1292 Truncated incorrect mrr_buffer_size value: '10'
+select @@global.mrr_buffer_size;
+@@global.mrr_buffer_size
+8192
+set session mrr_buffer_size=10;
+Warnings:
+Warning 1292 Truncated incorrect mrr_buffer_size value: '10'
+select @@session.mrr_buffer_size;
+@@session.mrr_buffer_size
+8192
+set global mrr_buffer_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'mrr_buffer_size'
+set session mrr_buffer_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'mrr_buffer_size'
+set global mrr_buffer_size="foo";
+ERROR 42000: Incorrect argument type to variable 'mrr_buffer_size'
+set global mrr_buffer_size=0;
+Warnings:
+Warning 1292 Truncated incorrect mrr_buffer_size value: '0'
+select @@global.mrr_buffer_size;
+@@global.mrr_buffer_size
+8192
+set session mrr_buffer_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect mrr_buffer_size value: '18446744073709551615'
+select @@session.mrr_buffer_size;
+@@session.mrr_buffer_size
+2147483647
+SET @@global.mrr_buffer_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result b/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result
new file mode 100644
index 00000000000..a43c194e3f9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result
@@ -0,0 +1,21 @@
+select @@global.mutex_deadlock_detector;
+@@global.mutex_deadlock_detector
+1
+select @@session.mutex_deadlock_detector;
+ERROR HY000: Variable 'mutex_deadlock_detector' is a GLOBAL variable
+show global variables like 'mutex_deadlock_detector';
+Variable_name Value
+mutex_deadlock_detector ON
+show session variables like 'mutex_deadlock_detector';
+Variable_name Value
+mutex_deadlock_detector ON
+select * from information_schema.global_variables where variable_name='mutex_deadlock_detector';
+VARIABLE_NAME VARIABLE_VALUE
+MUTEX_DEADLOCK_DETECTOR ON
+select * from information_schema.session_variables where variable_name='mutex_deadlock_detector';
+VARIABLE_NAME VARIABLE_VALUE
+MUTEX_DEADLOCK_DETECTOR ON
+set global mutex_deadlock_detector=1;
+ERROR HY000: Variable 'mutex_deadlock_detector' is a read only variable
+set session mutex_deadlock_detector=1;
+ERROR HY000: Variable 'mutex_deadlock_detector' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result
index 22384d3c6ef..3fc0f563298 100644
--- a/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result
+++ b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result
@@ -1,20 +1,20 @@
select @@global.myisam_recover_options;
@@global.myisam_recover_options
-OFF
+DEFAULT
select @@session.myisam_recover_options;
ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable
show global variables like 'myisam_recover_options';
Variable_name Value
-myisam_recover_options OFF
+myisam_recover_options DEFAULT
show session variables like 'myisam_recover_options';
Variable_name Value
-myisam_recover_options OFF
+myisam_recover_options DEFAULT
select * from information_schema.global_variables where variable_name='myisam_recover_options';
VARIABLE_NAME VARIABLE_VALUE
-MYISAM_RECOVER_OPTIONS OFF
+MYISAM_RECOVER_OPTIONS DEFAULT
select * from information_schema.session_variables where variable_name='myisam_recover_options';
VARIABLE_NAME VARIABLE_VALUE
-MYISAM_RECOVER_OPTIONS OFF
+MYISAM_RECOVER_OPTIONS DEFAULT
set global myisam_recover_options=1;
ERROR HY000: Variable 'myisam_recover_options' is a read only variable
set session myisam_recover_options=1;
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 acc8cd699f8..cab81890503 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,57 +1,57 @@
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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
set global optimizer_switch=10;
set session optimizer_switch=5;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,firstmatch=off,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,table_elimination=off
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
@@ -63,4 +63,4 @@ 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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
diff --git a/mysql-test/suite/sys_vars/r/optimizer_use_mrr_basic.result b/mysql-test/suite/sys_vars/r/optimizer_use_mrr_basic.result
new file mode 100644
index 00000000000..45a7d83c2ad
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/optimizer_use_mrr_basic.result
@@ -0,0 +1,48 @@
+SET @start_global_value = @@global.optimizer_use_mrr;
+select @@global.optimizer_use_mrr;
+@@global.optimizer_use_mrr
+force
+select @@session.optimizer_use_mrr;
+@@session.optimizer_use_mrr
+force
+show global variables like 'optimizer_use_mrr';
+Variable_name Value
+optimizer_use_mrr force
+show session variables like 'optimizer_use_mrr';
+Variable_name Value
+optimizer_use_mrr force
+select * from information_schema.global_variables where variable_name='optimizer_use_mrr';
+VARIABLE_NAME VARIABLE_VALUE
+OPTIMIZER_USE_MRR force
+select * from information_schema.session_variables where variable_name='optimizer_use_mrr';
+VARIABLE_NAME VARIABLE_VALUE
+OPTIMIZER_USE_MRR force
+set global optimizer_use_mrr=1;
+select @@global.optimizer_use_mrr;
+@@global.optimizer_use_mrr
+force
+set session optimizer_use_mrr=1;
+select @@session.optimizer_use_mrr;
+@@session.optimizer_use_mrr
+force
+set session optimizer_use_mrr='auto';
+select @@session.optimizer_use_mrr;
+@@session.optimizer_use_mrr
+auto
+set session optimizer_use_mrr='force';
+select @@session.optimizer_use_mrr;
+@@session.optimizer_use_mrr
+force
+set session optimizer_use_mrr='disable';
+select @@session.optimizer_use_mrr;
+@@session.optimizer_use_mrr
+disable
+set session optimizer_use_mrr=1.1;
+ERROR 42000: Incorrect argument type to variable 'optimizer_use_mrr'
+set session optimizer_use_mrr=1e1;
+ERROR 42000: Incorrect argument type to variable 'optimizer_use_mrr'
+set session optimizer_use_mrr="foo";
+ERROR 42000: Variable 'optimizer_use_mrr' can't be set to the value of 'foo'
+set session optimizer_use_mrr=3;
+ERROR 42000: Variable 'optimizer_use_mrr' can't be set to the value of '3'
+SET @@global.optimizer_use_mrr = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
index f81cae24dda..c18f4cd2a1d 100644
--- a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
+++ b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
@@ -1,20 +1,20 @@
select @@global.plugin_dir;
@@global.plugin_dir
-MYSQL_LIBDIR/plugin
+MYSQL_LIBDIR/plugins
select @@session.plugin_dir;
ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable
show global variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_LIBDIR/plugin
+plugin_dir MYSQL_LIBDIR/plugins
show session variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_LIBDIR/plugin
+plugin_dir MYSQL_LIBDIR/plugins
select * from information_schema.global_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_LIBDIR/plugin
+PLUGIN_DIR MYSQL_LIBDIR/plugins
select * from information_schema.session_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_LIBDIR/plugin
+PLUGIN_DIR MYSQL_LIBDIR/plugins
set global plugin_dir=1;
ERROR HY000: Variable 'plugin_dir' is a read only variable
set session plugin_dir=1;
diff --git a/mysql-test/suite/sys_vars/r/plugin_maturity_basic.result b/mysql-test/suite/sys_vars/r/plugin_maturity_basic.result
new file mode 100644
index 00000000000..e088361563e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/plugin_maturity_basic.result
@@ -0,0 +1,21 @@
+select @@global.plugin_maturity;
+@@global.plugin_maturity
+unknown
+select @@session.plugin_maturity;
+ERROR HY000: Variable 'plugin_maturity' is a GLOBAL variable
+show global variables like 'plugin_maturity';
+Variable_name Value
+plugin_maturity unknown
+show session variables like 'plugin_maturity';
+Variable_name Value
+plugin_maturity unknown
+select * from information_schema.global_variables where variable_name='plugin_maturity';
+VARIABLE_NAME VARIABLE_VALUE
+PLUGIN_MATURITY unknown
+select * from information_schema.session_variables where variable_name='plugin_maturity';
+VARIABLE_NAME VARIABLE_VALUE
+PLUGIN_MATURITY unknown
+set global plugin_maturity=1;
+ERROR HY000: Variable 'plugin_maturity' is a read only variable
+set session plugin_maturity=1;
+ERROR HY000: Variable 'plugin_maturity' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/rowid_merge_buff_size_basic.result b/mysql-test/suite/sys_vars/r/rowid_merge_buff_size_basic.result
new file mode 100644
index 00000000000..222500dabda
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rowid_merge_buff_size_basic.result
@@ -0,0 +1,44 @@
+SET @start_global_value = @@global.rowid_merge_buff_size;
+select @@global.rowid_merge_buff_size;
+@@global.rowid_merge_buff_size
+8388608
+select @@session.rowid_merge_buff_size;
+@@session.rowid_merge_buff_size
+8388608
+show global variables like 'rowid_merge_buff_size';
+Variable_name Value
+rowid_merge_buff_size 8388608
+show session variables like 'rowid_merge_buff_size';
+Variable_name Value
+rowid_merge_buff_size 8388608
+select * from information_schema.global_variables where variable_name='rowid_merge_buff_size';
+VARIABLE_NAME VARIABLE_VALUE
+ROWID_MERGE_BUFF_SIZE 8388608
+select * from information_schema.session_variables where variable_name='rowid_merge_buff_size';
+VARIABLE_NAME VARIABLE_VALUE
+ROWID_MERGE_BUFF_SIZE 8388608
+set global rowid_merge_buff_size=10;
+select @@global.rowid_merge_buff_size;
+@@global.rowid_merge_buff_size
+10
+set session rowid_merge_buff_size=10;
+select @@session.rowid_merge_buff_size;
+@@session.rowid_merge_buff_size
+10
+set global rowid_merge_buff_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'rowid_merge_buff_size'
+set session rowid_merge_buff_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'rowid_merge_buff_size'
+set global rowid_merge_buff_size="foo";
+ERROR 42000: Incorrect argument type to variable 'rowid_merge_buff_size'
+set global rowid_merge_buff_size=0;
+select @@global.rowid_merge_buff_size;
+@@global.rowid_merge_buff_size
+0
+set session rowid_merge_buff_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect rowid_merge_buff_size value: '18446744073709551615'
+select @@session.rowid_merge_buff_size;
+@@session.rowid_merge_buff_size
+9223372036854775807
+SET @@global.rowid_merge_buff_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
index 19695fd3af6..df5f38c8b12 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
@@ -357,7 +357,7 @@ REAL_AS_FLOAT,PIPES_AS_CONCAT
SET @@global.sql_mode = 50000;
SELECT @@global.sql_mode;
@@global.sql_mode
-PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,,,NO_UNSIGNED_SUBTRACTION,POSTGRESQL,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
+PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,NO_UNSIGNED_SUBTRACTION,POSTGRESQL,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
SET @@global.sql_mode = 500000;
SELECT @@global.sql_mode;
@@global.sql_mode
@@ -365,7 +365,7 @@ REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,POSTGR
SET @@global.sql_mode = 4294967295;
SELECT @@global.sql_mode;
@@global.sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,,,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
SET @@global.sql_mode = 4294967296;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '4294967296'
SET @@global.sql_mode = 0.4;
diff --git a/mysql-test/suite/sys_vars/r/storage_engine_basic.result b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
index 6f10ec475a0..2831ebaa500 100644
--- a/mysql-test/suite/sys_vars/r/storage_engine_basic.result
+++ b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
@@ -1,11 +1,5 @@
SET @start_global_value = @@global.storage_engine;
-SELECT @start_global_value;
-@start_global_value
-InnoDB
SET @start_session_value = @@session.storage_engine;
-SELECT @start_session_value;
-@start_session_value
-InnoDB
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.storage_engine = INNODB;
SET @@global.storage_engine = DEFAULT;
@@ -108,10 +102,4 @@ SELECT storage_engine = @@session.storage_engine;
ERROR 42S22: Unknown column 'storage_engine' in 'field list'
SET @@storage_engine = @start_global_value;
SET @@global.storage_engine = @start_global_value;
-SELECT @@global.storage_engine;
-@@global.storage_engine
-InnoDB
SET @@session.storage_engine = @start_session_value;
-SELECT @@session.storage_engine;
-@@session.storage_engine
-InnoDB
diff --git a/mysql-test/suite/sys_vars/r/thread_stack_basic.result b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
index c9c458a28a9..4d974f66a00 100644
--- a/mysql-test/suite/sys_vars/r/thread_stack_basic.result
+++ b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
@@ -1,20 +1,20 @@
select @@global.thread_stack;
@@global.thread_stack
-262144
+294912
select @@session.thread_stack;
ERROR HY000: Variable 'thread_stack' is a GLOBAL variable
show global variables like 'thread_stack';
Variable_name Value
-thread_stack 262144
+thread_stack 294912
show session variables like 'thread_stack';
Variable_name Value
-thread_stack 262144
+thread_stack 294912
select * from information_schema.global_variables where variable_name='thread_stack';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_STACK 262144
+THREAD_STACK 294912
select * from information_schema.session_variables where variable_name='thread_stack';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_STACK 262144
+THREAD_STACK 294912
set global thread_stack=1;
ERROR HY000: Variable 'thread_stack' is a read only variable
set session thread_stack=1;
diff --git a/mysql-test/suite/sys_vars/r/userstat_basic.result b/mysql-test/suite/sys_vars/r/userstat_basic.result
new file mode 100644
index 00000000000..2d082cd3a25
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/userstat_basic.result
@@ -0,0 +1,39 @@
+SET @start_global_value = @@global.userstat;
+select @@global.userstat;
+@@global.userstat
+0
+select @@session.userstat;
+ERROR HY000: Variable 'userstat' is a GLOBAL variable
+show global variables like 'userstat';
+Variable_name Value
+userstat OFF
+show session variables like 'userstat';
+Variable_name Value
+userstat OFF
+select * from information_schema.global_variables where variable_name='userstat';
+VARIABLE_NAME VARIABLE_VALUE
+USERSTAT OFF
+select * from information_schema.session_variables where variable_name='userstat';
+VARIABLE_NAME VARIABLE_VALUE
+USERSTAT OFF
+set global userstat=ON;
+select @@global.userstat;
+@@global.userstat
+1
+set global userstat=OFF;
+select @@global.userstat;
+@@global.userstat
+0
+set global userstat=1;
+select @@global.userstat;
+@@global.userstat
+1
+set session userstat=1;
+ERROR HY000: Variable 'userstat' is a GLOBAL variable and should be set with SET GLOBAL
+set global userstat=1.1;
+ERROR 42000: Incorrect argument type to variable 'userstat'
+set global userstat=1e1;
+ERROR 42000: Incorrect argument type to variable 'userstat'
+set global userstat="foo";
+ERROR 42000: Variable 'userstat' can't be set to the value of 'foo'
+SET @@global.userstat = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/all_vars-master.opt b/mysql-test/suite/sys_vars/t/all_vars-master.opt
index 3eec696ce86..48457b17309 100644
--- a/mysql-test/suite/sys_vars/t/all_vars-master.opt
+++ b/mysql-test/suite/sys_vars/t/all_vars-master.opt
@@ -1 +1 @@
-$SEMISYNC_PLUGIN_OPT --loose-innodb
+--loose-innodb
diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test
index e9e7e16687a..74430787c26 100644
--- a/mysql-test/suite/sys_vars/t/all_vars.test
+++ b/mysql-test/suite/sys_vars/t/all_vars.test
@@ -15,24 +15,23 @@
--source include/not_embedded.inc
-# 2010-01-28 OBN Added support to load 'innodb' and 'semisync' if possible.
-# As we need to have there variables loaded if the components exist but do
-# not want the test skiped if they are not, we cannot use the 'have_xxx' mecanizm.
-# Added an 'all_vars-master.opt' file that includes
-# "$SEMISYNC_PLUGIN_OPT --loose-innodb" (see $SEMISYNC_PLUGIN_OPT setting in mysql-test-run.pl)
-# and logic similar to 'include/have_semisync_plugin.inc' that will load semisync plugin
-if (`SELECT @@have_dynamic_loading = 'YES' AND LENGTH('$SEMISYNC_MASTER_PLUGIN') > 0`)
-{
- --disable_query_log
- # The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
- --replace_regex /\.dll/.so/
- eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
- --replace_regex /\.dll/.so/
- eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
- --enable_query_log
-}
-
-
+#
+# load everything we want to include in the testing
+#
+--disable_query_log
+--disable_result_log
+--disable_abort_on_error
+eval INSTALL PLUGIN archive SONAME "$HA_ARCHIVE_SO";
+eval INSTALL PLUGIN blackhole SONAME "$HA_BLACKHOLE_SO";
+eval INSTALL PLUGIN federated SONAME "$HA_FEDERATEDX_SO";
+eval INSTALL PLUGIN oqgraph SONAME "$HA_OQGRAPH_SO";
+eval INSTALL PLUGIN sphinx SONAME "$HA_SPHINX_SO";
+eval INSTALL PLUGIN innodb SONAME "$HA_XTRADB_SO";
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME "$SEMISYNC_MASTER_SO";
+eval INSTALL PLUGIN rpl_semi_sync_slave SONAME "$SEMISYNC_SLAVE_SO";
+--enable_abort_on_error
+--enable_result_log
+--enable_query_log
#
# This test verifies that *all* system variables are tested
@@ -48,6 +47,7 @@ perl;
use File::Basename;
my $dirname=dirname($ENV{MYSQLTEST_FILE});
my @all_tests=<$dirname/*_basic{,_32,_64}.test>;
+ #*/
open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/sys_vars.all_vars.txt") or die;
binmode F;
print F join "\n", sort map { s/_basic(_32|_64)?\.test$//; basename $_ } @all_tests;
@@ -78,11 +78,18 @@ select variable_name as `There should be *no* variables listed below:` from t2
drop table t1;
drop table t2;
-# Unloading the semisync plugins in case they were loaded
-if (`SELECT @@have_dynamic_loading = 'YES' AND LENGTH('$SEMISYNC_MASTER_PLUGIN') > 0`)
-{
- --disable_query_log
- UNINSTALL PLUGIN rpl_semi_sync_master;
- UNINSTALL PLUGIN rpl_semi_sync_slave;
- --enable_query_log
-}
+--disable_query_log
+--disable_result_log
+--disable_abort_on_error
+UNINSTALL PLUGIN archive;
+UNINSTALL PLUGIN blackhole;
+UNINSTALL PLUGIN federated;
+UNINSTALL PLUGIN oqgraph;
+UNINSTALL PLUGIN sphinx;
+UNINSTALL PLUGIN innodb;
+UNINSTALL PLUGIN rpl_semi_sync_master;
+UNINSTALL PLUGIN rpl_semi_sync_slave;
+--enable_abort_on_error
+--enable_result_log
+--enable_query_log
+
diff --git a/mysql-test/suite/sys_vars/t/aria_block_size_basic.test b/mysql-test/suite/sys_vars/t/aria_block_size_basic.test
new file mode 100644
index 00000000000..ceac27fcd92
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_block_size_basic.test
@@ -0,0 +1,22 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.aria_block_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_block_size;
+show global variables like 'aria_block_size';
+show session variables like 'aria_block_size';
+select * from information_schema.global_variables where variable_name='aria_block_size';
+select * from information_schema.session_variables where variable_name='aria_block_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global aria_block_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session aria_block_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/aria_checkpoint_interval_basic.test b/mysql-test/suite/sys_vars/t/aria_checkpoint_interval_basic.test
new file mode 100644
index 00000000000..6829ca99ba0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_checkpoint_interval_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_checkpoint_interval;
+
+#
+# exists as global only
+#
+select @@global.aria_checkpoint_interval;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_checkpoint_interval;
+show global variables like 'aria_checkpoint_interval';
+show session variables like 'aria_checkpoint_interval';
+select * from information_schema.global_variables where variable_name='aria_checkpoint_interval';
+select * from information_schema.session_variables where variable_name='aria_checkpoint_interval';
+
+#
+# show that it's writable
+#
+set global aria_checkpoint_interval=1;
+select @@global.aria_checkpoint_interval;
+--error ER_GLOBAL_VARIABLE
+set session aria_checkpoint_interval=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_checkpoint_interval=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_checkpoint_interval=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_checkpoint_interval="foo";
+
+#
+# min/max values
+#
+set global aria_checkpoint_interval=0;
+select @@global.aria_checkpoint_interval;
+set global aria_checkpoint_interval=cast(-1 as unsigned int);
+select @@global.aria_checkpoint_interval;
+
+SET @@global.aria_checkpoint_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_force_start_after_recovery_failures_basic.test b/mysql-test/suite/sys_vars/t/aria_force_start_after_recovery_failures_basic.test
new file mode 100644
index 00000000000..c99a303b795
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_force_start_after_recovery_failures_basic.test
@@ -0,0 +1,22 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.aria_force_start_after_recovery_failures;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_force_start_after_recovery_failures;
+show global variables like 'aria_force_start_after_recovery_failures';
+show session variables like 'aria_force_start_after_recovery_failures';
+select * from information_schema.global_variables where variable_name='aria_force_start_after_recovery_failures';
+select * from information_schema.session_variables where variable_name='aria_force_start_after_recovery_failures';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global aria_force_start_after_recovery_failures=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session aria_force_start_after_recovery_failures=1;
+
diff --git a/mysql-test/suite/sys_vars/t/aria_group_commit_basic.test b/mysql-test/suite/sys_vars/t/aria_group_commit_basic.test
new file mode 100644
index 00000000000..11d7d598ef3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_group_commit_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_group_commit;
+
+#
+# exists as global only
+#
+select @@global.aria_group_commit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_group_commit;
+show global variables like 'aria_group_commit';
+show session variables like 'aria_group_commit';
+select * from information_schema.global_variables where variable_name='aria_group_commit';
+select * from information_schema.session_variables where variable_name='aria_group_commit';
+
+#
+# show that it's writable
+#
+set global aria_group_commit=1;
+select @@global.aria_group_commit;
+--error ER_GLOBAL_VARIABLE
+set session aria_group_commit=1;
+
+#
+# all valid values
+#
+set global aria_group_commit=none;
+select @@global.aria_group_commit;
+set global aria_group_commit=hard;
+select @@global.aria_group_commit;
+set global aria_group_commit=soft;
+select @@global.aria_group_commit;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_group_commit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_group_commit=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_group_commit="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_group_commit=3;
+
+SET @@global.aria_group_commit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_group_commit_interval_basic.test b/mysql-test/suite/sys_vars/t/aria_group_commit_interval_basic.test
new file mode 100644
index 00000000000..5b606ee1707
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_group_commit_interval_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_group_commit_interval;
+
+#
+# exists as global only
+#
+select @@global.aria_group_commit_interval;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_group_commit_interval;
+show global variables like 'aria_group_commit_interval';
+show session variables like 'aria_group_commit_interval';
+select * from information_schema.global_variables where variable_name='aria_group_commit_interval';
+select * from information_schema.session_variables where variable_name='aria_group_commit_interval';
+
+#
+# show that it's writable
+#
+set global aria_group_commit_interval=1;
+select @@global.aria_group_commit_interval;
+--error ER_GLOBAL_VARIABLE
+set session aria_group_commit_interval=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_group_commit_interval=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_group_commit_interval=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_group_commit_interval="foo";
+
+#
+# min/max values
+#
+set global aria_group_commit_interval=0;
+select @@global.aria_group_commit_interval;
+set global aria_group_commit_interval=cast(-1 as unsigned int);
+select @@global.aria_group_commit_interval;
+
+SET @@global.aria_group_commit_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_log_file_size_basic.test b/mysql-test/suite/sys_vars/t/aria_log_file_size_basic.test
new file mode 100644
index 00000000000..c403e7d3889
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_log_file_size_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_log_file_size;
+
+#
+# exists as global only
+#
+select @@global.aria_log_file_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_log_file_size;
+show global variables like 'aria_log_file_size';
+show session variables like 'aria_log_file_size';
+select * from information_schema.global_variables where variable_name='aria_log_file_size';
+select * from information_schema.session_variables where variable_name='aria_log_file_size';
+
+#
+# show that it's writable
+#
+set global aria_log_file_size=1024*1024*10;
+select @@global.aria_log_file_size;
+--error ER_GLOBAL_VARIABLE
+set session aria_log_file_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_log_file_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_log_file_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_log_file_size="foo";
+
+#
+# min/max values, block size
+#
+set global aria_log_file_size=1;
+select @@global.aria_log_file_size;
+set global aria_log_file_size=@@global.aria_log_file_size + 8192 - 1;
+select @@global.aria_log_file_size;
+set global aria_log_file_size=@@global.aria_log_file_size + 8192;
+select @@global.aria_log_file_size;
+set global aria_log_file_size=cast(-1 as unsigned int);
+select @@global.aria_log_file_size;
+
+SET @@global.aria_log_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_log_purge_type_basic.test b/mysql-test/suite/sys_vars/t/aria_log_purge_type_basic.test
new file mode 100644
index 00000000000..6424b7db2c0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_log_purge_type_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_log_purge_type;
+
+#
+# exists as global only
+#
+select @@global.aria_log_purge_type;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_log_purge_type;
+show global variables like 'aria_log_purge_type';
+show session variables like 'aria_log_purge_type';
+select * from information_schema.global_variables where variable_name='aria_log_purge_type';
+select * from information_schema.session_variables where variable_name='aria_log_purge_type';
+
+#
+# show that it's writable
+#
+set global aria_log_purge_type=1;
+select @@global.aria_log_purge_type;
+--error ER_GLOBAL_VARIABLE
+set session aria_log_purge_type=1;
+
+#
+# all valid values
+#
+set global aria_log_purge_type=immediate;
+select @@global.aria_log_purge_type;
+set global aria_log_purge_type=external;
+select @@global.aria_log_purge_type;
+set global aria_log_purge_type=at_flush;
+select @@global.aria_log_purge_type;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_log_purge_type=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_log_purge_type=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_log_purge_type="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_log_purge_type=3;
+
+SET @@global.aria_log_purge_type = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test b/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test
new file mode 100644
index 00000000000..b2385d2f99b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_max_sort_file_size_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_max_sort_file_size;
+
+#
+# exists as global only
+#
+select @@global.aria_max_sort_file_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_max_sort_file_size;
+show global variables like 'aria_max_sort_file_size';
+show session variables like 'aria_max_sort_file_size';
+select * from information_schema.global_variables where variable_name='aria_max_sort_file_size';
+select * from information_schema.session_variables where variable_name='aria_max_sort_file_size';
+
+#
+# show that it's writable
+#
+set global aria_max_sort_file_size=1024*1024*10;
+select @@global.aria_max_sort_file_size;
+--error ER_GLOBAL_VARIABLE
+set session aria_max_sort_file_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_max_sort_file_size="foo";
+
+#
+# min/max values, block size
+#
+set global aria_max_sort_file_size=1;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024 - 1;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024;
+select @@global.aria_max_sort_file_size;
+set global aria_max_sort_file_size=cast(-1 as unsigned int);
+select @@global.aria_max_sort_file_size;
+
+SET @@global.aria_max_sort_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_page_checksum_basic.test b/mysql-test/suite/sys_vars/t/aria_page_checksum_basic.test
new file mode 100644
index 00000000000..5340699a346
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_page_checksum_basic.test
@@ -0,0 +1,39 @@
+# bool global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_page_checksum;
+
+#
+# exists as global only
+#
+select @@global.aria_page_checksum;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_page_checksum;
+show global variables like 'aria_page_checksum';
+show session variables like 'aria_page_checksum';
+select * from information_schema.global_variables where variable_name='aria_page_checksum';
+select * from information_schema.session_variables where variable_name='aria_page_checksum';
+
+#
+# show that it's writable
+#
+set global aria_page_checksum=ON;
+select @@global.aria_page_checksum;
+set global aria_page_checksum=OFF;
+select @@global.aria_page_checksum;
+set global aria_page_checksum=1;
+select @@global.aria_page_checksum;
+--error ER_GLOBAL_VARIABLE
+set session aria_page_checksum=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_page_checksum=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_page_checksum=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_page_checksum="foo";
+
+SET @@global.aria_page_checksum = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_pagecache_age_threshold_basic.test b/mysql-test/suite/sys_vars/t/aria_pagecache_age_threshold_basic.test
new file mode 100644
index 00000000000..2d8dcc4eff5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_pagecache_age_threshold_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_pagecache_age_threshold;
+
+#
+# exists as global only
+#
+select @@global.aria_pagecache_age_threshold;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_pagecache_age_threshold;
+show global variables like 'aria_pagecache_age_threshold';
+show session variables like 'aria_pagecache_age_threshold';
+select * from information_schema.global_variables where variable_name='aria_pagecache_age_threshold';
+select * from information_schema.session_variables where variable_name='aria_pagecache_age_threshold';
+
+#
+# show that it's writable
+#
+set global aria_pagecache_age_threshold=200;
+select @@global.aria_pagecache_age_threshold;
+--error ER_GLOBAL_VARIABLE
+set session aria_pagecache_age_threshold=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_age_threshold=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_age_threshold=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_age_threshold="foo";
+
+#
+# min/max values, block size
+#
+set global aria_pagecache_age_threshold=1;
+select @@global.aria_pagecache_age_threshold;
+set global aria_pagecache_age_threshold=@@global.aria_pagecache_age_threshold + 100 - 1;
+select @@global.aria_pagecache_age_threshold;
+set global aria_pagecache_age_threshold=@@global.aria_pagecache_age_threshold + 100;
+select @@global.aria_pagecache_age_threshold;
+set global aria_pagecache_age_threshold=cast(-1 as unsigned int);
+select @@global.aria_pagecache_age_threshold;
+
+SET @@global.aria_pagecache_age_threshold = @start_global_value;
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
new file mode 100644
index 00000000000..172787d793a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_pagecache_buffer_size_basic.test
@@ -0,0 +1,22 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.aria_pagecache_buffer_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_pagecache_buffer_size;
+show global variables like 'aria_pagecache_buffer_size';
+show session variables like 'aria_pagecache_buffer_size';
+select * from information_schema.global_variables where variable_name='aria_pagecache_buffer_size';
+select * from information_schema.session_variables where variable_name='aria_pagecache_buffer_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global aria_pagecache_buffer_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session aria_pagecache_buffer_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/aria_pagecache_division_limit_basic.test b/mysql-test/suite/sys_vars/t/aria_pagecache_division_limit_basic.test
new file mode 100644
index 00000000000..096b9869979
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_pagecache_division_limit_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_pagecache_division_limit;
+
+#
+# exists as global only
+#
+select @@global.aria_pagecache_division_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_pagecache_division_limit;
+show global variables like 'aria_pagecache_division_limit';
+show session variables like 'aria_pagecache_division_limit';
+select * from information_schema.global_variables where variable_name='aria_pagecache_division_limit';
+select * from information_schema.session_variables where variable_name='aria_pagecache_division_limit';
+
+#
+# show that it's writable
+#
+set global aria_pagecache_division_limit=20;
+select @@global.aria_pagecache_division_limit;
+--error ER_GLOBAL_VARIABLE
+set session aria_pagecache_division_limit=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_division_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_division_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_pagecache_division_limit="foo";
+
+#
+# min/max values, block size
+#
+set global aria_pagecache_division_limit=0;
+select @@global.aria_pagecache_division_limit;
+set global aria_pagecache_division_limit=cast(-1 as unsigned int);
+select @@global.aria_pagecache_division_limit;
+
+SET @@global.aria_pagecache_division_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_recover_basic.test b/mysql-test/suite/sys_vars/t/aria_recover_basic.test
new file mode 100644
index 00000000000..25aa2d7cf77
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_recover_basic.test
@@ -0,0 +1,51 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_recover;
+
+#
+# exists as global only
+#
+select @@global.aria_recover;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_recover;
+show global variables like 'aria_recover';
+show session variables like 'aria_recover';
+select * from information_schema.global_variables where variable_name='aria_recover';
+select * from information_schema.session_variables where variable_name='aria_recover';
+
+#
+# show that it's writable
+#
+set global aria_recover=1;
+select @@global.aria_recover;
+--error ER_GLOBAL_VARIABLE
+set session aria_recover=1;
+
+#
+# all valid values
+#
+set global aria_recover=normal;
+select @@global.aria_recover;
+set global aria_recover=backup;
+select @@global.aria_recover;
+set global aria_recover='force';
+select @@global.aria_recover;
+set global aria_recover='quick';
+select @@global.aria_recover;
+set global aria_recover=off;
+select @@global.aria_recover;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_recover=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_recover=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_recover="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_recover=5;
+
+SET @@global.aria_recover = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_repair_threads_basic.test b/mysql-test/suite/sys_vars/t/aria_repair_threads_basic.test
new file mode 100644
index 00000000000..476bd0b4cb2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_repair_threads_basic.test
@@ -0,0 +1,43 @@
+# ulong session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_repair_threads;
+
+#
+# exists as global only
+#
+select @@global.aria_repair_threads;
+select @@session.aria_repair_threads;
+show global variables like 'aria_repair_threads';
+show session variables like 'aria_repair_threads';
+select * from information_schema.global_variables where variable_name='aria_repair_threads';
+select * from information_schema.session_variables where variable_name='aria_repair_threads';
+
+#
+# show that it's writable
+#
+set global aria_repair_threads=10;
+select @@global.aria_repair_threads;
+set session aria_repair_threads=10;
+select @@session.aria_repair_threads;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_repair_threads=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session aria_repair_threads=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_repair_threads="foo";
+
+#
+# min/max values, block size
+#
+set global aria_repair_threads=0;
+select @@global.aria_repair_threads;
+set session aria_repair_threads=cast(-1 as unsigned int);
+select @@session.aria_repair_threads;
+
+SET @@global.aria_repair_threads = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test
new file mode 100644
index 00000000000..699f6ae8e20
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test
@@ -0,0 +1,43 @@
+# ulong session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_sort_buffer_size;
+
+#
+# exists as global only
+#
+select @@global.aria_sort_buffer_size;
+select @@session.aria_sort_buffer_size;
+show global variables like 'aria_sort_buffer_size';
+show session variables like 'aria_sort_buffer_size';
+select * from information_schema.global_variables where variable_name='aria_sort_buffer_size';
+select * from information_schema.session_variables where variable_name='aria_sort_buffer_size';
+
+#
+# show that it's writable
+#
+set global aria_sort_buffer_size=10;
+select @@global.aria_sort_buffer_size;
+set session aria_sort_buffer_size=10;
+select @@session.aria_sort_buffer_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_sort_buffer_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session aria_sort_buffer_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_sort_buffer_size="foo";
+
+#
+# min/max values, block size
+#
+set global aria_sort_buffer_size=0;
+select @@global.aria_sort_buffer_size;
+set session aria_sort_buffer_size=cast(-1 as unsigned int);
+select @@session.aria_sort_buffer_size;
+
+SET @@global.aria_sort_buffer_size = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/aria_stats_method_basic.test b/mysql-test/suite/sys_vars/t/aria_stats_method_basic.test
new file mode 100644
index 00000000000..6db279237c1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_stats_method_basic.test
@@ -0,0 +1,46 @@
+# enum session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_stats_method;
+
+#
+# exists as global only
+#
+select @@global.aria_stats_method;
+select @@session.aria_stats_method;
+show global variables like 'aria_stats_method';
+show session variables like 'aria_stats_method';
+select * from information_schema.global_variables where variable_name='aria_stats_method';
+select * from information_schema.session_variables where variable_name='aria_stats_method';
+
+#
+# show that it's writable
+#
+set global aria_stats_method=1;
+select @@global.aria_stats_method;
+set session aria_stats_method=1;
+select @@session.aria_stats_method;
+
+#
+# all valid values
+#
+set session aria_stats_method=nulls_unequal;
+select @@session.aria_stats_method;
+set session aria_stats_method=nulls_equal;
+select @@session.aria_stats_method;
+set session aria_stats_method=nulls_ignored;
+select @@session.aria_stats_method;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session aria_stats_method=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session aria_stats_method=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session aria_stats_method="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set session aria_stats_method=3;
+
+SET @@global.aria_stats_method = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_sync_log_dir_basic.test b/mysql-test/suite/sys_vars/t/aria_sync_log_dir_basic.test
new file mode 100644
index 00000000000..7809e0d8d11
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_sync_log_dir_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.aria_sync_log_dir;
+
+#
+# exists as global only
+#
+select @@global.aria_sync_log_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_sync_log_dir;
+show global variables like 'aria_sync_log_dir';
+show session variables like 'aria_sync_log_dir';
+select * from information_schema.global_variables where variable_name='aria_sync_log_dir';
+select * from information_schema.session_variables where variable_name='aria_sync_log_dir';
+
+#
+# show that it's writable
+#
+set global aria_sync_log_dir=1;
+select @@global.aria_sync_log_dir;
+--error ER_GLOBAL_VARIABLE
+set session aria_sync_log_dir=1;
+
+#
+# all valid values
+#
+set global aria_sync_log_dir=never;
+select @@global.aria_sync_log_dir;
+set global aria_sync_log_dir=newfile;
+select @@global.aria_sync_log_dir;
+set global aria_sync_log_dir=always;
+select @@global.aria_sync_log_dir;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_sync_log_dir=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global aria_sync_log_dir=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_sync_log_dir="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global aria_sync_log_dir=3;
+
+SET @@global.aria_sync_log_dir = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test b/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test
new file mode 100644
index 00000000000..e962dcf178d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test
@@ -0,0 +1,22 @@
+# bool readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.aria_used_for_temp_tables;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.aria_used_for_temp_tables;
+show global variables like 'aria_used_for_temp_tables';
+show session variables like 'aria_used_for_temp_tables';
+select * from information_schema.global_variables where variable_name='aria_used_for_temp_tables';
+select * from information_schema.session_variables where variable_name='aria_used_for_temp_tables';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global aria_used_for_temp_tables=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session aria_used_for_temp_tables=1;
+
diff --git a/mysql-test/suite/sys_vars/t/deadlock_search_depth_long_basic.test b/mysql-test/suite/sys_vars/t/deadlock_search_depth_long_basic.test
new file mode 100644
index 00000000000..1862015b0a3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/deadlock_search_depth_long_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.deadlock_search_depth_long;
+
+#
+# exists as global only
+#
+select @@global.deadlock_search_depth_long;
+select @@session.deadlock_search_depth_long;
+show global variables like 'deadlock_search_depth_long';
+show session variables like 'deadlock_search_depth_long';
+select * from information_schema.global_variables where variable_name='deadlock_search_depth_long';
+select * from information_schema.session_variables where variable_name='deadlock_search_depth_long';
+
+#
+# show that it's writable
+#
+set global deadlock_search_depth_long=10;
+select @@global.deadlock_search_depth_long;
+set session deadlock_search_depth_long=10;
+select @@session.deadlock_search_depth_long;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_search_depth_long=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session deadlock_search_depth_long=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_search_depth_long="foo";
+
+#
+# min/max values, block size
+#
+set global deadlock_search_depth_long=0;
+select @@global.deadlock_search_depth_long;
+set session deadlock_search_depth_long=cast(-1 as unsigned int);
+select @@session.deadlock_search_depth_long;
+
+SET @@global.deadlock_search_depth_long = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/deadlock_search_depth_short_basic.test b/mysql-test/suite/sys_vars/t/deadlock_search_depth_short_basic.test
new file mode 100644
index 00000000000..3df6fb92c51
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/deadlock_search_depth_short_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.deadlock_search_depth_short;
+
+#
+# exists as global only
+#
+select @@global.deadlock_search_depth_short;
+select @@session.deadlock_search_depth_short;
+show global variables like 'deadlock_search_depth_short';
+show session variables like 'deadlock_search_depth_short';
+select * from information_schema.global_variables where variable_name='deadlock_search_depth_short';
+select * from information_schema.session_variables where variable_name='deadlock_search_depth_short';
+
+#
+# show that it's writable
+#
+set global deadlock_search_depth_short=10;
+select @@global.deadlock_search_depth_short;
+set session deadlock_search_depth_short=10;
+select @@session.deadlock_search_depth_short;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_search_depth_short=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session deadlock_search_depth_short=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_search_depth_short="foo";
+
+#
+# min/max values, block size
+#
+set global deadlock_search_depth_short=0;
+select @@global.deadlock_search_depth_short;
+set session deadlock_search_depth_short=cast(-1 as unsigned int);
+select @@session.deadlock_search_depth_short;
+
+SET @@global.deadlock_search_depth_short = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/deadlock_timeout_long_basic.test b/mysql-test/suite/sys_vars/t/deadlock_timeout_long_basic.test
new file mode 100644
index 00000000000..4ebc3cc059d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/deadlock_timeout_long_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.deadlock_timeout_long;
+
+#
+# exists as global only
+#
+select @@global.deadlock_timeout_long;
+select @@session.deadlock_timeout_long;
+show global variables like 'deadlock_timeout_long';
+show session variables like 'deadlock_timeout_long';
+select * from information_schema.global_variables where variable_name='deadlock_timeout_long';
+select * from information_schema.session_variables where variable_name='deadlock_timeout_long';
+
+#
+# show that it's writable
+#
+set global deadlock_timeout_long=10;
+select @@global.deadlock_timeout_long;
+set session deadlock_timeout_long=10;
+select @@session.deadlock_timeout_long;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_timeout_long=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session deadlock_timeout_long=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_timeout_long="foo";
+
+#
+# min/max values, block size
+#
+set global deadlock_timeout_long=0;
+select @@global.deadlock_timeout_long;
+set session deadlock_timeout_long=cast(-1 as unsigned int);
+select @@session.deadlock_timeout_long;
+
+SET @@global.deadlock_timeout_long = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/deadlock_timeout_short_basic.test b/mysql-test/suite/sys_vars/t/deadlock_timeout_short_basic.test
new file mode 100644
index 00000000000..86beeaeae9c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/deadlock_timeout_short_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.deadlock_timeout_short;
+
+#
+# exists as global only
+#
+select @@global.deadlock_timeout_short;
+select @@session.deadlock_timeout_short;
+show global variables like 'deadlock_timeout_short';
+show session variables like 'deadlock_timeout_short';
+select * from information_schema.global_variables where variable_name='deadlock_timeout_short';
+select * from information_schema.session_variables where variable_name='deadlock_timeout_short';
+
+#
+# show that it's writable
+#
+set global deadlock_timeout_short=10;
+select @@global.deadlock_timeout_short;
+set session deadlock_timeout_short=10;
+select @@session.deadlock_timeout_short;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_timeout_short=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session deadlock_timeout_short=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global deadlock_timeout_short="foo";
+
+#
+# min/max values, block size
+#
+set global deadlock_timeout_short=0;
+select @@global.deadlock_timeout_short;
+set session deadlock_timeout_short=cast(-1 as unsigned int);
+select @@session.deadlock_timeout_short;
+
+SET @@global.deadlock_timeout_short = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test b/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test
new file mode 100644
index 00000000000..f7d17a8e5ad
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test
@@ -0,0 +1,42 @@
+# ulong global
+
+SET @start_global_value = @@global.debug_crc_break;
+
+#
+# exists as global only
+#
+select @@global.debug_crc_break;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.debug_crc_break;
+show global variables like 'debug_crc_break';
+show session variables like 'debug_crc_break';
+select * from information_schema.global_variables where variable_name='debug_crc_break';
+select * from information_schema.session_variables where variable_name='debug_crc_break';
+
+#
+# show that it's writable
+#
+set global debug_crc_break=1;
+select @@global.debug_crc_break;
+--error ER_GLOBAL_VARIABLE
+set session debug_crc_break=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global debug_crc_break=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global debug_crc_break=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global debug_crc_break="foo";
+
+#
+# min/max values
+#
+set global debug_crc_break=0;
+select @@global.debug_crc_break;
+set global debug_crc_break=cast(-1 as unsigned int);
+select @@global.debug_crc_break;
+
+SET @@global.debug_crc_break = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test b/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
index f47453eb234..3e805688565 100644
--- a/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
+++ b/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
@@ -29,9 +29,7 @@
#############################################################
SET @start_global_value = @@global.default_storage_engine;
-SELECT @start_global_value;
SET @start_session_value = @@session.default_storage_engine;
-SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
@@ -41,10 +39,12 @@ SELECT @start_session_value;
SET @@global.default_storage_engine = INNODB;
SET @@global.default_storage_engine = DEFAULT;
+--replace_result MyISAM InnoDB
SELECT @@global.default_storage_engine;
SET @@session.default_storage_engine = INNODB;
SET @@session.default_storage_engine = DEFAULT;
+--replace_result MyISAM InnoDB
SELECT @@session.default_storage_engine;
@@ -173,10 +173,7 @@ SET @@default_storage_engine = @start_global_value;
####################################
SET @@global.default_storage_engine = @start_global_value;
-SELECT @@global.default_storage_engine;
SET @@session.default_storage_engine = @start_session_value;
-SELECT @@session.default_storage_engine;
-
#############################################################
# END OF default_storage_engine TESTS #
diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def
index 483eea9daeb..ba9f819f96b 100644
--- a/mysql-test/suite/sys_vars/t/disabled.def
+++ b/mysql-test/suite/sys_vars/t/disabled.def
@@ -14,4 +14,5 @@ query_cache_size_basic_64 : Bug#36747: Allocating a large query cache
transaction_prealloc_size_basic_32 : Bug#36747
transaction_prealloc_size_basic_64 : Bug#36747
#thread_cache_size_func : Bug#40575: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
-
+multi_range_count_basic_32 : no such variable
+multi_range_count_basic_64 : no such variable
diff --git a/mysql-test/suite/sys_vars/t/extra_max_connections_basic.test b/mysql-test/suite/sys_vars/t/extra_max_connections_basic.test
new file mode 100644
index 00000000000..214e64ebe7d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/extra_max_connections_basic.test
@@ -0,0 +1,42 @@
+# ulong global
+
+SET @start_global_value = @@global.extra_max_connections;
+
+#
+# exists as global only
+#
+select @@global.extra_max_connections;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.extra_max_connections;
+show global variables like 'extra_max_connections';
+show session variables like 'extra_max_connections';
+select * from information_schema.global_variables where variable_name='extra_max_connections';
+select * from information_schema.session_variables where variable_name='extra_max_connections';
+
+#
+# show that it's writable
+#
+set global extra_max_connections=1;
+select @@global.extra_max_connections;
+--error ER_GLOBAL_VARIABLE
+set session extra_max_connections=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global extra_max_connections=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global extra_max_connections=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global extra_max_connections="foo";
+
+#
+# min/max values
+#
+set global extra_max_connections=0;
+select @@global.extra_max_connections;
+set global extra_max_connections=cast(-1 as unsigned int);
+select @@global.extra_max_connections;
+
+SET @@global.extra_max_connections = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/extra_port_basic.test b/mysql-test/suite/sys_vars/t/extra_port_basic.test
new file mode 100644
index 00000000000..af5500e7ab7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/extra_port_basic.test
@@ -0,0 +1,21 @@
+# ulong readonly
+
+#
+# show the global and session values;
+#
+select @@global.extra_port;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.extra_port;
+show global variables like 'extra_port';
+show session variables like 'extra_port';
+select * from information_schema.global_variables where variable_name='extra_port';
+select * from information_schema.session_variables where variable_name='extra_port';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global extra_port=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session extra_port=1;
+
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
new file mode 100644
index 00000000000..1e0deb9c028
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/join_cache_level_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.join_cache_level;
+
+#
+# exists as global only
+#
+select @@global.join_cache_level;
+select @@session.join_cache_level;
+show global variables like 'join_cache_level';
+show session variables like 'join_cache_level';
+select * from information_schema.global_variables where variable_name='join_cache_level';
+select * from information_schema.session_variables where variable_name='join_cache_level';
+
+#
+# show that it's writable
+#
+set global join_cache_level=4;
+select @@global.join_cache_level;
+set session join_cache_level=4;
+select @@session.join_cache_level;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global join_cache_level=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session join_cache_level=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global join_cache_level="foo";
+
+#
+# min/max values, block size
+#
+set global join_cache_level=0;
+select @@global.join_cache_level;
+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/key_cache_segments_basic.test b/mysql-test/suite/sys_vars/t/key_cache_segments_basic.test
new file mode 100644
index 00000000000..ce0c736e4cc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/key_cache_segments_basic.test
@@ -0,0 +1,42 @@
+# ulong global
+
+SET @start_global_value = @@global.key_cache_segments;
+
+#
+# exists as global only
+#
+select @@global.key_cache_segments;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.key_cache_segments;
+show global variables like 'key_cache_segments';
+show session variables like 'key_cache_segments';
+select * from information_schema.global_variables where variable_name='key_cache_segments';
+select * from information_schema.session_variables where variable_name='key_cache_segments';
+
+#
+# show that it's writable
+#
+set global key_cache_segments=1;
+select @@global.key_cache_segments;
+--error ER_GLOBAL_VARIABLE
+set session key_cache_segments=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global key_cache_segments=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global key_cache_segments=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global key_cache_segments="foo";
+
+#
+# min/max values
+#
+set global key_cache_segments=0;
+select @@global.key_cache_segments;
+set global key_cache_segments=cast(-1 as unsigned int);
+select @@global.key_cache_segments;
+
+SET @@global.key_cache_segments = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/log_slow_filter_basic.test b/mysql-test/suite/sys_vars/t/log_slow_filter_basic.test
new file mode 100644
index 00000000000..2891b7ded8b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_slow_filter_basic.test
@@ -0,0 +1,69 @@
+# set session
+
+SET @start_global_value = @@global.log_slow_filter;
+
+#
+# exists as global only
+#
+select @@global.log_slow_filter;
+select @@session.log_slow_filter;
+show global variables like 'log_slow_filter';
+show session variables like 'log_slow_filter';
+select * from information_schema.global_variables where variable_name='log_slow_filter';
+select * from information_schema.session_variables where variable_name='log_slow_filter';
+
+#
+# show that it's writable
+#
+set global log_slow_filter=1;
+select @@global.log_slow_filter;
+set session log_slow_filter=1;
+select @@session.log_slow_filter;
+
+#
+# all valid values
+#
+set session log_slow_filter=1;
+select @@session.log_slow_filter;
+set session log_slow_filter=2;
+select @@session.log_slow_filter;
+set session log_slow_filter=5;
+select @@session.log_slow_filter;
+set session log_slow_filter='admin';
+select @@session.log_slow_filter;
+set session log_slow_filter='filesort';
+select @@session.log_slow_filter;
+set session log_slow_filter='filesort_on_disk';
+select @@session.log_slow_filter;
+set session log_slow_filter='full_join';
+select @@session.log_slow_filter;
+set session log_slow_filter='full_scan';
+select @@session.log_slow_filter;
+set session log_slow_filter='query_cache';
+select @@session.log_slow_filter;
+set session log_slow_filter='query_cache_miss';
+select @@session.log_slow_filter;
+set session log_slow_filter='tmp_table';
+select @@session.log_slow_filter;
+set session log_slow_filter='tmp_table_on_disk';
+select @@session.log_slow_filter;
+set session log_slow_filter='filesort,query_cache';
+select @@session.log_slow_filter;
+set session log_slow_filter='admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk';
+select @@session.log_slow_filter;
+set session log_slow_filter='';
+select @@session.log_slow_filter;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session log_slow_filter=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session log_slow_filter=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session log_slow_filter="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set session log_slow_filter=1024;
+
+SET @@global.log_slow_filter = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/log_slow_rate_limit_basic.test b/mysql-test/suite/sys_vars/t/log_slow_rate_limit_basic.test
new file mode 100644
index 00000000000..bb90b29e5f4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_slow_rate_limit_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.log_slow_rate_limit;
+
+#
+# exists as global only
+#
+select @@global.log_slow_rate_limit;
+select @@session.log_slow_rate_limit;
+show global variables like 'log_slow_rate_limit';
+show session variables like 'log_slow_rate_limit';
+select * from information_schema.global_variables where variable_name='log_slow_rate_limit';
+select * from information_schema.session_variables where variable_name='log_slow_rate_limit';
+
+#
+# show that it's writable
+#
+set global log_slow_rate_limit=10;
+select @@global.log_slow_rate_limit;
+set session log_slow_rate_limit=10;
+select @@session.log_slow_rate_limit;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global log_slow_rate_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session log_slow_rate_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global log_slow_rate_limit="foo";
+
+#
+# min/max values, block size
+#
+set global log_slow_rate_limit=0;
+select @@global.log_slow_rate_limit;
+set session log_slow_rate_limit=cast(-1 as unsigned int);
+select @@session.log_slow_rate_limit;
+
+SET @@global.log_slow_rate_limit = @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
new file mode 100644
index 00000000000..9302d5f1210
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_slow_verbosity_basic.test
@@ -0,0 +1,53 @@
+# set session
+
+SET @start_global_value = @@global.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';
+select * from information_schema.session_variables where variable_name='log_slow_verbosity';
+
+#
+# show that it's writable
+#
+set global log_slow_verbosity=1;
+select @@global.log_slow_verbosity;
+set session log_slow_verbosity=1;
+select @@session.log_slow_verbosity;
+
+#
+# all valid values
+#
+set session log_slow_verbosity=1;
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity=2;
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity=3;
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity='innodb';
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity='query_plan';
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity='innodb,query_plan';
+select @@session.log_slow_verbosity;
+set session log_slow_verbosity='';
+select @@session.log_slow_verbosity;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session log_slow_verbosity=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session log_slow_verbosity=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session log_slow_verbosity="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set session log_slow_verbosity=4;
+
+SET @@global.log_slow_verbosity = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_block_size_basic.test b/mysql-test/suite/sys_vars/t/maria_block_size_basic.test
new file mode 100644
index 00000000000..5acfcab539a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_block_size_basic.test
@@ -0,0 +1,24 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.maria_block_size, @@global.aria_block_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_block_size, @@session.aria_block_size;
+show global variables like '%aria_block_size';
+show session variables like '%aria_block_size';
+--sorted_result
+select * from information_schema.global_variables where variable_name like '%aria_block_size';
+--sorted_result
+select * from information_schema.session_variables where variable_name like '%aria_block_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global maria_block_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session maria_block_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/maria_checkpoint_interval_basic.test b/mysql-test/suite/sys_vars/t/maria_checkpoint_interval_basic.test
new file mode 100644
index 00000000000..ccbf9ee8eb0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_checkpoint_interval_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_checkpoint_interval;
+
+#
+# exists as global only
+#
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_checkpoint_interval, @@session.aria_checkpoint_interval;
+show global variables like '%aria_checkpoint_interval';
+show session variables like '%aria_checkpoint_interval';
+select * from information_schema.global_variables where variable_name='maria_checkpoint_interval';
+select * from information_schema.session_variables where variable_name='maria_checkpoint_interval';
+
+#
+# show that it's writable
+#
+set global maria_checkpoint_interval=1;
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+--error ER_GLOBAL_VARIABLE
+set session maria_checkpoint_interval=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_checkpoint_interval=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_checkpoint_interval=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_checkpoint_interval="foo";
+
+#
+# min/max values
+#
+set global maria_checkpoint_interval=0;
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+set global maria_checkpoint_interval=cast(-1 as unsigned int);
+select @@global.maria_checkpoint_interval, @@global.aria_checkpoint_interval;
+
+SET @@global.maria_checkpoint_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_force_start_after_recovery_failures_basic.test b/mysql-test/suite/sys_vars/t/maria_force_start_after_recovery_failures_basic.test
new file mode 100644
index 00000000000..a6b69561a7e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_force_start_after_recovery_failures_basic.test
@@ -0,0 +1,22 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.maria_force_start_after_recovery_failures, @@global.aria_force_start_after_recovery_failures;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_force_start_after_recovery_failures, @@session.aria_force_start_after_recovery_failures;
+show global variables like '%aria_force_start_after_recovery_failures';
+show session variables like '%aria_force_start_after_recovery_failures';
+select * from information_schema.global_variables where variable_name='maria_force_start_after_recovery_failures';
+select * from information_schema.session_variables where variable_name='maria_force_start_after_recovery_failures';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global maria_force_start_after_recovery_failures=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session maria_force_start_after_recovery_failures=1;
+
diff --git a/mysql-test/suite/sys_vars/t/maria_group_commit_basic.test b/mysql-test/suite/sys_vars/t/maria_group_commit_basic.test
new file mode 100644
index 00000000000..09a9cb6f46e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_group_commit_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_group_commit;
+
+#
+# exists as global only
+#
+select @@global.maria_group_commit, @@global.aria_group_commit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_group_commit, @@session.aria_group_commit;
+show global variables like '%aria_group_commit';
+show session variables like '%aria_group_commit';
+select * from information_schema.global_variables where variable_name='maria_group_commit';
+select * from information_schema.session_variables where variable_name='maria_group_commit';
+
+#
+# show that it's writable
+#
+set global maria_group_commit=1;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+--error ER_GLOBAL_VARIABLE
+set session maria_group_commit=1;
+
+#
+# all valid values
+#
+set global maria_group_commit=none;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+set global maria_group_commit=hard;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+set global maria_group_commit=soft;
+select @@global.maria_group_commit, @@global.aria_group_commit;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_group_commit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_group_commit=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_group_commit="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_group_commit=3;
+
+SET @@global.maria_group_commit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_group_commit_interval_basic.test b/mysql-test/suite/sys_vars/t/maria_group_commit_interval_basic.test
new file mode 100644
index 00000000000..d60219fad5e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_group_commit_interval_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_group_commit_interval;
+
+#
+# exists as global only
+#
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_group_commit_interval, @@session.aria_group_commit_interval;
+show global variables like '%aria_group_commit_interval';
+show session variables like '%aria_group_commit_interval';
+select * from information_schema.global_variables where variable_name='maria_group_commit_interval';
+select * from information_schema.session_variables where variable_name='maria_group_commit_interval';
+
+#
+# show that it's writable
+#
+set global maria_group_commit_interval=1;
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+--error ER_GLOBAL_VARIABLE
+set session maria_group_commit_interval=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_group_commit_interval=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_group_commit_interval=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_group_commit_interval="foo";
+
+#
+# min/max values
+#
+set global maria_group_commit_interval=0;
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+set global maria_group_commit_interval=cast(-1 as unsigned int);
+select @@global.maria_group_commit_interval, @@global.aria_group_commit_interval;
+
+SET @@global.maria_group_commit_interval = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_log_file_size_basic.test b/mysql-test/suite/sys_vars/t/maria_log_file_size_basic.test
new file mode 100644
index 00000000000..367ee6c3365
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_log_file_size_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_log_file_size;
+
+#
+# exists as global only
+#
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_log_file_size, @@session.aria_log_file_size;
+show global variables like '%aria_log_file_size';
+show session variables like '%aria_log_file_size';
+select * from information_schema.global_variables where variable_name like '%aria_log_file_size';
+select * from information_schema.session_variables where variable_name like '%aria_log_file_size';
+
+#
+# show that it's writable
+#
+set global maria_log_file_size=1024*1024*10;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+--error ER_GLOBAL_VARIABLE
+set session maria_log_file_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_log_file_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_log_file_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_log_file_size="foo";
+
+#
+# min/max values, block size
+#
+set global maria_log_file_size=1;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+set global maria_log_file_size=@@global.maria_log_file_size + 8192 - 1;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+set global maria_log_file_size=@@global.maria_log_file_size + 8192;
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+set global maria_log_file_size=cast(-1 as unsigned int);
+select @@global.maria_log_file_size, @@global.aria_log_file_size;
+
+SET @@global.maria_log_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_log_purge_type_basic.test b/mysql-test/suite/sys_vars/t/maria_log_purge_type_basic.test
new file mode 100644
index 00000000000..1bf6221922c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_log_purge_type_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_log_purge_type;
+
+#
+# exists as global only
+#
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_log_purge_type, @@session.aria_log_purge_type;
+show global variables like '%aria_log_purge_type';
+show session variables like '%aria_log_purge_type';
+select * from information_schema.global_variables where variable_name like '%aria_log_purge_type';
+select * from information_schema.session_variables where variable_name like '%aria_log_purge_type';
+
+#
+# show that it's writable
+#
+set global maria_log_purge_type=1;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+--error ER_GLOBAL_VARIABLE
+set session maria_log_purge_type=1;
+
+#
+# all valid values
+#
+set global maria_log_purge_type=immediate;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+set global maria_log_purge_type=external;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+set global maria_log_purge_type=at_flush;
+select @@global.maria_log_purge_type, @@global.aria_log_purge_type;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_log_purge_type=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_log_purge_type=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_log_purge_type="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_log_purge_type=3;
+
+SET @@global.maria_log_purge_type = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_max_sort_file_size_basic.test b/mysql-test/suite/sys_vars/t/maria_max_sort_file_size_basic.test
new file mode 100644
index 00000000000..1879449935b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_max_sort_file_size_basic.test
@@ -0,0 +1,49 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_max_sort_file_size;
+
+#
+# exists as global only
+#
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_max_sort_file_size, @@session.aria_max_sort_file_size;
+show global variables like '%aria_max_sort_file_size';
+show session variables like '%aria_max_sort_file_size';
+--sorted_result
+select * from information_schema.global_variables where variable_name like '%aria_max_sort_file_size';
+--sorted_result
+select * from information_schema.session_variables where variable_name like '%aria_max_sort_file_size';
+
+#
+# show that it's writable
+#
+set global maria_max_sort_file_size=1024*1024*10;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+--error ER_GLOBAL_VARIABLE
+set session maria_max_sort_file_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_max_sort_file_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_max_sort_file_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_max_sort_file_size="foo";
+
+#
+# min/max values, block size
+#
+set global maria_max_sort_file_size=1;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+set global maria_max_sort_file_size=@@global.maria_max_sort_file_size + 1024*1024 - 1;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+set global maria_max_sort_file_size=@@global.maria_max_sort_file_size + 1024*1024;
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+set global maria_max_sort_file_size=cast(-1 as unsigned int);
+select @@global.maria_max_sort_file_size, @@global.aria_max_sort_file_size;
+
+SET @@global.maria_max_sort_file_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_page_checksum_basic.test b/mysql-test/suite/sys_vars/t/maria_page_checksum_basic.test
new file mode 100644
index 00000000000..2085abdffd5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_page_checksum_basic.test
@@ -0,0 +1,39 @@
+# bool global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_page_checksum;
+
+#
+# exists as global only
+#
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_page_checksum, @@session.aria_page_checksum;
+show global variables like '%aria_page_checksum';
+show session variables like '%aria_page_checksum';
+select * from information_schema.global_variables where variable_name like '%aria_page_checksum';
+select * from information_schema.session_variables where variable_name like '%aria_page_checksum';
+
+#
+# show that it's writable
+#
+set global maria_page_checksum=ON;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+set global maria_page_checksum=OFF;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+set global maria_page_checksum=1;
+select @@global.maria_page_checksum, @@global.aria_page_checksum;
+--error ER_GLOBAL_VARIABLE
+set session maria_page_checksum=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_page_checksum=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_page_checksum=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_page_checksum="foo";
+
+SET @@global.maria_page_checksum = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_pagecache_age_threshold_basic.test b/mysql-test/suite/sys_vars/t/maria_pagecache_age_threshold_basic.test
new file mode 100644
index 00000000000..17204db2c6c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_pagecache_age_threshold_basic.test
@@ -0,0 +1,47 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_pagecache_age_threshold;
+
+#
+# exists as global only
+#
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_pagecache_age_threshold, @@session.aria_pagecache_age_threshold;
+show global variables like '%aria_pagecache_age_threshold';
+show session variables like '%aria_pagecache_age_threshold';
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_age_threshold';
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_age_threshold';
+
+#
+# show that it's writable
+#
+set global maria_pagecache_age_threshold=200;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+--error ER_GLOBAL_VARIABLE
+set session maria_pagecache_age_threshold=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_age_threshold=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_age_threshold=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_age_threshold="foo";
+
+#
+# min/max values, block size
+#
+set global maria_pagecache_age_threshold=1;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+set global maria_pagecache_age_threshold=@@global.maria_pagecache_age_threshold + 100 - 1;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+set global maria_pagecache_age_threshold=@@global.maria_pagecache_age_threshold + 100;
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+set global maria_pagecache_age_threshold=cast(-1 as unsigned int);
+select @@global.maria_pagecache_age_threshold, @@global.aria_pagecache_age_threshold;
+
+SET @@global.maria_pagecache_age_threshold = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_pagecache_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/maria_pagecache_buffer_size_basic.test
new file mode 100644
index 00000000000..1c37d2014db
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_pagecache_buffer_size_basic.test
@@ -0,0 +1,22 @@
+# ulong readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.maria_pagecache_buffer_size, @@global.aria_pagecache_buffer_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_pagecache_buffer_size, @@session.aria_pagecache_buffer_size;
+show global variables like '%aria_pagecache_buffer_size';
+show session variables like '%aria_pagecache_buffer_size';
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_buffer_size';
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_buffer_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global maria_pagecache_buffer_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session maria_pagecache_buffer_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/maria_pagecache_division_limit_basic.test b/mysql-test/suite/sys_vars/t/maria_pagecache_division_limit_basic.test
new file mode 100644
index 00000000000..c68cb05de10
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_pagecache_division_limit_basic.test
@@ -0,0 +1,43 @@
+# ulong global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_pagecache_division_limit;
+
+#
+# exists as global only
+#
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_pagecache_division_limit, @@session.aria_pagecache_division_limit;
+show global variables like '%aria_pagecache_division_limit';
+show session variables like '%aria_pagecache_division_limit';
+select * from information_schema.global_variables where variable_name like '%aria_pagecache_division_limit';
+select * from information_schema.session_variables where variable_name like '%aria_pagecache_division_limit';
+
+#
+# show that it's writable
+#
+set global maria_pagecache_division_limit=20;
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+--error ER_GLOBAL_VARIABLE
+set session maria_pagecache_division_limit=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_division_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_division_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_pagecache_division_limit="foo";
+
+#
+# min/max values, block size
+#
+set global maria_pagecache_division_limit=0;
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+set global maria_pagecache_division_limit=cast(-1 as unsigned int);
+select @@global.maria_pagecache_division_limit, @@global.aria_pagecache_division_limit;
+
+SET @@global.maria_pagecache_division_limit = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_recover_basic.test b/mysql-test/suite/sys_vars/t/maria_recover_basic.test
new file mode 100644
index 00000000000..d188339929d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_recover_basic.test
@@ -0,0 +1,51 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_recover;
+
+#
+# exists as global only
+#
+select @@global.maria_recover, @@global.aria_recover;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_recover, @@session.aria_recover;
+show global variables like '%aria_recover';
+show session variables like '%aria_recover';
+select * from information_schema.global_variables where variable_name like '%aria_recover';
+select * from information_schema.session_variables where variable_name like '%aria_recover';
+
+#
+# show that it's writable
+#
+set global maria_recover=1;
+select @@global.maria_recover, @@global.aria_recover;
+--error ER_GLOBAL_VARIABLE
+set session maria_recover=1;
+
+#
+# all valid values
+#
+set global maria_recover=normal;
+select @@global.maria_recover, @@global.aria_recover;
+set global maria_recover=backup;
+select @@global.maria_recover, @@global.aria_recover;
+set global maria_recover='force';
+select @@global.maria_recover, @@global.aria_recover;
+set global maria_recover=`quick`;
+select @@global.maria_recover, @@global.aria_recover;
+set global maria_recover=off;
+select @@global.maria_recover, @@global.aria_recover;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_recover=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_recover=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_recover="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_recover=5;
+
+SET @@global.maria_recover = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_repair_threads_basic.test b/mysql-test/suite/sys_vars/t/maria_repair_threads_basic.test
new file mode 100644
index 00000000000..7f66d18f528
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_repair_threads_basic.test
@@ -0,0 +1,43 @@
+# ulong session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_repair_threads;
+
+#
+# exists as global only
+#
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+show global variables like '%aria_repair_threads';
+show session variables like '%aria_repair_threads';
+select * from information_schema.global_variables where variable_name like '%aria_repair_threads';
+select * from information_schema.session_variables where variable_name like '%aria_repair_threads';
+
+#
+# show that it's writable
+#
+set global maria_repair_threads=10;
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+set session maria_repair_threads=10;
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_repair_threads=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session maria_repair_threads=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_repair_threads="foo";
+
+#
+# min/max values, block size
+#
+set global maria_repair_threads=0;
+select @@global.maria_repair_threads, @@global.aria_repair_threads;
+set session maria_repair_threads=cast(-1 as unsigned int);
+select @@session.maria_repair_threads, @@session.aria_repair_threads;
+
+SET @@global.maria_repair_threads = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/maria_sort_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/maria_sort_buffer_size_basic.test
new file mode 100644
index 00000000000..7887e2d19b5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_sort_buffer_size_basic.test
@@ -0,0 +1,43 @@
+# ulong session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_sort_buffer_size;
+
+#
+# exists as global only
+#
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+show global variables like '%aria_sort_buffer_size';
+show session variables like '%aria_sort_buffer_size';
+select * from information_schema.global_variables where variable_name like '%aria_sort_buffer_size';
+select * from information_schema.session_variables where variable_name like '%aria_sort_buffer_size';
+
+#
+# show that it's writable
+#
+set global maria_sort_buffer_size=10;
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+set session maria_sort_buffer_size=10;
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_sort_buffer_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session maria_sort_buffer_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_sort_buffer_size="foo";
+
+#
+# min/max values, block size
+#
+set global maria_sort_buffer_size=0;
+select @@global.maria_sort_buffer_size, @@global.aria_sort_buffer_size;
+set session maria_sort_buffer_size=cast(-1 as unsigned int);
+select @@session.maria_sort_buffer_size, @@session.aria_sort_buffer_size;
+
+SET @@global.maria_sort_buffer_size = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/maria_stats_method_basic.test b/mysql-test/suite/sys_vars/t/maria_stats_method_basic.test
new file mode 100644
index 00000000000..d615705c65a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_stats_method_basic.test
@@ -0,0 +1,46 @@
+# enum session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_stats_method;
+
+#
+# exists as global only
+#
+select @@global.maria_stats_method, @@global.aria_stats_method;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+show global variables like '%aria_stats_method';
+show session variables like '%aria_stats_method';
+select * from information_schema.global_variables where variable_name like '%aria_stats_method';
+select * from information_schema.session_variables where variable_name like '%aria_stats_method';
+
+#
+# show that it's writable
+#
+set global maria_stats_method=1;
+select @@global.maria_stats_method, @@global.aria_stats_method;
+set session maria_stats_method=1;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+
+#
+# all valid values
+#
+set session maria_stats_method=nulls_unequal;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+set session maria_stats_method=nulls_equal;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+set session maria_stats_method=nulls_ignored;
+select @@session.maria_stats_method, @@session.aria_stats_method;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session maria_stats_method=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session maria_stats_method=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session maria_stats_method="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set session maria_stats_method=3;
+
+SET @@global.maria_stats_method = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_sync_log_dir_basic.test b/mysql-test/suite/sys_vars/t/maria_sync_log_dir_basic.test
new file mode 100644
index 00000000000..7e9a424cc49
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_sync_log_dir_basic.test
@@ -0,0 +1,47 @@
+# enum global
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.maria_sync_log_dir;
+
+#
+# exists as global only
+#
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_sync_log_dir, @@session.aria_sync_log_dir;
+show global variables like '%aria_sync_log_dir';
+show session variables like '%aria_sync_log_dir';
+select * from information_schema.global_variables where variable_name like '%aria_sync_log_dir';
+select * from information_schema.session_variables where variable_name like '%aria_sync_log_dir';
+
+#
+# show that it's writable
+#
+set global maria_sync_log_dir=1;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+--error ER_GLOBAL_VARIABLE
+set session maria_sync_log_dir=1;
+
+#
+# all valid values
+#
+set global maria_sync_log_dir=never;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+set global maria_sync_log_dir=newfile;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+set global maria_sync_log_dir=always;
+select @@global.maria_sync_log_dir, @@global.aria_sync_log_dir;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_sync_log_dir=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global maria_sync_log_dir=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_sync_log_dir="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set global maria_sync_log_dir=3;
+
+SET @@global.maria_sync_log_dir = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/maria_used_for_temp_tables_basic.test b/mysql-test/suite/sys_vars/t/maria_used_for_temp_tables_basic.test
new file mode 100644
index 00000000000..504e2dfbcb5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maria_used_for_temp_tables_basic.test
@@ -0,0 +1,22 @@
+# bool readonly
+
+--source include/have_maria.inc
+#
+# show the global and session values;
+#
+select @@global.maria_used_for_temp_tables, @@global.aria_used_for_temp_tables;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.maria_used_for_temp_tables, @@session.aria_used_for_temp_tables;
+show global variables like '%aria_used_for_temp_tables';
+show session variables like '%aria_used_for_temp_tables';
+select * from information_schema.global_variables where variable_name like '%aria_used_for_temp_tables';
+select * from information_schema.session_variables where variable_name like '%aria_used_for_temp_tables';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global maria_used_for_temp_tables=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session maria_used_for_temp_tables=1;
+
diff --git a/mysql-test/suite/sys_vars/t/mrr_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/mrr_buffer_size_basic.test
new file mode 100644
index 00000000000..5641bb7db6f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/mrr_buffer_size_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.mrr_buffer_size;
+
+#
+# exists as global only
+#
+select @@global.mrr_buffer_size;
+select @@session.mrr_buffer_size;
+show global variables like 'mrr_buffer_size';
+show session variables like 'mrr_buffer_size';
+select * from information_schema.global_variables where variable_name='mrr_buffer_size';
+select * from information_schema.session_variables where variable_name='mrr_buffer_size';
+
+#
+# show that it's writable
+#
+set global mrr_buffer_size=10;
+select @@global.mrr_buffer_size;
+set session mrr_buffer_size=10;
+select @@session.mrr_buffer_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global mrr_buffer_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session mrr_buffer_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global mrr_buffer_size="foo";
+
+#
+# min/max values, block size
+#
+set global mrr_buffer_size=0;
+select @@global.mrr_buffer_size;
+set session mrr_buffer_size=cast(-1 as unsigned int);
+select @@session.mrr_buffer_size;
+
+SET @@global.mrr_buffer_size = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
new file mode 100644
index 00000000000..03b7743a7aa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
@@ -0,0 +1,21 @@
+# bool readonly
+
+#
+# show the global and session values;
+#
+select @@global.mutex_deadlock_detector;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.mutex_deadlock_detector;
+show global variables like 'mutex_deadlock_detector';
+show session variables like 'mutex_deadlock_detector';
+select * from information_schema.global_variables where variable_name='mutex_deadlock_detector';
+select * from information_schema.session_variables where variable_name='mutex_deadlock_detector';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global mutex_deadlock_detector=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session mutex_deadlock_detector=1;
+
diff --git a/mysql-test/suite/sys_vars/t/optimizer_use_mrr_basic.test b/mysql-test/suite/sys_vars/t/optimizer_use_mrr_basic.test
new file mode 100644
index 00000000000..bb5f1284614
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/optimizer_use_mrr_basic.test
@@ -0,0 +1,46 @@
+# enum session
+--source include/have_maria.inc
+
+SET @start_global_value = @@global.optimizer_use_mrr;
+
+#
+# exists as global only
+#
+select @@global.optimizer_use_mrr;
+select @@session.optimizer_use_mrr;
+show global variables like 'optimizer_use_mrr';
+show session variables like 'optimizer_use_mrr';
+select * from information_schema.global_variables where variable_name='optimizer_use_mrr';
+select * from information_schema.session_variables where variable_name='optimizer_use_mrr';
+
+#
+# show that it's writable
+#
+set global optimizer_use_mrr=1;
+select @@global.optimizer_use_mrr;
+set session optimizer_use_mrr=1;
+select @@session.optimizer_use_mrr;
+
+#
+# all valid values
+#
+set session optimizer_use_mrr='auto';
+select @@session.optimizer_use_mrr;
+set session optimizer_use_mrr='force';
+select @@session.optimizer_use_mrr;
+set session optimizer_use_mrr='disable';
+select @@session.optimizer_use_mrr;
+
+#
+# incorrect types/values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session optimizer_use_mrr=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session optimizer_use_mrr=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session optimizer_use_mrr="foo";
+--error ER_WRONG_VALUE_FOR_VAR
+set session optimizer_use_mrr=3;
+
+SET @@global.optimizer_use_mrr = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
index d714950c807..24dc15b646e 100644
--- a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
+++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
@@ -5,18 +5,20 @@
#
# on windows it's <basedir>/lib/plugin
# on unix it's <basedir>/lib/mysql/plugin
+# unless mtr sets it to $MYSQL_TEST_DIR/var/plugins
#
---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+let plugindir=$MYSQL_TEST_DIR/var;
+--replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
select @@global.plugin_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.plugin_dir;
---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
show global variables like 'plugin_dir';
---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
show session variables like 'plugin_dir';
---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
select * from information_schema.global_variables where variable_name='plugin_dir';
---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
select * from information_schema.session_variables where variable_name='plugin_dir';
#
diff --git a/mysql-test/suite/sys_vars/t/plugin_maturity_basic.test b/mysql-test/suite/sys_vars/t/plugin_maturity_basic.test
new file mode 100644
index 00000000000..2590e07c85f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/plugin_maturity_basic.test
@@ -0,0 +1,21 @@
+# enum readonly
+
+#
+# show the global and session values;
+#
+select @@global.plugin_maturity;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.plugin_maturity;
+show global variables like 'plugin_maturity';
+show session variables like 'plugin_maturity';
+select * from information_schema.global_variables where variable_name='plugin_maturity';
+select * from information_schema.session_variables where variable_name='plugin_maturity';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global plugin_maturity=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session plugin_maturity=1;
+
diff --git a/mysql-test/suite/sys_vars/t/rowid_merge_buff_size_basic.test b/mysql-test/suite/sys_vars/t/rowid_merge_buff_size_basic.test
new file mode 100644
index 00000000000..1c88bdd7180
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rowid_merge_buff_size_basic.test
@@ -0,0 +1,42 @@
+# ulong session
+
+SET @start_global_value = @@global.rowid_merge_buff_size;
+
+#
+# exists as global only
+#
+select @@global.rowid_merge_buff_size;
+select @@session.rowid_merge_buff_size;
+show global variables like 'rowid_merge_buff_size';
+show session variables like 'rowid_merge_buff_size';
+select * from information_schema.global_variables where variable_name='rowid_merge_buff_size';
+select * from information_schema.session_variables where variable_name='rowid_merge_buff_size';
+
+#
+# show that it's writable
+#
+set global rowid_merge_buff_size=10;
+select @@global.rowid_merge_buff_size;
+set session rowid_merge_buff_size=10;
+select @@session.rowid_merge_buff_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global rowid_merge_buff_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session rowid_merge_buff_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global rowid_merge_buff_size="foo";
+
+#
+# min/max values, block size
+#
+set global rowid_merge_buff_size=0;
+select @@global.rowid_merge_buff_size;
+set session rowid_merge_buff_size=cast(-1 as unsigned int);
+select @@session.rowid_merge_buff_size;
+
+SET @@global.rowid_merge_buff_size = @start_global_value;
+
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test
index 43954d6441d..ded489f36ff 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test
@@ -9,7 +9,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
select @@global.rpl_semi_sync_master_enabled;
SET @start_global_value = @@global.rpl_semi_sync_master_enabled;
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test
index 0d085412a00..5258894150d 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test
@@ -8,7 +8,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
select @@global.rpl_semi_sync_master_timeout;
SET @start_global_value = @@global.rpl_semi_sync_master_timeout;
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test
index c3f538f8dba..d9b1d860b35 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test
@@ -8,7 +8,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
select @@global.rpl_semi_sync_master_trace_level;
SET @start_global_value = @@global.rpl_semi_sync_master_trace_level;
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test
index 1db772dec61..896bd50d156 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test
@@ -9,7 +9,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_SO';
select @@global.rpl_semi_sync_master_wait_no_slave;
SET @start_global_value = @@global.rpl_semi_sync_master_wait_no_slave;
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test
index 565139456db..030b0827a11 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test
@@ -9,7 +9,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_SO';
select @@global.rpl_semi_sync_slave_enabled;
SET @start_global_value = @@global.rpl_semi_sync_slave_enabled;
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt
deleted file mode 100644
index 58029d28ace..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt
+++ /dev/null
@@ -1 +0,0 @@
-$SEMISYNC_PLUGIN_OPT
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test
index ac88593f02f..64c935ee957 100644
--- a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test
@@ -8,7 +8,7 @@ source include/not_embedded.inc;
source include/have_semisync_plugin.inc;
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_SO';
select @@global.rpl_semi_sync_slave_trace_level;
SET @start_global_value = @@global.rpl_semi_sync_slave_trace_level;
diff --git a/mysql-test/suite/sys_vars/t/storage_engine_basic.test b/mysql-test/suite/sys_vars/t/storage_engine_basic.test
index 49e8a52efea..2d1e94e6620 100644
--- a/mysql-test/suite/sys_vars/t/storage_engine_basic.test
+++ b/mysql-test/suite/sys_vars/t/storage_engine_basic.test
@@ -35,9 +35,7 @@
#############################################################
SET @start_global_value = @@global.storage_engine;
-SELECT @start_global_value;
SET @start_session_value = @@session.storage_engine;
-SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
@@ -47,10 +45,12 @@ SELECT @start_session_value;
SET @@global.storage_engine = INNODB;
SET @@global.storage_engine = DEFAULT;
+--replace_result MyISAM InnoDB
SELECT @@global.storage_engine;
SET @@session.storage_engine = INNODB;
SET @@session.storage_engine = DEFAULT;
+--replace_result MyISAM InnoDB
SELECT @@session.storage_engine;
@@ -179,9 +179,7 @@ SET @@storage_engine = @start_global_value;
####################################
SET @@global.storage_engine = @start_global_value;
-SELECT @@global.storage_engine;
SET @@session.storage_engine = @start_session_value;
-SELECT @@session.storage_engine;
#############################################################
diff --git a/mysql-test/suite/sys_vars/t/userstat_basic.test b/mysql-test/suite/sys_vars/t/userstat_basic.test
new file mode 100644
index 00000000000..55aa98c90c7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/userstat_basic.test
@@ -0,0 +1,38 @@
+# bool global
+
+SET @start_global_value = @@global.userstat;
+
+#
+# exists as global only
+#
+select @@global.userstat;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.userstat;
+show global variables like 'userstat';
+show session variables like 'userstat';
+select * from information_schema.global_variables where variable_name='userstat';
+select * from information_schema.session_variables where variable_name='userstat';
+
+#
+# show that it's writable
+#
+set global userstat=ON;
+select @@global.userstat;
+set global userstat=OFF;
+select @@global.userstat;
+set global userstat=1;
+select @@global.userstat;
+--error ER_GLOBAL_VARIABLE
+set session userstat=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global userstat=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global userstat=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global userstat="foo";
+
+SET @@global.userstat = @start_global_value;
diff --git a/mysql-test/suite/vcol/inc/vcol_keys.inc b/mysql-test/suite/vcol/inc/vcol_keys.inc
index 68a40afea92..bba58363a81 100644
--- a/mysql-test/suite/vcol/inc/vcol_keys.inc
+++ b/mysql-test/suite/vcol/inc/vcol_keys.inc
@@ -96,9 +96,9 @@ if (!$skip_spatial_index_check)
{
--echo # Error "All parts of a SPATIAL index must be NOT NULL"
--error ER_SPATIAL_CANT_HAVE_NULL
- create table t1 (a int, b int as (a+1) persistent, spatial index (b));
+ create table t1 (a int, b geometry as (a+1) persistent, spatial index (b));
create table t1 (a int, b int as (a+1) persistent);
- --error ER_SPATIAL_CANT_HAVE_NULL
+ --error ER_SPATIAL_MUST_HAVE_GEOM_COL
alter table t1 add spatial index (b);
drop table t1;
}
diff --git a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
index 4f6b960f9d0..78a8e8944fd 100644
--- a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
+++ b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
@@ -83,7 +83,7 @@ let $rows = 1;
--echo # COT()
let $cols = a double, b double as (format(cot(a),6));
let $values1 = 12,default;
-let $values2 = 0,default;
+let $values2 = 1,default;
let $rows = 2;
--source suite/vcol/inc/vcol_supported_sql_funcs.inc
diff --git a/mysql-test/suite/vcol/r/vcol_archive.result b/mysql-test/suite/vcol/r/vcol_archive.result
index 83fb78a5592..5ca80dae7d2 100644
--- a/mysql-test/suite/vcol/r/vcol_archive.result
+++ b/mysql-test/suite/vcol/r/vcol_archive.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'archive';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'ARCHIVE' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'ARCHIVE' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_blackhole.result b/mysql-test/suite/vcol/r/vcol_blackhole.result
index 15e7505aebb..dad1902643f 100644
--- a/mysql-test/suite/vcol/r/vcol_blackhole.result
+++ b/mysql-test/suite/vcol/r/vcol_blackhole.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'blackhole';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'BLACKHOLE' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'BLACKHOLE' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_csv.result b/mysql-test/suite/vcol/r/vcol_csv.result
index 97977505696..2da4e330f9f 100644
--- a/mysql-test/suite/vcol/r/vcol_csv.result
+++ b/mysql-test/suite/vcol/r/vcol_csv.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'CSV';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'CSV' is not yet supported for computed columns
create table t1 (a int not null);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'CSV' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index 161a82171ce..3628139bd03 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
insert into t1 values (1,2,3);
Warnings:
-Warning 1647 The value specified for computed column 'b' in table 't1' ignored
-Warning 1647 The value specified for computed column 'c' in table 't1' ignored
+Warning 1703 The value specified for computed column 'b' in table 't1' ignored
+Warning 1703 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -65,8 +65,8 @@ a b c
# against vcols
insert into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1647 The value specified for computed column 'b' in table 't1' ignored
-Warning 1647 The value specified for computed column 'b' in table 't1' ignored
+Warning 1703 The value specified for computed column 'b' in table 't1' ignored
+Warning 1703 The value specified for computed column 'b' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -107,8 +107,8 @@ a b c
create table t2 like t1;
insert into t2 select * from t1;
Warnings:
-Warning 1647 The value specified for computed column 'b' in table 't2' ignored
-Warning 1647 The value specified for computed column 'c' in table 't2' ignored
+Warning 1703 The value specified for computed column 'b' in table 't2' ignored
+Warning 1703 The value specified for computed column 'c' in table 't2' ignored
select * from t1;
a b c
2 -2 -2
@@ -123,8 +123,8 @@ a b c
create table t2 like t1;
insert into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1647 The value specified for computed column 'b' in table 't2' ignored
-Warning 1647 The value specified for computed column 'b' in table 't2' ignored
+Warning 1703 The value specified for computed column 'b' in table 't2' ignored
+Warning 1703 The value specified for computed column 'b' in table 't2' ignored
select * from t2;
a b c
2 -2 -2
@@ -159,7 +159,7 @@ a b c
2 -2 -2
update t1 set c=3 where a=2;
Warnings:
-Warning 1647 The value specified for computed column 'c' in table 't1' ignored
+Warning 1703 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -189,7 +189,7 @@ a b c
2 -2 -2
update t1 set c=3 where b=-2;
Warnings:
-Warning 1647 The value specified for computed column 'c' in table 't1' ignored
+Warning 1703 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index af0935affbc..f44d306312d 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -100,11 +100,11 @@ drop table t1;
# TODO: FULLTEXT INDEX
# SPATIAL INDEX
# Error "All parts of a SPATIAL index must be NOT NULL"
-create table t1 (a int, b int as (a+1) persistent, spatial index (b));
+create table t1 (a int, b geometry as (a+1) persistent, spatial index (b));
ERROR 42000: All parts of a SPATIAL index must be NOT NULL
create table t1 (a int, b int as (a+1) persistent);
alter table t1 add spatial index (b);
-ERROR 42000: All parts of a SPATIAL index must be NOT NULL
+ERROR 42000: A SPATIAL index may only contain a geometrical type column
drop table t1;
# FOREIGN KEY
# Rejected FK options.
diff --git a/mysql-test/suite/vcol/r/vcol_memory.result b/mysql-test/suite/vcol/r/vcol_memory.result
index 30b6bd4a4bf..8cfb21f3930 100644
--- a/mysql-test/suite/vcol/r/vcol_memory.result
+++ b/mysql-test/suite/vcol/r/vcol_memory.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'memory';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'MEMORY' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'MEMORY' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_merge.result b/mysql-test/suite/vcol/r/vcol_merge.result
index 03a1e151c2e..5cc2286a31a 100644
--- a/mysql-test/suite/vcol/r/vcol_merge.result
+++ b/mysql-test/suite/vcol/r/vcol_merge.result
@@ -4,5 +4,5 @@ create table t2 (a int, b int as (a % 10));
insert into t1 values (1,default);
insert into t2 values (2,default);
create table t3 (a int, b int as (a % 10)) engine=MERGE UNION=(t1,t2);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
+ERROR HY000: 'MRG_MYISAM' is not yet supported for computed columns
drop table t1,t2;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index a460b8da709..0cdd0029b85 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -108,10 +108,10 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL);
INSERT INTO t1 VALUES (0,1,0);
Warnings:
-Warning 1647 The value specified for computed column 'v' in table 't1' ignored
+Warning 1703 The value specified for computed column 'v' in table 't1' ignored
INSERT INTO t1 VALUES (NULL,0,0);
Warnings:
-Warning 1647 The value specified for computed column 'v' in table 't1' ignored
+Warning 1703 The value specified for computed column 'v' in table 't1' ignored
SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1;
a p v ROUND(a,p) ROUND(a,p+NULL)
1 0 1 1 NULL
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index e7c01abc3ac..cee28007caa 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -53,7 +53,7 @@ a b c a b c
explain select * from t1,t3 where t1.c=t3.c and t3.c=-1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 const c c 5 const 1
-1 SIMPLE t1 ref c c 5 const 2
+1 SIMPLE t1 ref c c 5 const 2 Using index condition
# select_type=PRIMARY, type=index,ALL
select * from t1 where b in (select c from t3);
a b c
@@ -130,7 +130,7 @@ count(distinct c)
3
explain select count(distinct c) from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL c 5 NULL 5 Using index
+1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning)
###
### filesort & range-based utils
###
diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
index 844aae38af2..ce6bd7eed40 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
@@ -170,11 +170,11 @@ t1 CREATE TABLE `t1` (
`b` double AS (format(cot(a),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
-insert into t1 values (0,default);
+insert into t1 values (1,default);
select * from t1;
a b
12 -1.572673
-0 NULL
+1 0.642093
drop table t1;
set sql_warnings = 0;
# CRC32()
diff --git a/mysql-test/suite/vcol/r/vcol_view_myisam.result b/mysql-test/suite/vcol/r/vcol_view_myisam.result
index bd5999792ff..72325939c20 100644
--- a/mysql-test/suite/vcol/r/vcol_view_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_view_myisam.result
@@ -266,8 +266,8 @@ insert into v1 (a) values (3);
ERROR HY000: CHECK OPTION failed 'test.v1'
insert ignore into v1 (a) values (2),(3),(0);
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
index 516e121a2aa..baefddc0fd1 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
let $skip_full_text_checks = 1;
diff --git a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
index 38baa2b3024..e11618163cc 100644
--- a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_handler_innodb.test b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
index bf443c6bbd3..1a50aeaaa86 100644
--- a/mysql-test/suite/vcol/t/vcol_handler_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
index 5d9ac12e930..3b83c7f4565 100644
--- a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
index e408672ac07..d44d2f701cf 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
index 88ed6157294..42834d5c0bb 100644
--- a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_partition_innodb.test b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
index 01230120ef9..47f1581fc96 100644
--- a/mysql-test/suite/vcol/t/vcol_partition_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test
index 314aecb75b9..787f5fe77a7 100644
--- a/mysql-test/suite/vcol/t/vcol_select_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
index 53826a460a7..32e2600c2fc 100644
--- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
index 5a36fb1c06d..57655d6d3fe 100644
--- a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_view_innodb.test b/mysql-test/suite/vcol/t/vcol_view_innodb.test
index 01fced8e4c3..322fb122436 100644
--- a/mysql-test/suite/vcol/t/vcol_view_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_view_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_innodb.inc
+--source include/have_xtradb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/t/archive_plugin-master.opt b/mysql-test/t/archive_plugin-master.opt
deleted file mode 100644
index 36b21a74922..00000000000
--- a/mysql-test/t/archive_plugin-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---plugin_dir=$ARCHIVE_PLUGIN_DIR
diff --git a/mysql-test/t/blackhole_plugin-master.opt b/mysql-test/t/blackhole_plugin-master.opt
deleted file mode 100644
index e78cd2b1662..00000000000
--- a/mysql-test/t/blackhole_plugin-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---plugin_dir=$BLACKHOLE_PLUGIN_DIR
diff --git a/mysql-test/t/bootstrap-master.opt b/mysql-test/t/bootstrap-master.opt
index 31a799e4d9b..96f0ce3f36c 100644
--- a/mysql-test/t/bootstrap-master.opt
+++ b/mysql-test/t/bootstrap-master.opt
@@ -1 +1 @@
---default-storage-engine=MyISAM --skip-innodb
+--default-storage-engine=MyISAM
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
index ca8782f1b27..d5bb2f42273 100644
--- a/mysql-test/t/bootstrap.test
+++ b/mysql-test/t/bootstrap.test
@@ -7,7 +7,7 @@ drop table if exists t1;
# Add the datadir to the bootstrap command
let $MYSQLD_DATADIR= `select @@datadir`;
-let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --skip-innodb;
+let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --loose-skip-innodb;
#
# Check that --bootstrap reads from stdin
#
diff --git a/mysql-test/t/crash_commit_before-master.opt b/mysql-test/t/crash_commit_before-master.opt
index becc5443ef1..9bcf94dca97 100644
--- a/mysql-test/t/crash_commit_before-master.opt
+++ b/mysql-test/t/crash_commit_before-master.opt
@@ -1,3 +1,3 @@
--skip-stack-trace --skip-core-file
--default-storage-engine=MyISAM
---loose-innodb-file-per-table=0
+--loose-skip-innodb-file-per-table
diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test
index ef705474eee..513dfb4e03f 100644
--- a/mysql-test/t/ctype_utf16.test
+++ b/mysql-test/t/ctype_utf16.test
@@ -2,6 +2,8 @@
-- source include/have_utf8mb4.inc
+SET TIME_ZONE='+03:00';
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test
index b03284a1c7c..89e4499d0b1 100644
--- a/mysql-test/t/ctype_utf32.test
+++ b/mysql-test/t/ctype_utf32.test
@@ -1,5 +1,7 @@
-- source include/have_utf32.inc
+SET TIME_ZONE = '+03:00';
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 45f6dc2f82e..957c2e9a7b4 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -4,6 +4,9 @@
let collation=utf8_unicode_ci;
--source include/have_collation.inc
+SET TIME_ZONE='+03:00';
+
+--source include/have_innodb.inc
--disable_warnings
drop table if exists t1,t2,t3,t4;
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index 1a121d10470..6b6cdaabcdf 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -258,7 +258,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT);
--error ER_SP_DOES_NOT_EXIST
INSERT DELAYED INTO t1 SET a= b();
---error 1305
+--error ER_BAD_FIELD_ERROR
INSERT DELAYED INTO t1 SET b= 1;
--error ER_SP_DOES_NOT_EXIST
INSERT DELAYED INTO t1 SET b= b();
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 7456face914..bd1817b20ec 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -18,3 +18,4 @@ query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails spo
sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution
ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06
main.events_time_zone : Test is not predictable as it depends on precise timing.
+table_elim : sergeyp to reapply 2643.26.4 in Item_sum::update_used_tables
diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test
index 1c296ee302b..3240dccbc76 100644
--- a/mysql-test/t/events_logs_tests.test
+++ b/mysql-test/t/events_logs_tests.test
@@ -75,10 +75,12 @@ create event ev_log_general on schedule at now() on completion not preserve
--replace_column 1 USER_HOST
select user_host, db, sql_text from mysql.slow_log
where sql_text like 'select \'events_logs_test\'%';
+
drop database events_test;
set global event_scheduler=off;
set @@global.long_query_time=default;
set @@session.long_query_time=default;
+
#
# Safety
#
diff --git a/mysql-test/t/fulltext_plugin.test b/mysql-test/t/fulltext_plugin.test
index 25e4302ef0d..5f09992d464 100644
--- a/mysql-test/t/fulltext_plugin.test
+++ b/mysql-test/t/fulltext_plugin.test
@@ -4,7 +4,7 @@
# BUG#39746 - Debug flag breaks struct definition (server crash)
#
--replace_regex /\.dll/.so/
-eval INSTALL PLUGIN simple_parser SONAME $MYPLUGLIB_SO;
+eval INSTALL PLUGIN simple_parser SONAME '$MYPLUGLIB_SO';
CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
diff --git a/mysql-test/t/information_schema_all_engines-master.opt b/mysql-test/t/information_schema_all_engines-master.opt
deleted file mode 100644
index 959cf74c816..00000000000
--- a/mysql-test/t/information_schema_all_engines-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-safemalloc
diff --git a/mysql-test/t/information_schema_all_engines.test b/mysql-test/t/information_schema_all_engines.test
index b20ce60985c..97065803169 100644
--- a/mysql-test/t/information_schema_all_engines.test
+++ b/mysql-test/t/information_schema_all_engines.test
@@ -4,7 +4,7 @@
--source include/not_embedded.inc
--source include/have_pbxt.inc
---source include/have_innodb.inc
+--source include/have_xtradb.inc
--source include/not_staging.inc
use INFORMATION_SCHEMA;
diff --git a/mysql-test/t/information_schema_parameters.test b/mysql-test/t/information_schema_parameters.test
index ec9616926b7..254daa5d314 100644
--- a/mysql-test/t/information_schema_parameters.test
+++ b/mysql-test/t/information_schema_parameters.test
@@ -28,7 +28,7 @@
###############################################################################
-- echo # ========== parameters.1 ==========
USE INFORMATION_SCHEMA;
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
SHOW CREATE TABLE INFORMATION_SCHEMA.PARAMETERS;
# embedded server does not display privileges
diff --git a/mysql-test/t/information_schema_routines.test b/mysql-test/t/information_schema_routines.test
index c107b1dc2ce..2d80f67fb72 100644
--- a/mysql-test/t/information_schema_routines.test
+++ b/mysql-test/t/information_schema_routines.test
@@ -56,7 +56,7 @@
################################################################################
-- echo # ========== routines.1 ==========
USE INFORMATION_SCHEMA;
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
SHOW CREATE TABLE INFORMATION_SCHEMA.ROUTINES;
# embedded server does not display privileges
diff --git a/mysql-test/t/innodb-lock.test b/mysql-test/t/innodb-lock.test
deleted file mode 100644
index eacf7e562be..00000000000
--- a/mysql-test/t/innodb-lock.test
+++ /dev/null
@@ -1,102 +0,0 @@
--- source include/have_innodb.inc
-
-#
-# Check and select innodb lock type
-#
-
-set global innodb_table_locks=1;
-
-select @@innodb_table_locks;
-
-#
-# Testing of explicit table locks with enforced table locks
-#
-
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Testing of explicit table locks with enforced table locks
-#
-
-set @@innodb_table_locks=1;
-
-connection con1;
-create table t1 (id integer, x integer) engine=INNODB;
-insert into t1 values(0, 0);
-set autocommit=0;
-SELECT * from t1 where id = 0 FOR UPDATE;
-
-connection con2;
-set autocommit=0;
-
-# The following statement should hang because con1 is locking the page
---send
-lock table t1 write;
---sleep 2
-
-connection con1;
-update t1 set x=1 where id = 0;
-select * from t1;
-commit;
-
-connection con2;
-reap;
-update t1 set x=2 where id = 0;
-commit;
-unlock tables;
-
-connection con1;
-select * from t1;
-commit;
-
-drop table t1;
-
-#
-# Try with old lock method (where LOCK TABLE is ignored by InnoDB)
-#
-
-set @@innodb_table_locks=0;
-
-create table t1 (id integer primary key, x integer) engine=INNODB;
-insert into t1 values(0, 0),(1,1),(2,2);
-commit;
-SELECT * from t1 where id = 0 FOR UPDATE;
-
-connection con2;
-set autocommit=0;
-set @@innodb_table_locks=0;
-
-# The following statement should work becase innodb doesn't check table locks
-lock table t1 write;
-
-connection con1;
-
-# This will be locked by MySQL
---send
-update t1 set x=10 where id = 2;
---sleep 2
-
-connection con2;
-
-# Note that we will get a deadlock if we try to select any rows marked
-# for update by con1 !
-
-SELECT * from t1 where id = 2;
-UPDATE t1 set x=3 where id = 2;
-commit;
-SELECT * from t1;
-commit;
-unlock tables;
-
-connection con1;
-reap;
-commit;
-select * from t1;
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/t/innodb-master.opt b/mysql-test/t/innodb-master.opt
deleted file mode 100644
index 72c88068345..00000000000
--- a/mysql-test/t/innodb-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---binlog_cache_size=32768 --loose_innodb_lock_wait_timeout=1
diff --git a/mysql-test/t/innodb-semi-consistent-master.opt b/mysql-test/t/innodb-semi-consistent-master.opt
deleted file mode 100644
index cb48f1aaf60..00000000000
--- a/mysql-test/t/innodb-semi-consistent-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb_lock_wait_timeout=2
diff --git a/mysql-test/t/innodb-semi-consistent.test b/mysql-test/t/innodb-semi-consistent.test
deleted file mode 100644
index f5ed4677c69..00000000000
--- a/mysql-test/t/innodb-semi-consistent.test
+++ /dev/null
@@ -1,68 +0,0 @@
--- source include/not_embedded.inc
--- source include/have_innodb.inc
-
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
-# basic tests of semi-consistent reads
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-set binlog_format=mixed;
-set session transaction isolation level repeatable read;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2),(3),(4),(5),(6),(7);
-set autocommit=0;
-# this should lock the entire table
-select * from t1 where a=3 lock in share mode;
-connection b;
-set binlog_format=mixed;
-set session transaction isolation level repeatable read;
-set autocommit=0;
--- error ER_LOCK_WAIT_TIMEOUT
-update t1 set a=10 where a=5;
-connection a;
-commit;
-connection b;
-# perform a semi-consisent read (and unlock non-matching rows)
-set session transaction isolation level read committed;
-update t1 set a=10 where a=5;
-connection a;
--- error ER_LOCK_WAIT_TIMEOUT
-select * from t1 where a=2 for update;
-# this should lock the records (1),(2)
-select * from t1 where a=2 limit 1 for update;
-connection b;
-# semi-consistent read will skip non-matching locked rows a=1, a=2
-update t1 set a=11 where a=6;
--- error ER_LOCK_WAIT_TIMEOUT
-update t1 set a=12 where a=2;
--- error ER_LOCK_WAIT_TIMEOUT
-update t1 set a=13 where a=1;
-connection a;
-commit;
-connection b;
-update t1 set a=14 where a=1;
-commit;
-connection a;
-select * from t1;
-drop table t1;
-
-connection default;
-disconnect a;
-disconnect b;
-
-# Bug 39320
-create table t1 (a int, b int) engine=myisam;
-create table t2 (c int, d int, key (c)) engine=innodb;
-insert into t1 values (1,1);
-insert into t2 values (1,2);
-connect (a,localhost,root,,);
-connection a;
-set session transaction isolation level read committed;
-delete from t1 using t1 join t2 on t1.a = t2.c where t2.d in (1);
-connection default;
-disconnect a;
-drop table t1, t2;
diff --git a/mysql-test/t/innodb-zip.test b/mysql-test/t/innodb-zip.test
deleted file mode 100644
index 7514da087eb..00000000000
--- a/mysql-test/t/innodb-zip.test
+++ /dev/null
@@ -1,347 +0,0 @@
--- source include/have_innodb.inc
-
-let $per_table=`select @@innodb_file_per_table`;
-let $format=`select @@innodb_file_format`;
-let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
-set global innodb_file_per_table=off;
-set global innodb_file_format=`0`;
-
-create table t0(a int primary key) engine=innodb row_format=compressed;
-create table t00(a int primary key) engine=innodb
-key_block_size=4 row_format=compressed;
-create table t1(a int primary key) engine=innodb row_format=dynamic;
-create table t2(a int primary key) engine=innodb row_format=redundant;
-create table t3(a int primary key) engine=innodb row_format=compact;
-create table t4(a int primary key) engine=innodb key_block_size=9;
-create table t5(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-
-set global innodb_file_per_table=on;
-create table t6(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-set global innodb_file_format=`1`;
-create table t7(a int primary key) engine=innodb
-key_block_size=1 row_format=redundant;
-create table t8(a int primary key) engine=innodb
-key_block_size=1 row_format=fixed;
-create table t9(a int primary key) engine=innodb
-key_block_size=1 row_format=compact;
-create table t10(a int primary key) engine=innodb
-key_block_size=1 row_format=dynamic;
-create table t11(a int primary key) engine=innodb
-key_block_size=1 row_format=compressed;
-create table t12(a int primary key) engine=innodb
-key_block_size=1;
-create table t13(a int primary key) engine=innodb
-row_format=compressed;
-create table t14(a int primary key) engine=innodb key_block_size=9;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-
-drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
-alter table t1 key_block_size=0;
-alter table t1 row_format=dynamic;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-alter table t1 row_format=compact;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-alter table t1 row_format=redundant;
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t1;
-
-create table t1(a int not null, b text, index(b(10))) engine=innodb
-key_block_size=1;
-
-create table t2(b text)engine=innodb;
-insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000)));
-
-insert into t1 select 1, b from t2;
-commit;
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-
-connection a;
-begin;
-update t1 set b=repeat('B',100);
-
-connection b;
-select a,left(b,40) from t1 natural join t2;
-
-connection a;
-rollback;
-
-connection b;
-select a,left(b,40) from t1 natural join t2;
-
-connection default;
-disconnect a;
-disconnect b;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t1,t2;
-
-# The following should fail even in non-strict mode.
-SET SESSION innodb_strict_mode = off;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
-drop table t1;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-# The maximum key size for a compressed row actually depends on the
-# version of libz used, as account must be taken for the maximum
-# compressed size of a key, and this differs between libz
-# versions. Some libz versions allow a size of 439, some only 438.
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
-DROP TABLE t1;
-
-#
-# Test blob column inheritance (mantis issue#36)
-#
-
-create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
- primary key(c1, c2(22), c3(22)))
- engine = innodb row_format = dynamic;
-begin;
-insert into t1 values(1, repeat('A', 20000), repeat('B', 20000),
- repeat('C', 20000));
-
-update t1 set c3 = repeat('D', 20000) where c1 = 1;
-commit;
-
-# one blob column which is unchanged in update and part of PK
-# one blob column which is changed and part of of PK
-# one blob column which is not part of PK and is unchanged
-select count(*) from t1 where c2 = repeat('A', 20000);
-select count(*) from t1 where c3 = repeat('D', 20000);
-select count(*) from t1 where c4 = repeat('C', 20000);
-
-update t1 set c3 = repeat('E', 20000) where c1 = 1;
-drop table t1;
-
-#
-#
-# Test innodb_file_format
-#
-set global innodb_file_format=`0`;
-select @@innodb_file_format;
-set global innodb_file_format=`1`;
-select @@innodb_file_format;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=`2`;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=`-1`;
-set global innodb_file_format=`Antelope`;
-set global innodb_file_format=`Barracuda`;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=`Cheetah`;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=`abc`;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=`1a`;
--- error ER_WRONG_ARGUMENTS
-set global innodb_file_format=``;
-
-#test strict mode.
-# this does not work anymore, has been removed from mysqltest
-# -- enable_errors
-set global innodb_file_per_table = on;
-set global innodb_file_format = `1`;
-
-set innodb_strict_mode = off;
-create table t1 (id int primary key) engine = innodb key_block_size = 0;
-drop table t1;
-
-#set strict_mode
-set innodb_strict_mode = on;
-
-#Test different values of KEY_BLOCK_SIZE
-
---error ER_CANT_CREATE_TABLE
-create table t1 (id int primary key) engine = innodb key_block_size = 0;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb key_block_size = 9;
-show warnings;
-
-
-create table t3 (id int primary key) engine = innodb key_block_size = 1;
-create table t4 (id int primary key) engine = innodb key_block_size = 2;
-create table t5 (id int primary key) engine = innodb key_block_size = 4;
-create table t6 (id int primary key) engine = innodb key_block_size = 8;
-create table t7 (id int primary key) engine = innodb key_block_size = 16;
-
-#check various ROW_FORMAT values.
-create table t8 (id int primary key) engine = innodb row_format = compressed;
-create table t9 (id int primary key) engine = innodb row_format = dynamic;
-create table t10(id int primary key) engine = innodb row_format = compact;
-create table t11(id int primary key) engine = innodb row_format = redundant;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t3, t4, t5, t6, t7, t8, t9, t10, t11;
-
-#test different values of ROW_FORMAT with KEY_BLOCK_SIZE
-create table t1 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compressed;
-
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb
-key_block_size = 8 row_format = redundant;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t3 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compact;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t4 (id int primary key) engine = innodb
-key_block_size = 8 row_format = dynamic;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t5 (id int primary key) engine = innodb
-key_block_size = 8 row_format = default;
-show warnings;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t1;
-
-#test multiple errors
---error ER_CANT_CREATE_TABLE
-create table t1 (id int primary key) engine = innodb
-key_block_size = 9 row_format = redundant;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb
-key_block_size = 9 row_format = compact;
-show warnings;
-
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb
-key_block_size = 9 row_format = dynamic;
-show warnings;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-
-#test valid values with innodb_file_per_table unset
-set global innodb_file_per_table = off;
-
---error ER_CANT_CREATE_TABLE
-create table t1 (id int primary key) engine = innodb key_block_size = 1;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb key_block_size = 2;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t3 (id int primary key) engine = innodb key_block_size = 4;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t6 (id int primary key) engine = innodb row_format = compressed;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t7 (id int primary key) engine = innodb row_format = dynamic;
-show warnings;
-create table t8 (id int primary key) engine = innodb row_format = compact;
-create table t9 (id int primary key) engine = innodb row_format = redundant;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t8, t9;
-
-#test valid values with innodb_file_format unset
-set global innodb_file_per_table = on;
-set global innodb_file_format = `0`;
-
---error ER_CANT_CREATE_TABLE
-create table t1 (id int primary key) engine = innodb key_block_size = 1;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t2 (id int primary key) engine = innodb key_block_size = 2;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t3 (id int primary key) engine = innodb key_block_size = 4;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t6 (id int primary key) engine = innodb row_format = compressed;
-show warnings;
---error ER_CANT_CREATE_TABLE
-create table t7 (id int primary key) engine = innodb row_format = dynamic;
-show warnings;
-create table t8 (id int primary key) engine = innodb row_format = compact;
-create table t9 (id int primary key) engine = innodb row_format = redundant;
-
-SELECT table_schema, table_name, row_format
-FROM information_schema.tables WHERE engine='innodb';
-drop table t8, t9;
-
-eval set global innodb_file_per_table=$per_table;
-eval set global innodb_file_format=$format;
-#
-# Testing of tablespace tagging
-#
--- disable_info
-set global innodb_file_per_table=on;
-set global innodb_file_format=`Barracuda`;
-set global innodb_file_format_check=`Antelope`;
-create table normal_table (
- c1 int
-) engine = innodb;
-select @@innodb_file_format_check;
-create table zip_table (
- c1 int
-) engine = innodb key_block_size = 8;
-select @@innodb_file_format_check;
-set global innodb_file_format_check=`Antelope`;
-select @@innodb_file_format_check;
--- disable_result_log
-show table status;
--- enable_result_log
-select @@innodb_file_format_check;
-drop table normal_table, zip_table;
--- disable_result_log
-
-#
-# restore environment to the state it was before this test execution
-#
-
--- disable_query_log
-eval set global innodb_file_format=$format;
-eval set global innodb_file_per_table=$per_table;
-eval set global innodb_file_format_check=$innodb_file_format_check_orig;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
deleted file mode 100644
index 2c9f84e823a..00000000000
--- a/mysql-test/t/innodb.test
+++ /dev/null
@@ -1,2565 +0,0 @@
-#######################################################################
-# #
-# Please, DO NOT TOUCH this file as well as the innodb.result file. #
-# These files are to be modified ONLY BY INNOBASE guys. #
-# #
-# Use innodb_mysql.[test|result] files instead. #
-# #
-# If nevertheless you need to make some changes here, please, forward #
-# your commit message #
-# To: innodb_dev_ww@oracle.com #
-# Cc: dev-innodb@mysql.com #
-# (otherwise your changes may be erased). #
-# #
-#######################################################################
-
--- source include/have_innodb.inc
-
-# Save the original values of some variables in order to be able to
-# estimate how much they have changed during the tests. Previously this
-# test assumed that e.g. rows_deleted is 0 here and after deleting 23
-# rows it expected that rows_deleted will be 23. Now we do not make
-# assumptions about the values of the variables at the beginning, e.g.
-# rows_deleted should be 23 + "rows_deleted before the test". This allows
-# the test to be run multiple times without restarting the mysqld server.
-# See Bug#43309 Test main.innodb can't be run twice
--- disable_query_log
-SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
-
-SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
-SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
-SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
-SET @innodb_row_lock_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits');
-SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits');
-SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
-SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
-SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
--- enable_query_log
-
---disable_warnings
-drop table if exists t1,t2,t3,t4;
-drop database if exists mysqltest;
---enable_warnings
-
-#
-# Small basic test with ignore
-#
-
-create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
-
-insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
-select id, code, name from t1 order by id;
-
-update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
-select id, code, name from t1 order by id;
-update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
-select id, code, name from t1 order by id;
-
-drop table t1;
-
-#
-# A bit bigger test
-# The 'replace_column' statements are needed because the cardinality calculated
-# by innodb is not always the same between runs
-#
-
-CREATE TABLE t1 (
- id int(11) NOT NULL auto_increment,
- parent_id int(11) DEFAULT '0' NOT NULL,
- level tinyint(4) DEFAULT '0' NOT NULL,
- PRIMARY KEY (id),
- KEY parent_id (parent_id),
- KEY level (level)
-) engine=innodb;
-INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
-update t1 set parent_id=parent_id+100;
-select * from t1 where parent_id=102;
-update t1 set id=id+1000;
--- error ER_DUP_ENTRY,1022
-update t1 set id=1024 where id=1009;
-select * from t1;
-update ignore t1 set id=id+1; # This will change all rows
-select * from t1;
-update ignore t1 set id=1023 where id=1010;
-select * from t1 where parent_id=102;
---replace_column 9 #
-explain select level from t1 where level=1;
---replace_column 9 #
-explain select level,id from t1 where level=1;
---replace_column 9 #
-explain select level,id,parent_id from t1 where level=1;
-select level,id from t1 where level=1;
-select level,id,parent_id from t1 where level=1;
-optimize table t1;
---replace_column 7 #
-show keys from t1;
-drop table t1;
-
-#
-# Test replace
-#
-
-CREATE TABLE t1 (
- gesuchnr int(11) DEFAULT '0' NOT NULL,
- benutzer_id int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (gesuchnr,benutzer_id)
-) engine=innodb;
-
-replace into t1 (gesuchnr,benutzer_id) values (2,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-select * from t1;
-drop table t1;
-
-#
-# test delete using hidden_primary_key
-#
-
-create table t1 (a int) engine=innodb;
-insert into t1 values (1), (2);
-optimize table t1;
-delete from t1 where a = 1;
-select * from t1;
-check table t1;
-drop table t1;
-
-create table t1 (a int,b varchar(20)) engine=innodb;
-insert into t1 values (1,""), (2,"testing");
-delete from t1 where a = 1;
-select * from t1;
-create index skr on t1 (a);
-insert into t1 values (3,""), (4,"testing");
-analyze table t1;
---replace_column 7 #
-show keys from t1;
-drop table t1;
-
-
-# Test of reading on secondary key with may be null
-
-create table t1 (a int,b varchar(20),key(a)) engine=innodb;
-insert into t1 values (1,""), (2,"testing");
-select * from t1 where a = 1;
-drop table t1;
-
-#
-# Test rollback
-#
-
-create table t1 (n int not null primary key) engine=innodb;
-set autocommit=0;
-insert into t1 values (4);
-rollback;
-select n, "after rollback" from t1;
-insert into t1 values (4);
-commit;
-select n, "after commit" from t1;
-commit;
-insert into t1 values (5);
--- error ER_DUP_ENTRY
-insert into t1 values (4);
-commit;
-select n, "after commit" from t1;
-set autocommit=1;
-insert into t1 values (6);
--- error ER_DUP_ENTRY
-insert into t1 values (4);
-select n from t1;
-set autocommit=0;
-#
-# savepoints
-#
-begin;
-savepoint `my_savepoint`;
-insert into t1 values (7);
-savepoint `savept2`;
-insert into t1 values (3);
-select n from t1;
-savepoint savept3;
-rollback to savepoint savept2;
---error 1305
-rollback to savepoint savept3;
-rollback to savepoint savept2;
-release savepoint `my_savepoint`;
-select n from t1;
--- error 1305
-rollback to savepoint `my_savepoint`;
---error 1305
-rollback to savepoint savept2;
-insert into t1 values (8);
-savepoint sv;
-commit;
-savepoint sv;
-set autocommit=1;
-# nop
-rollback;
-drop table t1;
-
-#
-# Test for commit and FLUSH TABLES WITH READ LOCK
-#
-
-create table t1 (n int not null primary key) engine=innodb;
-start transaction;
-insert into t1 values (4);
-flush tables with read lock;
-#
-# Current code can't handle a read lock in middle of transaction
-#--error 1223;
-commit;
-unlock tables;
-commit;
-select * from t1;
-drop table t1;
-
-#
-# Testing transactions
-#
-
-create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
-begin;
-insert into t1 values(1,'hamdouni');
-select id as afterbegin_id,nom as afterbegin_nom from t1;
-rollback;
-select id as afterrollback_id,nom as afterrollback_nom from t1;
-set autocommit=0;
-insert into t1 values(2,'mysql');
-select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
-rollback;
-select id as afterrollback_id,nom as afterrollback_nom from t1;
-set autocommit=1;
-drop table t1;
-
-#
-# Simple not autocommit test
-#
-
-CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
-insert into t1 values ('pippo', 12);
--- error ER_DUP_ENTRY
-insert into t1 values ('pippo', 12); # Gives error
-delete from t1;
-delete from t1 where id = 'pippo';
-select * from t1;
-
-insert into t1 values ('pippo', 12);
-set autocommit=0;
-delete from t1;
-rollback;
-select * from t1;
-delete from t1;
-commit;
-select * from t1;
-drop table t1;
-
-#
-# Test of active transactions
-#
-
-create table t1 (a integer) engine=innodb;
-start transaction;
-rename table t1 to t2;
-create table t1 (b integer) engine=innodb;
-insert into t1 values (1);
-rollback;
-drop table t1;
-rename table t2 to t1;
-drop table t1;
-set autocommit=1;
-
-#
-# The following simple tests failed at some point
-#
-
-CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
-INSERT INTO t1 VALUES (1, 'Jochen');
-select * from t1;
-drop table t1;
-
-CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
-set autocommit=0;
-INSERT INTO t1 SET _userid='marc@anyware.co.uk';
-COMMIT;
-SELECT * FROM t1;
-SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk';
-drop table t1;
-set autocommit=1;
-
-#
-# Test when reading on part of unique key
-#
-CREATE TABLE t1 (
- user_id int(10) DEFAULT '0' NOT NULL,
- name varchar(100),
- phone varchar(100),
- ref_email varchar(100) DEFAULT '' NOT NULL,
- detail varchar(200),
- PRIMARY KEY (user_id,ref_email)
-)engine=innodb;
-
-INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar');
-select * from t1 where user_id=10292;
-INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10293,'shirish','2333604','shirish@yahoo.com','ddsds');
-select * from t1 where user_id=10292;
-select * from t1 where user_id>=10292;
-select * from t1 where user_id>10292;
-select * from t1 where user_id<10292;
-drop table t1;
-
-#
-# Test that keys are created in right order
-#
-
-CREATE TABLE t1 (a int not null, b int not null,c int not null,
-key(a),primary key(a,b), unique(c),key(a),unique(b));
---replace_column 7 #
-show index from t1;
-drop table t1;
-
-#
-# Test of ALTER TABLE and innodb tables
-#
-
-create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
-alter table t1 engine=innodb;
-insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
-select * from t1;
-update t1 set col2='7' where col1='4';
-select * from t1;
-alter table t1 add co3 int not null;
-select * from t1;
-update t1 set col2='9' where col1='2';
-select * from t1;
-drop table t1;
-
-#
-# INSERT INTO innodb tables
-#
-
-create table t1 (a int not null , b int, primary key (a)) engine = innodb;
-create table t2 (a int not null , b int, primary key (a)) engine = myisam;
-insert into t1 VALUES (1,3) , (2,3), (3,3);
-select * from t1;
-insert into t2 select * from t1;
-select * from t2;
-delete from t1 where b = 3;
-select * from t1;
-insert into t1 select * from t2;
-select * from t1;
-select * from t2;
-drop table t1,t2;
-
-#
-# ORDER BY on not primary key
-#
-
-CREATE TABLE t1 (
- user_name varchar(12),
- password text,
- subscribed char(1),
- user_id int(11) DEFAULT '0' NOT NULL,
- quota bigint(20),
- weight double,
- access_date date,
- access_time time,
- approved datetime,
- dummy_primary_key int(11) NOT NULL auto_increment,
- PRIMARY KEY (dummy_primary_key)
-) ENGINE=innodb;
-INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
-INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
-INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
-INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
-INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
-select user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
-drop table t1;
-
-#
-# Testing of tables without primary keys
-#
-
-CREATE TABLE t1 (
- id int(11) NOT NULL auto_increment,
- parent_id int(11) DEFAULT '0' NOT NULL,
- level tinyint(4) DEFAULT '0' NOT NULL,
- KEY (id),
- KEY parent_id (parent_id),
- KEY level (level)
-) engine=innodb;
-INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
-INSERT INTO t1 values (179,5,2);
-update t1 set parent_id=parent_id+100;
-select * from t1 where parent_id=102;
-update t1 set id=id+1000;
-update t1 set id=1024 where id=1009;
-select * from t1;
-update ignore t1 set id=id+1; # This will change all rows
-select * from t1;
-update ignore t1 set id=1023 where id=1010;
-select * from t1 where parent_id=102;
---replace_column 9 #
-explain select level from t1 where level=1;
-select level,id from t1 where level=1;
-select level,id,parent_id from t1 where level=1;
-select level,id from t1 where level=1 order by id;
-delete from t1 where level=1;
-select * from t1;
-drop table t1;
-
-#
-# Test of index only reads
-#
-CREATE TABLE t1 (
- sca_code char(6) NOT NULL,
- cat_code char(6) NOT NULL,
- sca_desc varchar(50),
- lan_code char(2) NOT NULL,
- sca_pic varchar(100),
- sca_sdesc varchar(50),
- sca_sch_desc varchar(16),
- PRIMARY KEY (sca_code, cat_code, lan_code),
- INDEX sca_pic (sca_pic)
-) engine = innodb ;
-
-INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
-select count(*) from t1 where sca_code = 'PD';
-select count(*) from t1 where sca_code <= 'PD';
-select count(*) from t1 where sca_pic is null;
-alter table t1 drop index sca_pic;
-alter table t1 add index sca_pic (cat_code, sca_pic);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-select count(*) from t1 where cat_code='E';
-
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
-select count(*) from t1 where sca_code='PD' and sca_pic is null;
-select count(*) from t1 where sca_pic >= 'n';
-select sca_pic from t1 where sca_pic is null;
-update t1 set sca_pic="test" where sca_pic is null;
-delete from t1 where sca_code='pd';
-drop table t1;
-
-#
-# Test of opening table twice and timestamps
-#
-set @a:=now();
-CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
-insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
-select a from t1 natural join t1 as t2 where b >= @a order by a;
-update t1 set a=5 where a=1;
-select a from t1;
-drop table t1;
-
-#
-# Test with variable length primary key
-#
-create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
-insert into t1 values("hello",1),("world",2);
-select * from t1 order by b desc;
-optimize table t1;
---replace_column 7 #
-show keys from t1;
-drop table t1;
-
-#
-# Test of create index with NULL columns
-#
-create table t1 (i int, j int ) ENGINE=innodb;
-insert into t1 values (1,2);
-select * from t1 where i=1 and j=2;
-create index ax1 on t1 (i,j);
-select * from t1 where i=1 and j=2;
-drop table t1;
-
-#
-# Test min-max optimization
-#
-
-CREATE TABLE t1 (
- a int3 unsigned NOT NULL,
- b int1 unsigned NOT NULL,
- UNIQUE (a, b)
-) ENGINE = innodb;
-
-INSERT INTO t1 VALUES (1, 1);
-SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
-drop table t1;
-
-#
-# Test INSERT DELAYED
-#
-
-CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
-# Can't test this in 3.23
-# INSERT DELAYED INTO t1 VALUES (1);
-INSERT INTO t1 VALUES (1);
-SELECT * FROM t1;
-DROP TABLE t1;
-
-
-#
-# Crash when using many tables (Test case by Jeremy D Zawodny)
-#
-
-create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
-insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
---replace_column 9 #
-explain select * from t1 where a > 0 and a < 50;
-drop table t1;
-
-#
-# Test lock tables
-#
-
-create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
-insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
-LOCK TABLES t1 WRITE;
---error ER_DUP_ENTRY
-insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-select id from t1;
-select id from t1;
-UNLOCK TABLES;
-DROP TABLE t1;
-
-create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
-insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
-LOCK TABLES t1 WRITE;
-begin;
---error ER_DUP_ENTRY
-insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-select id from t1;
-insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
-commit;
-select id,id3 from t1;
-UNLOCK TABLES;
-DROP TABLE t1;
-
-#
-# Test prefix key
-#
-create table t1 (a char(20), unique (a(5))) engine=innodb;
-drop table t1;
-create table t1 (a char(20), index (a(5))) engine=innodb;
-show create table t1;
-drop table t1;
-
-#
-# Test using temporary table and auto_increment
-#
-
-create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
-insert into t1 values (NULL),(NULL),(NULL);
-delete from t1 where a=3;
-insert into t1 values (NULL);
-select * from t1;
-alter table t1 add b int;
-select * from t1;
-drop table t1;
-
-#Slashdot bug
-create table t1
- (
- id int auto_increment primary key,
- name varchar(32) not null,
- value text not null,
- uid int not null,
- unique key(name,uid)
- ) engine=innodb;
-insert into t1 values (1,'one','one value',101),
- (2,'two','two value',102),(3,'three','three value',103);
-set insert_id=5;
-replace into t1 (value,name,uid) values ('other value','two',102);
-delete from t1 where uid=102;
-set insert_id=5;
-replace into t1 (value,name,uid) values ('other value','two',102);
-set insert_id=6;
-replace into t1 (value,name,uid) values ('other value','two',102);
-select * from t1;
-drop table t1;
-
-#
-# Test DROP DATABASE
-#
-
-create database mysqltest;
-create table mysqltest.t1 (a int not null) engine= innodb;
-insert into mysqltest.t1 values(1);
-create table mysqltest.t2 (a int not null) engine= myisam;
-insert into mysqltest.t2 values(1);
-create table mysqltest.t3 (a int not null) engine= heap;
-insert into mysqltest.t3 values(1);
-commit;
-drop database mysqltest;
-# Don't check error message
---error 1049
-show tables from mysqltest;
-
-#
-# Test truncate table with and without auto_commit
-#
-
-set autocommit=0;
-create table t1 (a int not null) engine= innodb;
-insert into t1 values(1),(2);
-truncate table t1;
-commit;
-truncate table t1;
-truncate table t1;
-select * from t1;
-insert into t1 values(1),(2);
-delete from t1;
-select * from t1;
-commit;
-drop table t1;
-set autocommit=1;
-
-create table t1 (a int not null) engine= innodb;
-insert into t1 values(1),(2);
-truncate table t1;
-insert into t1 values(1),(2);
-select * from t1;
-truncate table t1;
-insert into t1 values(1),(2);
-delete from t1;
-select * from t1;
-drop table t1;
-
-#
-# Test of how ORDER BY works when doing it on the whole table
-#
-
-create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
-insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
---replace_column 9 #
-explain select * from t1 order by a;
---replace_column 9 #
-explain select * from t1 order by b;
---replace_column 9 #
-explain select * from t1 order by c;
---replace_column 9 #
-explain select a from t1 order by a;
---replace_column 9 #
-explain select b from t1 order by b;
---replace_column 9 #
-explain select a,b from t1 order by b;
---replace_column 9 #
-explain select a,b from t1;
---replace_column 9 #
-explain select a,b,c from t1;
-drop table t1;
-
-#
-# Check describe
-#
-
-create table t1 (t int not null default 1, key (t)) engine=innodb;
-desc t1;
-drop table t1;
-
-#
-# Test of multi-table-delete
-#
-
-CREATE TABLE t1 (
- number bigint(20) NOT NULL default '0',
- cname char(15) NOT NULL default '',
- carrier_id smallint(6) NOT NULL default '0',
- privacy tinyint(4) NOT NULL default '0',
- last_mod_date timestamp NOT NULL,
- last_mod_id smallint(6) NOT NULL default '0',
- last_app_date timestamp NOT NULL,
- last_app_id smallint(6) default '-1',
- version smallint(6) NOT NULL default '0',
- assigned_scps int(11) default '0',
- status tinyint(4) default '0'
-) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
-INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
-INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
-INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
-INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
-INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
-CREATE TABLE t2 (
- number bigint(20) NOT NULL default '0',
- cname char(15) NOT NULL default '',
- carrier_id smallint(6) NOT NULL default '0',
- privacy tinyint(4) NOT NULL default '0',
- last_mod_date timestamp NOT NULL,
- last_mod_id smallint(6) NOT NULL default '0',
- last_app_date timestamp NOT NULL,
- last_app_id smallint(6) default '-1',
- version smallint(6) NOT NULL default '0',
- assigned_scps int(11) default '0',
- status tinyint(4) default '0'
-) ENGINE=InnoDB;
-INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
-INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
-INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
-INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
-select * from t1;
-select * from t2;
-delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or (t1.carrier_id=90 and t2.number is null);
-select * from t1;
-select * from t2;
-select * from t2;
-drop table t1,t2;
-
-#
-# A simple test with some isolation levels
-# TODO: Make this into a test using replication to really test how
-# this works.
-#
-
-create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
-
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-SELECT @@tx_isolation,@@global.tx_isolation;
-insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
-select id, code, name from t1 order by id;
-COMMIT;
-
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
-select id, code, name from t1 order by id;
-COMMIT;
-
-SET binlog_format='MIXED';
-BEGIN;
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
-select id, code, name from t1 order by id;
-COMMIT;
-DROP TABLE t1;
-
-#
-# Test of multi-table-update
-#
-create table t1 (n int(10), d int(10)) engine=innodb;
-create table t2 (n int(10), d int(10)) engine=innodb;
-insert into t1 values(1,1),(1,2);
-insert into t2 values(1,10),(2,20);
-UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
-select * from t1;
-select * from t2;
-drop table t1,t2;
-
-#
-# Bug #29136 erred multi-delete on trans table does not rollback
-#
-
-# prepare
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-CREATE TABLE t1 (a int, PRIMARY KEY (a));
-CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
-create trigger trg_del_t2 after delete on t2 for each row
- insert into t1 values (1);
-insert into t1 values (1);
-insert into t2 values (1),(2);
-
-
-# exec cases A, B - see multi_update.test
-
-# A. send_error() w/o send_eof() branch
-
---error ER_DUP_ENTRY
-delete t2 from t2;
-
-# check
-
-select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
-
-# cleanup bug#29136
-
-drop table t1, t2;
-
-
-#
-# Bug #29136 erred multi-delete on trans table does not rollback
-#
-
-# prepare
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-CREATE TABLE t1 (a int, PRIMARY KEY (a));
-CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
-create trigger trg_del_t2 after delete on t2 for each row
- insert into t1 values (1);
-insert into t1 values (1);
-insert into t2 values (1),(2);
-
-
-# exec cases A, B - see multi_update.test
-
-# A. send_error() w/o send_eof() branch
-
---error ER_DUP_ENTRY
-delete t2 from t2;
-
-# check
-
-select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
-
-# cleanup bug#29136
-
-drop table t1, t2;
-
-
-#
-# Testing of IFNULL
-#
-create table t1 (a int, b int) engine=innodb;
-insert into t1 values(20,null);
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a;
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a order by 1;
-insert into t1 values(10,null);
-select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
-t2.b=t3.a order by 1;
-drop table t1;
-
-#
-# Test of read_through not existing const_table
-#
-
-create table t1 (a varchar(10) not null) engine=myisam;
-create table t2 (b varchar(10) not null unique) engine=innodb;
-select t1.a from t1,t2 where t1.a=t2.b;
-drop table t1,t2;
-create table t1 (a int not null, b int, primary key (a)) engine = innodb;
-create table t2 (a int not null, b int, primary key (a)) engine = innodb;
-insert into t1 values (10, 20);
-insert into t2 values (10, 20);
-update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
-drop table t1,t2;
-
-#
-# Test of multi-table-delete with foreign key constraints
-#
-
-CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
-CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE ) ENGINE=INNODB;
-insert into t1 set id=1;
-insert into t2 set id=1, t1_id=1;
-delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
-select * from t1;
-select * from t2;
-drop table t2,t1;
-CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
-CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) ENGINE=INNODB;
-INSERT INTO t1 VALUES(1);
-INSERT INTO t2 VALUES(1, 1);
-SELECT * from t1;
-UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
-SELECT * from t1;
-UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
-SELECT * from t1;
-DROP TABLE t1,t2;
-
-#
-# Test of range_optimizer
-#
-
-set autocommit=0;
-
-CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
-
-CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
-
-CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
-
-INSERT INTO t3 VALUES("my-test-1", "my-test-2");
-COMMIT;
-
-INSERT INTO t1 VALUES("this-key", "will disappear");
-INSERT INTO t2 VALUES("this-key", "will also disappear");
-DELETE FROM t3 WHERE id1="my-test-1";
-
-SELECT * FROM t1;
-SELECT * FROM t2;
-SELECT * FROM t3;
-ROLLBACK;
-
-SELECT * FROM t1;
-SELECT * FROM t2;
-SELECT * FROM t3;
-SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
-COMMIT;
-set autocommit=1;
-DROP TABLE t1,t2,t3;
-
-#
-# Check update with conflicting key
-#
-
-CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-# We need the a < 1000 test here to quard against the halloween problems
-UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
-SELECT * from t1;
-drop table t1;
-
-#
-# Test multi update with different join methods
-#
-
-CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
-CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
-INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-
-# Full join, without key
-update t1,t2 set t1.a=t1.a+100;
-select * from t1;
-
-# unique key
-update t1,t2 set t1.a=t1.a+100 where t1.a=101;
-select * from t1;
-
-# ref key
-update t1,t2 set t1.b=t1.b+10 where t1.b=2;
-select * from t1;
-
-# Range key (in t1)
-update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
-select * from t1;
-select * from t2;
-
-drop table t1,t2;
-CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
-CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-SET AUTOCOMMIT=0;
-INSERT INTO t1 ( B_ID ) VALUES ( 1 );
-INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
-ROLLBACK;
-SELECT * FROM t1;
-drop table t1,t2;
-create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) engine = innodb;
-insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2);
-select distinct parent,child from t1 order by parent;
-drop table t1;
-
-#
-# Test that MySQL priorities clustered indexes
-#
-create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
-create table t2 (a int not null auto_increment primary key, b int);
-insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
-insert into t2 (a) select b from t1;
-insert into t1 (b) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-insert into t2 (a) select b from t1;
-insert into t1 (a) select b from t2;
-select count(*) from t1;
---replace_column 9 #
-explain select * from t1 where c between 1 and 2500;
-update t1 set c=a;
---replace_column 9 #
-explain select * from t1 where c between 1 and 2500;
-drop table t1,t2;
-
-#
-# Test of UPDATE ... ORDER BY
-#
-
-create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
-
-insert into t1 (id) values (null),(null),(null),(null),(null);
-update t1 set fk=69 where fk is null order by id limit 1;
-SELECT * from t1;
-drop table t1;
-
-create table t1 (a int not null, b int not null, key (a));
-insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
-SET @tmp=0;
-update t1 set b=(@tmp:=@tmp+1) order by a;
-update t1 set b=99 where a=1 order by b asc limit 1;
-update t1 set b=100 where a=1 order by b desc limit 2;
-update t1 set a=a+10+b where a=1 order by b;
-select * from t1 order by a,b;
-drop table t1;
-
-#
-# Test of multi-table-updates (bug #1980).
-#
-
-create table t1 ( c char(8) not null ) engine=innodb;
-insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
-insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
-
-alter table t1 add b char(8) not null;
-alter table t1 add a char(8) not null;
-alter table t1 add primary key (a,b,c);
-update t1 set a=c, b=c;
-
-create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
-insert into t2 select * from t1;
-
-delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
-drop table t1,t2;
-
-#
-# test autoincrement with TRUNCATE
-#
-
-SET AUTOCOMMIT=1;
-create table t1 (a integer auto_increment primary key) engine=innodb;
-insert into t1 (a) values (NULL),(NULL);
-truncate table t1;
-insert into t1 (a) values (NULL),(NULL);
-SELECT * from t1;
-drop table t1;
-
-#
-# Test dictionary handling with spaceand quoting
-#
-
-CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
-CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB;
-#show create table t2;
-drop table t2,t1;
-
-#
-# Test of multi updated and foreign keys
-#
-
-create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb;
-insert into `t1`values ( 1 ) ;
-create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
-insert into `t2`values ( 1 ) ;
-create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
-insert into `t3`values ( 1 ) ;
---error 1451
-delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
---error 1451
-update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
---error 1054
-update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
-drop table t3,t2,t1;
-
-#
-# test for recursion depth limit
-#
-create table t1(
- id int primary key,
- pid int,
- index(pid),
- foreign key(pid) references t1(id) on delete cascade) engine=innodb;
-insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
- (8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
--- error 1451
-delete from t1 where id=0;
-delete from t1 where id=15;
-delete from t1 where id=0;
-
-drop table t1;
-
-#
-# Test timestamps
-#
-
-CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
-CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
-(stamp))ENGINE=InnoDB;
-insert into t1 values (1),(2),(3);
-# Note that timestamp 3 is wrong
-insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
-SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
-'20020204120000' GROUP BY col1;
-drop table t1,t2;
-
-#
-# Test by Francois MASUREL
-#
-
-CREATE TABLE t1 (
- `id` int(10) unsigned NOT NULL auto_increment,
- `id_object` int(10) unsigned default '0',
- `id_version` int(10) unsigned NOT NULL default '1',
- `label` varchar(100) NOT NULL default '',
- `description` text,
- PRIMARY KEY (`id`),
- KEY `id_object` (`id_object`),
- KEY `id_version` (`id_version`)
-) ENGINE=InnoDB;
-
-INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
-
-CREATE TABLE t2 (
- `id` int(10) unsigned NOT NULL auto_increment,
- `id_version` int(10) unsigned NOT NULL default '1',
- PRIMARY KEY (`id`),
- KEY `id_version` (`id_version`)
-) ENGINE=InnoDB;
-
-INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
-
-SELECT t2.id, t1.`label` FROM t2 INNER JOIN
-(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl
-ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
-drop table t1,t2;
-
-create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
-create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
-create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
-insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
-insert t2 select * from t1;
-insert t3 select * from t1;
-checksum table t1, t2, t3, t4 quick;
-checksum table t1, t2, t3, t4;
-checksum table t1, t2, t3, t4 extended;
-#show table status;
-drop table t1,t2,t3;
-
-#
-# Test problem with refering to different fields in same table in UNION
-# (Bug #2552)
-#
-create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
-insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
-select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
-drop table t1;
-
-#
-# Bug2160
-#
-create table t1 (a int) engine=innodb;
-create table t2 like t1;
-drop table t1,t2;
-
-#
-# Test of automaticly created foreign keys
-#
-
-create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
-create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
-show create table t1;
-show create table t2;
-create index id on t2 (id);
-show create table t2;
-create index id2 on t2 (id);
-show create table t2;
-drop index id2 on t2;
---error ER_DROP_INDEX_FK
-drop index id on t2;
-show create table t2;
-drop table t2;
-
-create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
-show create table t2;
-create unique index id on t2 (id,id2);
-show create table t2;
-drop table t2;
-
-# Check foreign key columns created in different order than key columns
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
-show create table t2;
-drop table t2;
-
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
-show create table t2;
-drop table t2;
-
-create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
-show create table t2;
-drop table t2;
-
-create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
-show create table t2;
-drop table t2;
-
-create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
-show create table t2;
-alter table t2 add index id_test (id), add index id_test2 (id,id2);
-show create table t2;
-drop table t2;
-
-# Test error handling
-
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error ER_WRONG_FK_DEF
-create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
-
-# bug#3749
-
-create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
-show create table t2;
-drop table t2;
-create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
-show create table t2;
-drop table t2, t1;
-
-
-#
-# Bug #6126: Duplicate columns in keys gives misleading error message
-#
---error 1060
-create table t1 (c char(10), index (c,c)) engine=innodb;
---error 1060
-create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
---error 1060
-create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
---error 1060
-create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
-create table t1 (c1 char(10), c2 char(10)) engine=innodb;
---error 1060
-alter table t1 add key (c1,c1);
---error 1060
-alter table t1 add key (c2,c1,c1);
---error 1060
-alter table t1 add key (c1,c2,c1);
---error 1060
-alter table t1 add key (c1,c1,c2);
-drop table t1;
-
-#
-# Bug #4082: integer truncation
-#
-
-create table t1(a int(1) , b int(1)) engine=innodb;
-insert into t1 values ('1111', '3333');
-select distinct concat(a, b) from t1;
-drop table t1;
-
-#
-# BUG#7709 test case - Boolean fulltext query against unsupported
-# engines does not fail
-#
-
-CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
---error 1214
-SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
-DROP TABLE t1;
-
-#
-# check null values #1
-#
-
---disable_warnings
-CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-INSERT INTO t1 VALUES (1),(2),(3);
-CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a),
- CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
---enable_warnings
-INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
-SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
-DROP TABLE t2;
-DROP TABLE t1;
-
-#
-# Bug#11816 - Truncate table doesn't work with temporary innodb tables
-# This is not an innodb bug, but we test it using innodb.
-#
-create temporary table t1 (a int) engine=innodb;
-insert into t1 values (4711);
-truncate t1;
-insert into t1 values (42);
-select * from t1;
-drop table t1;
-# Show that it works with permanent tables too.
-create table t1 (a int) engine=innodb;
-insert into t1 values (4711);
-truncate t1;
-insert into t1 values (42);
-select * from t1;
-drop table t1;
-
-#
-# Bug #13025 Server crash during filesort
-#
-
-create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
-insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
-select * from t1 order by a,b,c,d;
-explain select * from t1 order by a,b,c,d;
-drop table t1;
-
-#
-# BUG#11039,#13218 Wrong key length in min()
-#
-
-create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
-insert into t1 values ('8', '6'), ('4', '7');
-select min(a) from t1;
-select min(b) from t1 where a='8';
-drop table t1;
-
-# End of 4.1 tests
-
-#
-# range optimizer problem
-#
-
-create table t1 (x bigint unsigned not null primary key) engine=innodb;
-insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
-select * from t1;
-select count(*) from t1 where x>0;
-select count(*) from t1 where x=0;
-select count(*) from t1 where x<0;
-select count(*) from t1 where x < -16;
-select count(*) from t1 where x = -16;
-explain select count(*) from t1 where x > -16;
-select count(*) from t1 where x > -16;
-select * from t1 where x > -16;
-select count(*) from t1 where x = 18446744073709551601;
-drop table t1;
-
-
-# Test for testable InnoDB status variables. This test
-# uses previous ones(pages_created, rows_deleted, ...).
-
-# InnoDB aligns the memory for the buffer pool to a page boundary. This may
-# cause actual pool size to be one less than requested depending on exact
-# alignment of obtained memory.
---replace_result 8192 8191
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
-SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
-SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
-SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
-
-# Test for row locks InnoDB status variables.
-SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
-SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
-SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
-SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
-SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
-
-# Test for innodb_sync_spin_loops variable
-SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops;
-show variables like "innodb_sync_spin_loops";
-set global innodb_sync_spin_loops=1000;
-show variables like "innodb_sync_spin_loops";
-set global innodb_sync_spin_loops=0;
-show variables like "innodb_sync_spin_loops";
-set global innodb_sync_spin_loops=20;
-show variables like "innodb_sync_spin_loops";
-set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
-
-# Test for innodb_thread_concurrency variable
-SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
-show variables like "innodb_thread_concurrency";
-set global innodb_thread_concurrency=1001;
-show variables like "innodb_thread_concurrency";
-set global innodb_thread_concurrency=0;
-show variables like "innodb_thread_concurrency";
-set global innodb_thread_concurrency=16;
-show variables like "innodb_thread_concurrency";
-SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
-
-# Test for innodb_concurrency_tickets variable
-show variables like "innodb_concurrency_tickets";
-set global innodb_concurrency_tickets=1000;
-show variables like "innodb_concurrency_tickets";
-set global innodb_concurrency_tickets=0;
-show variables like "innodb_concurrency_tickets";
-set global innodb_concurrency_tickets=500;
-show variables like "innodb_concurrency_tickets";
-
-# Test for innodb_thread_sleep_delay variable
-show variables like "innodb_thread_sleep_delay";
-set global innodb_thread_sleep_delay=100000;
-show variables like "innodb_thread_sleep_delay";
-set global innodb_thread_sleep_delay=0;
-show variables like "innodb_thread_sleep_delay";
-set global innodb_thread_sleep_delay=10000;
-show variables like "innodb_thread_sleep_delay";
-
-#
-# Test varchar
-#
-
-let $default=`select @@storage_engine`;
-set storage_engine=INNODB;
-source include/varchar.inc;
-
-#
-# Some errors/warnings on create
-#
-
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
-create table t1 (v varchar(65530), key(v));
-drop table t1;
-create table t1 (v varchar(65536));
-show create table t1;
-drop table t1;
-create table t1 (v varchar(65530) character set utf8);
-show create table t1;
-drop table t1;
-
-eval set storage_engine=$default;
-
-# InnoDB specific varchar tests
-create table t1 (v varchar(16384)) engine=innodb;
-drop table t1;
-
-#
-# BUG#11039 Wrong key length in min()
-#
-
-create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
-insert into t1 values ('8', '6'), ('4', '7');
-select min(a) from t1;
-select min(b) from t1 where a='8';
-drop table t1;
-
-#
-# Bug #11080 & #11005 Multi-row REPLACE fails on a duplicate key error
-#
-
-CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY (`a`),UNIQUE KEY `b` (`b`)) ENGINE=innodb;
-insert into t1 (b) values (1);
-replace into t1 (b) values (2), (1), (3);
-select * from t1;
-truncate table t1;
-insert into t1 (b) values (1);
-replace into t1 (b) values (2);
-replace into t1 (b) values (1);
-replace into t1 (b) values (3);
-select * from t1;
-drop table t1;
-
-create table t1 (rowid int not null auto_increment, val int not null,primary
-key (rowid), unique(val)) engine=innodb;
-replace into t1 (val) values ('1'),('2');
-replace into t1 (val) values ('1'),('2');
---error ER_DUP_ENTRY
-insert into t1 (val) values ('1'),('2');
-select * from t1;
-drop table t1;
-
-#
-# Test that update does not change internal auto-increment value
-#
-
-create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
-insert into t1 (val) values (1);
-update t1 set a=2 where a=1;
-# We should get the following error because InnoDB does not update the counter
---error ER_DUP_ENTRY
-insert into t1 (val) values (1);
-select * from t1;
-drop table t1;
-#
-# Bug #10465
-#
-
---disable_warnings
-CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
---enable_warnings
-INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
-SELECT GRADE FROM t1 WHERE GRADE > 160 AND GRADE < 300;
-SELECT GRADE FROM t1 WHERE GRADE= 151;
-DROP TABLE t1;
-
-#
-# Bug #12340 multitable delete deletes only one record
-#
-create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
-create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
-insert into t2 values ('aa','cc');
-insert into t1 values ('aa','bb'),('aa','cc');
-delete t1 from t1,t2 where f1=f3 and f4='cc';
-select * from t1;
-drop table t1,t2;
-
-#
-# Test that the slow TRUNCATE implementation resets autoincrement columns
-# (bug #11946)
-#
-
-CREATE TABLE t1 (
-id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
-) ENGINE=InnoDB;
-
-CREATE TABLE t2 (
-id INTEGER NOT NULL,
-FOREIGN KEY (id) REFERENCES t1 (id)
-) ENGINE=InnoDB;
-
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-TRUNCATE t1;
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-
-# continued from above; test that doing a slow TRUNCATE on a table with 0
-# rows resets autoincrement columns
-DELETE FROM t1;
-TRUNCATE t1;
-INSERT INTO t1 (id) VALUES (NULL);
-SELECT * FROM t1;
-DROP TABLE t2, t1;
-
-# Test that foreign keys in temporary tables are not accepted (bug #12084)
-CREATE TABLE t1
-(
- id INT PRIMARY KEY
-) ENGINE=InnoDB;
-
---error 1005,1005
-CREATE TEMPORARY TABLE t2
-(
- id INT NOT NULL PRIMARY KEY,
- b INT,
- FOREIGN KEY (b) REFERENCES test.t1(id)
-) ENGINE=InnoDB;
-DROP TABLE t1;
-
-#
-# Test that index column max sizes are honored (bug #13315)
-#
-
-# prefix index
-create table t1 (col1 varchar(2000), index (col1(767)))
- character set = latin1 engine = innodb;
-
-# normal indexes
-create table t2 (col1 char(255), index (col1))
- character set = latin1 engine = innodb;
-create table t3 (col1 binary(255), index (col1))
- character set = latin1 engine = innodb;
-create table t4 (col1 varchar(767), index (col1))
- character set = latin1 engine = innodb;
-create table t5 (col1 varchar(767) primary key)
- character set = latin1 engine = innodb;
-create table t6 (col1 varbinary(767) primary key)
- character set = latin1 engine = innodb;
-create table t7 (col1 text, index(col1(767)))
- character set = latin1 engine = innodb;
-create table t8 (col1 blob, index(col1(767)))
- character set = latin1 engine = innodb;
-
-# multi-column indexes are allowed to be longer
-create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
- character set = latin1 engine = innodb;
-
-show create table t9;
-
-drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
-
-# these should have their index length trimmed
-create table t1 (col1 varchar(768), index(col1))
- character set = latin1 engine = innodb;
-create table t2 (col1 varbinary(768), index(col1))
- character set = latin1 engine = innodb;
-create table t3 (col1 text, index(col1(768)))
- character set = latin1 engine = innodb;
-create table t4 (col1 blob, index(col1(768)))
- character set = latin1 engine = innodb;
-
-show create table t1;
-
-drop table t1, t2, t3, t4;
-
-# these should be refused
---error 1071
-create table t1 (col1 varchar(768) primary key)
- character set = latin1 engine = innodb;
---error 1071
-create table t2 (col1 varbinary(768) primary key)
- character set = latin1 engine = innodb;
---error 1071
-create table t3 (col1 text, primary key(col1(768)))
- character set = latin1 engine = innodb;
---error 1071
-create table t4 (col1 blob, primary key(col1(768)))
- character set = latin1 engine = innodb;
-
-#
-# Test improved foreign key error messages (bug #3443)
-#
-
-CREATE TABLE t1
-(
- id INT PRIMARY KEY
-) ENGINE=InnoDB;
-
-CREATE TABLE t2
-(
- v INT,
- CONSTRAINT c1 FOREIGN KEY (v) REFERENCES t1(id)
-) ENGINE=InnoDB;
-
---error 1452
-INSERT INTO t2 VALUES(2);
-
-INSERT INTO t1 VALUES(1);
-INSERT INTO t2 VALUES(1);
-
---error 1451
-DELETE FROM t1 WHERE id = 1;
-
---error 1217
-DROP TABLE t1;
-
-SET FOREIGN_KEY_CHECKS=0;
-DROP TABLE t1;
-SET FOREIGN_KEY_CHECKS=1;
-
---error 1452
-INSERT INTO t2 VALUES(3);
-
-DROP TABLE t2;
-#
-# Test that checksum table uses a consistent read Bug #12669
-#
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2);
-set autocommit=0;
-checksum table t1;
-connection b;
-insert into t1 values(3);
-connection a;
-#
-# Here checksum should not see insert
-#
-checksum table t1;
-connection a;
-commit;
-checksum table t1;
-commit;
-drop table t1;
-#
-# autocommit = 1
-#
-connection a;
-create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
-insert into t1 values (1),(2);
-set autocommit=1;
-checksum table t1;
-connection b;
-set autocommit=1;
-insert into t1 values(3);
-connection a;
-#
-# Here checksum sees insert
-#
-checksum table t1;
-drop table t1;
-
-connection default;
-disconnect a;
-disconnect b;
-
-# tests for bugs #9802 and #13778
-
-# test that FKs between invalid types are not accepted
-
-set foreign_key_checks=0;
-create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--- error 1005
-create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
-set foreign_key_checks=1;
-drop table t2;
-
-# test that FKs between different charsets are not accepted in CREATE even
-# when f_k_c is 0
-
-set foreign_key_checks=0;
-create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--- error 1005
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
-set foreign_key_checks=1;
-drop table t1;
-
-# test that invalid datatype conversions with ALTER are not allowed
-
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
-create table t1(a varchar(10) primary key) engine = innodb;
--- error 1025,1025
-alter table t1 modify column a int;
-set foreign_key_checks=1;
-drop table t2,t1;
-
-# test that charset conversions with ALTER are allowed when f_k_c is 0
-
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
-create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
-alter table t1 convert to character set utf8;
-set foreign_key_checks=1;
-drop table t2,t1;
-
-# test that RENAME does not allow invalid charsets when f_k_c is 0
-
-set foreign_key_checks=0;
-create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
-create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--- error 1025
-rename table t3 to t1;
-set foreign_key_checks=1;
-drop table t2,t3;
-
-# test that foreign key errors are reported correctly (Bug #15550)
-
-create table t1(a int primary key) row_format=redundant engine=innodb;
-create table t2(a int primary key,constraint foreign key(a)references t1(a)) row_format=compact engine=innodb;
-create table t3(a int primary key) row_format=compact engine=innodb;
-create table t4(a int primary key,constraint foreign key(a)references t3(a)) row_format=redundant engine=innodb;
-
-insert into t1 values(1);
-insert into t3 values(1);
--- error 1452
-insert into t2 values(2);
--- error 1452
-insert into t4 values(2);
-insert into t2 values(1);
-insert into t4 values(1);
--- error 1451
-update t1 set a=2;
--- error 1452
-update t2 set a=2;
--- error 1451
-update t3 set a=2;
--- error 1452
-update t4 set a=2;
--- error 1451
-truncate t1;
--- error 1451
-truncate t3;
-truncate t2;
-truncate t4;
-truncate t1;
-truncate t3;
-
-drop table t4,t3,t2,t1;
-
-
-#
-# Test that we can create a large (>1K) key
-#
-create table t1 (a varchar(255) character set utf8,
- b varchar(255) character set utf8,
- c varchar(255) character set utf8,
- d varchar(255) character set utf8,
- key (a,b,c,d)) engine=innodb;
-drop table t1;
---error ER_TOO_LONG_KEY
-create table t1 (a varchar(255) character set utf8,
- b varchar(255) character set utf8,
- c varchar(255) character set utf8,
- d varchar(255) character set utf8,
- e varchar(255) character set utf8,
- key (a,b,c,d,e)) engine=innodb;
-
-
-# test the padding of BINARY types and collations (Bug #14189)
-
-create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
-create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
-create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
-create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
-
-insert into t1 values (0x41),(0x4120),(0x4100);
--- error ER_DUP_ENTRY
-insert into t2 values (0x41),(0x4120),(0x4100);
-insert into t2 values (0x41),(0x4120);
--- error ER_DUP_ENTRY
-insert into t3 values (0x41),(0x4120),(0x4100);
-insert into t3 values (0x41),(0x4100);
--- error ER_DUP_ENTRY
-insert into t4 values (0x41),(0x4120),(0x4100);
-insert into t4 values (0x41),(0x4100);
-select hex(s1) from t1;
-select hex(s1) from t2;
-select hex(s1) from t3;
-select hex(s1) from t4;
-drop table t1,t2,t3,t4;
-
-create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=innodb;
-create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
-
-insert into t1 values(1,0x4100),(2,0x41),(3,0x4120),(4,0x42);
--- error 1452
-insert into t2 values(0x42);
-insert into t2 values(0x41);
-select hex(s1) from t2;
-update t1 set s1=0x123456 where a=2;
-select hex(s1) from t2;
--- error 1451
-update t1 set s1=0x12 where a=1;
--- error 1451
-update t1 set s1=0x12345678 where a=1;
--- error 1451
-update t1 set s1=0x123457 where a=1;
-update t1 set s1=0x1220 where a=1;
-select hex(s1) from t2;
-update t1 set s1=0x1200 where a=1;
-select hex(s1) from t2;
-update t1 set s1=0x4200 where a=1;
-select hex(s1) from t2;
--- error 1451
-delete from t1 where a=1;
-delete from t1 where a=2;
-update t2 set s1=0x4120;
--- error 1451
-delete from t1;
-delete from t1 where a!=3;
-select a,hex(s1) from t1;
-select hex(s1) from t2;
-
-drop table t2,t1;
-
-create table t1 (a int primary key,s1 varchar(2) binary not null unique) engine=innodb;
-create table t2 (s1 char(2) binary not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
-
-insert into t1 values(1,0x4100),(2,0x41);
-insert into t2 values(0x41);
-select hex(s1) from t2;
-update t1 set s1=0x1234 where a=1;
-select hex(s1) from t2;
-update t1 set s1=0x12 where a=2;
-select hex(s1) from t2;
-delete from t1 where a=1;
--- error 1451
-delete from t1 where a=2;
-select a,hex(s1) from t1;
-select hex(s1) from t2;
-
-drop table t2,t1;
-# Ensure that <tablename>_ibfk_0 is not mistreated as a
-# generated foreign key identifier. (Bug #16387)
-
-CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
-CREATE TABLE t2(a INT) ENGINE=InnoDB;
-ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
-ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_1;
-ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
-ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
-SHOW CREATE TABLE t2;
-DROP TABLE t2,t1;
-
-#
-# Test case for bug #16229: MySQL/InnoDB uses full explicit table locks in trigger processing
-#
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-insert into t1(a) values (1),(2),(3);
-commit;
-connection b;
-set autocommit = 0;
-update t1 set b = 5 where a = 2;
-connection a;
-delimiter |;
-create trigger t1t before insert on t1 for each row begin set NEW.b = NEW.a * 10 + 5, NEW.c = NEW.a / 10; end |
-delimiter ;|
-set autocommit = 0;
-connection a;
-insert into t1(a) values (10),(20),(30),(40),(50),(60),(70),(80),(90),(100),
-(11),(21),(31),(41),(51),(61),(71),(81),(91),(101),
-(12),(22),(32),(42),(52),(62),(72),(82),(92),(102),
-(13),(23),(33),(43),(53),(63),(73),(83),(93),(103),
-(14),(24),(34),(44),(54),(64),(74),(84),(94),(104);
-connection b;
-commit;
-connection a;
-commit;
-drop trigger t1t;
-drop table t1;
-disconnect a;
-disconnect b;
-#
-# Another trigger test
-#
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t2(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t3(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t4(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-create table t5(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
-insert into t1(a) values (1),(2),(3);
-insert into t2(a) values (1),(2),(3);
-insert into t3(a) values (1),(2),(3);
-insert into t4(a) values (1),(2),(3);
-insert into t3(a) values (5),(7),(8);
-insert into t4(a) values (5),(7),(8);
-insert into t5(a) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12);
-
-delimiter |;
-create trigger t1t before insert on t1 for each row begin
- INSERT INTO t2 SET a = NEW.a;
-end |
-
-create trigger t2t before insert on t2 for each row begin
- DELETE FROM t3 WHERE a = NEW.a;
-end |
-
-create trigger t3t before delete on t3 for each row begin
- UPDATE t4 SET b = b + 1 WHERE a = OLD.a;
-end |
-
-create trigger t4t before update on t4 for each row begin
- UPDATE t5 SET b = b + 1 where a = NEW.a;
-end |
-delimiter ;|
-commit;
-set autocommit = 0;
-update t1 set b = b + 5 where a = 1;
-update t2 set b = b + 5 where a = 1;
-update t3 set b = b + 5 where a = 1;
-update t4 set b = b + 5 where a = 1;
-insert into t5(a) values(20);
-connection b;
-set autocommit = 0;
-insert into t1(a) values(7);
-insert into t2(a) values(8);
-delete from t2 where a = 3;
-update t4 set b = b + 1 where a = 3;
-commit;
-drop trigger t1t;
-drop trigger t2t;
-drop trigger t3t;
-drop trigger t4t;
-drop table t1, t2, t3, t4, t5;
-connection default;
-disconnect a;
-disconnect b;
-
-#
-# Test that cascading updates leading to duplicate keys give the correct
-# error message (bug #9680)
-#
-
-CREATE TABLE t1 (
- field1 varchar(8) NOT NULL DEFAULT '',
- field2 varchar(8) NOT NULL DEFAULT '',
- PRIMARY KEY (field1, field2)
-) ENGINE=InnoDB;
-
-CREATE TABLE t2 (
- field1 varchar(8) NOT NULL DEFAULT '' PRIMARY KEY,
- FOREIGN KEY (field1) REFERENCES t1 (field1)
- ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB;
-
-INSERT INTO t1 VALUES ('old', 'somevalu');
-INSERT INTO t1 VALUES ('other', 'anyvalue');
-
-INSERT INTO t2 VALUES ('old');
-INSERT INTO t2 VALUES ('other');
-
---error ER_FOREIGN_DUPLICATE_KEY
-UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-#
-# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
-#
-create table t1 (
- c1 bigint not null,
- c2 bigint not null,
- primary key (c1),
- unique key (c2)
-) engine=innodb;
-#
-create table t2 (
- c1 bigint not null,
- primary key (c1)
-) engine=innodb;
-#
-alter table t1 add constraint c2_fk foreign key (c2)
- references t2(c1) on delete cascade;
-show create table t1;
-#
-alter table t1 drop foreign key c2_fk;
-show create table t1;
-#
-drop table t1, t2;
-
-#
-# Bug #14360: problem with intervals
-#
-
-create table t1(a date) engine=innodb;
-create table t2(a date, key(a)) engine=innodb;
-insert into t1 values('2005-10-01');
-insert into t2 values('2005-10-01');
-select * from t1, t2
- where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
-drop table t1, t2;
-
-create table t1 (id int not null, f_id int not null, f int not null,
-primary key(f_id, id)) engine=innodb;
-create table t2 (id int not null,s_id int not null,s varchar(200),
-primary key(id)) engine=innodb;
-INSERT INTO t1 VALUES (8, 1, 3);
-INSERT INTO t1 VALUES (1, 2, 1);
-INSERT INTO t2 VALUES (1, 0, '');
-INSERT INTO t2 VALUES (8, 1, '');
-commit;
-DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
-WHERE mm.id IS NULL;
-select ml.* from t1 as ml left join t2 as mm on (mm.id=ml.id)
-where mm.id is null lock in share mode;
-drop table t1,t2;
-
-#
-# Test case where X-locks on unused rows should be released in a
-# update (because READ COMMITTED isolation level)
-#
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
-commit;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-update t1 set b = 5 where b = 1;
-connection b;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-#
-# X-lock to record (7,3) should be released in a update
-#
-select * from t1 where a = 7 and b = 3 for update;
-connection a;
-commit;
-connection b;
-commit;
-drop table t1;
-connection default;
-disconnect a;
-disconnect b;
-
-#
-# Test case where no locks should be released (because we are not
-# using READ COMMITTED isolation level)
-#
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
-commit;
-set autocommit = 0;
-select * from t1 lock in share mode;
-update t1 set b = 5 where b = 1;
-connection b;
-set autocommit = 0;
-#
-# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
-#
---error 1205
-select * from t1 where a = 2 and b = 2 for update;
-#
-# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
-#
---error 1205
-connection a;
-commit;
-connection b;
-commit;
-connection default;
-disconnect a;
-disconnect b;
-drop table t1;
-
-#
-# Consistent read should be used in following selects
-#
-# 1) INSERT INTO ... SELECT
-# 2) UPDATE ... = ( SELECT ...)
-# 3) CREATE ... SELECT
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values (1,2),(5,3),(4,2);
-create table t2(d int not null, e int, primary key(d)) engine=innodb;
-insert into t2 values (8,6),(12,1),(3,1);
-commit;
-set autocommit = 0;
-select * from t2 for update;
-connection b;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-insert into t1 select * from t2;
-update t1 set b = (select e from t2 where a = d);
-create table t3(d int not null, e int, primary key(d)) engine=innodb
-select * from t2;
-commit;
-connection a;
-commit;
-connection default;
-disconnect a;
-disconnect b;
-drop table t1, t2, t3;
-
-#
-# Consistent read should not be used if
-#
-# (a) isolation level is serializable OR
-# (b) select ... lock in share mode OR
-# (c) select ... for update
-#
-# in following queries:
-#
-# 1) INSERT INTO ... SELECT
-# 2) UPDATE ... = ( SELECT ...)
-# 3) CREATE ... SELECT
-
-connect (a,localhost,root,,);
-connect (b,localhost,root,,);
-connect (c,localhost,root,,);
-connect (d,localhost,root,,);
-connect (e,localhost,root,,);
-connect (f,localhost,root,,);
-connect (g,localhost,root,,);
-connect (h,localhost,root,,);
-connect (i,localhost,root,,);
-connect (j,localhost,root,,);
-connection a;
-create table t1(a int not null, b int, primary key(a)) engine=innodb;
-insert into t1 values (1,2),(5,3),(4,2);
-create table t2(a int not null, b int, primary key(a)) engine=innodb;
-insert into t2 values (8,6),(12,1),(3,1);
-create table t3(d int not null, b int, primary key(d)) engine=innodb;
-insert into t3 values (8,6),(12,1),(3,1);
-create table t5(a int not null, b int, primary key(a)) engine=innodb;
-insert into t5 values (1,2),(5,3),(4,2);
-create table t6(d int not null, e int, primary key(d)) engine=innodb;
-insert into t6 values (8,6),(12,1),(3,1);
-create table t8(a int not null, b int, primary key(a)) engine=innodb;
-insert into t8 values (1,2),(5,3),(4,2);
-create table t9(d int not null, e int, primary key(d)) engine=innodb;
-insert into t9 values (8,6),(12,1),(3,1);
-commit;
-set autocommit = 0;
-select * from t2 for update;
-connection b;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
---send
-insert into t1 select * from t2;
-connection c;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
---send
-update t3 set b = (select b from t2 where a = d);
-connection d;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
---send
-create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
-connection e;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-insert into t5 (select * from t2 lock in share mode);
-connection f;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-update t6 set e = (select b from t2 where a = d lock in share mode);
-connection g;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
-connection h;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-insert into t8 (select * from t2 for update);
-connection i;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-update t9 set e = (select b from t2 where a = d for update);
-connection j;
-SET binlog_format='MIXED';
-set autocommit = 0;
-SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
---send
-create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
-
-connection b;
---error 1205
-reap;
-
-connection c;
---error 1205
-reap;
-
-connection d;
---error 1205
-reap;
-
-connection e;
---error 1205
-reap;
-
-connection f;
---error 1205
-reap;
-
-connection g;
---error 1205
-reap;
-
-connection h;
---error 1205
-reap;
-
-connection i;
---error 1205
-reap;
-
-connection j;
---error 1205
-reap;
-
-connection a;
-commit;
-
-connection default;
-disconnect a;
-disconnect b;
-disconnect c;
-disconnect d;
-disconnect e;
-disconnect f;
-disconnect g;
-disconnect h;
-disconnect i;
-disconnect j;
-drop table t1, t2, t3, t5, t6, t8, t9;
-
-# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
---error ER_WRONG_COLUMN_NAME
-CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
-
-#
-# Bug #17152: Wrong result with BINARY comparison on aliased column
-#
-
-CREATE TABLE t1 (
- a BIGINT(20) NOT NULL,
- PRIMARY KEY (a)
- ) ENGINE=INNODB DEFAULT CHARSET=UTF8;
-
-CREATE TABLE t2 (
- a BIGINT(20) NOT NULL,
- b VARCHAR(128) NOT NULL,
- c TEXT NOT NULL,
- PRIMARY KEY (a,b),
- KEY idx_t2_b_c (b,c(200)),
- CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a)
- ON DELETE CASCADE
- ) ENGINE=INNODB DEFAULT CHARSET=UTF8;
-
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1, 'bar', 'vbar');
-INSERT INTO t2 VALUES (1, 'BAR2', 'VBAR');
-INSERT INTO t2 VALUES (1, 'bar_bar', 'bibi');
-INSERT INTO t2 VALUES (1, 'customer_over', '1');
-
-SELECT * FROM t2 WHERE b = 'customer_over';
-SELECT * FROM t2 WHERE BINARY b = 'customer_over';
-SELECT DISTINCT p0.a FROM t2 p0 WHERE p0.b = 'customer_over';
-/* Bang: Empty result set, above was expected: */
-SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
-SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
-
-drop table t2, t1;
-
-#
-# Test optimize on table with open transaction
-#
-
-CREATE TABLE t1 ( a int ) ENGINE=innodb;
-BEGIN;
-INSERT INTO t1 VALUES (1);
-OPTIMIZE TABLE t1;
-DROP TABLE t1;
-
-#
-# Bug #24741 (existing cascade clauses disappear when adding foreign keys)
-#
-
-CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
-
-CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL,
- CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id)
- ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
-
-ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON
-DELETE CASCADE ON UPDATE CASCADE;
-
-SHOW CREATE TABLE t2;
-DROP TABLE t2, t1;
-
-#
-# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns
-# for which there is a foreign key constraint ON ... SET NULL.
-#
-
-CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB;
-CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
-ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error 1025
-ALTER TABLE t2 MODIFY a INT NOT NULL;
-DELETE FROM t1;
-DROP TABLE t2,t1;
-
-#
-# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
-# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
-#
-
-CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
-AUTO_INCREMENT=42;
-
-INSERT INTO t1 VALUES (0),(347),(0);
-SELECT * FROM t1;
-
-SHOW CREATE TABLE t1;
-
-CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t2 VALUES(42),(347),(348);
-ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
-SHOW CREATE TABLE t1;
-
-DROP TABLE t1,t2;
-
-#
-# Bug #21101 (Prints wrong error message if max row size is too large)
-#
-set innodb_strict_mode=on;
---error 1118
-CREATE TABLE t1 (
- c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
- c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
- c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
- c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
- c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
- c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
- c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
- c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
- ) ENGINE = InnoDB;
-
-#
-# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
-#
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1(
- id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
- ) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-10);
-SELECT * FROM t1;
-#
-# NOTE: The server really needs to be restarted at this point
-# for the test to be useful.
-#
-# Without the fix InnoDB would trip over an assertion here.
-INSERT INTO t1 VALUES(NULL);
-# The next value should be 1 and not -9 or a -ve number
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# Bug #21409 Incorrect result returned when in READ-COMMITTED with
-# query_cache ON
-#
-CONNECT (c1,localhost,root,,);
-CONNECT (c2,localhost,root,,);
-CONNECTION c1;
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-DROP TABLE IF EXISTS t1, t2;
-CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
-CREATE TABLE t2 LIKE t1;
-SELECT * FROM t2;
-CONNECTION c2;
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (1);
-COMMIT;
-CONNECTION c1;
-SELECT * FROM t1 WHERE a=1;
-DISCONNECT c1;
-DISCONNECT c2;
-CONNECT (c1,localhost,root,,);
-CONNECT (c2,localhost,root,,);
-CONNECTION c1;
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-SELECT * FROM t2;
-CONNECTION c2;
-SET binlog_format='MIXED';
-SET TX_ISOLATION='read-committed';
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (2);
-COMMIT;
-CONNECTION c1;
-# The result set below should be the same for both selects
-SELECT * FROM t1 WHERE a=2;
-SELECT * FROM t1 WHERE a=2;
-DROP TABLE t1;
-DROP TABLE t2;
-DISCONNECT c1;
-DISCONNECT c2;
-CONNECTION default;
-
-#
-# Bug #29157 UPDATE, changed rows incorrect
-#
-create table t1 (i int, j int) engine=innodb;
-insert into t1 (i, j) values (1, 1), (2, 2);
---enable_info
-update t1 set j = 2;
---disable_info
-drop table t1;
-
-#
-# Bug #32440 InnoDB free space info does not appear in SHOW TABLE STATUS or
-# I_S
-#
-create table t1 (id int) comment='this is a comment' engine=innodb;
-select table_comment, data_free > 0 as data_free_is_set
- from information_schema.tables
- where table_schema='test' and table_name = 't1';
-drop table t1;
-
-#
-# Bug 34920 test
-#
-CONNECTION default;
-CREATE TABLE t1 (
- c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- c2 VARCHAR(128) NOT NULL,
- PRIMARY KEY(c1)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
-
-CREATE TABLE t2 (
- c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- c2 INT(10) UNSIGNED DEFAULT NULL,
- PRIMARY KEY(c1)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
-
-SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
-ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
-SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
-DROP TABLE t2;
-DROP TABLE t1;
-# End 34920 test
-#
-# Bug #29507 TRUNCATE shows to many rows effected
-#
-CONNECTION default;
-CREATE TABLE t1 (c1 int default NULL,
- c2 int default NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
---enable_info
-TRUNCATE TABLE t1;
-
-INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
-TRUNCATE TABLE t1;
-
---disable_info
-DROP TABLE t1;
-#
-# Bug#35537 Innodb doesn't increment handler_update and handler_delete.
-#
--- disable_query_log
--- disable_result_log
-
-CONNECT (c1,localhost,root,,);
-
-DROP TABLE IF EXISTS bug35537;
-CREATE TABLE bug35537 (
- c1 int
-) ENGINE=InnoDB;
-
-INSERT INTO bug35537 VALUES (1);
-
--- enable_result_log
-
-SHOW SESSION STATUS LIKE 'Handler_update%';
-SHOW SESSION STATUS LIKE 'Handler_delete%';
-
-UPDATE bug35537 SET c1 = 2 WHERE c1 = 1;
-DELETE FROM bug35537 WHERE c1 = 2;
-
-SHOW SESSION STATUS LIKE 'Handler_update%';
-SHOW SESSION STATUS LIKE 'Handler_delete%';
-
-DROP TABLE bug35537;
-
-DISCONNECT c1;
-CONNECTION default;
-
-SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-
--- enable_query_log
-
-#######################################################################
-# #
-# Please, DO NOT TOUCH this file as well as the innodb.result file. #
-# These files are to be modified ONLY BY INNOBASE guys. #
-# #
-# Use innodb_mysql.[test|result] files instead. #
-# #
-# If nevertheless you need to make some changes here, please, forward #
-# your commit message #
-# To: innodb_dev_ww@oracle.com #
-# Cc: dev-innodb@mysql.com #
-# (otherwise your changes may be erased). #
-# #
-#######################################################################
diff --git a/mysql-test/t/innodb_bug36172.test b/mysql-test/t/innodb_bug36172.test
deleted file mode 100644
index 67af2b2f7c2..00000000000
--- a/mysql-test/t/innodb_bug36172.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Test case for bug 36172
-#
-
--- source include/not_embedded.inc
--- source include/have_innodb.inc
-
-SET storage_engine=InnoDB;
-
-# we do not really care about what gets printed, we are only
-# interested in getting success or failure according to our
-# expectations
-
--- disable_query_log
--- disable_result_log
-
-let $file_format=`select @@innodb_file_format`;
-let $file_format_check=`select @@innodb_file_format_check`;
-let $file_per_table=`select @@innodb_file_per_table`;
-SET GLOBAL innodb_file_format='Barracuda';
-SET GLOBAL innodb_file_per_table=on;
-
-DROP TABLE IF EXISTS `table0`;
-CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
-CHECK TABLE table0 EXTENDED;
-INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
-CHECK TABLE table0 EXTENDED;
-
-DROP TABLE table0;
-EVAL SET GLOBAL innodb_file_format=$file_format;
-EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
-EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/t/innodb_bug47167.test b/mysql-test/t/innodb_bug47167.test
deleted file mode 100644
index 88e927c01bd..00000000000
--- a/mysql-test/t/innodb_bug47167.test
+++ /dev/null
@@ -1,45 +0,0 @@
-# This is the unit test for bug *47167.
-# It tests setting the global variable
-# "innodb_file_format_check" with a
-# user-Defined Variable.
-
---source include/have_innodb.inc
-
-# Save the value (Antelope) in 'innodb_file_format_check' to
-# 'old_innodb_file_format_check'
-set @old_innodb_file_format_check=@@innodb_file_format_check;
-
-# @old_innodb_file_format_check shall have the value of 'Antelope'
-select @old_innodb_file_format_check;
-
-# Reset the value in 'innodb_file_format_check' to 'Barracuda'
-set global innodb_file_format_check = Barracuda;
-
-select @@innodb_file_format_check;
-
-# Set 'innodb_file_format_check' to its default value, which
-# is the latest file format supported in the current release.
-set global innodb_file_format_check = DEFAULT;
-
-select @@innodb_file_format_check;
-
-# Put the saved value back to 'innodb_file_format_check'
-set global innodb_file_format_check = @old_innodb_file_format_check;
-
-# Check whether 'innodb_file_format_check' get its original value.
-select @@innodb_file_format_check;
-
-# Following are negative tests, all should fail.
---disable_warnings
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format_check = cheetah;
-
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format_check = Bear;
-
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format_check = on;
-
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format_check = off;
---enable_warnings
diff --git a/mysql-test/t/innodb_file_format.test b/mysql-test/t/innodb_file_format.test
deleted file mode 100644
index 6de026ad97f..00000000000
--- a/mysql-test/t/innodb_file_format.test
+++ /dev/null
@@ -1,31 +0,0 @@
--- source include/have_innodb.inc
-
-call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
-
-select @@innodb_file_format;
-select @@innodb_file_format_check;
-set global innodb_file_format=antelope;
-set global innodb_file_format=barracuda;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format=cheetah;
-select @@innodb_file_format;
-set global innodb_file_format=default;
-select @@innodb_file_format;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format=on;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format=off;
-select @@innodb_file_format;
-set global innodb_file_format_check=antelope;
-set global innodb_file_format_check=barracuda;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format_check=cheetah;
-select @@innodb_file_format_check;
-set global innodb_file_format_check=default;
-select @@innodb_file_format_check;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format=on;
---error ER_WRONG_ARGUMENTS
-set global innodb_file_format=off;
-select @@innodb_file_format_check;
-set global innodb_file_format_check=antelope;
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index eda3e8451dd..824af06cf69 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -2,6 +2,8 @@
# Testing of table locking
#
+--source include/have_partition.inc
+
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
diff --git a/mysql-test/t/log_slow.test b/mysql-test/t/log_slow.test
index d624e9f2520..af8a948d318 100644
--- a/mysql-test/t/log_slow.test
+++ b/mysql-test/t/log_slow.test
@@ -40,7 +40,7 @@ show fields from mysql.slow_log;
# Check flush command
#
-flush slow query logs;
+flush slow logs;
# Reset used variables
diff --git a/mysql-test/t/merge_debug.test b/mysql-test/t/merge_debug.test
index 2e30cf88b5d..5bf01468b89 100644
--- a/mysql-test/t/merge_debug.test
+++ b/mysql-test/t/merge_debug.test
@@ -26,7 +26,7 @@ INSERT INTO t2 VALUES (20);
INSERT INTO t3 VALUES (30);
LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, crashed WRITE;
-SET GLOBAL debug="+d,*,myisam_pretend_crashed_table_on_open";
+SET GLOBAL debug="+d,myisam_pretend_crashed_table_on_open";
--disable_warnings
CREATE TRIGGER t1_ai AFTER INSERT ON crashed FOR EACH ROW INSERT INTO t2 VALUES(29);
--enable_warnings
diff --git a/mysql-test/t/myisam-master.opt b/mysql-test/t/myisam-master.opt
new file mode 100644
index 00000000000..c5f16ccfd5b
--- /dev/null
+++ b/mysql-test/t/myisam-master.opt
@@ -0,0 +1 @@
+--myisam-recover-options=off
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
index 91de7ecff02..4c188ff3147 100644
--- a/mysql-test/t/mysql_upgrade.test
+++ b/mysql-test/t/mysql_upgrade.test
@@ -103,5 +103,5 @@ DROP USER 'user3'@'%';
# Test the --upgrade-system-tables option
#
--replace_result $MYSQLTEST_VARDIR var
---exec $MYSQL_UPGRADE --skip-verbose --upgrade-system-tables
+--exec $MYSQL_UPGRADE --force --upgrade-system-tables
diff --git a/mysql-test/t/mysql_upgrade_ssl.test b/mysql-test/t/mysql_upgrade_ssl.test
index d1c029bf33a..8ed818186b2 100644
--- a/mysql-test/t/mysql_upgrade_ssl.test
+++ b/mysql-test/t/mysql_upgrade_ssl.test
@@ -6,5 +6,5 @@
--echo #
--echo # Bug#55672 mysql_upgrade dies with internal error
--echo #
---exec $MYSQL_UPGRADE --skip-verbose --ssl --force 2>&1
+--exec $MYSQL_UPGRADE --skip-verbose --skip-silent --ssl --force 2>&1
--exit
diff --git a/mysql-test/t/mysqld_option_err.test b/mysql-test/t/mysqld_option_err.test
index 9c02dec51e6..0c38eba7ca9 100644
--- a/mysql-test/t/mysqld_option_err.test
+++ b/mysql-test/t/mysqld_option_err.test
@@ -21,22 +21,22 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
--echo Test that unknown option is not silently ignored.
--error 2
---exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --nonexistentoption >$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --nonexistentoption >$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Test bad binlog format.
--error 1
---exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --log-bin --binlog-format=badformat >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --log-bin --binlog-format=badformat >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Test bad default storage engine.
--error 1
---exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --default-storage-engine=nonexistentengine >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --default-storage-engine=nonexistentengine >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Test non-numeric value passed to number option.
--error 1
---exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --min-examined-row-limit=notanumber >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --min-examined-row-limit=notanumber >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
# Test for MBug#423035: error in parsing enum value for plugin
@@ -44,16 +44,16 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
# See also Bug#32034.
--echo Test that bad value for plugin enum option is rejected correctly.
--error 7
---exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --plugin-dir=$MYSQLTEST_VARDIR/plugins --plugin-load=example=ha_example.so --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --plugin-dir=$MYSQLTEST_VARDIR/plugins --plugin-load=example=ha_example.so --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
#
# Test that an wrong option with --help --verbose gives an error
#
--echo Test that --help --verbose works
---exec $MYSQLD --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Test that --not-known-option --help --verbose gives error
--error 2
---exec $MYSQLD --not-known-option --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--exec $MYSQLD_BOOTSTRAP_CMD --not-known-option --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Done.
diff --git a/mysql-test/t/not_partition.test b/mysql-test/t/not_partition.test
index 38b88c00ba3..b930214e008 100644
--- a/mysql-test/t/not_partition.test
+++ b/mysql-test/t/not_partition.test
@@ -1,5 +1,5 @@
--disable_abort_on_error
-# Run this test only when mysqld don't has partitioning (not compiled with)
+# Run this test only when mysqld doesn't have partitioning (not compiled with)
# the statements are not expected to work, just check that we
# can't crash the server
-- require r/not_partition.require
diff --git a/mysql-test/t/optimizer_switch.test b/mysql-test/t/optimizer_switch.test
deleted file mode 100644
index 713262197d4..00000000000
--- a/mysql-test/t/optimizer_switch.test
+++ /dev/null
@@ -1,113 +0,0 @@
---echo #
---echo # Generic @@optimizer_switch tests
---echo #
---echo #
-
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='index_merge=off,index_merge_union=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='index_merge_union=on';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,index_merge_sort_union=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch=4;
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch=NULL;
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='default,index_merge';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge=index_merge';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge=on,but...';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge=';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='on';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge=on,index_merge=off';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='index_merge_union=on,index_merge_union=default';
-
---error ER_WRONG_VALUE_FOR_VAR
-set optimizer_switch='default,index_merge=on,index_merge=off,default';
-
-set optimizer_switch=default;
-set optimizer_switch='index_merge=off,index_merge_union=off,default';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-set optimizer_switch=default;
-
-# Check setting defaults for global vars
---replace_regex /,table_elimination=on//
-select @@global.optimizer_switch;
-set @@global.optimizer_switch=default;
---replace_regex /,table_elimination=on//
-select @@global.optimizer_switch;
-
---echo #
---echo # Check index_merge's @@optimizer_switch flags
---echo #
---replace_regex /,table_elimination.on//
-select @@optimizer_switch;
-
---echo
---echo BUG#37120 optimizer_switch allowable values not according to specification
---echo
-
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,materialization=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,semijoin=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,loosescan=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,semijoin=off,materialization=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,materialization=off,semijoin=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,semijoin=off,materialization=off,loosescan=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,semijoin=off,loosescan=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-
-set optimizer_switch='default,materialization=off,loosescan=off';
---replace_regex /,table_elimination=on//
-select @@optimizer_switch;
-set optimizer_switch=default;
-
-
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 3e9ac2ce2b5..abf543ad53a 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -16,6 +16,9 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
SET GLOBAL innodb_thread_concurrency = 1;
+set global default_storage_engine='innodb';
+set session default_storage_engine='innodb';
+
CREATE TABLE t1
(user_num BIGINT,
hours SMALLINT,
@@ -569,3 +572,6 @@ SET SESSION sql_mode = 'NO_ZERO_DATE';
OPTIMIZE TABLE t1;
SET SESSION sql_mode = @old_mode;
DROP TABLE t1;
+
+set global default_storage_engine=default;
+
diff --git a/mysql-test/t/pool_of_threads.cnf b/mysql-test/t/pool_of_threads.cnf
index 9ab0571df9f..4ae202bab6c 100644
--- a/mysql-test/t/pool_of_threads.cnf
+++ b/mysql-test/t/pool_of_threads.cnf
@@ -1,7 +1,6 @@
!include include/default_my.cnf
[mysqld.1]
-test-ignore-wrong-options
loose-thread-handling= pool-of-threads
loose-thread_pool_size= 2
extra-port= @mysqld.1.#extra-port
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index d9293554615..56ea4e7c268 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -877,19 +877,6 @@ drop procedure f4;
drop table t1;
set GLOBAL query_cache_size=0;
-# Tests moved from main.variables due to needing query cache in server.
-set GLOBAL query_cache_size=100000;
---error ER_GLOBAL_VARIABLE
-set SESSION query_cache_size=10000;
-set global query_cache_limit=100;
-set global query_cache_size=100;
-set global query_cache_type=demand;
-
-set GLOBAL query_cache_type=default;
-set GLOBAL query_cache_limit=default;
-set GLOBAL query_cache_size=default;
-
-
--echo End of 4.1 tests
#
diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test
index ce62b931a93..c2cd4d796aa 100644
--- a/mysql-test/t/query_cache_debug.test
+++ b/mysql-test/t/query_cache_debug.test
@@ -18,7 +18,7 @@ connect (bug30887con2, localhost, root, ,test);
connection bug30887con1;
--echo Activate debug hook and attempt to retrieve the statement from the cache.
-set session debug='+d,wait_in_query_cache_insert';
+set session debug='+d,foobar,wait_in_query_cache_insert';
--send select SQL_CACHE * from t1;
connection default;
@@ -67,7 +67,7 @@ connect(con2,localhost,root,,test,,);
connection con1;
--echo # Switch to connection con1
-SET SESSION debug='+d,wait_after_query_cache_invalidate';
+SET SESSION debug='+d,foobar,wait_after_query_cache_invalidate';
--echo # Send concurrent insert, will wait in the query cache table invalidate
--send INSERT INTO t1 VALUES (4)
@@ -157,8 +157,8 @@ SELECT SQL_CACHE * FROM t1;
--echo ** before the mutex lock in invalidate_table_internal.
--echo ** This will allow new result sets to be written into the QC.
--echo **
-SET SESSION debug='+d,wait_in_query_cache_invalidate1';
-SET SESSION debug='+d,wait_in_query_cache_invalidate2';
+SET SESSION debug='+d,foobar,wait_in_query_cache_invalidate1';
+SET SESSION debug='+d,foobar,wait_in_query_cache_invalidate2';
--send DELETE FROM t1 WHERE a like '%a%';
connection default;
@@ -173,14 +173,14 @@ connection thd2;
--echo ** On THD2: Insert a result into the cache. This attempt will be blocked
--echo ** because of a debug hook placed just before the mutex lock after which
--echo ** the first part of the result set is written.
-SET SESSION debug='+d,wait_in_query_cache_insert';
+SET SESSION debug='+d,foobar,wait_in_query_cache_insert';
--send SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3
connection thd3;
--echo =================================== Connection thd3
--echo ** On THD3: Insert another result into the cache and block on the same
--echo ** debug hook.
-SET SESSION debug='+d,wait_in_query_cache_insert';
+SET SESSION debug='+d,foobar,wait_in_query_cache_insert';
--send SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;
connection default;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 87f36c452f2..96510bdcf7e 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1333,6 +1333,7 @@ explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 a
# If the like starts with a certain letter key will be used.
#
+--sorted_result
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
diff --git a/mysql-test/t/status_user.test b/mysql-test/t/status_user.test
index d42f81b20e5..8b017767e37 100644
--- a/mysql-test/t/status_user.test
+++ b/mysql-test/t/status_user.test
@@ -1,7 +1,7 @@
#
# Testing of user status (the userstat variable).
-# Note that this test requires a fresh restart to not problems with
-# old status
+# Note that this test requires a fresh restart to not have problems with the
+# old status values
-- source include/have_innodb.inc
-- source include/have_log_bin.inc
diff --git a/mysql-test/t/subselect_cache.test b/mysql-test/t/subselect_cache.test
index e8dd256b20b..b83ab27e03e 100644
--- a/mysql-test/t/subselect_cache.test
+++ b/mysql-test/t/subselect_cache.test
@@ -1,4 +1,3 @@
-
set optimizer_switch='subquery_cache=on';
create table t1 (a int, b int);
@@ -1611,3 +1610,4 @@ WHERE ( table1 . `pk` < 5 ) OR ( table1 . `col_varchar_key` IS NOT NULL)
GROUP BY field3
HAVING (field3 <= 'h' AND field2 != 4) ;
drop tables t1, t2, t3;
+
diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test
index e73e7cfade2..d0794db68bb 100644
--- a/mysql-test/t/subselect_sj2.test
+++ b/mysql-test/t/subselect_sj2.test
@@ -47,7 +47,7 @@ select * from t3 where b in (select a from t1);
set @save_max_heap_table_size= @@max_heap_table_size;
set max_heap_table_size=16384;
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
drop table t3;
create table t3 (
@@ -62,11 +62,7 @@ insert into t3 select
from t0 A, t0 B where B.a <5;
explain select * from t3 where b in (select a from t0);
-# Because of BUG#40154, run the next select w/o index condition pushdown:
-set @save_ecp= @@engine_condition_pushdown;
-set engine_condition_pushdown=0;
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
-set engine_condition_pushdown=@save_ecp;
set join_buffer_size= @save_join_buffer_size;
set max_heap_table_size= @save_max_heap_table_size;
@@ -83,7 +79,7 @@ drop table t1, t2, t3;
# Test join buffering
#
set @save_join_buffer_size = @@join_buffer_size;
-set join_buffer_size= 8000;
+set join_buffer_size= 8192;
create table t1 (a int, filler1 binary(200), filler2 binary(200));
insert into t1 select a, 'filler123456', 'filler123456' from t0;
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 073fcd28246..7472c9c0d26 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -79,7 +79,7 @@ create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, p
# Should fail becasue the file t9.MYI already exist in 'run'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---error 1,1,ER_UNKNOWN_ERROR
+--error 1,156
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run";
# Should fail becasue the file t9.MYD already exist in 'tmp'
diff --git a/mysql-test/t/trigger_notembedded.test b/mysql-test/t/trigger_notembedded.test
index d3761d98049..d619afab176 100644
--- a/mysql-test/t/trigger_notembedded.test
+++ b/mysql-test/t/trigger_notembedded.test
@@ -916,7 +916,7 @@ INSERT INTO t1 VALUES (5);
CONNECTION rl_contender;
# Wait until wl_acquirer is waiting for the read lock on t2 to be released.
let $wait_condition=
- SELECT STATE = 'Locked' FROM INFORMATION_SCHEMA.PROCESSLIST
+ SELECT STATE = 'Waiting for table level lock' FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE ID = $wl_acquirer_thread_id;
--source include/wait_condition.inc
# must not "see" the row inserted by the INSERT (as it must run before the
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test
index fd71b888396..4ee412f80d8 100644
--- a/mysql-test/t/udf.test
+++ b/mysql-test/t/udf.test
@@ -425,8 +425,8 @@ drop function if exists test.metaphon;
drop function if exists metaphon;
--enable_warnings
---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
-eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
select metaphon("Hello");
@@ -442,8 +442,8 @@ CREATE FUNCTION test.metaphon(a TEXT) RETURNS TEXT return "This is a SF";
create database db_31767;
use db_31767;
---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
-eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
use test;
@@ -504,8 +504,8 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (f1 INT);
INSERT INTO t1 VALUES(1),(50);
---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
-eval CREATE FUNCTION myfunc_double RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_double RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE f1=1 + myfunc_double(1);
DROP FUNCTION myfunc_double;
DROP TABLE t1;
diff --git a/mysql-test/t/unsafe_binlog_innodb-master.opt b/mysql-test/t/unsafe_binlog_innodb-master.opt
index d5ecd2ed9a5..0d13f0834a5 100644
--- a/mysql-test/t/unsafe_binlog_innodb-master.opt
+++ b/mysql-test/t/unsafe_binlog_innodb-master.opt
@@ -1 +1 @@
---loose-innodb_locks_unsafe_for_binlog=true --loose-innodb_lock_wait_timeout=1
+--loose-innodb_locks_unsafe_for_binlog --loose-innodb_lock_wait_timeout=1
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 2b7a07f4753..e2027e445a0 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -1407,7 +1407,9 @@ drop function if exists t1_max;
drop function if exists t1_min;
--enable_warnings
+--disable_warnings
create table t1 (a int) engine=innodb;
+--enable_warnings
insert into t1(a) values (0), (1);
create function t1_max() returns int return (select max(a) from t1);
create function t1_min() returns int return (select min(a) from t1);
diff --git a/mysql-test/t/innodb_mrr.test b/mysql-test/t/xtradb_mrr.test
index 0f5b41cef27..62b46152cf0 100644
--- a/mysql-test/t/innodb_mrr.test
+++ b/mysql-test/t/xtradb_mrr.test
@@ -1,4 +1,4 @@
--- source include/have_innodb.inc
+-- source include/have_xtradb.inc
--disable_warnings
drop table if exists t1,t2,t3,t4;