summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rw-r--r--client/mysqltest.cc353
-rw-r--r--cmake/maintainer.cmake9
-rw-r--r--cmake/mysql_version.cmake8
-rw-r--r--cmake/os/FreeBSD.cmake9
-rw-r--r--config.h.cmake2
-rw-r--r--configure.cmake2
-rw-r--r--dbug/tests.c5
-rw-r--r--debian/libmariadbclient-dev.files3
-rw-r--r--debian/libmariadbclient-dev.links4
-rw-r--r--extra/my_print_defaults.c6
-rw-r--r--include/CMakeLists.txt23
-rw-r--r--include/maria.h70
-rw-r--r--include/thread_pool_priv.h (renamed from include/mysql/thread_pool_priv.h)0
-rw-r--r--mysql-test/CMakeLists.txt4
-rw-r--r--mysql-test/include/default_mysqld.cnf2
-rw-r--r--mysql-test/include/have_32bit_ulong.inc16
-rw-r--r--mysql-test/include/have_64bit_ulong.inc14
-rw-r--r--mysql-test/lib/mtr_cases.pm91
-rwxr-xr-xmysql-test/mysql-test-run.pl31
-rw-r--r--mysql-test/r/aborted_clients.result10
-rw-r--r--mysql-test/r/default_storage_engine.result1
-rw-r--r--mysql-test/r/derived_view.result53
-rw-r--r--mysql-test/r/flush-innodb.result5
-rw-r--r--mysql-test/r/gis-precise.result18
-rw-r--r--mysql-test/r/group_by.result47
-rw-r--r--mysql-test/r/in_datetime_241.result5
-rw-r--r--mysql-test/r/information_schema_all_engines.result104
-rw-r--r--mysql-test/r/innodb_icp,innodb_plugin.rdiff8
-rw-r--r--mysql-test/r/innodb_icp.result6
-rw-r--r--mysql-test/r/join_cache.result18
-rw-r--r--mysql-test/r/myisam_icp.result6
-rw-r--r--mysql-test/r/mysqltest_cont_on_error.result7
-rw-r--r--mysql-test/r/plugin_loaderr.result10
-rw-r--r--mysql-test/r/progress_976225.result11
-rw-r--r--mysql-test/r/query_cache.result4
-rw-r--r--mysql-test/r/status.result4
-rw-r--r--mysql-test/r/status_user.result2
-rw-r--r--mysql-test/r/subselect.result43
-rw-r--r--mysql-test/r/subselect_no_mat.result43
-rw-r--r--mysql-test/r/subselect_no_opts.result43
-rw-r--r--mysql-test/r/subselect_no_scache.result43
-rw-r--r--mysql-test/r/subselect_no_semijoin.result43
-rw-r--r--mysql-test/r/subselect_sj.result40
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result40
-rw-r--r--mysql-test/r/type_date.result6
-rw-r--r--mysql-test/r/update_ignore_216.result9
-rw-r--r--mysql-test/suite.pm3
-rw-r--r--mysql-test/suite/archive/archive-big.result (renamed from mysql-test/r/archive-big.result)0
-rw-r--r--mysql-test/suite/archive/archive-big.test (renamed from mysql-test/t/archive-big.test)0
-rw-r--r--mysql-test/suite/archive/archive.result (renamed from mysql-test/r/archive.result)0
-rw-r--r--mysql-test/suite/archive/archive.test (renamed from mysql-test/t/archive.test)0
-rw-r--r--mysql-test/suite/archive/archive_bitfield.result (renamed from mysql-test/r/archive_bitfield.result)0
-rw-r--r--mysql-test/suite/archive/archive_bitfield.test (renamed from mysql-test/t/archive_bitfield.test)0
-rw-r--r--mysql-test/suite/archive/archive_debug.result (renamed from mysql-test/r/archive_debug.result)0
-rw-r--r--mysql-test/suite/archive/archive_debug.test (renamed from mysql-test/t/archive_debug.test)0
-rw-r--r--mysql-test/suite/archive/archive_gis.result (renamed from mysql-test/r/archive_gis.result)0
-rw-r--r--mysql-test/suite/archive/archive_gis.test (renamed from mysql-test/t/archive_gis.test)0
-rw-r--r--mysql-test/suite/archive/archive_plugin.result (renamed from mysql-test/r/archive_plugin.result)0
-rw-r--r--mysql-test/suite/archive/archive_plugin.test (renamed from mysql-test/t/archive_plugin.test)0
-rw-r--r--mysql-test/suite/archive/mysqlhotcopy_archive.result (renamed from mysql-test/r/mysqlhotcopy_archive.result)0
-rw-r--r--mysql-test/suite/archive/mysqlhotcopy_archive.test (renamed from mysql-test/t/mysqlhotcopy_archive.test)0
-rw-r--r--mysql-test/suite/archive/partition_archive.result (renamed from mysql-test/r/partition_archive.result)0
-rw-r--r--mysql-test/suite/archive/partition_archive.test (renamed from mysql-test/t/partition_archive.test)0
-rw-r--r--mysql-test/suite/archive/suite.pm9
-rw-r--r--mysql-test/suite/csv/csv.result (renamed from mysql-test/r/csv.result)0
-rw-r--r--mysql-test/suite/csv/csv.test (renamed from mysql-test/t/csv.test)0
-rw-r--r--mysql-test/suite/csv/csv_alter_table.result (renamed from mysql-test/r/csv_alter_table.result)0
-rw-r--r--mysql-test/suite/csv/csv_alter_table.test (renamed from mysql-test/t/csv_alter_table.test)0
-rw-r--r--mysql-test/suite/csv/csv_not_null.result (renamed from mysql-test/r/csv_not_null.result)0
-rw-r--r--mysql-test/suite/csv/csv_not_null.test (renamed from mysql-test/t/csv_not_null.test)0
-rw-r--r--mysql-test/suite/heap/heap.result (renamed from mysql-test/r/heap.result)0
-rw-r--r--mysql-test/suite/heap/heap.test (renamed from mysql-test/t/heap.test)0
-rw-r--r--mysql-test/suite/heap/heap_auto_increment.result (renamed from mysql-test/r/heap_auto_increment.result)0
-rw-r--r--mysql-test/suite/heap/heap_auto_increment.test (renamed from mysql-test/t/heap_auto_increment.test)0
-rw-r--r--mysql-test/suite/heap/heap_btree.result (renamed from mysql-test/r/heap_btree.result)0
-rw-r--r--mysql-test/suite/heap/heap_btree.test (renamed from mysql-test/t/heap_btree.test)0
-rw-r--r--mysql-test/suite/heap/heap_hash.result (renamed from mysql-test/r/heap_hash.result)0
-rw-r--r--mysql-test/suite/heap/heap_hash.test (renamed from mysql-test/t/heap_hash.test)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result6
-rw-r--r--mysql-test/suite/maria/compat_aliases-master.opt (renamed from mysql-test/suite/maria/t/compat_aliases-master.opt)0
-rw-r--r--mysql-test/suite/maria/group_commit.result (renamed from mysql-test/suite/maria/r/group_commit.result)0
-rw-r--r--mysql-test/suite/maria/group_commit.test (renamed from mysql-test/suite/maria/t/group_commit.test)0
-rw-r--r--mysql-test/suite/maria/icp.result (renamed from mysql-test/r/maria_icp.result)6
-rw-r--r--mysql-test/suite/maria/icp.test (renamed from mysql-test/t/maria_icp.test)0
-rw-r--r--mysql-test/suite/maria/lock.result29
-rw-r--r--mysql-test/suite/maria/lock.test44
-rw-r--r--mysql-test/suite/maria/locking.result (renamed from mysql-test/suite/maria/r/locking.result)0
-rw-r--r--mysql-test/suite/maria/locking.test (renamed from mysql-test/suite/maria/t/locking.test)0
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.result (renamed from mysql-test/suite/maria/r/maria-autozerofill.result)0
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.test (renamed from mysql-test/suite/maria/t/maria-autozerofill.test)0
-rw-r--r--mysql-test/suite/maria/maria-big.result (renamed from mysql-test/suite/maria/r/maria-big.result)0
-rw-r--r--mysql-test/suite/maria/maria-big.test (renamed from mysql-test/suite/maria/t/maria-big.test)0
-rw-r--r--mysql-test/suite/maria/maria-big2.result (renamed from mysql-test/suite/maria/r/maria-big2.result)0
-rw-r--r--mysql-test/suite/maria/maria-big2.test (renamed from mysql-test/suite/maria/t/maria-big2.test)0
-rw-r--r--mysql-test/suite/maria/maria-connect.result (renamed from mysql-test/suite/maria/r/maria-connect.result)0
-rw-r--r--mysql-test/suite/maria/maria-connect.test (renamed from mysql-test/suite/maria/t/maria-connect.test)0
-rw-r--r--mysql-test/suite/maria/maria-gis-recovery.opt (renamed from mysql-test/suite/maria/t/maria-gis-recovery.opt)0
-rw-r--r--mysql-test/suite/maria/maria-gis-recovery.result (renamed from mysql-test/suite/maria/r/maria-gis-recovery.result)0
-rw-r--r--mysql-test/suite/maria/maria-gis-recovery.test (renamed from mysql-test/suite/maria/t/maria-gis-recovery.test)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result (renamed from mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.test (renamed from mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result (renamed from mysql-test/suite/maria/r/maria-gis-rtree-trans.result)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.test (renamed from mysql-test/suite/maria/t/maria-gis-rtree-trans.test)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result (renamed from mysql-test/suite/maria/r/maria-gis-rtree.result)0
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.test (renamed from mysql-test/suite/maria/t/maria-gis-rtree.test)0
-rw-r--r--mysql-test/suite/maria/maria-mvcc.result (renamed from mysql-test/suite/maria/r/maria-mvcc.result)0
-rw-r--r--mysql-test/suite/maria/maria-mvcc.test (renamed from mysql-test/suite/maria/t/maria-mvcc.test)0
-rw-r--r--mysql-test/suite/maria/maria-no-logging.result (renamed from mysql-test/suite/maria/r/maria-no-logging.result)0
-rw-r--r--mysql-test/suite/maria/maria-no-logging.test (renamed from mysql-test/suite/maria/t/maria-no-logging.test)0
-rw-r--r--mysql-test/suite/maria/maria-page-checksum.result (renamed from mysql-test/suite/maria/r/maria-page-checksum.result)0
-rw-r--r--mysql-test/suite/maria/maria-page-checksum.test (renamed from mysql-test/suite/maria/t/maria-page-checksum.test)0
-rw-r--r--mysql-test/suite/maria/maria-partitioning.result (renamed from mysql-test/suite/maria/r/maria-partitioning.result)4
-rw-r--r--mysql-test/suite/maria/maria-partitioning.test (renamed from mysql-test/suite/maria/t/maria-partitioning.test)9
-rw-r--r--mysql-test/suite/maria/maria-preload.result (renamed from mysql-test/suite/maria/r/maria-preload.result)0
-rw-r--r--mysql-test/suite/maria/maria-preload.test (renamed from mysql-test/suite/maria/t/maria-preload.test)0
-rw-r--r--mysql-test/suite/maria/maria-purge.result (renamed from mysql-test/suite/maria/r/maria-purge.result)0
-rw-r--r--mysql-test/suite/maria/maria-purge.test (renamed from mysql-test/suite/maria/t/maria-purge.test)0
-rw-r--r--mysql-test/suite/maria/maria-recover-master.opt (renamed from mysql-test/suite/maria/t/maria-recover-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recover.result (renamed from mysql-test/suite/maria/r/maria-recover.result)0
-rw-r--r--mysql-test/suite/maria/maria-recover.test (renamed from mysql-test/suite/maria/t/maria-recover.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-big-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery-big-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-big.result (renamed from mysql-test/suite/maria/r/maria-recovery-big.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-big.test (renamed from mysql-test/suite/maria/t/maria-recovery-big.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-bitmap-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-bitmap.result (renamed from mysql-test/suite/maria/r/maria-recovery-bitmap.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-bitmap.test (renamed from mysql-test/suite/maria/t/maria-recovery-bitmap.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-rtree-ft.result (renamed from mysql-test/suite/maria/r/maria-recovery-rtree-ft.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery-rtree-ft.test (renamed from mysql-test/suite/maria/t/maria-recovery-rtree-ft.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery.result (renamed from mysql-test/suite/maria/r/maria-recovery.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery.test (renamed from mysql-test/suite/maria/t/maria-recovery.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery2-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery2-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery2.result (renamed from mysql-test/suite/maria/r/maria-recovery2.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery2.test (renamed from mysql-test/suite/maria/t/maria-recovery2.test)0
-rw-r--r--mysql-test/suite/maria/maria-recovery3-master.opt (renamed from mysql-test/suite/maria/t/maria-recovery3-master.opt)0
-rw-r--r--mysql-test/suite/maria/maria-recovery3.result (renamed from mysql-test/suite/maria/r/maria-recovery3.result)0
-rw-r--r--mysql-test/suite/maria/maria-recovery3.test (renamed from mysql-test/suite/maria/t/maria-recovery3.test)0
-rw-r--r--mysql-test/suite/maria/maria-ucs2.result (renamed from mysql-test/suite/maria/r/maria-ucs2.result)0
-rw-r--r--mysql-test/suite/maria/maria-ucs2.test (renamed from mysql-test/suite/maria/t/maria-ucs2.test)0
-rw-r--r--mysql-test/suite/maria/maria.result (renamed from mysql-test/suite/maria/r/maria.result)0
-rw-r--r--mysql-test/suite/maria/maria.test (renamed from mysql-test/suite/maria/t/maria.test)0
-rw-r--r--mysql-test/suite/maria/maria2.result (renamed from mysql-test/suite/maria/r/maria2.result)0
-rw-r--r--mysql-test/suite/maria/maria2.test (renamed from mysql-test/suite/maria/t/maria2.test)0
-rw-r--r--mysql-test/suite/maria/maria3.result (renamed from mysql-test/suite/maria/r/maria3.result)0
-rw-r--r--mysql-test/suite/maria/maria3.test (renamed from mysql-test/suite/maria/t/maria3.test)0
-rw-r--r--mysql-test/suite/maria/maria_notembedded.result (renamed from mysql-test/suite/maria/r/maria_notembedded.result)0
-rw-r--r--mysql-test/suite/maria/maria_notembedded.test (renamed from mysql-test/suite/maria/t/maria_notembedded.test)0
-rw-r--r--mysql-test/suite/maria/maria_partition.result (renamed from mysql-test/suite/maria/r/maria_partition.result)0
-rw-r--r--mysql-test/suite/maria/maria_partition.test (renamed from mysql-test/suite/maria/t/maria_partition.test)0
-rw-r--r--mysql-test/suite/maria/maria_showlog_error.result (renamed from mysql-test/suite/maria/r/maria_showlog_error.result)0
-rw-r--r--mysql-test/suite/maria/maria_showlog_error.test (renamed from mysql-test/suite/maria/t/maria_showlog_error.test)0
-rw-r--r--mysql-test/suite/maria/max_length.result (renamed from mysql-test/suite/maria/r/max_length.result)0
-rw-r--r--mysql-test/suite/maria/max_length.test (renamed from mysql-test/suite/maria/t/max_length.test)0
-rw-r--r--mysql-test/suite/maria/mrr.result (renamed from mysql-test/r/maria_mrr.result)0
-rw-r--r--mysql-test/suite/maria/mrr.test (renamed from mysql-test/t/maria_mrr.test)0
-rw-r--r--mysql-test/suite/maria/optimize.result (renamed from mysql-test/suite/maria/r/optimize.result)0
-rw-r--r--mysql-test/suite/maria/optimize.test (renamed from mysql-test/suite/maria/t/optimize.test)0
-rw-r--r--mysql-test/suite/maria/ps_maria.result (renamed from mysql-test/suite/maria/r/ps_maria.result)0
-rw-r--r--mysql-test/suite/maria/ps_maria.test (renamed from mysql-test/suite/maria/t/ps_maria.test)0
-rw-r--r--mysql-test/suite/maria/small_blocksize-master.opt (renamed from mysql-test/suite/maria/t/small_blocksize-master.opt)0
-rw-r--r--mysql-test/suite/maria/small_blocksize.result (renamed from mysql-test/suite/maria/r/small_blocksize.result)0
-rw-r--r--mysql-test/suite/maria/small_blocksize.test (renamed from mysql-test/suite/maria/t/small_blocksize.test)0
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_install.result3
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result3
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result3
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result (renamed from mysql-test/suite/sys_vars/r/binlog_cache_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result108
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result (renamed from mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result108
-rw-r--r--mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic.result (renamed from mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result153
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_insert_limit_basic.result (renamed from mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result111
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_queue_size_basic.result (renamed from mysql-test/suite/sys_vars/r/delayed_queue_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result109
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_size_basic.result (renamed from mysql-test/suite/sys_vars/r/join_buffer_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result177
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic.result (renamed from mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result131
-rw-r--r--mysql-test/suite/sys_vars/r/log_warnings_basic.result (renamed from mysql-test/suite/sys_vars/r/log_warnings_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/log_warnings_basic_64.result165
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic.result (renamed from mysql-test/suite/sys_vars/r/max_connect_errors_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result134
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_basic.result (renamed from mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result179
-rw-r--r--mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result (renamed from mysql-test/suite/sys_vars/r/max_tmp_tables_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result197
-rw-r--r--mysql-test/suite/sys_vars/r/max_write_lock_count_basic.result (renamed from mysql-test/suite/sys_vars/r/max_write_lock_count_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result108
-rw-r--r--mysql-test/suite/sys_vars/r/min_examined_row_limit_basic.result (renamed from mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result183
-rw-r--r--mysql-test/suite/sys_vars/r/multi_range_count_basic.result (renamed from mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result)22
-rw-r--r--mysql-test/suite/sys_vars/r/multi_range_count_basic_32.result245
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic.result (renamed from mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result132
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_repair_threads_basic.result (renamed from mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result)12
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_32.result180
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result (renamed from mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result)12
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result196
-rw-r--r--mysql-test/suite/sys_vars/r/net_retry_count_basic.result (renamed from mysql-test/suite/sys_vars/r/net_retry_count_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result191
-rw-r--r--mysql-test/suite/sys_vars/r/query_alloc_block_size_basic.result (renamed from mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result184
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_limit_basic.result (renamed from mysql-test/suite/sys_vars/r/query_cache_limit_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result129
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic.result (renamed from mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result)28
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result135
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_size_basic.result (renamed from mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result133
-rw-r--r--mysql-test/suite/sys_vars/r/range_alloc_block_size_basic.result (renamed from mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result187
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result (renamed from mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result)15
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result144
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retries_basic.result (renamed from mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result120
-rw-r--r--mysql-test/suite/sys_vars/r/sort_buffer_size_basic.result (renamed from mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result140
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result (renamed from mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result188
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result (renamed from mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result)0
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result162
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/binlog_cache_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_cache_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_cache_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test7
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test7
-rw-r--r--mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_insert_limit_basic.test (renamed from mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_queue_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_queue_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_queue_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/join_buffer_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic.test (renamed from mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/log_warnings_basic.test (renamed from mysql-test/suite/sys_vars/inc/log_warnings_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/log_warnings_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/log_warnings_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_connect_errors_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/max_connect_errors_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_connect_errors_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_seeks_for_key_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_tmp_tables_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/max_tmp_tables_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_tmp_tables_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_write_lock_count_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/max_write_lock_count_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_write_lock_count_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/min_examined_row_limit_basic.test (renamed from mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/multi_range_count_basic.test (renamed from mysql-test/suite/sys_vars/inc/multi_range_count_basic.inc)15
-rw-r--r--mysql-test/suite/sys_vars/t/multi_range_count_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/multi_range_count_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc)3
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_repair_threads_basic.test (renamed from mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc)9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc)8
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/net_retry_count_basic.test (renamed from mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/net_retry_count_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/net_retry_count_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_alloc_block_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_limit_basic.test (renamed from mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_limit_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_limit_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic.test (renamed from mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/range_alloc_block_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test (renamed from mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc)11
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_transaction_retries_basic.test (renamed from mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sort_buffer_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/sort_buffer_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sort_buffer_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test9
-rw-r--r--mysql-test/t/aborted_clients.test28
-rw-r--r--mysql-test/t/default_storage_engine.test16
-rw-r--r--mysql-test/t/derived_view.test24
-rw-r--r--mysql-test/t/flush-innodb.test9
-rw-r--r--mysql-test/t/func_crypt.test2
-rw-r--r--mysql-test/t/func_math.test1
-rw-r--r--mysql-test/t/gis-precise.test12
-rw-r--r--mysql-test/t/group_by.test39
-rw-r--r--mysql-test/t/in_datetime_241.test9
-rw-r--r--mysql-test/t/information_schema_all_engines-master.opt17
-rw-r--r--mysql-test/t/join_cache.test2
-rw-r--r--mysql-test/t/mysqltest_cont_on_error.test16
-rw-r--r--mysql-test/t/plugin_loaderr.opt1
-rw-r--r--mysql-test/t/plugin_loaderr.test10
-rw-r--r--mysql-test/t/progress_976225.test8
-rw-r--r--mysql-test/t/subselect.test29
-rw-r--r--mysql-test/t/subselect_sj.test33
-rw-r--r--mysql-test/t/type_date.test7
-rw-r--r--mysql-test/t/update_ignore_216.test13
-rw-r--r--mysys/CMakeLists.txt2
-rw-r--r--mysys/my_init.c6
-rw-r--r--mysys/my_thr_init.c1
-rw-r--r--mysys/safemalloc.c1
-rw-r--r--mysys/waiting_threads.c6
-rw-r--r--plugin/feedback/utils.cc16
-rw-r--r--plugin/handler_socket/CMakeLists.txt41
-rw-r--r--plugin/handler_socket/handlersocket/mysql_incl.hpp3
-rw-r--r--plugin/handler_socket/libhsclient/auto_addrinfo.hpp2
-rw-r--r--regex/CMakeLists.txt2
-rw-r--r--sql-common/client.c13
-rw-r--r--sql/CMakeLists.txt14
-rw-r--r--sql/gcalc_slicescan.cc2
-rw-r--r--sql/handler.cc2
-rw-r--r--sql/innodb_priv.h (renamed from include/mysql/innodb_priv.h)0
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item_cmpfunc.h1
-rw-r--r--sql/item_func.h2
-rw-r--r--sql/item_geofunc.cc8
-rw-r--r--sql/item_subselect.cc71
-rw-r--r--sql/item_subselect.h10
-rw-r--r--sql/lock.cc9
-rw-r--r--sql/mysql_install_db.cc18
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/opt_subselect.cc11
-rw-r--r--sql/opt_subselect.h4
-rw-r--r--sql/parse_file.cc51
-rw-r--r--sql/parse_file.h1
-rw-r--r--sql/signal_handler.cc2
-rw-r--r--sql/slave.cc9
-rw-r--r--sql/sql_acl.cc8
-rw-r--r--sql/sql_admin.cc38
-rw-r--r--sql/sql_base.cc47
-rw-r--r--sql/sql_base.h2
-rw-r--r--sql/sql_cache.cc5
-rw-r--r--sql/sql_cache.h2
-rw-r--r--sql/sql_lex.cc15
-rw-r--r--sql/sql_partition.cc10
-rw-r--r--sql/sql_plugin.cc52
-rw-r--r--sql/sql_plugin.h1
-rw-r--r--sql/sql_reload.cc6
-rw-r--r--sql/sql_select.cc24
-rw-r--r--sql/sql_select.h3
-rw-r--r--sql/sql_show.cc1
-rw-r--r--sql/sql_table.cc18
-rw-r--r--sql/sql_test.cc2
-rw-r--r--sql/sql_trigger.cc2
-rw-r--r--sql/sql_truncate.cc4
-rw-r--r--sql/sql_update.cc4
-rw-r--r--sql/sql_view.cc2
-rw-r--r--sql/sys_vars.cc2
-rw-r--r--sql/table.cc3
-rw-r--r--sql/table.h17
-rw-r--r--sql/threadpool_common.cc1
-rw-r--r--sql/threadpool_win.cc4
-rw-r--r--storage/innobase/CMakeLists.txt9
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
-rw-r--r--storage/innobase/handler/handler0alter.cc2
-rw-r--r--storage/innobase/handler/i_s.cc2
-rw-r--r--storage/maria/ma_test3.c2
-rw-r--r--storage/maria/maria_def.h70
-rw-r--r--storage/maria/unittest/ma_control_file-t.c4
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multithread-t.c2
-rw-r--r--storage/perfschema/pfs_instr_class.cc8
-rw-r--r--storage/perfschema/pfs_instr_class.h4
-rw-r--r--storage/sphinx/ha_sphinx.cc1
-rw-r--r--storage/xtradb/handler/ha_innodb.cc2
-rw-r--r--storage/xtradb/handler/handler0alter.cc2
-rw-r--r--storage/xtradb/handler/i_s.cc2
-rw-r--r--win/packaging/CMakeLists.txt1
-rw-r--r--win/packaging/ca/CMakeLists.txt16
-rw-r--r--win/packaging/ca/CustomAction.cpp87
-rw-r--r--win/packaging/create_msi.cmake.in3
-rw-r--r--win/packaging/extra.wxs.in9
-rw-r--r--win/packaging/mysql_server.wxs.in8
401 files changed, 2093 insertions, 5377 deletions
diff --git a/.bzrignore b/.bzrignore
index f757e602563..f2b28d74d64 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1140,3 +1140,4 @@ libmysqld/gcalc_tools.cc
sql/share/errmsg.sys
sql/share/mysql
install_manifest.txt
+sql/db.opt
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index e6d42bc60a2..9e459743713 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -33,7 +33,7 @@
And many others
*/
-#define MTEST_VERSION "3.3"
+#define MTEST_VERSION "3.4"
#include "client_priv.h"
#include <mysql_version.h>
@@ -78,6 +78,8 @@ static my_bool non_blocking_api_enabled= 0;
#define MAX_DELIMITER_LENGTH 16
#define DEFAULT_MAX_CONN 64
+#define DIE_BUFF_SIZE 8192
+
/* Flags controlling send and reap */
#define QUERY_SEND_FLAG 1
#define QUERY_REAP_FLAG 2
@@ -106,6 +108,7 @@ static int opt_port= 0;
static int opt_max_connect_retries;
static int opt_result_format_version;
static int opt_max_connections= DEFAULT_MAX_CONN;
+static int error_count= 0;
static my_bool opt_compress= 0, silent= 0, verbose= 0;
static my_bool debug_info_flag= 0, debug_check_flag= 0;
static my_bool tty_password= 0;
@@ -122,7 +125,7 @@ static my_bool disable_connect_log= 1;
static my_bool disable_warnings= 0, disable_column_names= 0;
static my_bool prepare_warnings_enabled= 0;
static my_bool disable_info= 1;
-static my_bool abort_on_error= 1;
+static my_bool abort_on_error= 1, opt_continue_on_error= 0;
static my_bool server_initialized= 0;
static my_bool is_windows= 0;
static char **default_argv;
@@ -559,14 +562,15 @@ const char *from, int len);
static void cleanup_and_exit(int exit_code) __attribute__((noreturn));
-void die(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
-void abort_not_supported_test(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
-void verbose_msg(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2);
-void log_msg(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2);
+void really_die(const char *msg) __attribute__((noreturn));
+void report_or_die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
+void die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2)
+ __attribute__((noreturn));
+static void make_error_message(char *buf, size_t len, const char *fmt, va_list args);
+void abort_not_supported_test(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2)
+ __attribute__((noreturn));
+void verbose_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
+void log_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
VAR* var_from_env(const char *, const char *);
VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
@@ -983,7 +987,10 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query,
else
{
if (!(v= var_get(p, &p, 0, 0)))
- die("Bad variable in eval");
+ {
+ report_or_die( "Bad variable in eval");
+ return;
+ }
dynstr_append_mem(query_eval, v->str_val, v->str_val_len);
}
break;
@@ -1270,9 +1277,13 @@ void handle_command_error(struct st_command *command, uint error,
int i;
if (command->abort_on_error)
- die("command \"%.*s\" failed with error: %u my_errno: %d errno: %d",
+ {
+ report_or_die("command \"%.*s\" failed with error: %u my_errno: %d "
+ "errno: %d",
command->first_word_len, command->query, error, my_errno,
sys_errno);
+ return;
+ }
i= match_expected_error(command, error, NULL);
@@ -1285,14 +1296,17 @@ void handle_command_error(struct st_command *command, uint error,
DBUG_VOID_RETURN;
}
if (command->expected_errors.count > 0)
- die("command \"%.*s\" failed with wrong error: %u my_errno: %d errno: %d",
- command->first_word_len, command->query, error, my_errno, sys_errno);
+ report_or_die("command \"%.*s\" failed with wrong error: %u "
+ "my_errno: %d errno: %d",
+ command->first_word_len, command->query, error, my_errno,
+ sys_errno);
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
- die("command \"%.*s\" succeeded - should have failed with errno %d...",
+ report_or_die("command \"%.*s\" succeeded - should have failed with "
+ "errno %d...",
command->first_word_len, command->query,
command->expected_errors.err[0].code.errnum);
}
@@ -1437,50 +1451,59 @@ static void cleanup_and_exit(int exit_code)
exit(exit_code);
}
-void print_file_stack()
+size_t print_file_stack(char *s, const char *end)
{
+ char *start= s;
struct st_test_file* err_file= cur_file;
if (err_file == file_stack)
- return;
+ return 0;
for (;;)
{
err_file--;
- fprintf(stderr, "included from %s at line %d:\n",
- err_file->file_name, err_file->lineno);
+ s+= my_snprintf(s, end - s, "included from %s at line %d:\n",
+ err_file->file_name, err_file->lineno);
if (err_file == file_stack)
break;
}
+ return s - start;
}
-void die(const char *fmt, ...)
-{
- static int dying= 0;
- va_list args;
- DBUG_ENTER("die");
- DBUG_PRINT("enter", ("start_lineno: %d", start_lineno));
- fflush(stdout);
- /* Print the error message */
- fprintf(stderr, "mysqltest: ");
+static void make_error_message(char *buf, size_t len, const char *fmt, va_list args)
+{
+ char *s= buf, *end= buf + len;
+ s+= my_snprintf(s, end - s, "mysqltest: ");
if (cur_file && cur_file != file_stack)
{
- fprintf(stderr, "In included file \"%s\": \n",
- cur_file->file_name);
- print_file_stack();
+ s+= my_snprintf(s, end - s, "In included file \"%s\": \n",
+ cur_file->file_name);
+ s+= print_file_stack(s, end);
}
if (start_lineno > 0)
- fprintf(stderr, "At line %u: ", start_lineno);
- if (fmt)
- {
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
- }
- else
- fprintf(stderr, "unknown error");
- fprintf(stderr, "\n");
+ s+= my_snprintf(s, end -s, "At line %u: ", start_lineno);
+ if (!fmt)
+ fmt= "unknown error";
+
+ s+= my_vsnprintf(s, end - s, fmt, args);
+ s+= my_snprintf(s, end -s, "\n", start_lineno);
+}
+
+void die(const char *fmt, ...)
+{
+ char buff[DIE_BUFF_SIZE];
+ va_list args;
+ va_start(args, fmt);
+ make_error_message(buff, sizeof(buff), fmt, args);
+ really_die(buff);
+}
+
+void really_die(const char *msg)
+{
+ static int dying= 0;
+ fflush(stdout);
+ fprintf(stderr, "%s", msg);
fflush(stderr);
/*
@@ -1504,6 +1527,28 @@ void die(const char *fmt, ...)
cleanup_and_exit(1);
}
+void report_or_die(const char *fmt, ...)
+{
+ va_list args;
+ DBUG_ENTER("report_or_die");
+
+ char buff[DIE_BUFF_SIZE];
+
+ va_start(args, fmt);
+ make_error_message(buff, sizeof(buff), fmt, args);
+ va_end(args);
+
+ if (opt_continue_on_error)
+ {
+ /* Just log the error and continue */
+ replace_dynstr_append(&ds_res, buff);
+ error_count++;
+ DBUG_VOID_RETURN;
+ }
+
+ really_die(buff);
+}
+
void abort_not_supported_test(const char *fmt, ...)
{
@@ -1516,7 +1561,10 @@ void abort_not_supported_test(const char *fmt, ...)
file_stack->file_name);
fprintf(stderr, "Detected in file %s at line %d\n",
cur_file->file_name, cur_file->lineno);
- print_file_stack();
+
+ char buff[DIE_BUFF_SIZE];
+ print_file_stack(buff, buff + sizeof(buff));
+ fprintf(stderr, "%s", buff);
/* Print error message */
va_start(args, fmt);
@@ -1648,7 +1696,10 @@ static int run_command(char* cmd,
DBUG_PRINT("enter", ("cmd: %s", cmd));
if (!(res_file= popen(cmd, "r")))
- die("popen(\"%s\", \"r\") failed", cmd);
+ {
+ report_or_die("popen(\"%s\", \"r\") failed", cmd);
+ return -1;
+ }
while (fgets(buf, sizeof(buf), res_file))
{
@@ -1748,7 +1799,10 @@ static int diff_check(const char *diff_name)
if (!(res_file= popen(buf, "r")))
die("popen(\"%s\", \"r\") failed", buf);
- /* if diff is not present, nothing will be in stdout to increment have_diff */
+ /*
+ if diff is not present, nothing will be in stdout to increment
+ have_diff
+ */
if (fgets(buf, sizeof(buf), res_file))
have_diff= 1;
@@ -2061,7 +2115,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
void check_result()
{
- const char* mess= "Result content mismatch\n";
+ const char *mess= 0;
DBUG_ENTER("check_result");
DBUG_ASSERT(result_file_name);
@@ -2069,9 +2123,13 @@ void check_result()
switch (compare_files(log_file.file_name(), result_file_name)) {
case RESULT_OK:
- break; /* ok */
+ if (!error_count)
+ break; /* ok */
+ mess= "Got errors while running test";
+ /* Fallthrough */
case RESULT_LENGTH_MISMATCH:
- mess= "Result length mismatch\n";
+ if (!mess)
+ mess= "Result length mismatch\n";
/* Fallthrough */
case RESULT_CONTENT_MISMATCH:
{
@@ -2081,6 +2139,10 @@ void check_result()
*/
char reject_file[FN_REFLEN];
size_t reject_length;
+
+ if (!mess)
+ mess= "Result content mismatch\n";
+
dirname_part(reject_file, result_file_name, &reject_length);
if (access(reject_file, W_OK) == 0)
@@ -2180,8 +2242,8 @@ static int strip_surrounding(char* str, char c1, char c2)
static void strip_parentheses(struct st_command *command)
{
if (strip_surrounding(command->first_argument, '(', ')'))
- die("%.*s - argument list started with '%c' must be ended with '%c'",
- command->first_word_len, command->query, '(', ')');
+ die("%.*s - argument list started with '%c' must be ended with '%c'",
+ command->first_word_len, command->query, '(', ')');
}
@@ -2518,8 +2580,8 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
if (mysql_real_query(mysql, ds_query.str, ds_query.length))
{
- handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
- mysql_sqlstate(mysql), &ds_res);
+ handle_error(curr_command, mysql_errno(mysql), mysql_error(mysql),
+ mysql_sqlstate(mysql), &ds_res);
/* If error was acceptable, return empty string */
dynstr_free(&ds_query);
eval_expr(var, "", 0);
@@ -2527,7 +2589,12 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
}
if (!(res= mysql_store_result(mysql)))
- die("Query '%s' didn't return a result set", ds_query.str);
+ {
+ report_or_die("Query '%s' didn't return a result set", ds_query.str);
+ dynstr_free(&ds_query);
+ eval_expr(var, "", 0);
+ return;
+ }
dynstr_free(&ds_query);
if ((row= mysql_fetch_row(res)) && row[0])
@@ -2696,16 +2763,23 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
/* Run the query */
if (mysql_real_query(mysql, ds_query.str, ds_query.length))
{
- handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
- mysql_sqlstate(mysql), &ds_res);
+ handle_error(curr_command, mysql_errno(mysql), mysql_error(mysql),
+ mysql_sqlstate(mysql), &ds_res);
/* If error was acceptable, return empty string */
dynstr_free(&ds_query);
+ dynstr_free(&ds_col);
eval_expr(var, "", 0);
DBUG_VOID_RETURN;
}
if (!(res= mysql_store_result(mysql)))
- die("Query '%s' didn't return a result set", ds_query.str);
+ {
+ report_or_die("Query '%s' didn't return a result set", ds_query.str);
+ dynstr_free(&ds_query);
+ dynstr_free(&ds_col);
+ eval_expr(var, "", 0);
+ return;
+ }
{
/* Find column number from the given column name */
@@ -2725,8 +2799,11 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
if (col_no == -1)
{
mysql_free_result(res);
- die("Could not find column '%s' in the result of '%s'",
- ds_col.str, ds_query.str);
+ report_or_die("Could not find column '%s' in the result of '%s'",
+ ds_col.str, ds_query.str);
+ dynstr_free(&ds_query);
+ dynstr_free(&ds_col);
+ return;
}
DBUG_PRINT("info", ("Found column %d with name '%s'",
i, fields[i].name));
@@ -3165,7 +3242,10 @@ void do_exec(struct st_command *command)
while (*cmd && my_isspace(charset_info, *cmd))
cmd++;
if (!*cmd)
- die("Missing argument in exec");
+ {
+ report_or_die("Missing argument in exec");
+ return;
+ }
command->last_argument= command->end;
init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256);
@@ -3197,10 +3277,12 @@ void do_exec(struct st_command *command)
DBUG_PRINT("info", ("Executing '%s' as '%s'",
command->first_argument, ds_cmd.str));
- if (!(res_file= my_popen(&ds_cmd, "r")) && command->abort_on_error)
+ if (!(res_file= my_popen(&ds_cmd, "r")))
{
dynstr_free(&ds_cmd);
- die("popen(\"%s\", \"r\") failed", command->first_argument);
+ if (command->abort_on_error)
+ report_or_die("popen(\"%s\", \"r\") failed", command->first_argument);
+ return;
}
ds_result= &ds_res;
@@ -3237,11 +3319,12 @@ void do_exec(struct st_command *command)
if (command->abort_on_error)
{
- log_msg("exec of '%s' failed, error: %d, status: %d, errno: %d",
- ds_cmd.str, error, status, errno);
+ report_or_die("exec of '%s' failed, error: %d, status: %d, errno: %d\n"
+ "Output from before failure:\n%s\n",
+ ds_cmd.str, error, status, errno,
+ ds_res.str);
dynstr_free(&ds_cmd);
- die("command \"%s\" failed\n\nOutput from before failure:\n%s\n",
- command->first_argument, ds_res.str);
+ return;
}
DBUG_PRINT("info",
@@ -3256,8 +3339,8 @@ void do_exec(struct st_command *command)
{
dynstr_free(&ds_cmd);
if (command->expected_errors.count > 0)
- die("command \"%s\" failed with wrong error: %d",
- command->first_argument, status);
+ report_or_die("command \"%s\" failed with wrong error: %d",
+ command->first_argument, status);
}
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
@@ -3267,8 +3350,10 @@ void do_exec(struct st_command *command)
log_msg("exec of '%s failed, error: %d, errno: %d",
ds_cmd.str, error, errno);
dynstr_free(&ds_cmd);
- die("command \"%s\" succeeded - should have failed with errno %d...",
- command->first_argument, command->expected_errors.err[0].code.errnum);
+ report_or_die("command \"%s\" succeeded - should have failed with "
+ "errno %d...",
+ command->first_argument,
+ command->expected_errors.err[0].code.errnum);
}
dynstr_free(&ds_cmd);
@@ -3302,7 +3387,8 @@ int do_modify_var(struct st_command *command,
const char *p= command->first_argument;
VAR* v;
if (!*p)
- die("Missing argument to %.*s", command->first_word_len, command->query);
+ die("Missing argument to %.*s", command->first_word_len,
+ command->query);
if (*p != '$')
die("The argument to %.*s must be a variable (start with $)",
command->first_word_len, command->query);
@@ -3368,7 +3454,10 @@ void do_system(struct st_command *command)
DBUG_ENTER("do_system");
if (strlen(command->first_argument) == 0)
- die("Missing arguments to system, nothing to do!");
+ {
+ report_or_die("Missing arguments to system, nothing to do!");
+ return;
+ }
init_dynamic_string(&ds_cmd, 0, command->query_len + 64, 256);
@@ -3389,12 +3478,14 @@ void do_system(struct st_command *command)
if (my_system(&ds_cmd))
{
if (command->abort_on_error)
- die("system command '%s' failed", command->first_argument);
-
- /* If ! abort_on_error, log message and continue */
- dynstr_append(&ds_res, "system command '");
- replace_dynstr_append(&ds_res, command->first_argument);
- dynstr_append(&ds_res, "' failed\n");
+ report_or_die("system command '%s' failed", command->first_argument);
+ else
+ {
+ /* If ! abort_on_error, log message and continue */
+ dynstr_append(&ds_res, "system command '");
+ replace_dynstr_append(&ds_res, command->first_argument);
+ dynstr_append(&ds_res, "' failed\n");
+ }
}
command->last_argument= command->end;
@@ -3941,12 +4032,12 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
No characters except \n are allowed on
the same line as the command
*/
- die("Trailing characters found after command");
+ report_or_die("Trailing characters found after command");
}
if (feof(cur_file->file))
- die("End of file encountered before '%s' delimiter was found",
- ds_delimiter->str);
+ report_or_die("End of file encountered before '%s' delimiter was found",
+ ds_delimiter->str);
if (match_delimiter(c, ds_delimiter->str, ds_delimiter->length))
{
@@ -4350,8 +4441,13 @@ void do_perl(struct st_command *command)
/* Format the "perl <filename>" command */
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);
- if (!(res_file= popen(buf, "r")) && command->abort_on_error)
- die("popen(\"%s\", \"r\") failed", buf);
+ if (!(res_file= popen(buf, "r")))
+ {
+ if (command->abort_on_error)
+ die("popen(\"%s\", \"r\") failed", buf);
+ dynstr_free(&ds_delimiter);
+ return;
+ }
while (fgets(buf, sizeof(buf), res_file))
{
@@ -4506,14 +4602,14 @@ void do_sync_with_master2(struct st_command *command, long offset)
information is not initialized, the arguments are
incorrect, or an error has occured
*/
- die("%.*s failed: '%s' returned NULL "\
+ die("%.*s failed: '%s' returned NULL " \
"indicating slave SQL thread failure",
command->first_word_len, command->query, query_buf);
}
if (result == -1)
- die("%.*s failed: '%s' returned -1 "\
+ die("%.*s failed: '%s' returned -1 " \
"indicating timeout after %d seconds",
command->first_word_len, command->query, query_buf, timeout);
else
@@ -4808,7 +4904,8 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
while (my_isspace(charset_info, *p))
p++;
if (!*p)
- die("Missing argument to %.*s", command->first_word_len, command->query);
+ die("Missing argument to %.*s", command->first_word_len,
+ command->query);
sleep_start= p;
/* Check that arg starts with a digit, not handled by my_strtod */
if (!my_isdigit(charset_info, *sleep_start))
@@ -4880,16 +4977,21 @@ int query_get_string(MYSQL* mysql, const char* query,
MYSQL_ROW row;
if (mysql_query(mysql, query))
- die("'%s' failed: %d %s", query,
- mysql_errno(mysql), mysql_error(mysql));
+ {
+ report_or_die("'%s' failed: %d %s", query,
+ mysql_errno(mysql), mysql_error(mysql));
+ return 1;
+ }
if ((res= mysql_store_result(mysql)) == NULL)
- die("Failed to store result: %d %s",
- mysql_errno(mysql), mysql_error(mysql));
+ {
+ report_or_die("Failed to store result: %d %s",
+ mysql_errno(mysql), mysql_error(mysql));
+ return 1;
+ }
if ((row= mysql_fetch_row(res)) == NULL)
{
mysql_free_result(res);
- ds= 0;
return 1;
}
init_dynamic_string(ds, (row[column] ? row[column] : "NULL"), ~0, 32);
@@ -5161,7 +5263,7 @@ void do_get_errcodes(struct st_command *command)
while (*p && p != end)
{
if (!my_isdigit(charset_info, *p))
- die("Invalid argument to error: '%s' - "\
+ die("Invalid argument to error: '%s' - " \
"the errno may only consist of digits[0-9]",
command->first_argument);
p++;
@@ -6084,7 +6186,7 @@ void do_block(enum block_cmd cmd, struct st_command* command)
eval_expr(&v2, curr_ptr, &expr_end);
if ((operand!=EQ_OP && operand!=NE_OP) && ! (v.is_int && v2.is_int))
- die ("Only == and != are supported for string values");
+ die("Only == and != are supported for string values");
/* Now we overwrite the first variable with 0 or 1 (for false or true) */
@@ -6442,7 +6544,7 @@ int read_line(char *buf, int size)
*p++= c;
}
}
- die("The input buffer is too small for this query.x\n" \
+ die("The input buffer is too small for this query.x\n" \
"check your query or increase MAX_QUERY and recompile");
DBUG_RETURN(0);
}
@@ -6675,6 +6777,12 @@ static struct my_option my_long_options[] =
{"compress", 'C', "Use the compressed server/client protocol.",
&opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
+ {"continue-on-error", 0,
+ "Continue test even if we got an error. "
+ "This is mostly useful when testing a storage engine to see what from a test file it can execute, "
+ "or to find all syntax errors in a newly created big test file",
+ &opt_continue_on_error, &opt_continue_on_error, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"cursor-protocol", 0, "Use cursors for prepared statements.",
&cursor_protocol, &cursor_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -7006,7 +7114,8 @@ int parse_args(int argc, char **argv)
{
/* Check that the result file exists */
if (result_file_name && access(result_file_name, F_OK) != 0)
- die("The specified result file '%s' does not exist", result_file_name);
+ die("The specified result file '%s' does not exist",
+ result_file_name);
}
return 0;
@@ -7333,8 +7442,8 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
}
if (error != MYSQL_NO_DATA)
- die("mysql_fetch didn't end with MYSQL_NO_DATA from statement: error: %d",
- error);
+ die("mysql_fetch didn't end with MYSQL_NO_DATA from statement: "
+ "error: %d", error);
if (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA)
die("mysql_fetch didn't end with MYSQL_NO_DATA from statement: %d %s",
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
@@ -7666,7 +7775,8 @@ static int match_expected_error(struct st_command *command,
NULL is quite likely, but not in conjunction with a SQL-state expect!
*/
if (unlikely(err_sqlstate == NULL))
- die("expecting a SQL-state (%s) from query '%s' which cannot produce one...",
+ die("expecting a SQL-state (%s) from query '%s' which cannot "
+ "produce one...",
command->expected_errors.err[i].code.sqlstate, command->query);
if (strncmp(command->expected_errors.err[i].code.sqlstate,
@@ -7720,7 +7830,11 @@ void handle_error(struct st_command *command,
}
if (command->abort_on_error)
- die("query '%s' failed: %d: %s", command->query, err_errno, err_error);
+ {
+ report_or_die("query '%s' failed: %d: %s", command->query, err_errno,
+ err_error);
+ DBUG_VOID_RETURN;
+ }
DBUG_PRINT("info", ("expected_errors.count: %d",
command->expected_errors.count));
@@ -7766,13 +7880,15 @@ void handle_error(struct st_command *command,
if (command->expected_errors.count > 0)
{
if (command->expected_errors.err[0].type == ERR_ERRNO)
- die("query '%s' failed with wrong errno %d: '%s', instead of %d...",
- command->query, err_errno, err_error,
- command->expected_errors.err[0].code.errnum);
+ report_or_die("query '%s' failed with wrong errno %d: '%s', instead of "
+ "%d...",
+ command->query, err_errno, err_error,
+ command->expected_errors.err[0].code.errnum);
else
- die("query '%s' failed with wrong sqlstate %s: '%s', instead of %s...",
- command->query, err_sqlstate, err_error,
- command->expected_errors.err[0].code.sqlstate);
+ report_or_die("query '%s' failed with wrong sqlstate %s: '%s', "
+ "instead of %s...",
+ command->query, err_sqlstate, err_error,
+ command->expected_errors.err[0].code.sqlstate);
}
revert_properties();
@@ -7799,15 +7915,17 @@ void handle_no_error(struct st_command *command)
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
- die("query '%s' succeeded - should have failed with errno %d...",
- command->query, command->expected_errors.err[0].code.errnum);
+ report_or_die("query '%s' succeeded - should have failed with errno %d...",
+ command->query, command->expected_errors.err[0].code.errnum);
}
else if (command->expected_errors.err[0].type == ERR_SQLSTATE &&
strcmp(command->expected_errors.err[0].code.sqlstate,"00000") != 0)
{
/* SQLSTATE we wanted was != "00000", i.e. not an expected success */
- die("query '%s' succeeded - should have failed with sqlstate %s...",
- command->query, command->expected_errors.err[0].code.sqlstate);
+ report_or_die("query '%s' succeeded - should have failed with "
+ "sqlstate %s...",
+ command->query,
+ command->expected_errors.err[0].code.sqlstate);
}
DBUG_VOID_RETURN;
}
@@ -8105,10 +8223,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
DBUG_ENTER("run_query");
if (cn->pending && (flags & QUERY_SEND_FLAG))
- die ("Cannot run query on connection between send and reap");
+ die("Cannot run query on connection between send and reap");
if (!(flags & QUERY_SEND_FLAG) && !cn->pending)
- die ("Cannot reap on a connection without pending send");
+ die("Cannot reap on a connection without pending send");
init_dynamic_string(&ds_warnings, NULL, 0, 256);
ds_warn= &ds_warnings;
@@ -8293,13 +8411,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
if (sp_created)
{
if (util_query(mysql, "DROP PROCEDURE mysqltest_tmp_sp "))
- die("Failed to drop sp: %d: %s", mysql_errno(mysql), mysql_error(mysql));
+ report_or_die("Failed to drop sp: %d: %s", mysql_errno(mysql),
+ mysql_error(mysql));
}
if (view_created)
{
if (util_query(mysql, "DROP VIEW mysqltest_tmp_v "))
- die("Failed to drop view: %d: %s",
+ report_or_die("Failed to drop view: %d: %s",
mysql_errno(mysql), mysql_error(mysql));
}
@@ -8463,9 +8582,10 @@ void get_command_type(struct st_command* command)
else
{
/* -- "comment" that didn't contain a mysqltest command */
- die("Found line beginning with -- that didn't contain "\
- "a valid mysqltest command, check your syntax or "\
+ report_or_die("Found line beginning with -- that didn't contain " \
+ "a valid mysqltest command, check your syntax or " \
"use # if you intended to write a comment");
+ command->type= Q_COMMENT;
}
}
@@ -9190,7 +9310,7 @@ int main(int argc, char **argv)
if (parsing_disabled == 0)
parsing_disabled= 1;
else
- die("Parsing is already disabled");
+ report_or_die("Parsing is already disabled");
break;
case Q_ENABLE_PARSING:
/*
@@ -9200,7 +9320,7 @@ int main(int argc, char **argv)
if (parsing_disabled == 1)
parsing_disabled= 0;
else
- die("Parsing is already enabled");
+ report_or_die("Parsing is already enabled");
break;
case Q_DIE:
/* Abort test with error code and error message */
@@ -9404,7 +9524,8 @@ void do_get_replace_column(struct st_command *command)
if (!(column_number= atoi(to)) || column_number > MAX_COLUMNS)
die("Wrong column number to replace_column in '%s'", command->query);
if (!*from)
- die("Wrong number of arguments to replace_column in '%s'", command->query);
+ die("Wrong number of arguments to replace_column in '%s'",
+ command->query);
to= get_string(&buff, &from, command);
my_free(replace_column[column_number-1]);
replace_column[column_number-1]= my_strdup(to, MYF(MY_WME | MY_FAE));
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index cf9b1882715..9c9ab8cca3b 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -19,6 +19,15 @@ INCLUDE(CheckCCompilerFlag)
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing")
+
+ CHECK_C_COMPILER_FLAG("-Wno-missing-field-initializers"
+ HAVE_NO_MISSING_FIELD_INITIALIZERS)
+
+ IF (HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ SET(MY_MAINTAINER_WARNINGS
+ "${MY_MAINTAINER_WARNINGS} -Wno-missing-field-initializers")
+ ENDIF()
+
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
HAVE_DECLARATION_AFTER_STATEMENT)
IF(HAVE_DECLARATION_AFTER_STATEMENT)
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index 5f60cb68101..76cd7995ed1 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -126,10 +126,12 @@ ENDIF()
IF(MSVC)
# Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number>
# to bzr revno for example (in the CI builds)
- SET(TINY_VERSION "0" CACHE INTERNAL "")
+ IF(NOT TINY_VERSION)
+ SET(TINY_VERSION "0")
+ ENDIF()
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-
+
SET(FILETYPE VFT_APP)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
@@ -137,7 +139,7 @@ IF(MSVC)
SET(FILETYPE VFT_DLL)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
-
+
FUNCTION(ADD_VERSION_INFO target target_type sources_var)
IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE")
SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
diff --git a/cmake/os/FreeBSD.cmake b/cmake/os/FreeBSD.cmake
index 9bc7d944da2..27afe679f25 100644
--- a/cmake/os/FreeBSD.cmake
+++ b/cmake/os/FreeBSD.cmake
@@ -23,6 +23,15 @@
# The below was used for really old versions of FreeBSD, roughly: before 5.1.9
# ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
+# Find libexecinfo (library that contains backtrace_symbols etc)
+INCLUDE_DIRECTORIES(/usr/local/include)
+SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include )
+SET(ENV{LIB} "$ENV{LIB}:/usr/local/lib")
+FIND_LIBRARY(EXECINFO NAMES execinfo)
+IF(EXECINFO)
+ SET(LIBEXECINFO ${EXECINFO})
+ENDIF()
+
# Use atomic builtins
IF(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
diff --git a/config.h.cmake b/config.h.cmake
index 529e1c7ad1d..d03ad91189c 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -589,6 +589,8 @@
#cmakedefine WITH_MYISAM_STORAGE_ENGINE 1
#cmakedefine WITH_MYISAMMRG_STORAGE_ENGINE 1
#cmakedefine WITH_HEAP_STORAGE_ENGINE 1
+#cmakedefine WITH_INNOBASE_STORAGE_ENGINE 1
+#cmakedefine WITH_XTRADB_STORAGE_ENGINE 1
#cmakedefine WITH_CSV_STORAGE_ENGINE 1
#cmakedefine WITH_PARTITION_STORAGE_ENGINE 1
#cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1
diff --git a/configure.cmake b/configure.cmake
index bf2a08386ab..6191ceef378 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -147,7 +147,7 @@ IF(UNIX)
FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES
- ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
+ ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
IF(CMAKE_REQUIRED_LIBRARIES)
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
diff --git a/dbug/tests.c b/dbug/tests.c
index 5950c5fa583..657ed638a5a 100644
--- a/dbug/tests.c
+++ b/dbug/tests.c
@@ -38,10 +38,10 @@ int func1()
int main (int argc, char *argv[])
{
- int i;
#ifdef DBUG_OFF
return 1;
-#endif
+#else
+ int i;
if (argc == 1)
return 0;
@@ -83,4 +83,5 @@ int main (int argc, char *argv[])
DBUG_SET(""); /* to not have my_end() in the traces */
my_end(0);
return 0;
+#endif /* DBUG_OFF */
}
diff --git a/debian/libmariadbclient-dev.files b/debian/libmariadbclient-dev.files
index f75f049ec00..8f56a3065d5 100644
--- a/debian/libmariadbclient-dev.files
+++ b/debian/libmariadbclient-dev.files
@@ -1,6 +1,5 @@
usr/bin/mysql_config
-usr/include/mysql/*.h
-usr/include/mysql/psi/*.h
+usr/include/mysql
usr/lib/libmysqlclient.a
usr/lib/libmysqlclient_r.a
usr/lib/libmysqlservices.a
diff --git a/debian/libmariadbclient-dev.links b/debian/libmariadbclient-dev.links
index 0481d1a0020..0076791dcfa 100644
--- a/debian/libmariadbclient-dev.links
+++ b/debian/libmariadbclient-dev.links
@@ -1,2 +1,2 @@
-usr/lib/libmysqlclient.so.16 usr/lib/libmysqlclient.so
-usr/lib/libmysqlclient_r.so.16 usr/lib/libmysqlclient_r.so
+usr/lib/libmysqlclient.so.18 usr/lib/libmysqlclient.so
+usr/lib/libmysqlclient_r.so.18 usr/lib/libmysqlclient_r.so
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index a25381c4808..8a16e677cb9 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -67,7 +67,7 @@ static struct my_option my_long_options[] =
{"defaults-extra-file", 'e',
"Read this file after the global config file and before the config "
"file in the users home directory; should be the first option",
- &my_defaults_extra_file, &my_defaults_extra_file, 0,
+ (void *)&my_defaults_extra_file, (void *)&my_defaults_extra_file, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"defaults-group-suffix", 'g',
"In addition to the given groups, read also groups with this suffix",
@@ -75,8 +75,8 @@ static struct my_option my_long_options[] =
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"extra-file", 'e',
"Deprecated. Synonym for --defaults-extra-file.",
- &my_defaults_extra_file,
- &my_defaults_extra_file, 0, GET_STR,
+ (void *)&my_defaults_extra_file,
+ (void *)&my_defaults_extra_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 3046c3f7614..6404074c8c9 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -14,11 +14,11 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(HEADERS_GEN_CONFIGURE
-${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h
-${CMAKE_CURRENT_BINARY_DIR}/my_config.h
-${CMAKE_CURRENT_BINARY_DIR}/mysqld_ername.h
-${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h
-${CMAKE_CURRENT_BINARY_DIR}/sql_state.h
+ mysql_version.h
+ my_config.h
+ mysqld_ername.h
+ mysqld_error.h
+ sql_state.h
)
SET(HEADERS
@@ -49,8 +49,19 @@ SET(HEADERS
m_ctype.h
my_attribute.h
my_compiler.h
- ${HEADERS_GEN_CONFIGURE}
)
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
+FOREACH(f ${HEADERS_GEN_CONFIGURE})
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+ENDFOREACH(f)
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h")
+
+STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
+STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
+
+INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN CMakeFiles EXCLUDE
+ PATTERN mysql EXCLUDE
+ REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
diff --git a/include/maria.h b/include/maria.h
index 404ce98dafd..cb2f92e8a35 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -24,7 +24,6 @@ extern "C" {
#include <my_base.h>
#include <my_sys.h>
#include <m_ctype.h>
-#include "../storage/maria/ma_pagecache.h"
#include "my_compare.h"
#include "ft_global.h"
#include <myisamchk.h>
@@ -268,7 +267,6 @@ extern my_bool maria_flush, maria_single_user, maria_page_checksums;
extern my_bool maria_delay_key_write;
extern my_off_t maria_max_temp_length;
extern ulong maria_bulk_insert_tree_size, maria_data_pointer_size;
-extern PAGECACHE maria_pagecache_var, *maria_pagecache;
extern MY_TMPDIR *maria_tmpdir;
/*
This is used to check if a symlink points into the mysql data home,
@@ -353,69 +351,6 @@ typedef struct st_maria_bit_buff
uint error;
} MARIA_BIT_BUFF;
-
-typedef struct st_maria_sort_info
-{
- /* sync things */
- mysql_mutex_t mutex;
- mysql_cond_t cond;
- MARIA_HA *info, *new_info;
- HA_CHECK *param;
- char *buff;
- SORT_KEY_BLOCKS *key_block, *key_block_end;
- SORT_FT_BUF *ft_buf;
- my_off_t filelength, dupp, buff_length;
- pgcache_page_no_t page;
- ha_rows max_records;
- uint current_key, total_keys;
- uint got_error, threads_running;
- myf myf_rw;
- enum data_file_type new_data_file_type, org_data_file_type;
-} MARIA_SORT_INFO;
-
-typedef struct st_maria_sort_param
-{
- pthread_t thr;
- IO_CACHE read_cache, tempfile, tempfile_for_exceptions;
- DYNAMIC_ARRAY buffpek;
- MARIA_BIT_BUFF bit_buff; /* For parallel repair of packrec. */
-
- MARIA_KEYDEF *keyinfo;
- MARIA_SORT_INFO *sort_info;
- HA_KEYSEG *seg;
- uchar **sort_keys;
- uchar *rec_buff;
- void *wordlist, *wordptr;
- MEM_ROOT wordroot;
- uchar *record;
- MY_TMPDIR *tmpdir;
-
- /*
- The next two are used to collect statistics, see maria_update_key_parts for
- description.
- */
- ulonglong unique[HA_MAX_KEY_SEG+1];
- ulonglong notnull[HA_MAX_KEY_SEG+1];
-
- MARIA_RECORD_POS pos,max_pos,filepos,start_recpos, current_filepos;
- uint key, key_length,real_key_length,sortbuff_size;
- uint maxbuffers, keys, find_length, sort_keys_length;
- my_bool fix_datafile, master;
- my_bool calc_checksum; /* calculate table checksum */
- size_t rec_buff_size;
-
- int (*key_cmp)(struct st_maria_sort_param *, const void *, const void *);
- int (*key_read)(struct st_maria_sort_param *, uchar *);
- int (*key_write)(struct st_maria_sort_param *, const uchar *);
- void (*lock_in_memory)(HA_CHECK *);
- int (*write_keys)(struct st_maria_sort_param *, register uchar **,
- uint , struct st_buffpek *, IO_CACHE *);
- uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
- int (*write_key)(struct st_maria_sort_param *, IO_CACHE *,uchar *,
- uint, uint);
-} MARIA_SORT_PARAM;
-
-
/* functions in maria_check */
void maria_chk_init(HA_CHECK *param);
void maria_chk_init_for_check(HA_CHECK *param, MARIA_HA *info);
@@ -443,7 +378,6 @@ int maria_filecopy(HA_CHECK *param, File to, File from, my_off_t start,
my_off_t length, const char *type);
int maria_movepoint(MARIA_HA *info, uchar *record, my_off_t oldpos,
my_off_t newpos, uint prot_key);
-int maria_write_data_suffix(MARIA_SORT_INFO *sort_info, my_bool fix_datafile);
int maria_test_if_almost_full(MARIA_HA *info);
int maria_recreate_table(HA_CHECK *param, MARIA_HA **org_info, char *filename);
int maria_disable_indexes(MARIA_HA *info);
@@ -456,10 +390,6 @@ my_bool maria_test_if_sort_rep(MARIA_HA *info, ha_rows rows, ulonglong key_map,
int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows);
void maria_flush_bulk_insert(MARIA_HA *info, uint inx);
void maria_end_bulk_insert(MARIA_HA *info);
-int maria_assign_to_pagecache(MARIA_HA *info, ulonglong key_map,
- PAGECACHE *key_cache);
-void maria_change_pagecache(PAGECACHE *old_key_cache,
- PAGECACHE *new_key_cache);
int maria_preload(MARIA_HA *info, ulonglong key_map, my_bool ignore_leaves);
void maria_versioning(MARIA_HA *info, my_bool versioning);
void maria_ignore_trids(MARIA_HA *info);
diff --git a/include/mysql/thread_pool_priv.h b/include/thread_pool_priv.h
index 4060cf51733..4060cf51733 100644
--- a/include/mysql/thread_pool_priv.h
+++ b/include/thread_pool_priv.h
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
index f360ef1c616..d065e8935c2 100644
--- a/mysql-test/CMakeLists.txt
+++ b/mysql-test/CMakeLists.txt
@@ -28,6 +28,10 @@ INSTALL(
PATTERN ".cvsignore" EXCLUDE
PATTERN "*.am" EXCLUDE
PATTERN "*.in" EXCLUDE
+ PATTERN "*.vcxproj" EXCLUDE
+ PATTERN "*.vcxproj.filters" EXCLUDE
+ PATTERN "*.vcxproj.user" EXCLUDE
+ PATTERN "CTest" EXCLUDE
)
ENDIF()
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 18d7e11ee43..66ff188fe55 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -60,6 +60,8 @@ loose-performance-schema-max-table-handles=1000
binlog-direct-non-transactional-updates
+default-storage-engine=myisam
+
# here, at the end of [mysqld] group mtr will automatically disable
# all optional plugins.
diff --git a/mysql-test/include/have_32bit_ulong.inc b/mysql-test/include/have_32bit_ulong.inc
deleted file mode 100644
index 0323b8a9888..00000000000
--- a/mysql-test/include/have_32bit_ulong.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-# Created by Horst Hunger 2008-04-15
-# see also have_64bit_ulong.inc
-
---disable_query_log
---disable_warnings
-let $save = `SELECT @@pseudo_thread_id`;
-SET @@pseudo_thread_id = 4294967296;
-let $mach32 = `SELECT @@pseudo_thread_id <= 4294967295`;
-eval SET @@pseudo_thread_id = $save;
---enable_warnings
---enable_query_log
-if (!$mach32)
-{
- skip Need a 32 bit unsigned long;
-}
-
diff --git a/mysql-test/include/have_64bit_ulong.inc b/mysql-test/include/have_64bit_ulong.inc
deleted file mode 100644
index 529ab225e4f..00000000000
--- a/mysql-test/include/have_64bit_ulong.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-# Created by Horst Hunger 2008-04-15
-# see also have_32bit_ulong.inc
-
---disable_query_log
-let $save = `SELECT @@pseudo_thread_id`;
-SET @@pseudo_thread_id = 4294967296;
-let $mach64 = `SELECT @@pseudo_thread_id > 4294967295`;
-eval SET @@pseudo_thread_id = $save;
---enable_query_log
-if (!$mach64)
-{
- skip Need a 64 unsigned long ;
-}
-
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index beb0716d4a7..160fdcd935b 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -25,6 +25,8 @@ use strict;
use base qw(Exporter);
our @EXPORT= qw(collect_option collect_test_cases);
+use Carp;
+
use mtr_report;
use mtr_match;
@@ -103,12 +105,12 @@ sub collect_test_cases ($$$$) {
# If not reordering, we also shouldn't group by suites, unless
# no test cases were named.
- # This also effects some logic in the loop following this.
+ # This also affects some logic in the loop following this.
if ($opt_reorder or !@$opt_cases)
{
foreach my $suite (split(",", $suites))
{
- push(@$cases, collect_one_suite($suite, $opt_cases));
+ push(@$cases, collect_suite_name($suite, $opt_cases));
}
}
@@ -136,7 +138,7 @@ sub collect_test_cases ($$$$) {
$sname= "main" if !$opt_reorder and !$sname;
mtr_error("Could not find '$tname' in '$suites' suite(s)") unless $sname;
# If suite was part of name, find it there, may come with combinations
- my @this_case = collect_one_suite($sname, [ $test_name_spec ]);
+ my @this_case = collect_suite_name($sname, [ $test_name_spec ]);
if (@this_case)
{
push (@$cases, @this_case);
@@ -310,55 +312,74 @@ sub parse_disabled {
}
}
-sub collect_one_suite
+#
+# processes one user-specified suite name.
+# it could contain wildcards, e.g engines/*
+#
+sub collect_suite_name
{
my $suitename= shift; # Test suite name
my $opt_cases= shift;
my $over;
+ my %suites;
($suitename, $over) = split '-', $suitename;
- mtr_verbose("Collecting: $suitename");
-
- my $suitedir= $::glob_mysql_test_dir; # Default
- my @overlays = ();
if ( $suitename ne "main" )
{
# Allow suite to be path to "some dir" if $suitename has at least
# one directory part
- if ( -d $suitename and splitdir($suitename) > 1 ){
- $suitedir= $suitename;
- mtr_report(" - from '$suitedir'");
-
+ if ( -d $suitename and splitdir($suitename) > 1 ) {
+ $suites{$suitename} = [ $suitename ];
+ mtr_report(" - from '$suitename'");
}
else
{
- @overlays = my_find_dir(dirname($::glob_mysql_test_dir),
- ["mysql-test/suite",
- "storage/*/mysql-test",
- "plugin/*/mysql-test"],
- [$suitename]);
+ my @dirs = my_find_dir(dirname($::glob_mysql_test_dir),
+ ["mysql-test/suite",
+ "storage/*/mysql-test",
+ "plugin/*/mysql-test"],
+ [$suitename]);
#
- # XXX at the moment, for simplicity, we will not fully support one plugin
- # overlaying a suite of another plugin. Only suites in the main
- # mysql-test directory can be safely overlayed. To be fixed, when needed.
- # To fix it we'll need a smarter overlay detection (that is, detection of
- # what is an overlay and what is the "original" suite) than simply
- # "prefer directories with more files".
+ # if $suitename contained wildcards, we'll have many suites and
+ # their overlays here. Let's group them appropriately.
#
-
- if ($overlays[0] !~ m@/mysql-test/suite/$suitename$@) {
- # prefer directories with more files
- @overlays = sort { scalar(<$a/*>) <=> scalar(<$b/*>) } @overlays;
+ for (@dirs) {
+ m@^.*/mysql-test/(?:suite/)?(.*)$@ or confess $_;
+ push @{$suites{$1}}, $_;
}
- $suitedir = shift @overlays;
}
} else {
- @overlays = my_find_dir(dirname($::glob_mysql_test_dir),
- ["storage/*/mysql-test",
- "plugin/*/mysql-test"],
- ['main'], NOT_REQUIRED);
+ $suites{$suitename} = [ $::glob_mysql_test_dir,
+ my_find_dir(dirname($::glob_mysql_test_dir),
+ ["storage/*/mysql-test",
+ "plugin/*/mysql-test"],
+ ['main'], NOT_REQUIRED) ];
+ }
+
+ my @cases;
+ while (my ($name, $dirs) = each %suites) {
+ #
+ # XXX at the moment, for simplicity, we will not fully support one
+ # plugin overlaying a suite of another plugin. Only suites in the main
+ # mysql-test directory can be safely overlayed. To be fixed, when
+ # needed. To fix it we'll need a smarter overlay detection (that is,
+ # detection of what is an overlay and what is the "original" suite)
+ # than simply "prefer directories with more files".
+ #
+ if ($dirs->[0] !~ m@/mysql-test/suite/$name$@) {
+ # prefer directories with more files
+ @$dirs = sort { scalar(<$a/*>) <=> scalar(<$b/*>) } @$dirs;
+ }
+ push @cases, collect_one_suite($opt_cases, $name, $over, @$dirs);
}
+ return @cases;
+}
+
+sub collect_one_suite {
+ my ($opt_cases, $suitename, $over, $suitedir, @overlays) = @_;
+
+ mtr_verbose("Collecting: $suitename");
mtr_verbose("suitedir: $suitedir");
mtr_verbose("overlays: @overlays") if @overlays;
@@ -380,7 +401,7 @@ sub collect_one_suite
local %file_combinations = ();
local %file_in_overlay = ();
- die unless m@/(?:storage|plugin)/(\w+)/mysql-test/\w+$@;
+ confess $_ unless m@/(?:storage|plugin)/(\w+)/mysql-test/[\w/]*\w$@;
next unless defined $over and ($over eq '' or $over eq $1);
push @cases,
# don't add cases that take *all* data from the parent suite
@@ -396,7 +417,7 @@ sub process_suite {
if ($overname) {
$parent = $suites{$basename};
- die unless $parent;
+ confess unless $parent;
$suitename = $basename . '-' . $overname;
} else {
$suitename = $basename;
@@ -544,7 +565,7 @@ sub make_combinations($@)
if ($combinations[0]->{skip}) {
$test->{skip} = 1;
$test->{comment} = $combinations[0]->{skip} unless $test->{comment};
- die unless @combinations == 1;
+ confess unless @combinations == 1;
return ($test);
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index fd695d1129f..ebe7af3641d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -78,7 +78,8 @@ BEGIN {
use lib "lib";
-use Cwd;
+use Cwd ;
+use Cwd 'realpath';
use Getopt::Long;
use My::File::Path; # Patched version of File::Path
use File::Basename;
@@ -163,11 +164,14 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= join(',', map { "$_-" } qw(
main
+ archive
binlog
+ csv
federated
funcs_1
funcs_2
handler
+ heap
innodb
maria
optimizer_unfixed_bugs
@@ -226,7 +230,7 @@ my %opts_extern;
sub using_extern { return (keys %opts_extern > 0);};
our $opt_fast= 0;
-our $opt_force;
+our $opt_force= 0;
our $opt_mem= $ENV{'MTR_MEM'};
our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'};
@@ -1037,8 +1041,14 @@ sub ignore_option {
# Setup any paths that are $opt_vardir related
sub set_vardir {
my ($vardir)= @_;
-
- $opt_vardir= $vardir;
+ if(IS_WINDOWS)
+ {
+ $opt_vardir= $vardir;
+ }
+ else
+ {
+ $opt_vardir= realpath($vardir);
+ }
$path_vardir_trace= $opt_vardir;
# Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/...
@@ -1126,7 +1136,7 @@ sub command_line_setup {
'defaults-extra-file=s' => \&collect_option,
# Control what test suites or cases to run
- 'force' => \$opt_force,
+ 'force+' => \$opt_force,
'with-ndbcluster-only' => \&collect_option,
'include-ndbcluster' => \$opt_include_ndbcluster,
'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
@@ -5846,6 +5856,11 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "%s", $_) for @args_saved;
}
+ if ($opt_force > 1)
+ {
+ mtr_add_arg($args, "--continue-on-error");
+ }
+
my $suite = $tinfo->{suite};
if ($suite->{parent}) {
mtr_add_arg($args, "--overlay-dir=%s/", $suite->{dir});
@@ -6275,7 +6290,11 @@ Options to control directories to use
Options to control what test suites or cases to run
- force Continue to run the suite after failure
+ force Continue after a failure. When specified once, a
+ failure in a test file will abort this test file, and
+ the execution will continue from the next test file.
+ When specified twice, execution will continue executing
+ the failed test file from the next command.
with-ndbcluster-only Run only tests that include "ndb" in the filename
skip-ndb[cluster] Skip all tests that need cluster. Default.
include-ndb[cluster] Enable all tests that need cluster
diff --git a/mysql-test/r/aborted_clients.result b/mysql-test/r/aborted_clients.result
new file mode 100644
index 00000000000..7111a0c98db
--- /dev/null
+++ b/mysql-test/r/aborted_clients.result
@@ -0,0 +1,10 @@
+FLUSH STATUS;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
+VARIABLE_VALUE
+0
+KILL CONNECTION_ID();
+ERROR 70100: Connection was killed
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
+VARIABLE_VALUE
+1
+FLUSH STATUS;
diff --git a/mysql-test/r/default_storage_engine.result b/mysql-test/r/default_storage_engine.result
new file mode 100644
index 00000000000..da3350c6eaf
--- /dev/null
+++ b/mysql-test/r/default_storage_engine.result
@@ -0,0 +1 @@
+"all ok"
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result
index 32081c13376..176d39c50a9 100644
--- a/mysql-test/r/derived_view.result
+++ b/mysql-test/r/derived_view.result
@@ -2044,6 +2044,59 @@ a
drop table t1,t2;
set optimizer_switch=@save968720_optimizer_switch;
#
+# LP BUG#978847 Server crashes in Item_ref::real_item on
+# INSERT .. SELECT with FROM subquery and derived_merge=ON
+SET @save978847_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch = 'derived_merge=on';
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES (2,1),(3,2);
+select * from t1;
+a b
+2 1
+3 2
+INSERT INTO t1 SELECT * FROM
+( SELECT * FROM t1 ) AS alias;
+select * from t1;
+a b
+2 1
+3 2
+2 1
+3 2
+prepare stmt1 from 'INSERT INTO t1 SELECT SQL_BIG_RESULT * FROM
+ ( SELECT * FROM t1 ) AS alias';
+execute stmt1;
+select * from t1;
+a b
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+execute stmt1;
+select * from t1;
+a b
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+2 1
+3 2
+drop table t1;
+set optimizer_switch=@save978847_optimizer_switch;
+#
# end of 5.3 tests
#
set optimizer_switch=@exit_optimizer_switch;
diff --git a/mysql-test/r/flush-innodb.result b/mysql-test/r/flush-innodb.result
new file mode 100644
index 00000000000..cea4f81e2a2
--- /dev/null
+++ b/mysql-test/r/flush-innodb.result
@@ -0,0 +1,5 @@
+FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
+UNLOCK TABLES;
+CREATE TABLE t1 ( m MEDIUMTEXT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ( REPEAT('i',1048576) );
+DROP TABLE t1;
diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result
index 1cd72d0c178..3b07be3930a 100644
--- a/mysql-test/r/gis-precise.result
+++ b/mysql-test/r/gis-precise.result
@@ -434,3 +434,21 @@ ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGON
SELECT ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29)') );
ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,
1
+select ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3));
+ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3))
+POLYGON((3.999999999999999 6.999999999999998,4 7,3.999999999999999 6.999999999999998))
+SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
+ -2.910427500435995 0.727606875108998,
+ -0.910427500435995 8.727606875108998,
+ 7.664100588675687 1.503849116986468,
+ 1.664100588675687 -2.496150883013531,
+ 0.0 -3.0
+))' ), 3 )));
+ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
+ -2.910427500435995 0.727606875108998,
+ -0.910427500435995 8.727606875108998,
+ 7.664100588675687 1.503849116986468,
+ 1.664100588675687 -2.496150883013531,
+ 0.0 -3.0
+))' ),
+136
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index cffed9529d6..74e9cd3caaa 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -1976,6 +1976,53 @@ Warning 1292 Truncated incorrect DOUBLE value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
SET SESSION SQL_MODE=default;
drop table t1;
+#
+# LP bug#967242 Wrong result (extra rows, not grouped) with JOIN, AND in ON condition, multi-part key, GROUP BY, OR in WHERE
+#
+CREATE TABLE t1 ( a VARCHAR(1) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('x');
+CREATE TABLE t2 ( b INT, c VARCHAR(1), KEY (c, b) ) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+(4, 'd'),(8, 'g'),(3, 'x'),(3, 'f'),
+(0, 'p'),(3, 'j'),(8, 'c');
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+rand() + 1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+zzz
+0
+3
+4
+8
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+zzz
+0
+3
+4
+8
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+t2_1.b + 1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+zzz
+0
+3
+4
+8
+#TODO: in merge with 5.3 add original test suite
+drop table t1, t2;
# End of 5.2 tests
#
# lp:872702: Crash in add_ref_to_table_cond() when grouping by a PK
diff --git a/mysql-test/r/in_datetime_241.result b/mysql-test/r/in_datetime_241.result
new file mode 100644
index 00000000000..2c5b4bd8db1
--- /dev/null
+++ b/mysql-test/r/in_datetime_241.result
@@ -0,0 +1,5 @@
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 ( a DATE );
+SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-04-25','2012-04-26');
+a
+DROP TABLE t1;
diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result
index d9f437a29f3..d2b65c393ec 100644
--- a/mysql-test/r/information_schema_all_engines.result
+++ b/mysql-test/r/information_schema_all_engines.result
@@ -13,9 +13,26 @@ FILES
GLOBAL_STATUS
GLOBAL_VARIABLES
INDEX_STATISTICS
+INNODB_BUFFER_POOL_PAGES
+INNODB_BUFFER_POOL_PAGES_BLOB
+INNODB_BUFFER_POOL_PAGES_INDEX
+INNODB_CMP
INNODB_CMPMEM
+INNODB_CMPMEM_RESET
+INNODB_CMP_RESET
+INNODB_INDEX_STATS
INNODB_LOCKS
+INNODB_LOCK_WAITS
+INNODB_RSEG
+INNODB_SYS_COLUMNS
+INNODB_SYS_FIELDS
+INNODB_SYS_FOREIGN
+INNODB_SYS_FOREIGN_COLS
INNODB_SYS_INDEXES
+INNODB_SYS_STATS
+INNODB_SYS_TABLES
+INNODB_SYS_TABLESTATS
+INNODB_TABLE_STATS
INNODB_TRX
KEY_CACHES
KEY_COLUMN_USAGE
@@ -68,9 +85,26 @@ FILES TABLE_SCHEMA
GLOBAL_STATUS VARIABLE_NAME
GLOBAL_VARIABLES VARIABLE_NAME
INDEX_STATISTICS TABLE_SCHEMA
+INNODB_BUFFER_POOL_PAGES page_type
+INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_BUFFER_POOL_PAGES_INDEX index_id
+INNODB_CMP page_size
INNODB_CMPMEM page_size
+INNODB_CMPMEM_RESET page_size
+INNODB_CMP_RESET page_size
+INNODB_INDEX_STATS table_schema
INNODB_LOCKS lock_id
+INNODB_LOCK_WAITS requesting_trx_id
+INNODB_RSEG rseg_id
+INNODB_SYS_COLUMNS TABLE_ID
+INNODB_SYS_FIELDS INDEX_ID
+INNODB_SYS_FOREIGN ID
+INNODB_SYS_FOREIGN_COLS ID
INNODB_SYS_INDEXES INDEX_ID
+INNODB_SYS_STATS INDEX_ID
+INNODB_SYS_TABLES SCHEMA
+INNODB_SYS_TABLESTATS SCHEMA
+INNODB_TABLE_STATS table_schema
INNODB_TRX trx_id
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
@@ -123,9 +157,26 @@ FILES TABLE_SCHEMA
GLOBAL_STATUS VARIABLE_NAME
GLOBAL_VARIABLES VARIABLE_NAME
INDEX_STATISTICS TABLE_SCHEMA
+INNODB_BUFFER_POOL_PAGES page_type
+INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_BUFFER_POOL_PAGES_INDEX index_id
+INNODB_CMP page_size
INNODB_CMPMEM page_size
+INNODB_CMPMEM_RESET page_size
+INNODB_CMP_RESET page_size
+INNODB_INDEX_STATS table_schema
INNODB_LOCKS lock_id
+INNODB_LOCK_WAITS requesting_trx_id
+INNODB_RSEG rseg_id
+INNODB_SYS_COLUMNS TABLE_ID
+INNODB_SYS_FIELDS INDEX_ID
+INNODB_SYS_FOREIGN ID
+INNODB_SYS_FOREIGN_COLS ID
INNODB_SYS_INDEXES INDEX_ID
+INNODB_SYS_STATS INDEX_ID
+INNODB_SYS_TABLES SCHEMA
+INNODB_SYS_TABLESTATS SCHEMA
+INNODB_TABLE_STATS table_schema
INNODB_TRX trx_id
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
@@ -184,9 +235,26 @@ FILES information_schema.FILES 1
GLOBAL_STATUS information_schema.GLOBAL_STATUS 1
GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1
INDEX_STATISTICS information_schema.INDEX_STATISTICS 1
+INNODB_BUFFER_POOL_PAGES information_schema.INNODB_BUFFER_POOL_PAGES 1
+INNODB_BUFFER_POOL_PAGES_BLOB information_schema.INNODB_BUFFER_POOL_PAGES_BLOB 1
+INNODB_BUFFER_POOL_PAGES_INDEX information_schema.INNODB_BUFFER_POOL_PAGES_INDEX 1
+INNODB_CMP information_schema.INNODB_CMP 1
INNODB_CMPMEM information_schema.INNODB_CMPMEM 1
+INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1
+INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1
+INNODB_INDEX_STATS information_schema.INNODB_INDEX_STATS 1
INNODB_LOCKS information_schema.INNODB_LOCKS 1
+INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
+INNODB_RSEG information_schema.INNODB_RSEG 1
+INNODB_SYS_COLUMNS information_schema.INNODB_SYS_COLUMNS 1
+INNODB_SYS_FIELDS information_schema.INNODB_SYS_FIELDS 1
+INNODB_SYS_FOREIGN information_schema.INNODB_SYS_FOREIGN 1
+INNODB_SYS_FOREIGN_COLS information_schema.INNODB_SYS_FOREIGN_COLS 1
INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1
+INNODB_SYS_STATS information_schema.INNODB_SYS_STATS 1
+INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1
+INNODB_SYS_TABLESTATS information_schema.INNODB_SYS_TABLESTATS 1
+INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
INNODB_TRX information_schema.INNODB_TRX 1
KEY_CACHES information_schema.KEY_CACHES 1
KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
@@ -228,9 +296,26 @@ Database: information_schema
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| INDEX_STATISTICS |
+| INNODB_BUFFER_POOL_PAGES |
+| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_BUFFER_POOL_PAGES_INDEX |
+| INNODB_CMP |
| INNODB_CMPMEM |
+| INNODB_CMPMEM_RESET |
+| INNODB_CMP_RESET |
+| INNODB_INDEX_STATS |
| INNODB_LOCKS |
+| INNODB_LOCK_WAITS |
+| INNODB_RSEG |
+| INNODB_SYS_COLUMNS |
+| INNODB_SYS_FIELDS |
+| INNODB_SYS_FOREIGN |
+| INNODB_SYS_FOREIGN_COLS |
| INNODB_SYS_INDEXES |
+| INNODB_SYS_STATS |
+| INNODB_SYS_TABLES |
+| INNODB_SYS_TABLESTATS |
+| INNODB_TABLE_STATS |
| INNODB_TRX |
| KEY_CACHES |
| KEY_COLUMN_USAGE |
@@ -273,9 +358,26 @@ Database: INFORMATION_SCHEMA
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| INDEX_STATISTICS |
+| INNODB_BUFFER_POOL_PAGES |
+| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_BUFFER_POOL_PAGES_INDEX |
+| INNODB_CMP |
| INNODB_CMPMEM |
+| INNODB_CMPMEM_RESET |
+| INNODB_CMP_RESET |
+| INNODB_INDEX_STATS |
| INNODB_LOCKS |
+| INNODB_LOCK_WAITS |
+| INNODB_RSEG |
+| INNODB_SYS_COLUMNS |
+| INNODB_SYS_FIELDS |
+| INNODB_SYS_FOREIGN |
+| INNODB_SYS_FOREIGN_COLS |
| INNODB_SYS_INDEXES |
+| INNODB_SYS_STATS |
+| INNODB_SYS_TABLES |
+| INNODB_SYS_TABLESTATS |
+| INNODB_TABLE_STATS |
| INNODB_TRX |
| KEY_CACHES |
| KEY_COLUMN_USAGE |
@@ -309,5 +411,5 @@ Wildcard: inf_rmation_schema
| information_schema |
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*)
-information_schema 40
+information_schema 57
mysql 26
diff --git a/mysql-test/r/innodb_icp,innodb_plugin.rdiff b/mysql-test/r/innodb_icp,innodb_plugin.rdiff
index 08e16944fba..c74a8473486 100644
--- a/mysql-test/r/innodb_icp,innodb_plugin.rdiff
+++ b/mysql-test/r/innodb_icp,innodb_plugin.rdiff
@@ -31,18 +31,18 @@
4 4
show status like "Handler_icp%";
Variable_name Value
--Handler_icp_attempts 2
+-Handler_icp_attempts 2
-Handler_icp_match 1
-+Handler_icp_attempts 0
++Handler_icp_attempts 0
+Handler_icp_match 0
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
--Handler_icp_attempts 2
+-Handler_icp_attempts 2
-Handler_icp_match 1
-+Handler_icp_attempts 0
++Handler_icp_attempts 0
+Handler_icp_match 0
DROP TABLE t1;
#
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index 5b4b09df1fe..c1d3fa3445d 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -818,21 +818,21 @@ INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
DROP TABLE t1;
#
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index fa8471eb1cb..6471a2f8bbd 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -3221,7 +3221,7 @@ explain
select t1.a, count(t2.p) as count
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 8 Using index; Using temporary; Using filesort
1 SIMPLE t2 ref i_a i_a 5 test.t1.a 2 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
select t1.a, count(t2.p) as count
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
@@ -3522,7 +3522,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 20
+Handler_icp_attempts 20
Handler_icp_match 4
set join_cache_level=6;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -3539,7 +3539,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 40
+Handler_icp_attempts 40
Handler_icp_match 8
set join_cache_level=7;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -3556,7 +3556,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 60
+Handler_icp_attempts 60
Handler_icp_match 12
set join_cache_level=8;
select t2.f1, t2.f2, t2.f3 from t1,t2
@@ -3573,7 +3573,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 80
+Handler_icp_attempts 80
Handler_icp_match 16
drop table t1,t2;
set join_cache_level=default;
@@ -4274,7 +4274,7 @@ pk int NOT NULL, i int NOT NULL, v varchar(1) NOT NULL,
PRIMARY KEY (pk), INDEX idx1(i), INDEX idx2 (v,i)
) COLLATE latin1_bin;
INSERT INTO t1 VALUES
-(10,8,'v'), (11,8,'f'), (12,5,'v'), (13,8,'s'), (14,8,'a'),
+(10,8,'v'), (11,8,'f'), (13,8,'s'), (14,8,'a'),
(15,6,'p'), (16,7,'z'), (17,2,'a'), (18,5,'h'), (19,7,'h'),
(25,3,'m'), (26,5,'a'), (27,9,'n'), (28,1,'d'), (29,107,'a');
INSERT INTO t1 VALUES
@@ -4327,7 +4327,7 @@ SELECT t2.v FROM t1, t2, t3
WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100
GROUP BY t2.v ORDER BY t1.pk,t2.v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL idx1 NULL NULL NULL 20 Using temporary; Using filesort
+1 SIMPLE t2 index idx1 idx2 7 NULL 20 Using index; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY,idx2 PRIMARY 4 test.t2.i 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t1 ref idx2 idx2 3 test.t3.v 5 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
SELECT t2.v FROM t1, t2, t3
@@ -4345,9 +4345,9 @@ SELECT t2.v FROM t1, t2, t3
WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100
GROUP BY t2.v ORDER BY t1.pk,t2.v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL idx1 NULL NULL NULL 20 Using temporary; Using filesort
+1 SIMPLE t2 index idx1 idx2 7 NULL 20 Using index; Using temporary; Using filesort
1 SIMPLE t3 hash_ALL PRIMARY,idx2 #hash#PRIMARY 4 test.t2.i 20 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE t1 hash_ALL idx2 #hash#idx2 3 test.t3.v 45 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE t1 hash_ALL idx2 #hash#idx2 3 test.t3.v 44 Using where; Using join buffer (incremental, BNLH join)
SELECT t2.v FROM t1, t2, t3
WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100
GROUP BY t2.v ORDER BY t1.pk,t2.v;
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index f1a2af264a3..a8355db55e0 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -822,21 +822,21 @@ INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
DROP TABLE t1;
drop table if exists t0, t1, t1i, t1m;
diff --git a/mysql-test/r/mysqltest_cont_on_error.result b/mysql-test/r/mysqltest_cont_on_error.result
new file mode 100644
index 00000000000..eaa17028f8d
--- /dev/null
+++ b/mysql-test/r/mysqltest_cont_on_error.result
@@ -0,0 +1,7 @@
+select error;
+mysqltest: At line 1: query 'select error' failed: 1054: Unknown column 'error' in 'field list'
+SELECT ERROR;
+mysqltest: At line 1: query 'SELECT ERROR' failed: 1054: Unknown column 'ERROR' in 'field list'
+SELECT 2;
+2
+2
diff --git a/mysql-test/r/plugin_loaderr.result b/mysql-test/r/plugin_loaderr.result
new file mode 100644
index 00000000000..95e5ec794d2
--- /dev/null
+++ b/mysql-test/r/plugin_loaderr.result
@@ -0,0 +1,10 @@
+call mtr.add_suppression("InnoDB");
+SELECT
+PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE,PLUGIN_LIBRARY,PLUGIN_LIBRARY_VERSION,LOAD_OPTION
+FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb';
+PLUGIN_NAME InnoDB
+PLUGIN_STATUS DISABLED
+PLUGIN_TYPE STORAGE ENGINE
+PLUGIN_LIBRARY NULL
+PLUGIN_LIBRARY_VERSION NULL
+LOAD_OPTION ON
diff --git a/mysql-test/r/progress_976225.result b/mysql-test/r/progress_976225.result
new file mode 100644
index 00000000000..a96b7b411e3
--- /dev/null
+++ b/mysql-test/r/progress_976225.result
@@ -0,0 +1,11 @@
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3),(4);
+OPTIMIZE TABLE t1, t2;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t2 optimize status OK
+drop table t1, t2;
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index d9cb2d99020..2dd89d0e4bb 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -442,9 +442,11 @@ show global variables like "query_cache_min_res_unit";
Variable_name Value
query_cache_min_res_unit 4096
set GLOBAL query_cache_min_res_unit=1001;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1001'
show global variables like "query_cache_min_res_unit";
Variable_name Value
-query_cache_min_res_unit 1008
+query_cache_min_res_unit 1000
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
create table t2 (a int not null);
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index 7e3c2c45116..0da65a5ab51 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -275,7 +275,7 @@ Variable_name Value
Handler_commit 0
Handler_delete 0
Handler_discover 0
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
Handler_mrr_init 0
Handler_mrr_key_refills 0
@@ -316,7 +316,7 @@ Variable_name Value
Handler_commit 0
Handler_delete 0
Handler_discover 0
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
Handler_mrr_init 0
Handler_mrr_key_refills 0
diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result
index 528d005b81b..f43e217b8a5 100644
--- a/mysql-test/r/status_user.result
+++ b/mysql-test/r/status_user.result
@@ -100,7 +100,7 @@ Variable_name Value
Handler_commit 19
Handler_delete 1
Handler_discover 0
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
Handler_mrr_init 0
Handler_mrr_key_refills 0
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 29b8c41e515..dca872f0bbd 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -4585,7 +4585,7 @@ SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
-NULL 0
+NULL NULL
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
@@ -6521,5 +6521,46 @@ INSERT INTO t1 VALUES (1);
SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
a
drop table t1;
+#
+# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+# main query and implicit grouping
+#
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 NULL
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 1
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+drop table t1,t2;
# return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index e8086b53ead..d5c7084c48d 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -4587,7 +4587,7 @@ SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
-NULL 0
+NULL NULL
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
@@ -6520,6 +6520,47 @@ INSERT INTO t1 VALUES (1);
SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
a
drop table t1;
+#
+# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+# main query and implicit grouping
+#
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 NULL
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 1
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+drop table t1,t2;
# return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
set optimizer_switch=default;
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 12b1e45c92c..7b44b1a1f5d 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -4583,7 +4583,7 @@ SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
-NULL 0
+NULL NULL
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
@@ -6516,6 +6516,47 @@ INSERT INTO t1 VALUES (1);
SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
a
drop table t1;
+#
+# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+# main query and implicit grouping
+#
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 NULL
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 1
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+drop table t1,t2;
# return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index b9a4f9b23a9..9b24af0dc3a 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -4591,7 +4591,7 @@ SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
-NULL 0
+NULL NULL
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
@@ -6527,6 +6527,47 @@ INSERT INTO t1 VALUES (1);
SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
a
drop table t1;
+#
+# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+# main query and implicit grouping
+#
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 NULL
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 1
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+drop table t1,t2;
# return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
set optimizer_switch=default;
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index ad6d61e9ec9..ba42ff881fc 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -4583,7 +4583,7 @@ SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
-NULL 0
+NULL NULL
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
@@ -6516,6 +6516,47 @@ INSERT INTO t1 VALUES (1);
SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
a
drop table t1;
+#
+# LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+# main query and implicit grouping
+#
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 NULL
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 1
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+COUNT(f1) f4
+0 0
+drop table t1,t2;
# return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index ca834b21df5..f8ebe0d07a9 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -2671,4 +2671,44 @@ a
DEALLOCATE PREPARE pstmt;
DROP VIEW v1;
DROP TABLE t1, t2;
+#
+# BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
+#
+set @tmp_jcl_978479= @@join_cache_level;
+set join_cache_level=0;
+set @tmp_os_978479= @@optimizer_switch;
+set optimizer_switch = 'derived_with_keys=on,loosescan=on,semijoin=on,materialization=off';
+# Part#1: make sure EXPLAIN is using LooseScan:
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES
+(4,0),(6,8),(3,1),(5,8),(3,9),(2,4),
+(2,6),(9,1),(5,4),(7,7),(5,4);
+CREATE ALGORITHM=TEMPTABLE
+VIEW v1 AS SELECT * FROM t1;
+# This will use LooseScan:
+EXPLAIN
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_1 ALL NULL NULL NULL NULL 11 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Start temporary
+1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11 Using where; End temporary
+3 DERIVED t1 ALL NULL NULL NULL NULL 11
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+a b a b
+3 1 9 1
+5 8 4 0
+3 9 9 1
+2 4 6 8
+2 4 4 0
+2 6 6 8
+2 6 4 0
+5 4 4 0
+7 7 7 7
+5 4 4 0
+DROP VIEW v1;
+DROP TABLE t1;
+set @@join_cache_level= @tmp_jcl_978479;
+set @@optimizer_switch= @tmp_os_978479;
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 19f3baac5f2..c0a9287483d 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -2685,6 +2685,46 @@ a
DEALLOCATE PREPARE pstmt;
DROP VIEW v1;
DROP TABLE t1, t2;
+#
+# BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
+#
+set @tmp_jcl_978479= @@join_cache_level;
+set join_cache_level=0;
+set @tmp_os_978479= @@optimizer_switch;
+set optimizer_switch = 'derived_with_keys=on,loosescan=on,semijoin=on,materialization=off';
+# Part#1: make sure EXPLAIN is using LooseScan:
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES
+(4,0),(6,8),(3,1),(5,8),(3,9),(2,4),
+(2,6),(9,1),(5,4),(7,7),(5,4);
+CREATE ALGORITHM=TEMPTABLE
+VIEW v1 AS SELECT * FROM t1;
+# This will use LooseScan:
+EXPLAIN
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_1 ALL NULL NULL NULL NULL 11 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Start temporary
+1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11 Using where; End temporary
+3 DERIVED t1 ALL NULL NULL NULL NULL 11
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+a b a b
+3 1 9 1
+5 8 4 0
+3 9 9 1
+2 4 6 8
+2 4 4 0
+2 6 6 8
+2 6 4 0
+5 4 4 0
+7 7 7 7
+5 4 4 0
+DROP VIEW v1;
+DROP TABLE t1;
+set @@join_cache_level= @tmp_jcl_978479;
+set @@optimizer_switch= @tmp_os_978479;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index 8d069477f3e..fbac1752c37 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -21,6 +21,12 @@ name cdate note
name1 1998-01-01 note01
name2 1998-01-01 note01
drop table t1,t2;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;
+a
+1
+DROP TABLE t1;
CREATE TABLE t1 ( datum DATE );
INSERT INTO t1 VALUES ( "2000-1-1" );
INSERT INTO t1 VALUES ( "2000-1-2" );
diff --git a/mysql-test/r/update_ignore_216.result b/mysql-test/r/update_ignore_216.result
new file mode 100644
index 00000000000..4abc1eae06e
--- /dev/null
+++ b/mysql-test/r/update_ignore_216.result
@@ -0,0 +1,9 @@
+CREATE TABLE t1 ( a INT, b CHAR(3) );
+INSERT INTO t1 VALUES ( 1, 'foo' );
+CREATE TABLE t2 ( c CHAR(3), d INT );
+INSERT INTO t2 VALUES ( 'foo', 1 );
+UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar'
+ WHERE a != ( SELECT 1 UNION SELECT 2 );
+Warnings:
+Warning 1242 Subquery returns more than 1 row
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 7c234afffb1..1c2f55660c2 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -26,6 +26,9 @@ sub skip_combinations {
$skip{'include/not_windows.inc'} = 'Requires not Windows' if IS_WINDOWS;
+ $skip{'t/plugin_loaderr.test'} = 'needs compiled-in innodb'
+ unless $::mysqld_variables{'innodb'} eq "ON";
+
# disable tests that use ipv6, if unsupported
use Socket;
$skip{'include/check_ipv6.inc'} = 'No IPv6'
diff --git a/mysql-test/r/archive-big.result b/mysql-test/suite/archive/archive-big.result
index 7dbdb490017..7dbdb490017 100644
--- a/mysql-test/r/archive-big.result
+++ b/mysql-test/suite/archive/archive-big.result
diff --git a/mysql-test/t/archive-big.test b/mysql-test/suite/archive/archive-big.test
index 414b689b180..414b689b180 100644
--- a/mysql-test/t/archive-big.test
+++ b/mysql-test/suite/archive/archive-big.test
diff --git a/mysql-test/r/archive.result b/mysql-test/suite/archive/archive.result
index b4c4aab621d..b4c4aab621d 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/suite/archive/archive.result
diff --git a/mysql-test/t/archive.test b/mysql-test/suite/archive/archive.test
index 5dd85bf1aba..5dd85bf1aba 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/suite/archive/archive.test
diff --git a/mysql-test/r/archive_bitfield.result b/mysql-test/suite/archive/archive_bitfield.result
index 7e3b82a5caf..7e3b82a5caf 100644
--- a/mysql-test/r/archive_bitfield.result
+++ b/mysql-test/suite/archive/archive_bitfield.result
diff --git a/mysql-test/t/archive_bitfield.test b/mysql-test/suite/archive/archive_bitfield.test
index 2e90ce39708..2e90ce39708 100644
--- a/mysql-test/t/archive_bitfield.test
+++ b/mysql-test/suite/archive/archive_bitfield.test
diff --git a/mysql-test/r/archive_debug.result b/mysql-test/suite/archive/archive_debug.result
index 7bc6a113217..7bc6a113217 100644
--- a/mysql-test/r/archive_debug.result
+++ b/mysql-test/suite/archive/archive_debug.result
diff --git a/mysql-test/t/archive_debug.test b/mysql-test/suite/archive/archive_debug.test
index b107826784b..b107826784b 100644
--- a/mysql-test/t/archive_debug.test
+++ b/mysql-test/suite/archive/archive_debug.test
diff --git a/mysql-test/r/archive_gis.result b/mysql-test/suite/archive/archive_gis.result
index 97f48407db2..97f48407db2 100644
--- a/mysql-test/r/archive_gis.result
+++ b/mysql-test/suite/archive/archive_gis.result
diff --git a/mysql-test/t/archive_gis.test b/mysql-test/suite/archive/archive_gis.test
index ffbad923173..ffbad923173 100644
--- a/mysql-test/t/archive_gis.test
+++ b/mysql-test/suite/archive/archive_gis.test
diff --git a/mysql-test/r/archive_plugin.result b/mysql-test/suite/archive/archive_plugin.result
index 90c1f10bf19..90c1f10bf19 100644
--- a/mysql-test/r/archive_plugin.result
+++ b/mysql-test/suite/archive/archive_plugin.result
diff --git a/mysql-test/t/archive_plugin.test b/mysql-test/suite/archive/archive_plugin.test
index ba80652fb02..ba80652fb02 100644
--- a/mysql-test/t/archive_plugin.test
+++ b/mysql-test/suite/archive/archive_plugin.test
diff --git a/mysql-test/r/mysqlhotcopy_archive.result b/mysql-test/suite/archive/mysqlhotcopy_archive.result
index bea78597336..bea78597336 100644
--- a/mysql-test/r/mysqlhotcopy_archive.result
+++ b/mysql-test/suite/archive/mysqlhotcopy_archive.result
diff --git a/mysql-test/t/mysqlhotcopy_archive.test b/mysql-test/suite/archive/mysqlhotcopy_archive.test
index 4bfad3ce138..4bfad3ce138 100644
--- a/mysql-test/t/mysqlhotcopy_archive.test
+++ b/mysql-test/suite/archive/mysqlhotcopy_archive.test
diff --git a/mysql-test/r/partition_archive.result b/mysql-test/suite/archive/partition_archive.result
index 186a7930251..186a7930251 100644
--- a/mysql-test/r/partition_archive.result
+++ b/mysql-test/suite/archive/partition_archive.result
diff --git a/mysql-test/t/partition_archive.test b/mysql-test/suite/archive/partition_archive.test
index 6f6a26c018a..6f6a26c018a 100644
--- a/mysql-test/t/partition_archive.test
+++ b/mysql-test/suite/archive/partition_archive.test
diff --git a/mysql-test/suite/archive/suite.pm b/mysql-test/suite/archive/suite.pm
new file mode 100644
index 00000000000..eb2ff9f8e26
--- /dev/null
+++ b/mysql-test/suite/archive/suite.pm
@@ -0,0 +1,9 @@
+package My::Suite::Archive;
+
+@ISA = qw(My::Suite);
+
+return ("Need Archive engine" unless $ENV{HA_ARCHIVE_SO} or
+ $::mysqld_variables{'archive'} eq "ON");
+
+bless { };
+
diff --git a/mysql-test/r/csv.result b/mysql-test/suite/csv/csv.result
index 6b20add1bed..6b20add1bed 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/suite/csv/csv.result
diff --git a/mysql-test/t/csv.test b/mysql-test/suite/csv/csv.test
index 768a21912a2..768a21912a2 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/suite/csv/csv.test
diff --git a/mysql-test/r/csv_alter_table.result b/mysql-test/suite/csv/csv_alter_table.result
index b406e40b15d..b406e40b15d 100644
--- a/mysql-test/r/csv_alter_table.result
+++ b/mysql-test/suite/csv/csv_alter_table.result
diff --git a/mysql-test/t/csv_alter_table.test b/mysql-test/suite/csv/csv_alter_table.test
index 0093a1d10a7..0093a1d10a7 100644
--- a/mysql-test/t/csv_alter_table.test
+++ b/mysql-test/suite/csv/csv_alter_table.test
diff --git a/mysql-test/r/csv_not_null.result b/mysql-test/suite/csv/csv_not_null.result
index aed9bcb1587..aed9bcb1587 100644
--- a/mysql-test/r/csv_not_null.result
+++ b/mysql-test/suite/csv/csv_not_null.result
diff --git a/mysql-test/t/csv_not_null.test b/mysql-test/suite/csv/csv_not_null.test
index bebea53b2f7..bebea53b2f7 100644
--- a/mysql-test/t/csv_not_null.test
+++ b/mysql-test/suite/csv/csv_not_null.test
diff --git a/mysql-test/r/heap.result b/mysql-test/suite/heap/heap.result
index f058c9f9c72..f058c9f9c72 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/suite/heap/heap.result
diff --git a/mysql-test/t/heap.test b/mysql-test/suite/heap/heap.test
index 7d56425799a..7d56425799a 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/suite/heap/heap.test
diff --git a/mysql-test/r/heap_auto_increment.result b/mysql-test/suite/heap/heap_auto_increment.result
index 5b04a77e9eb..5b04a77e9eb 100644
--- a/mysql-test/r/heap_auto_increment.result
+++ b/mysql-test/suite/heap/heap_auto_increment.result
diff --git a/mysql-test/t/heap_auto_increment.test b/mysql-test/suite/heap/heap_auto_increment.test
index 016bc946209..016bc946209 100644
--- a/mysql-test/t/heap_auto_increment.test
+++ b/mysql-test/suite/heap/heap_auto_increment.test
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/suite/heap/heap_btree.result
index 12a011778c6..12a011778c6 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/suite/heap/heap_btree.result
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/suite/heap/heap_btree.test
index 02c09f52263..02c09f52263 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/suite/heap/heap_btree.test
diff --git a/mysql-test/r/heap_hash.result b/mysql-test/suite/heap/heap_hash.result
index 453bfc0c165..453bfc0c165 100644
--- a/mysql-test/r/heap_hash.result
+++ b/mysql-test/suite/heap/heap_hash.result
diff --git a/mysql-test/t/heap_hash.test b/mysql-test/suite/heap/heap_hash.test
index 80ae01e9547..80ae01e9547 100644
--- a/mysql-test/t/heap_hash.test
+++ b/mysql-test/suite/heap/heap_hash.test
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index a1782ea5f6e..2b3d24551c7 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -2365,8 +2365,8 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key PRIMARY
-key_len 4
+key b
+key_len 10
ref NULL
rows 10
Extra Using index
@@ -2652,7 +2652,7 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key PRIMARY
+key b
key_len 8
ref NULL
rows 3
diff --git a/mysql-test/suite/maria/t/compat_aliases-master.opt b/mysql-test/suite/maria/compat_aliases-master.opt
index a1dcde828cd..a1dcde828cd 100644
--- a/mysql-test/suite/maria/t/compat_aliases-master.opt
+++ b/mysql-test/suite/maria/compat_aliases-master.opt
diff --git a/mysql-test/suite/maria/r/group_commit.result b/mysql-test/suite/maria/group_commit.result
index 4fb85b912ec..4fb85b912ec 100644
--- a/mysql-test/suite/maria/r/group_commit.result
+++ b/mysql-test/suite/maria/group_commit.result
diff --git a/mysql-test/suite/maria/t/group_commit.test b/mysql-test/suite/maria/group_commit.test
index 38b2c9d3bf4..38b2c9d3bf4 100644
--- a/mysql-test/suite/maria/t/group_commit.test
+++ b/mysql-test/suite/maria/group_commit.test
diff --git a/mysql-test/r/maria_icp.result b/mysql-test/suite/maria/icp.result
index 2d0110f2f35..feca63402a4 100644
--- a/mysql-test/r/maria_icp.result
+++ b/mysql-test/suite/maria/icp.result
@@ -824,21 +824,21 @@ INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
flush status;
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 0
+Handler_icp_attempts 0
Handler_icp_match 0
SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
c1 c2
4 4
show status like "Handler_icp%";
Variable_name Value
-Handler_icp_attempts 2
+Handler_icp_attempts 2
Handler_icp_match 1
DROP TABLE t1;
set storage_engine= @save_storage_engine;
diff --git a/mysql-test/t/maria_icp.test b/mysql-test/suite/maria/icp.test
index d8af34daf2e..d8af34daf2e 100644
--- a/mysql-test/t/maria_icp.test
+++ b/mysql-test/suite/maria/icp.test
diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result
new file mode 100644
index 00000000000..101347c7d4c
--- /dev/null
+++ b/mysql-test/suite/maria/lock.result
@@ -0,0 +1,29 @@
+drop table if exists t1,t2;
+Warnings:
+Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+DROP TABLE t1;
+UNLOCK TABLES;
+DROP TABLE t2;
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLE t1;
+select * from t1;
+i
+unlock tables;
+drop table t1,t2;
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+repair table t1 use_frm;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+select * from t1;
+i
+drop table t2;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test
new file mode 100644
index 00000000000..6116f0b5f08
--- /dev/null
+++ b/mysql-test/suite/maria/lock.test
@@ -0,0 +1,44 @@
+#
+# Testing of potential problems in Aria with locking
+#
+
+-- source include/have_maria.inc
+
+drop table if exists t1,t2;
+
+#
+# Test for Bug#973039
+# Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE
+# under LOCK
+#
+
+# Test DROP TABLE
+
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+# Also fails with FLUSH TABLE t1 and with REPAIR TABLE t1 USE_FRM
+DROP TABLE t1;
+UNLOCK TABLES;
+DROP TABLE t2;
+
+#Test FLUSH TABLE
+
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLE t1;
+select * from t1;
+unlock tables;
+drop table t1,t2;
+
+# Test REPAIR ... USE_FRM and unlock tables last
+
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+CREATE TABLE t2 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE, t2 WRITE;
+repair table t1 use_frm;
+select * from t1;
+drop table t2;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/maria/r/locking.result b/mysql-test/suite/maria/locking.result
index 772e43f5983..772e43f5983 100644
--- a/mysql-test/suite/maria/r/locking.result
+++ b/mysql-test/suite/maria/locking.result
diff --git a/mysql-test/suite/maria/t/locking.test b/mysql-test/suite/maria/locking.test
index c20ca33e162..c20ca33e162 100644
--- a/mysql-test/suite/maria/t/locking.test
+++ b/mysql-test/suite/maria/locking.test
diff --git a/mysql-test/suite/maria/r/maria-autozerofill.result b/mysql-test/suite/maria/maria-autozerofill.result
index 22856fe54b0..22856fe54b0 100644
--- a/mysql-test/suite/maria/r/maria-autozerofill.result
+++ b/mysql-test/suite/maria/maria-autozerofill.result
diff --git a/mysql-test/suite/maria/t/maria-autozerofill.test b/mysql-test/suite/maria/maria-autozerofill.test
index 9bb2782105a..9bb2782105a 100644
--- a/mysql-test/suite/maria/t/maria-autozerofill.test
+++ b/mysql-test/suite/maria/maria-autozerofill.test
diff --git a/mysql-test/suite/maria/r/maria-big.result b/mysql-test/suite/maria/maria-big.result
index cb6e02df00e..cb6e02df00e 100644
--- a/mysql-test/suite/maria/r/maria-big.result
+++ b/mysql-test/suite/maria/maria-big.result
diff --git a/mysql-test/suite/maria/t/maria-big.test b/mysql-test/suite/maria/maria-big.test
index 5b4b6c4defe..5b4b6c4defe 100644
--- a/mysql-test/suite/maria/t/maria-big.test
+++ b/mysql-test/suite/maria/maria-big.test
diff --git a/mysql-test/suite/maria/r/maria-big2.result b/mysql-test/suite/maria/maria-big2.result
index 3e4c6973997..3e4c6973997 100644
--- a/mysql-test/suite/maria/r/maria-big2.result
+++ b/mysql-test/suite/maria/maria-big2.result
diff --git a/mysql-test/suite/maria/t/maria-big2.test b/mysql-test/suite/maria/maria-big2.test
index d138892fe3c..d138892fe3c 100644
--- a/mysql-test/suite/maria/t/maria-big2.test
+++ b/mysql-test/suite/maria/maria-big2.test
diff --git a/mysql-test/suite/maria/r/maria-connect.result b/mysql-test/suite/maria/maria-connect.result
index ed626a003f5..ed626a003f5 100644
--- a/mysql-test/suite/maria/r/maria-connect.result
+++ b/mysql-test/suite/maria/maria-connect.result
diff --git a/mysql-test/suite/maria/t/maria-connect.test b/mysql-test/suite/maria/maria-connect.test
index a1e9bbce4f2..a1e9bbce4f2 100644
--- a/mysql-test/suite/maria/t/maria-connect.test
+++ b/mysql-test/suite/maria/maria-connect.test
diff --git a/mysql-test/suite/maria/t/maria-gis-recovery.opt b/mysql-test/suite/maria/maria-gis-recovery.opt
index 58d0d012c54..58d0d012c54 100644
--- a/mysql-test/suite/maria/t/maria-gis-recovery.opt
+++ b/mysql-test/suite/maria/maria-gis-recovery.opt
diff --git a/mysql-test/suite/maria/r/maria-gis-recovery.result b/mysql-test/suite/maria/maria-gis-recovery.result
index d1088dd1ba0..d1088dd1ba0 100644
--- a/mysql-test/suite/maria/r/maria-gis-recovery.result
+++ b/mysql-test/suite/maria/maria-gis-recovery.result
diff --git a/mysql-test/suite/maria/t/maria-gis-recovery.test b/mysql-test/suite/maria/maria-gis-recovery.test
index c40cc3788de..c40cc3788de 100644
--- a/mysql-test/suite/maria/t/maria-gis-recovery.test
+++ b/mysql-test/suite/maria/maria-gis-recovery.test
diff --git a/mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index 843e5ae3d37..843e5ae3d37 100644
--- a/mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
diff --git a/mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
index 166c88cab36..166c88cab36 100644
--- a/mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
diff --git a/mysql-test/suite/maria/r/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index 8ccc1f5bfdf..8ccc1f5bfdf 100644
--- a/mysql-test/suite/maria/r/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
diff --git a/mysql-test/suite/maria/t/maria-gis-rtree-trans.test b/mysql-test/suite/maria/maria-gis-rtree-trans.test
index ec1573c3e29..ec1573c3e29 100644
--- a/mysql-test/suite/maria/t/maria-gis-rtree-trans.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.test
diff --git a/mysql-test/suite/maria/r/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index 9945daae75e..9945daae75e 100644
--- a/mysql-test/suite/maria/r/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
diff --git a/mysql-test/suite/maria/t/maria-gis-rtree.test b/mysql-test/suite/maria/maria-gis-rtree.test
index beffbfc99fe..beffbfc99fe 100644
--- a/mysql-test/suite/maria/t/maria-gis-rtree.test
+++ b/mysql-test/suite/maria/maria-gis-rtree.test
diff --git a/mysql-test/suite/maria/r/maria-mvcc.result b/mysql-test/suite/maria/maria-mvcc.result
index 671b1bbf53c..671b1bbf53c 100644
--- a/mysql-test/suite/maria/r/maria-mvcc.result
+++ b/mysql-test/suite/maria/maria-mvcc.result
diff --git a/mysql-test/suite/maria/t/maria-mvcc.test b/mysql-test/suite/maria/maria-mvcc.test
index 8be8e2ea630..8be8e2ea630 100644
--- a/mysql-test/suite/maria/t/maria-mvcc.test
+++ b/mysql-test/suite/maria/maria-mvcc.test
diff --git a/mysql-test/suite/maria/r/maria-no-logging.result b/mysql-test/suite/maria/maria-no-logging.result
index 9c50245d05d..9c50245d05d 100644
--- a/mysql-test/suite/maria/r/maria-no-logging.result
+++ b/mysql-test/suite/maria/maria-no-logging.result
diff --git a/mysql-test/suite/maria/t/maria-no-logging.test b/mysql-test/suite/maria/maria-no-logging.test
index 7055a842510..7055a842510 100644
--- a/mysql-test/suite/maria/t/maria-no-logging.test
+++ b/mysql-test/suite/maria/maria-no-logging.test
diff --git a/mysql-test/suite/maria/r/maria-page-checksum.result b/mysql-test/suite/maria/maria-page-checksum.result
index c4d1b71e33a..c4d1b71e33a 100644
--- a/mysql-test/suite/maria/r/maria-page-checksum.result
+++ b/mysql-test/suite/maria/maria-page-checksum.result
diff --git a/mysql-test/suite/maria/t/maria-page-checksum.test b/mysql-test/suite/maria/maria-page-checksum.test
index 8dd68fce245..8dd68fce245 100644
--- a/mysql-test/suite/maria/t/maria-page-checksum.test
+++ b/mysql-test/suite/maria/maria-page-checksum.test
diff --git a/mysql-test/suite/maria/r/maria-partitioning.result b/mysql-test/suite/maria/maria-partitioning.result
index 840c7c0b3b4..bcb88626ff7 100644
--- a/mysql-test/suite/maria/r/maria-partitioning.result
+++ b/mysql-test/suite/maria/maria-partitioning.result
@@ -28,3 +28,7 @@ insert into t1 values (2);
select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
a a
drop table t1,t2;
+CREATE TABLE t1 ( i INT ) ENGINE=Aria
+PARTITION BY HASH(i) PARTITIONS 2;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+drop table t1;
diff --git a/mysql-test/suite/maria/t/maria-partitioning.test b/mysql-test/suite/maria/maria-partitioning.test
index 612c44be57e..446cfed770b 100644
--- a/mysql-test/suite/maria/t/maria-partitioning.test
+++ b/mysql-test/suite/maria/maria-partitioning.test
@@ -34,6 +34,15 @@ insert into t1 values (2);
select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
drop table t1,t2;
+#
+# LP:990187
+# Assertion `share->reopen == 1' failed at maria_extra on ADD PARTITION
+#
+CREATE TABLE t1 ( i INT ) ENGINE=Aria
+ PARTITION BY HASH(i) PARTITIONS 2;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+drop table t1;
+
# Set defaults back
--disable_result_log
--disable_query_log
diff --git a/mysql-test/suite/maria/r/maria-preload.result b/mysql-test/suite/maria/maria-preload.result
index a693b6768ac..a693b6768ac 100644
--- a/mysql-test/suite/maria/r/maria-preload.result
+++ b/mysql-test/suite/maria/maria-preload.result
diff --git a/mysql-test/suite/maria/t/maria-preload.test b/mysql-test/suite/maria/maria-preload.test
index efac10ecbec..efac10ecbec 100644
--- a/mysql-test/suite/maria/t/maria-preload.test
+++ b/mysql-test/suite/maria/maria-preload.test
diff --git a/mysql-test/suite/maria/r/maria-purge.result b/mysql-test/suite/maria/maria-purge.result
index 382f8aedf89..382f8aedf89 100644
--- a/mysql-test/suite/maria/r/maria-purge.result
+++ b/mysql-test/suite/maria/maria-purge.result
diff --git a/mysql-test/suite/maria/t/maria-purge.test b/mysql-test/suite/maria/maria-purge.test
index ad41fa0f5d0..ad41fa0f5d0 100644
--- a/mysql-test/suite/maria/t/maria-purge.test
+++ b/mysql-test/suite/maria/maria-purge.test
diff --git a/mysql-test/suite/maria/t/maria-recover-master.opt b/mysql-test/suite/maria/maria-recover-master.opt
index 7582a381a32..7582a381a32 100644
--- a/mysql-test/suite/maria/t/maria-recover-master.opt
+++ b/mysql-test/suite/maria/maria-recover-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recover.result b/mysql-test/suite/maria/maria-recover.result
index 9b84c47720a..9b84c47720a 100644
--- a/mysql-test/suite/maria/r/maria-recover.result
+++ b/mysql-test/suite/maria/maria-recover.result
diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/maria-recover.test
index 56259ad9a31..56259ad9a31 100644
--- a/mysql-test/suite/maria/t/maria-recover.test
+++ b/mysql-test/suite/maria/maria-recover.test
diff --git a/mysql-test/suite/maria/t/maria-recovery-big-master.opt b/mysql-test/suite/maria/maria-recovery-big-master.opt
index d24a11c924f..d24a11c924f 100644
--- a/mysql-test/suite/maria/t/maria-recovery-big-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-big-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recovery-big.result b/mysql-test/suite/maria/maria-recovery-big.result
index ae4010c7a86..ae4010c7a86 100644
--- a/mysql-test/suite/maria/r/maria-recovery-big.result
+++ b/mysql-test/suite/maria/maria-recovery-big.result
diff --git a/mysql-test/suite/maria/t/maria-recovery-big.test b/mysql-test/suite/maria/maria-recovery-big.test
index 4bad3913e58..4bad3913e58 100644
--- a/mysql-test/suite/maria/t/maria-recovery-big.test
+++ b/mysql-test/suite/maria/maria-recovery-big.test
diff --git a/mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt b/mysql-test/suite/maria/maria-recovery-bitmap-master.opt
index 425fda95086..425fda95086 100644
--- a/mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-bitmap-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recovery-bitmap.result b/mysql-test/suite/maria/maria-recovery-bitmap.result
index e3697334239..e3697334239 100644
--- a/mysql-test/suite/maria/r/maria-recovery-bitmap.result
+++ b/mysql-test/suite/maria/maria-recovery-bitmap.result
diff --git a/mysql-test/suite/maria/t/maria-recovery-bitmap.test b/mysql-test/suite/maria/maria-recovery-bitmap.test
index 4c7956fbc30..4c7956fbc30 100644
--- a/mysql-test/suite/maria/t/maria-recovery-bitmap.test
+++ b/mysql-test/suite/maria/maria-recovery-bitmap.test
diff --git a/mysql-test/suite/maria/t/maria-recovery-master.opt b/mysql-test/suite/maria/maria-recovery-master.opt
index 58d0d012c54..58d0d012c54 100644
--- a/mysql-test/suite/maria/t/maria-recovery-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-master.opt
diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt b/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt
index 425fda95086..425fda95086 100644
--- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result b/mysql-test/suite/maria/maria-recovery-rtree-ft.result
index 030421ae06a..030421ae06a 100644
--- a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result
+++ b/mysql-test/suite/maria/maria-recovery-rtree-ft.result
diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test b/mysql-test/suite/maria/maria-recovery-rtree-ft.test
index 11050ad676a..11050ad676a 100644
--- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test
+++ b/mysql-test/suite/maria/maria-recovery-rtree-ft.test
diff --git a/mysql-test/suite/maria/r/maria-recovery.result b/mysql-test/suite/maria/maria-recovery.result
index 86e756badec..86e756badec 100644
--- a/mysql-test/suite/maria/r/maria-recovery.result
+++ b/mysql-test/suite/maria/maria-recovery.result
diff --git a/mysql-test/suite/maria/t/maria-recovery.test b/mysql-test/suite/maria/maria-recovery.test
index b0f01f37d0d..b0f01f37d0d 100644
--- a/mysql-test/suite/maria/t/maria-recovery.test
+++ b/mysql-test/suite/maria/maria-recovery.test
diff --git a/mysql-test/suite/maria/t/maria-recovery2-master.opt b/mysql-test/suite/maria/maria-recovery2-master.opt
index 9b232472a24..9b232472a24 100644
--- a/mysql-test/suite/maria/t/maria-recovery2-master.opt
+++ b/mysql-test/suite/maria/maria-recovery2-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recovery2.result b/mysql-test/suite/maria/maria-recovery2.result
index 149ce5a01af..149ce5a01af 100644
--- a/mysql-test/suite/maria/r/maria-recovery2.result
+++ b/mysql-test/suite/maria/maria-recovery2.result
diff --git a/mysql-test/suite/maria/t/maria-recovery2.test b/mysql-test/suite/maria/maria-recovery2.test
index 8d27d9aaaac..8d27d9aaaac 100644
--- a/mysql-test/suite/maria/t/maria-recovery2.test
+++ b/mysql-test/suite/maria/maria-recovery2.test
diff --git a/mysql-test/suite/maria/t/maria-recovery3-master.opt b/mysql-test/suite/maria/maria-recovery3-master.opt
index 58d0d012c54..58d0d012c54 100644
--- a/mysql-test/suite/maria/t/maria-recovery3-master.opt
+++ b/mysql-test/suite/maria/maria-recovery3-master.opt
diff --git a/mysql-test/suite/maria/r/maria-recovery3.result b/mysql-test/suite/maria/maria-recovery3.result
index d71a3f6c00a..d71a3f6c00a 100644
--- a/mysql-test/suite/maria/r/maria-recovery3.result
+++ b/mysql-test/suite/maria/maria-recovery3.result
diff --git a/mysql-test/suite/maria/t/maria-recovery3.test b/mysql-test/suite/maria/maria-recovery3.test
index e4bc73edc57..e4bc73edc57 100644
--- a/mysql-test/suite/maria/t/maria-recovery3.test
+++ b/mysql-test/suite/maria/maria-recovery3.test
diff --git a/mysql-test/suite/maria/r/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result
index e7258f21d4f..e7258f21d4f 100644
--- a/mysql-test/suite/maria/r/maria-ucs2.result
+++ b/mysql-test/suite/maria/maria-ucs2.result
diff --git a/mysql-test/suite/maria/t/maria-ucs2.test b/mysql-test/suite/maria/maria-ucs2.test
index fed67d780e9..fed67d780e9 100644
--- a/mysql-test/suite/maria/t/maria-ucs2.test
+++ b/mysql-test/suite/maria/maria-ucs2.test
diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/maria.result
index c68a8871f83..c68a8871f83 100644
--- a/mysql-test/suite/maria/r/maria.result
+++ b/mysql-test/suite/maria/maria.result
diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/maria.test
index b371394b2b3..b371394b2b3 100644
--- a/mysql-test/suite/maria/t/maria.test
+++ b/mysql-test/suite/maria/maria.test
diff --git a/mysql-test/suite/maria/r/maria2.result b/mysql-test/suite/maria/maria2.result
index a0ec440b662..a0ec440b662 100644
--- a/mysql-test/suite/maria/r/maria2.result
+++ b/mysql-test/suite/maria/maria2.result
diff --git a/mysql-test/suite/maria/t/maria2.test b/mysql-test/suite/maria/maria2.test
index df691569e05..df691569e05 100644
--- a/mysql-test/suite/maria/t/maria2.test
+++ b/mysql-test/suite/maria/maria2.test
diff --git a/mysql-test/suite/maria/r/maria3.result b/mysql-test/suite/maria/maria3.result
index 37613875f38..37613875f38 100644
--- a/mysql-test/suite/maria/r/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
diff --git a/mysql-test/suite/maria/t/maria3.test b/mysql-test/suite/maria/maria3.test
index f1d95a15ba5..f1d95a15ba5 100644
--- a/mysql-test/suite/maria/t/maria3.test
+++ b/mysql-test/suite/maria/maria3.test
diff --git a/mysql-test/suite/maria/r/maria_notembedded.result b/mysql-test/suite/maria/maria_notembedded.result
index f9d8bbfedc8..f9d8bbfedc8 100644
--- a/mysql-test/suite/maria/r/maria_notembedded.result
+++ b/mysql-test/suite/maria/maria_notembedded.result
diff --git a/mysql-test/suite/maria/t/maria_notembedded.test b/mysql-test/suite/maria/maria_notembedded.test
index f1d71e90354..f1d71e90354 100644
--- a/mysql-test/suite/maria/t/maria_notembedded.test
+++ b/mysql-test/suite/maria/maria_notembedded.test
diff --git a/mysql-test/suite/maria/r/maria_partition.result b/mysql-test/suite/maria/maria_partition.result
index 372230c0b71..372230c0b71 100644
--- a/mysql-test/suite/maria/r/maria_partition.result
+++ b/mysql-test/suite/maria/maria_partition.result
diff --git a/mysql-test/suite/maria/t/maria_partition.test b/mysql-test/suite/maria/maria_partition.test
index 47571c7a4be..47571c7a4be 100644
--- a/mysql-test/suite/maria/t/maria_partition.test
+++ b/mysql-test/suite/maria/maria_partition.test
diff --git a/mysql-test/suite/maria/r/maria_showlog_error.result b/mysql-test/suite/maria/maria_showlog_error.result
index e2434efec28..e2434efec28 100644
--- a/mysql-test/suite/maria/r/maria_showlog_error.result
+++ b/mysql-test/suite/maria/maria_showlog_error.result
diff --git a/mysql-test/suite/maria/t/maria_showlog_error.test b/mysql-test/suite/maria/maria_showlog_error.test
index d6c59c5a0a6..d6c59c5a0a6 100644
--- a/mysql-test/suite/maria/t/maria_showlog_error.test
+++ b/mysql-test/suite/maria/maria_showlog_error.test
diff --git a/mysql-test/suite/maria/r/max_length.result b/mysql-test/suite/maria/max_length.result
index 6db58622698..6db58622698 100644
--- a/mysql-test/suite/maria/r/max_length.result
+++ b/mysql-test/suite/maria/max_length.result
diff --git a/mysql-test/suite/maria/t/max_length.test b/mysql-test/suite/maria/max_length.test
index 68ad1e22aa9..68ad1e22aa9 100644
--- a/mysql-test/suite/maria/t/max_length.test
+++ b/mysql-test/suite/maria/max_length.test
diff --git a/mysql-test/r/maria_mrr.result b/mysql-test/suite/maria/mrr.result
index af7789eebff..af7789eebff 100644
--- a/mysql-test/r/maria_mrr.result
+++ b/mysql-test/suite/maria/mrr.result
diff --git a/mysql-test/t/maria_mrr.test b/mysql-test/suite/maria/mrr.test
index 6c6a8c4e7b6..6c6a8c4e7b6 100644
--- a/mysql-test/t/maria_mrr.test
+++ b/mysql-test/suite/maria/mrr.test
diff --git a/mysql-test/suite/maria/r/optimize.result b/mysql-test/suite/maria/optimize.result
index 9cce55d6199..9cce55d6199 100644
--- a/mysql-test/suite/maria/r/optimize.result
+++ b/mysql-test/suite/maria/optimize.result
diff --git a/mysql-test/suite/maria/t/optimize.test b/mysql-test/suite/maria/optimize.test
index 6b310b1d1a6..6b310b1d1a6 100644
--- a/mysql-test/suite/maria/t/optimize.test
+++ b/mysql-test/suite/maria/optimize.test
diff --git a/mysql-test/suite/maria/r/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index 6c1b40302ec..6c1b40302ec 100644
--- a/mysql-test/suite/maria/r/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.result
diff --git a/mysql-test/suite/maria/t/ps_maria.test b/mysql-test/suite/maria/ps_maria.test
index d3623314631..d3623314631 100644
--- a/mysql-test/suite/maria/t/ps_maria.test
+++ b/mysql-test/suite/maria/ps_maria.test
diff --git a/mysql-test/suite/maria/t/small_blocksize-master.opt b/mysql-test/suite/maria/small_blocksize-master.opt
index 59fd35a7846..59fd35a7846 100644
--- a/mysql-test/suite/maria/t/small_blocksize-master.opt
+++ b/mysql-test/suite/maria/small_blocksize-master.opt
diff --git a/mysql-test/suite/maria/r/small_blocksize.result b/mysql-test/suite/maria/small_blocksize.result
index f418a1f92ef..f418a1f92ef 100644
--- a/mysql-test/suite/maria/r/small_blocksize.result
+++ b/mysql-test/suite/maria/small_blocksize.result
diff --git a/mysql-test/suite/maria/t/small_blocksize.test b/mysql-test/suite/maria/small_blocksize.test
index 0acf8df6e66..0acf8df6e66 100644
--- a/mysql-test/suite/maria/t/small_blocksize.test
+++ b/mysql-test/suite/maria/small_blocksize.test
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_install.result b/mysql-test/suite/plugins/r/feedback_plugin_install.result
index b1b35072a08..37d26b48501 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_install.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_install.result
@@ -5,7 +5,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
-FEEDBACK 1.1
+FEEDBACK used 1
+FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index d434d1282c5..443b91bf0cc 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -4,7 +4,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
-FEEDBACK 1.1
+FEEDBACK used 1
+FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index db622cb3f97..2852240ca5b 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -4,7 +4,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
-FEEDBACK 1.1
+FEEDBACK used 2
+FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_32.result b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result
index 915a2383435..915a2383435 100644
--- a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
deleted file mode 100644
index 915a2383435..00000000000
--- a/mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result
+++ /dev/null
@@ -1,108 +0,0 @@
-SET @start_value = @@global.binlog_cache_size;
-SELECT @start_value;
-@start_value
-32768
-'#--------------------FN_DYNVARS_006_01------------------------#'
-SET @@global.binlog_cache_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '100'
-SET @@global.binlog_cache_size = DEFAULT;
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-32768
-'#---------------------FN_DYNVARS_006_02-------------------------#'
-SET @@global.binlog_cache_size = @start_value;
-SELECT @@global.binlog_cache_size = 32768;
-@@global.binlog_cache_size = 32768
-1
-'#--------------------FN_DYNVARS_006_03------------------------#'
-SET @@global.binlog_cache_size = 4096;
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4096
-SET @@global.binlog_cache_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '4294967295'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4294963200
-SET @@global.binlog_cache_size = 10000;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '10000'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-8192
-SET @@global.binlog_cache_size = 21221204;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '21221204'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-21217280
-'Bug: Invalid values are coming in variable on assigning valid values'
-'#--------------------FN_DYNVARS_006_04-------------------------#'
-SET @@global.binlog_cache_size = 1024;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '1024'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4096
-SET @@global.binlog_cache_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
-SET @@global.binlog_cache_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '-1024'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4096
-SET @@global.binlog_cache_size = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '42949672950'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-42949668864
-'Bug: Errors are not coming on assigning invalid values to variable'
-SET @@global.binlog_cache_size = ON;
-ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
-SET @@global.binlog_cache_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
-'#-------------------FN_DYNVARS_006_05----------------------------#'
-SET @@session.binlog_cache_size = 0;
-ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-'#----------------------FN_DYNVARS_006_06------------------------#'
-SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size';
-@@global.binlog_cache_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_006_07----------------------#'
-SET @@global.binlog_cache_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '1'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4096
-SET @@global.binlog_cache_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '0'
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-4096
-'Bug: Errors are not coming on assigning TRUE/FALSE to variable'
-'#---------------------FN_DYNVARS_006_08----------------------#'
-SET @@global.binlog_cache_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect binlog_cache_size value: '1'
-SELECT @@binlog_cache_size = @@global.binlog_cache_size;
-@@binlog_cache_size = @@global.binlog_cache_size
-1
-'#---------------------FN_DYNVARS_006_09----------------------#'
-SET binlog_cache_size = 1;
-ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SET global.binlog_cache_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'binlog_cache_size = 1' at line 1
-SELECT global.binlog_cache_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT binlog_cache_size = @@session.binlog_cache_size;
-ERROR 42S22: Unknown column 'binlog_cache_size' in 'field list'
-SET @@global.binlog_cache_size = @start_value;
-SELECT @@global.binlog_cache_size;
-@@global.binlog_cache_size
-32768
diff --git a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_32.result b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result
index 8f1e519dab4..8f1e519dab4 100644
--- a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result
deleted file mode 100644
index 8f1e519dab4..00000000000
--- a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result
+++ /dev/null
@@ -1,108 +0,0 @@
-SET @start_value = @@global.binlog_stmt_cache_size;
-SELECT @start_value;
-@start_value
-32768
-'#--------------------FN_DYNVARS_006_01------------------------#'
-SET @@global.binlog_stmt_cache_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '100'
-SET @@global.binlog_stmt_cache_size = DEFAULT;
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-32768
-'#---------------------FN_DYNVARS_006_02-------------------------#'
-SET @@global.binlog_stmt_cache_size = @start_value;
-SELECT @@global.binlog_stmt_cache_size = 32768;
-@@global.binlog_stmt_cache_size = 32768
-1
-'#--------------------FN_DYNVARS_006_03------------------------#'
-SET @@global.binlog_stmt_cache_size = 4096;
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4096
-SET @@global.binlog_stmt_cache_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '4294967295'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4294963200
-SET @@global.binlog_stmt_cache_size = 10000;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '10000'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-8192
-SET @@global.binlog_stmt_cache_size = 21221204;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '21221204'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-21217280
-'Bug: Invalid values are coming in variable on assigning valid values'
-'#--------------------FN_DYNVARS_006_04-------------------------#'
-SET @@global.binlog_stmt_cache_size = 1024;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '1024'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4096
-SET @@global.binlog_stmt_cache_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'binlog_stmt_cache_size'
-SET @@global.binlog_stmt_cache_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '-1024'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4096
-SET @@global.binlog_stmt_cache_size = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '42949672950'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-42949668864
-'Bug: Errors are not coming on assigning invalid values to variable'
-SET @@global.binlog_stmt_cache_size = ON;
-ERROR 42000: Incorrect argument type to variable 'binlog_stmt_cache_size'
-SET @@global.binlog_stmt_cache_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'binlog_stmt_cache_size'
-'#-------------------FN_DYNVARS_006_05----------------------------#'
-SET @@session.binlog_stmt_cache_size = 0;
-ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-'#----------------------FN_DYNVARS_006_06------------------------#'
-SELECT @@global.binlog_stmt_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_stmt_cache_size';
-@@global.binlog_stmt_cache_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_006_07----------------------#'
-SET @@global.binlog_stmt_cache_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '1'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4096
-SET @@global.binlog_stmt_cache_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '0'
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-4096
-'Bug: Errors are not coming on assigning TRUE/FALSE to variable'
-'#---------------------FN_DYNVARS_006_08----------------------#'
-SET @@global.binlog_stmt_cache_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '1'
-SELECT @@binlog_stmt_cache_size = @@global.binlog_stmt_cache_size;
-@@binlog_stmt_cache_size = @@global.binlog_stmt_cache_size
-1
-'#---------------------FN_DYNVARS_006_09----------------------#'
-SET binlog_stmt_cache_size = 1;
-ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SET global.binlog_stmt_cache_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'binlog_stmt_cache_size = 1' at line 1
-SELECT global.binlog_stmt_cache_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT binlog_stmt_cache_size = @@session.binlog_stmt_cache_size;
-ERROR 42S22: Unknown column 'binlog_stmt_cache_size' in 'field list'
-SET @@global.binlog_stmt_cache_size = @start_value;
-SELECT @@global.binlog_stmt_cache_size;
-@@global.binlog_stmt_cache_size
-32768
diff --git a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic.result
index b332d01f900..b332d01f900 100644
--- a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
deleted file mode 100644
index b332d01f900..00000000000
--- a/mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result
+++ /dev/null
@@ -1,153 +0,0 @@
-SET @start_global_value = @@global.bulk_insert_buffer_size;
-SELECT @start_global_value;
-@start_global_value
-8388608
-SET @start_session_value = @@session.bulk_insert_buffer_size;
-SELECT @start_session_value;
-@start_session_value
-8388608
-'#--------------------FN_DYNVARS_007_01-------------------------#'
-SET @@global.bulk_insert_buffer_size = 100;
-SET @@global.bulk_insert_buffer_size = DEFAULT;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-8388608
-SET @@session.bulk_insert_buffer_size = 200;
-SET @@session.bulk_insert_buffer_size = DEFAULT;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-8388608
-'#--------------------FN_DYNVARS_007_02-------------------------#'
-SET @@global.bulk_insert_buffer_size = @start_global_value;
-SELECT @@global.bulk_insert_buffer_size = 8388608;
-@@global.bulk_insert_buffer_size = 8388608
-1
-SET @@session.bulk_insert_buffer_size = @start_session_value;
-SELECT @@session.bulk_insert_buffer_size = 8388608;
-@@session.bulk_insert_buffer_size = 8388608
-1
-'#--------------------FN_DYNVARS_007_03-------------------------#'
-SET @@global.bulk_insert_buffer_size = 0;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-0
-SET @@global.bulk_insert_buffer_size = 1;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-1
-SET @@global.bulk_insert_buffer_size = 4294967295;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-4294967295
-SET @@global.bulk_insert_buffer_size = 429496;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-429496
-'#--------------------FN_DYNVARS_007_04-------------------------#'
-SET @@session.bulk_insert_buffer_size = 0;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-0
-SET @@session.bulk_insert_buffer_size = 1;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-1
-SET @@session.bulk_insert_buffer_size = 4294967295;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-4294967295
-SET @@session.bulk_insert_buffer_size = 429496;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-429496
-'#------------------FN_DYNVARS_007_05-----------------------#'
-SET @@global.bulk_insert_buffer_size = 42949672950;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-42949672950
-SET @@global.bulk_insert_buffer_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-1024'
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-0
-SET @@global.bulk_insert_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
-SET @@global.bulk_insert_buffer_size = ON;
-ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
-SET @@global.bulk_insert_buffer_size = 429496.10;
-ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
-SET @@session.bulk_insert_buffer_size = 42949672950;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-42949672950
-SET @@session.bulk_insert_buffer_size = -2;
-Warnings:
-Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-2'
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-0
-SET @@session.bulk_insert_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
-SET @@session.bulk_insert_buffer_size = 429496.10;
-ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
-'#------------------FN_DYNVARS_007_06-----------------------#'
-SELECT @@global.bulk_insert_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='bulk_insert_buffer_size';
-@@global.bulk_insert_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_007_07-----------------------#'
-SELECT @@session.bulk_insert_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='bulk_insert_buffer_size';
-@@session.bulk_insert_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_007_08-----------------------#'
-SET @@global.bulk_insert_buffer_size = TRUE;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-1
-SET @@global.bulk_insert_buffer_size = FALSE;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-0
-SET @@session.bulk_insert_buffer_size = TRUE;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-1
-SET @@session.bulk_insert_buffer_size = FALSE;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-0
-'#---------------------FN_DYNVARS_007_09----------------------#'
-SET @@bulk_insert_buffer_size = 100;
-SELECT @@bulk_insert_buffer_size = @@local.bulk_insert_buffer_size;
-@@bulk_insert_buffer_size = @@local.bulk_insert_buffer_size
-1
-SELECT @@local.bulk_insert_buffer_size = @@session.bulk_insert_buffer_size;
-@@local.bulk_insert_buffer_size = @@session.bulk_insert_buffer_size
-1
-'#---------------------FN_DYNVARS_007_10----------------------#'
-SET bulk_insert_buffer_size = 1;
-SELECT @@bulk_insert_buffer_size;
-@@bulk_insert_buffer_size
-1
-SET local.bulk_insert_buffer_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bulk_insert_buffer_size = 1' at line 1
-SELECT local.bulk_insert_buffer_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET session.bulk_insert_buffer_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bulk_insert_buffer_size = 1' at line 1
-SELECT session.bulk_insert_buffer_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT bulk_insert_buffer_size = @@session.bulk_insert_buffer_size;
-ERROR 42S22: Unknown column 'bulk_insert_buffer_size' in 'field list'
-SET @@global.bulk_insert_buffer_size = @start_global_value;
-SELECT @@global.bulk_insert_buffer_size;
-@@global.bulk_insert_buffer_size
-8388608
-SET @@session.bulk_insert_buffer_size = @start_session_value;
-SELECT @@session.bulk_insert_buffer_size;
-@@session.bulk_insert_buffer_size
-8388608
diff --git a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_32.result b/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic.result
index 6acc2398bbd..6acc2398bbd 100644
--- a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic.result
diff --git a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result b/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
deleted file mode 100644
index 6acc2398bbd..00000000000
--- a/mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result
+++ /dev/null
@@ -1,111 +0,0 @@
-SET @start_value = @@global.delayed_insert_limit;
-SELECT @start_value;
-@start_value
-100
-'#--------------------FN_DYNVARS_024_01------------------------#'
-SET @@global.delayed_insert_limit = 100;
-SET @@global.delayed_insert_limit = DEFAULT;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-100
-'#---------------------FN_DYNVARS_024_02-------------------------#'
-SET @@global.delayed_insert_limit = @start_value;
-SELECT @@global.delayed_insert_limit = 100;
-@@global.delayed_insert_limit = 100
-1
-'#--------------------FN_DYNVARS_024_03------------------------#'
-SET @@global.delayed_insert_limit = 10000;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-10000
-SET @@global.delayed_insert_limit = 4294967295;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-4294967295
-SET @@global.delayed_insert_limit = 1;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-1
-'#--------------------FN_DYNVARS_024_04-------------------------#'
-SET @@global.delayed_insert_limit = 0;
-Warnings:
-Warning 1292 Truncated incorrect delayed_insert_limit value: '0'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-1
-SET @@global.delayed_insert_limit = -1024;
-Warnings:
-Warning 1292 Truncated incorrect delayed_insert_limit value: '-1024'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-1
-SET @@global.delayed_insert_limit = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect delayed_insert_limit value: '42949672950'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-4294967295
-SET @@global.delayed_insert_limit = 429496729.5;
-ERROR 42000: Incorrect argument type to variable 'delayed_insert_limit'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-4294967295
-SET @@global.delayed_insert_limit = ON;
-ERROR 42000: Incorrect argument type to variable 'delayed_insert_limit'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-4294967295
-'#-------------------FN_DYNVARS_024_05----------------------------#'
-SET @@session.delayed_insert_limit = 0;
-ERROR HY000: Variable 'delayed_insert_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@Session.delayed_insert_limit;
-ERROR HY000: Variable 'delayed_insert_limit' is a GLOBAL variable
-'#----------------------FN_DYNVARS_024_06------------------------#'
-SELECT @@global.delayed_insert_limit =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='delayed_insert_limit';
-@@global.delayed_insert_limit =
-VARIABLE_VALUE
-1
-SELECT @@delayed_insert_limit =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='delayed_insert_limit';
-@@delayed_insert_limit =
-VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_024_07----------------------#'
-SET @@global.delayed_insert_limit = TRUE;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-1
-SET @@global.delayed_insert_limit = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect delayed_insert_limit value: '0'
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-1
-'#---------------------FN_DYNVARS_024_08----------------------#'
-SET @@global.delayed_insert_limit = 1;
-SELECT @@delayed_insert_limit = @@global.delayed_insert_limit;
-@@delayed_insert_limit = @@global.delayed_insert_limit
-1
-'#---------------------FN_DYNVARS_024_09----------------------#'
-SET delayed_insert_limit = 1;
-ERROR HY000: Variable 'delayed_insert_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@delayed_insert_limit;
-@@delayed_insert_limit
-1
-SET local.delayed_insert_limit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delayed_insert_limit = 1' at line 1
-SELECT local.delayed_insert_limit;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.delayed_insert_limit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delayed_insert_limit = 1' at line 1
-SELECT global.delayed_insert_limit;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT delayed_insert_limit = @@session.delayed_insert_limit;
-ERROR 42S22: Unknown column 'delayed_insert_limit' in 'field list'
-SET @@global.delayed_insert_limit = @start_value;
-SELECT @@global.delayed_insert_limit;
-@@global.delayed_insert_limit
-100
diff --git a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_32.result b/mysql-test/suite/sys_vars/r/delayed_queue_size_basic.result
index 04aad26f0e8..04aad26f0e8 100644
--- a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/delayed_queue_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result b/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
deleted file mode 100644
index 04aad26f0e8..00000000000
--- a/mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result
+++ /dev/null
@@ -1,109 +0,0 @@
-SET @start_value = @@global.delayed_queue_size;
-SELECT @start_value;
-@start_value
-1000
-'#--------------------FN_DYNVARS_026_01------------------------#'
-SET @@global.delayed_queue_size = 100;
-SET @@global.delayed_queue_size = DEFAULT;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1000
-'#---------------------FN_DYNVARS_026_02-------------------------#'
-SET @@global.delayed_queue_size = @start_value;
-SELECT @@global.delayed_queue_size = 1000;
-@@global.delayed_queue_size = 1000
-1
-'#--------------------FN_DYNVARS_026_03------------------------#'
-SET @@global.delayed_queue_size = 10000;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-10000
-SET @@global.delayed_queue_size = 4294967295;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-4294967295
-SET @@global.delayed_queue_size = 1;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1
-'#--------------------FN_DYNVARS_026_04-------------------------#'
-SET @@global.delayed_queue_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect delayed_queue_size value: '0'
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1
-SET @@global.delayed_queue_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect delayed_queue_size value: '-1024'
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1
-SET @@global.delayed_queue_size = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect delayed_queue_size value: '42949672950'
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-4294967295
-SET @@global.delayed_queue_size = 429496729.5;
-ERROR 42000: Incorrect argument type to variable 'delayed_queue_size'
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-4294967295
-SET @@global.delayed_queue_size = ON;
-ERROR 42000: Incorrect argument type to variable 'delayed_queue_size'
-SELECT @@delayed_queue_size;
-@@delayed_queue_size
-4294967295
-'#-------------------FN_DYNVARS_026_05----------------------------#'
-SET @@session.delayed_queue_size = 0;
-ERROR HY000: Variable 'delayed_queue_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.delayed_queue_size;
-ERROR HY000: Variable 'delayed_queue_size' is a GLOBAL variable
-'#----------------------FN_DYNVARS_026_06------------------------#'
-SELECT @@global.delayed_queue_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='delayed_queue_size';
-@@global.delayed_queue_size = VARIABLE_VALUE
-1
-SELECT @@delayed_queue_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='delayed_queue_size';
-@@delayed_queue_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_026_07----------------------#'
-SET @@global.delayed_queue_size = TRUE;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1
-SET @@global.delayed_queue_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect delayed_queue_size value: '0'
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1
-'#---------------------FN_DYNVARS_026_08----------------------#'
-SET @@global.delayed_queue_size = 1;
-SELECT @@delayed_queue_size = @@global.delayed_queue_size;
-@@delayed_queue_size = @@global.delayed_queue_size
-1
-'#---------------------FN_DYNVARS_026_09----------------------#'
-SET delayed_queue_size = 1;
-ERROR HY000: Variable 'delayed_queue_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@delayed_queue_size;
-@@delayed_queue_size
-1
-SET local.delayed_queue_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delayed_queue_size = 1' at line 1
-SELECT local.delayed_queue_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.delayed_queue_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delayed_queue_size = 1' at line 1
-SELECT global.delayed_queue_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT delayed_queue_size = @@session.delayed_queue_size;
-ERROR 42S22: Unknown column 'delayed_queue_size' in 'field list'
-SET @@global.delayed_queue_size = @start_value;
-SELECT @@global.delayed_queue_size;
-@@global.delayed_queue_size
-1000
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result
index fda265910f9..fda265910f9 100644
--- a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/join_buffer_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
deleted file mode 100644
index fda265910f9..00000000000
--- a/mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result
+++ /dev/null
@@ -1,177 +0,0 @@
-SET @start_global_value = @@global.join_buffer_size;
-SELECT @start_global_value;
-@start_global_value
-131072
-SET @start_session_value = @@session.join_buffer_size;
-SELECT @start_session_value;
-@start_session_value
-131072
-'#--------------------FN_DYNVARS_053_01-------------------------#'
-SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-131072
-SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-131072
-'#--------------------FN_DYNVARS_053_03-------------------------#'
-SET @@global.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-8192
-SET @@global.join_buffer_size = 65536;
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-65536
-SET @@global.join_buffer_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-4294967168
-'#--------------------FN_DYNVARS_053_04-------------------------#'
-SET @@session.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-8192
-SET @@session.join_buffer_size = 65536;
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-65536
-SET @@session.join_buffer_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-4294967168
-'#------------------FN_DYNVARS_053_05-----------------------#'
-SET @@global.join_buffer_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-128
-SET @@global.join_buffer_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '-1024'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-128
-SET @@global.join_buffer_size = 127;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '127'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-128
-SET @@global.join_buffer_size = 42949672951;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-42949672832
-SET @@global.join_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-42949672832
-SET @@global.join_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-42949672832
-SET @@session.join_buffer_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-128
-SET @@session.join_buffer_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '-1024'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-128
-SET @@session.join_buffer_size = 127;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '127'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-128
-SET @@session.join_buffer_size = 42949672951;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-42949672832
-SET @@session.join_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-42949672832
-SET @@session.join_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-42949672832
-'#------------------FN_DYNVARS_053_06-----------------------#'
-SELECT @@global.join_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='join_buffer_size';
-@@global.join_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_053_07-----------------------#'
-SELECT @@session.join_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='join_buffer_size';
-@@session.join_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_053_08-----------------------#'
-SET @@global.join_buffer_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SET @@global.join_buffer_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '0'
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.join_buffer_size = 10;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '10'
-SELECT @@join_buffer_size = @@global.join_buffer_size;
-@@join_buffer_size = @@global.join_buffer_size
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@join_buffer_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '100'
-SELECT @@join_buffer_size = @@local.join_buffer_size;
-@@join_buffer_size = @@local.join_buffer_size
-1
-SELECT @@local.join_buffer_size = @@session.join_buffer_size;
-@@local.join_buffer_size = @@session.join_buffer_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET join_buffer_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SELECT @@join_buffer_size;
-@@join_buffer_size
-128
-SELECT local.join_buffer_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.join_buffer_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT join_buffer_size = @@session.join_buffer_size;
-ERROR 42S22: Unknown column 'join_buffer_size' in 'field list'
-SET @@global.join_buffer_size = @start_global_value;
-SELECT @@global.join_buffer_size;
-@@global.join_buffer_size
-131072
-SET @@session.join_buffer_size = @start_session_value;
-SELECT @@session.join_buffer_size;
-@@session.join_buffer_size
-131072
diff --git a/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_32.result b/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic.result
index f2a59e419e4..f2a59e419e4 100644
--- a/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic.result
diff --git a/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result b/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result
deleted file mode 100644
index f2a59e419e4..00000000000
--- a/mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result
+++ /dev/null
@@ -1,131 +0,0 @@
-SET @start_value = @@global.key_cache_age_threshold;
-SELECT @start_value;
-@start_value
-300
-'#--------------------FN_DYNVARS_056_01------------------------#'
-SET @@global.key_cache_age_threshold = DEFAULT;
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-300
-'#---------------------FN_DYNVARS_056_02-------------------------#'
-SET @@global.key_cache_age_threshold = @start_value;
-SELECT @@global.key_cache_age_threshold = 300;
-@@global.key_cache_age_threshold = 300
-1
-'#--------------------FN_DYNVARS_056_03------------------------#'
-SET @@global.key_cache_age_threshold = 100;
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '4294967295'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-4294967200
-SET @@global.key_cache_age_threshold = 1800;
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-1800
-SET @@global.key_cache_age_threshold = 65535;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '65535'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-65500
-'#--------------------FN_DYNVARS_056_04-------------------------#'
-SET @@global.key_cache_age_threshold = -1;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '-1'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = 42949672951;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '42949672951'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-4294967200
-SET @@global.key_cache_age_threshold = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'key_cache_age_threshold'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-4294967200
-SET @@global.key_cache_age_threshold = -1024;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '-1024'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = 99;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '99'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = ON;
-ERROR 42000: Incorrect argument type to variable 'key_cache_age_threshold'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = 'test';
-ERROR 42000: Incorrect argument type to variable 'key_cache_age_threshold'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-'#-------------------FN_DYNVARS_056_05----------------------------#'
-SET @@session.key_cache_age_threshold = 0;
-ERROR HY000: Variable 'key_cache_age_threshold' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.key_cache_age_threshold;
-ERROR HY000: Variable 'key_cache_age_threshold' is a GLOBAL variable
-'#----------------------FN_DYNVARS_056_06------------------------#'
-SELECT @@global.key_cache_age_threshold = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='key_cache_age_threshold';
-@@global.key_cache_age_threshold = VARIABLE_VALUE
-1
-SELECT @@key_cache_age_threshold = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='key_cache_age_threshold';
-@@key_cache_age_threshold = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_056_07----------------------#'
-SET @@global.key_cache_age_threshold = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '1'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-SET @@global.key_cache_age_threshold = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '0'
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-100
-'#---------------------FN_DYNVARS_056_08----------------------#'
-SET @@global.key_cache_age_threshold = 101;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '101'
-SELECT @@key_cache_age_threshold = @@global.key_cache_age_threshold;
-@@key_cache_age_threshold = @@global.key_cache_age_threshold
-1
-'#---------------------FN_DYNVARS_056_09----------------------#'
-SET key_cache_age_threshold = 8000;
-ERROR HY000: Variable 'key_cache_age_threshold' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@key_cache_age_threshold;
-@@key_cache_age_threshold
-100
-SET local.key_cache_age_threshold = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key_cache_age_threshold = 10' at line 1
-SELECT local.key_cache_age_threshold;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.key_cache_age_threshold = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key_cache_age_threshold = 10' at line 1
-SELECT global.key_cache_age_threshold;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT key_cache_age_threshold = @@session.key_cache_age_threshold;
-ERROR 42S22: Unknown column 'key_cache_age_threshold' in 'field list'
-SET @@global.key_cache_age_threshold = @start_value;
-SELECT @@global.key_cache_age_threshold;
-@@global.key_cache_age_threshold
-300
diff --git a/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result b/mysql-test/suite/sys_vars/r/log_warnings_basic.result
index fee7f8966ca..fee7f8966ca 100644
--- a/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/log_warnings_basic.result
diff --git a/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result b/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
deleted file mode 100644
index fee7f8966ca..00000000000
--- a/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
+++ /dev/null
@@ -1,165 +0,0 @@
-SET @start_global_value = @@global.log_warnings;
-SELECT @start_global_value;
-@start_global_value
-1
-SET @start_session_value = @@session.log_warnings;
-SELECT @start_session_value;
-@start_session_value
-1
-'#--------------------FN_DYNVARS_067_01-------------------------#'
-SET @@global.log_warnings = 100;
-SET @@global.log_warnings = DEFAULT;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-1
-SET @@session.log_warnings = 200;
-SET @@session.log_warnings = DEFAULT;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-1
-'#--------------------FN_DYNVARS_067_02-------------------------#'
-SET @@global.log_warnings = DEFAULT;
-SELECT @@global.log_warnings = 1;
-@@global.log_warnings = 1
-1
-SET @@session.log_warnings = DEFAULT;
-SELECT @@session.log_warnings = 1;
-@@session.log_warnings = 1
-1
-'#--------------------FN_DYNVARS_067_03-------------------------#'
-SET @@global.log_warnings = 0;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-0
-SET @@global.log_warnings = 1;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-1
-SET @@global.log_warnings = 60020;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-60020
-SET @@global.log_warnings = 65535;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-65535
-SET @@global.log_warnings = 65536;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-65536
-'#--------------------FN_DYNVARS_067_04-------------------------#'
-SET @@session.log_warnings = 0;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-0
-SET @@session.log_warnings = 1;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-1
-SET @@session.log_warnings = 50050;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-50050
-SET @@session.log_warnings = 65535;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-65535
-SET @@session.log_warnings = 65550;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-65550
-'#------------------FN_DYNVARS_067_05-----------------------#'
-SET @@global.log_warnings = 100000000000;
-Warnings:
-Warning 1292 Truncated incorrect log_warnings value: '100000000000'
-SELECT @@global.log_warnings;
-@@global.log_warnings
-4294967295
-SET @@global.log_warnings = -1024;
-Warnings:
-Warning 1292 Truncated incorrect log_warnings value: '-1024'
-SELECT @@global.log_warnings;
-@@global.log_warnings
-0
-SET @@global.log_warnings = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'log_warnings'
-SELECT @@global.log_warnings;
-@@global.log_warnings
-0
-SET @@global.log_warnings = test;
-ERROR 42000: Incorrect argument type to variable 'log_warnings'
-SELECT @@global.log_warnings;
-@@global.log_warnings
-0
-SET @@session.log_warnings = 100000000000;
-Warnings:
-Warning 1292 Truncated incorrect log_warnings value: '100000000000'
-SELECT @@session.log_warnings;
-@@session.log_warnings
-4294967295
-SET @@session.log_warnings = -2;
-Warnings:
-Warning 1292 Truncated incorrect log_warnings value: '-2'
-SELECT @@session.log_warnings;
-@@session.log_warnings
-0
-SET @@session.log_warnings = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'log_warnings'
-SET @@session.log_warnings = test;
-ERROR 42000: Incorrect argument type to variable 'log_warnings'
-SELECT @@session.log_warnings;
-@@session.log_warnings
-0
-'#------------------FN_DYNVARS_067_06-----------------------#'
-SELECT @@global.log_warnings = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='log_warnings';
-@@global.log_warnings = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_067_07-----------------------#'
-SELECT @@session.log_warnings = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='log_warnings';
-@@session.log_warnings = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_067_08-----------------------#'
-SET @@global.log_warnings = TRUE;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-1
-SET @@global.log_warnings = FALSE;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-0
-'#---------------------FN_DYNVARS_067_09----------------------#'
-SET @@global.log_warnings = 10;
-SELECT @@log_warnings = @@global.log_warnings;
-@@log_warnings = @@global.log_warnings
-0
-'#---------------------FN_DYNVARS_067_10----------------------#'
-SET @@log_warnings = 100;
-SELECT @@log_warnings = @@local.log_warnings;
-@@log_warnings = @@local.log_warnings
-1
-SELECT @@local.log_warnings = @@session.log_warnings;
-@@local.log_warnings = @@session.log_warnings
-1
-'#---------------------FN_DYNVARS_067_11----------------------#'
-SET log_warnings = 1;
-SELECT @@log_warnings;
-@@log_warnings
-1
-SELECT local.log_warnings;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.log_warnings;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT log_warnings = @@session.log_warnings;
-ERROR 42S22: Unknown column 'log_warnings' in 'field list'
-SET @@global.log_warnings = @start_global_value;
-SELECT @@global.log_warnings;
-@@global.log_warnings
-1
-SET @@session.log_warnings = @start_session_value;
-SELECT @@session.log_warnings;
-@@session.log_warnings
-1
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_32.result b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
index be1a58394b8..be1a58394b8 100644
--- a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result b/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
deleted file mode 100644
index be1a58394b8..00000000000
--- a/mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result
+++ /dev/null
@@ -1,134 +0,0 @@
-SET @start_value = @@global.max_connect_errors;
-SELECT @start_value;
-@start_value
-10
-'#--------------------FN_DYNVARS_073_01------------------------#'
-SET @@global.max_connect_errors = 5000;
-SET @@global.max_connect_errors = DEFAULT;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-10
-'#---------------------FN_DYNVARS_073_02-------------------------#'
-SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors = 10;
-@@global.max_connect_errors = 10
-1
-'#--------------------FN_DYNVARS_073_03------------------------#'
-SET @@global.max_connect_errors = 4096;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4096
-SET @@global.max_connect_errors = 4294967294;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967294
-SET @@global.max_connect_errors = 4294967295;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-SET @@global.max_connect_errors = 1;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-SET @@global.max_connect_errors = 2;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-2
-'#--------------------FN_DYNVARS_073_04-------------------------#'
-SET @@global.max_connect_errors = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '-1'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-SET @@global.max_connect_errors = 100000000000;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '100000000000'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-SET @@global.max_connect_errors = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'max_connect_errors'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-SET @@global.max_connect_errors = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '-1024'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-SET @@global.max_connect_errors = 0;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '0'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-SET @@global.max_connect_errors = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '4294967296'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-SET @@global.max_connect_errors = ON;
-ERROR 42000: Incorrect argument type to variable 'max_connect_errors'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-SET @@global.max_connect_errors = 'test';
-ERROR 42000: Incorrect argument type to variable 'max_connect_errors'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-4294967295
-'#-------------------FN_DYNVARS_073_05----------------------------#'
-SET @@session.max_connect_errors = 4096;
-ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.max_connect_errors;
-ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable
-'#----------------------FN_DYNVARS_073_06------------------------#'
-SELECT @@global.max_connect_errors = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_connect_errors';
-@@global.max_connect_errors = VARIABLE_VALUE
-1
-SELECT @@max_connect_errors = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_connect_errors';
-@@max_connect_errors = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_073_07----------------------#'
-SET @@global.max_connect_errors = TRUE;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-SET @@global.max_connect_errors = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_connect_errors value: '0'
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-1
-'#---------------------FN_DYNVARS_073_08----------------------#'
-SET @@global.max_connect_errors = 5000;
-SELECT @@max_connect_errors = @@global.max_connect_errors;
-@@max_connect_errors = @@global.max_connect_errors
-1
-'#---------------------FN_DYNVARS_073_09----------------------#'
-SET max_connect_errors = 6000;
-ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@max_connect_errors;
-@@max_connect_errors
-5000
-SET local.max_connect_errors = 7000;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max_connect_errors = 7000' at line 1
-SELECT local.max_connect_errors;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.max_connect_errors = 8000;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max_connect_errors = 8000' at line 1
-SELECT global.max_connect_errors;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT max_connect_errors = @@session.max_connect_errors;
-ERROR 42S22: Unknown column 'max_connect_errors' in 'field list'
-SET @@global.max_connect_errors = @start_value;
-SELECT @@global.max_connect_errors;
-@@global.max_connect_errors
-10
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_32.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic.result
index 2973e7e1efd..2973e7e1efd 100644
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic.result
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
deleted file mode 100644
index 2973e7e1efd..00000000000
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result
+++ /dev/null
@@ -1,179 +0,0 @@
-SET @start_global_value = @@global.max_seeks_for_key;
-SELECT @start_global_value;
-@start_global_value
-4294967295
-SET @start_session_value = @@session.max_seeks_for_key;
-SELECT @start_session_value;
-@start_session_value
-4294967295
-'#--------------------FN_DYNVARS_083_01-------------------------#'
-SET @@global.max_seeks_for_key = 100;
-SET @@global.max_seeks_for_key = DEFAULT;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@session.max_seeks_for_key = 200;
-SET @@session.max_seeks_for_key = DEFAULT;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967295
-'#--------------------FN_DYNVARS_083_02-------------------------#'
-SET @@global.max_seeks_for_key = DEFAULT;
-SELECT @@global.max_seeks_for_key = 4294967295;
-@@global.max_seeks_for_key = 4294967295
-1
-SET @@session.max_seeks_for_key = DEFAULT;
-SELECT @@session.max_seeks_for_key = 4294967295;
-@@session.max_seeks_for_key = 4294967295
-1
-'#--------------------FN_DYNVARS_083_03-------------------------#'
-SET @@global.max_seeks_for_key = 1;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-1
-SET @@global.max_seeks_for_key = 2;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-2
-SET @@global.max_seeks_for_key = 65536;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-65536
-SET @@global.max_seeks_for_key = 4294967295;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@global.max_seeks_for_key = 4294967294;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967294
-'#--------------------FN_DYNVARS_083_04-------------------------#'
-SET @@session.max_seeks_for_key = 1;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-1
-SET @@session.max_seeks_for_key = 2;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-2
-SET @@session.max_seeks_for_key = 4294967295;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967295
-SET @@session.max_seeks_for_key = 4294967294;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967294
-SET @@session.max_seeks_for_key = 65535;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-65535
-'#------------------FN_DYNVARS_083_05-----------------------#'
-SET @@global.max_seeks_for_key = 0;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '0'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-1
-SET @@global.max_seeks_for_key = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '-1024'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-1
-SET @@global.max_seeks_for_key = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '4294967296'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@global.max_seeks_for_key = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@global.max_seeks_for_key = test;
-ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@session.max_seeks_for_key = 0;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '0'
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-1
-SET @@session.max_seeks_for_key = -2;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '-2'
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-1
-SET @@session.max_seeks_for_key = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
-SET @@session.max_seeks_for_key = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '4294967296'
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967295
-SET @@session.max_seeks_for_key = test;
-ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967295
-'#------------------FN_DYNVARS_083_06-----------------------#'
-SELECT @@global.max_seeks_for_key = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_seeks_for_key';
-@@global.max_seeks_for_key = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_083_07-----------------------#'
-SELECT @@session.max_seeks_for_key = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_seeks_for_key';
-@@session.max_seeks_for_key = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_083_08-----------------------#'
-SET @@global.max_seeks_for_key = TRUE;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-1
-SET @@global.max_seeks_for_key = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_seeks_for_key value: '0'
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-1
-'#---------------------FN_DYNVARS_083_09----------------------#'
-SET @@global.max_seeks_for_key = 10;
-SELECT @@max_seeks_for_key = @@global.max_seeks_for_key;
-@@max_seeks_for_key = @@global.max_seeks_for_key
-0
-'#---------------------FN_DYNVARS_083_10----------------------#'
-SET @@max_seeks_for_key = 100;
-SELECT @@max_seeks_for_key = @@local.max_seeks_for_key;
-@@max_seeks_for_key = @@local.max_seeks_for_key
-1
-SELECT @@local.max_seeks_for_key = @@session.max_seeks_for_key;
-@@local.max_seeks_for_key = @@session.max_seeks_for_key
-1
-'#---------------------FN_DYNVARS_083_11----------------------#'
-SET max_seeks_for_key = 1;
-SELECT @@max_seeks_for_key;
-@@max_seeks_for_key
-1
-SELECT local.max_seeks_for_key;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.max_seeks_for_key;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT max_seeks_for_key = @@session.max_seeks_for_key;
-ERROR 42S22: Unknown column 'max_seeks_for_key' in 'field list'
-SET @@global.max_seeks_for_key = @start_global_value;
-SELECT @@global.max_seeks_for_key;
-@@global.max_seeks_for_key
-4294967295
-SET @@session.max_seeks_for_key = @start_session_value;
-SELECT @@session.max_seeks_for_key;
-@@session.max_seeks_for_key
-4294967295
diff --git a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_32.result b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result
index 5daf78fcae1..5daf78fcae1 100644
--- a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic.result
diff --git a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result b/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
deleted file mode 100644
index 5daf78fcae1..00000000000
--- a/mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result
+++ /dev/null
@@ -1,197 +0,0 @@
-SET @start_global_value = @@global.max_tmp_tables;
-SELECT @start_global_value;
-@start_global_value
-32
-SET @start_session_value = @@session.max_tmp_tables;
-SELECT @start_session_value;
-@start_session_value
-32
-'#--------------------FN_DYNVARS_086_01-------------------------#'
-SET @@global.max_tmp_tables = 1000;
-SET @@global.max_tmp_tables = DEFAULT;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-32
-SET @@session.max_tmp_tables = 1000;
-SET @@session.max_tmp_tables = DEFAULT;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-32
-'#--------------------FN_DYNVARS_086_02-------------------------#'
-SET @@global.max_tmp_tables = DEFAULT;
-SELECT @@global.max_tmp_tables = 32;
-@@global.max_tmp_tables = 32
-1
-SET @@session.max_tmp_tables = DEFAULT;
-SELECT @@session.max_tmp_tables = 32;
-@@session.max_tmp_tables = 32
-1
-'#--------------------FN_DYNVARS_086_03-------------------------#'
-SET @@global.max_tmp_tables = 1;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-1
-SET @@global.max_tmp_tables = 2;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-2
-SET @@global.max_tmp_tables = 65536;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-65536
-SET @@global.max_tmp_tables = 4294967295;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967295
-SET @@global.max_tmp_tables = 4294967294;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967294
-'#--------------------FN_DYNVARS_086_04-------------------------#'
-SET @@session.max_tmp_tables = 1;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-1
-SET @@session.max_tmp_tables = 2;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-2
-SET @@session.max_tmp_tables = 65536;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-65536
-SET @@session.max_tmp_tables = 4294967295;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967295
-SET @@session.max_tmp_tables = 4294967294;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967294
-'#------------------FN_DYNVARS_086_05-----------------------#'
-SET @@global.max_tmp_tables = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '-1024'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-1
-SET @@global.max_tmp_tables = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '4294967296'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967295
-SET @@global.max_tmp_tables = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-1
-SET @@global.max_tmp_tables = 429496729500;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '429496729500'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967295
-SET @@global.max_tmp_tables = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967295
-SET @@global.max_tmp_tables = test;
-ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-4294967295
-SET @@session.max_tmp_tables = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '4294967296'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967295
-SET @@session.max_tmp_tables = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-1
-SET @@session.max_tmp_tables = 429496729500;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '429496729500'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967295
-SET @@session.max_tmp_tables = -001;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '-1'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-1
-SET @@session.max_tmp_tables = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
-SET @@session.max_tmp_tables = 10737418241;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '10737418241'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967295
-SET @@session.max_tmp_tables = test;
-ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-4294967295
-'#------------------FN_DYNVARS_086_06-----------------------#'
-SELECT @@global.max_tmp_tables = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_tmp_tables';
-@@global.max_tmp_tables = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_086_07-----------------------#'
-SELECT @@session.max_tmp_tables = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_tmp_tables';
-@@session.max_tmp_tables = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_086_08-----------------------#'
-SET @@global.max_tmp_tables = TRUE;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-1
-SET @@global.max_tmp_tables = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_tmp_tables value: '0'
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-1
-'#---------------------FN_DYNVARS_086_09----------------------#'
-SET @@global.max_tmp_tables = 20;
-SELECT @@max_tmp_tables = @@global.max_tmp_tables;
-@@max_tmp_tables = @@global.max_tmp_tables
-0
-'#---------------------FN_DYNVARS_086_10----------------------#'
-SET @@max_tmp_tables = 255;
-SELECT @@max_tmp_tables = @@local.max_tmp_tables;
-@@max_tmp_tables = @@local.max_tmp_tables
-1
-SELECT @@local.max_tmp_tables = @@session.max_tmp_tables;
-@@local.max_tmp_tables = @@session.max_tmp_tables
-1
-'#---------------------FN_DYNVARS_086_11----------------------#'
-SET max_tmp_tables = 102;
-SELECT @@max_tmp_tables;
-@@max_tmp_tables
-102
-SELECT local.max_tmp_tables;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.max_tmp_tables;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT max_tmp_tables = @@session.max_tmp_tables;
-ERROR 42S22: Unknown column 'max_tmp_tables' in 'field list'
-SET @@global.max_tmp_tables = @start_global_value;
-SELECT @@global.max_tmp_tables;
-@@global.max_tmp_tables
-32
-SET @@session.max_tmp_tables = @start_session_value;
-SELECT @@session.max_tmp_tables;
-@@session.max_tmp_tables
-32
diff --git a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_32.result b/mysql-test/suite/sys_vars/r/max_write_lock_count_basic.result
index 59d92d5cfe8..59d92d5cfe8 100644
--- a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_write_lock_count_basic.result
diff --git a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result b/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
deleted file mode 100644
index 59d92d5cfe8..00000000000
--- a/mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result
+++ /dev/null
@@ -1,108 +0,0 @@
-SET @start_global_value = @@global.max_write_lock_count;
-SELECT @start_global_value;
-@start_global_value
-4294967295
-'#--------------------FN_DYNVARS_088_01-------------------------#'
-SET @@global.max_write_lock_count = 1000;
-SET @@global.max_write_lock_count = DEFAULT;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-'#--------------------FN_DYNVARS_088_02-------------------------#'
-SET @@global.max_write_lock_count = DEFAULT;
-SELECT @@global.max_write_lock_count = 4294967295;
-@@global.max_write_lock_count = 4294967295
-1
-'#--------------------FN_DYNVARS_088_03-------------------------#'
-SET @@global.max_write_lock_count = 1;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-1
-SET @@global.max_write_lock_count = 2;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-2
-SET @@global.max_write_lock_count = 65536;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-65536
-SET @@global.max_write_lock_count = 4294967295;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-SET @@global.max_write_lock_count = 4294967294;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967294
-'#------------------FN_DYNVARS_088_04-----------------------#'
-SET @@global.max_write_lock_count = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_write_lock_count value: '-1024'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-1
-SET @@global.max_write_lock_count = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_write_lock_count value: '4294967296'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-SET @@global.max_write_lock_count = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_write_lock_count value: '-1'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-1
-SET @@global.max_write_lock_count = 429496729500;
-Warnings:
-Warning 1292 Truncated incorrect max_write_lock_count value: '429496729500'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-SET @@global.max_write_lock_count = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'max_write_lock_count'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-SET @@global.max_write_lock_count = test;
-ERROR 42000: Incorrect argument type to variable 'max_write_lock_count'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
-'#------------------FN_DYNVARS_088_05-----------------------#'
-SELECT @@global.max_write_lock_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_write_lock_count';
-@@global.max_write_lock_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_088_06-----------------------#'
-SET @@global.max_write_lock_count = TRUE;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-1
-SET @@global.max_write_lock_count = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_write_lock_count value: '0'
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-1
-'#---------------------FN_DYNVARS_088_07----------------------#'
-SET @@global.max_write_lock_count = 20;
-SELECT @@max_write_lock_count = @@global.max_write_lock_count;
-@@max_write_lock_count = @@global.max_write_lock_count
-1
-'#---------------------FN_DYNVARS_088_08----------------------#'
-SET @@global.max_write_lock_count = 102;
-SELECT @@max_write_lock_count;
-@@max_write_lock_count
-102
-SELECT local.max_write_lock_count;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT global.max_write_lock_count;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT max_write_lock_count = @@global.max_write_lock_count;
-ERROR 42S22: Unknown column 'max_write_lock_count' in 'field list'
-SET @@global.max_write_lock_count = @start_global_value;
-SELECT @@global.max_write_lock_count;
-@@global.max_write_lock_count
-4294967295
diff --git a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_32.result b/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic.result
index b4b1b9ae402..b4b1b9ae402 100644
--- a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic.result
diff --git a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result b/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
deleted file mode 100644
index b4b1b9ae402..00000000000
--- a/mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result
+++ /dev/null
@@ -1,183 +0,0 @@
-SET @start_global_value = @@global.min_examined_row_limit;
-SELECT @start_global_value;
-@start_global_value
-0
-SET @start_session_value = @@session.min_examined_row_limit;
-SELECT @start_session_value;
-@start_session_value
-0
-'#--------------------FN_DYNVARS_089_01-------------------------#'
-SET @@global.min_examined_row_limit = 100;
-SET @@global.min_examined_row_limit = DEFAULT;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-0
-SET @@session.min_examined_row_limit = 200;
-SET @@session.min_examined_row_limit = DEFAULT;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-0
-'#--------------------FN_DYNVARS_089_02-------------------------#'
-SET @@global.min_examined_row_limit = DEFAULT;
-SELECT @@global.min_examined_row_limit = 0;
-@@global.min_examined_row_limit = 0
-1
-SET @@session.min_examined_row_limit = DEFAULT;
-SELECT @@session.min_examined_row_limit = 0;
-@@session.min_examined_row_limit = 0
-1
-'#--------------------FN_DYNVARS_089_03-------------------------#'
-SET @@global.min_examined_row_limit = 0;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-0
-SET @@global.min_examined_row_limit = 1;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-1
-SET @@global.min_examined_row_limit = 60020;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-60020
-SET @@global.min_examined_row_limit = 65535;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-65535
-SET @@global.min_examined_row_limit = 4294967295;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-4294967295
-SET @@global.min_examined_row_limit = 4294967294;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-4294967294
-'#--------------------FN_DYNVARS_089_04-------------------------#'
-SET @@session.min_examined_row_limit = 0;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-0
-SET @@session.min_examined_row_limit = 1;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-1
-SET @@session.min_examined_row_limit = 50050;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-50050
-SET @@session.min_examined_row_limit = 65535;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-65535
-SET @@session.min_examined_row_limit = 4294967295;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-4294967295
-SET @@session.min_examined_row_limit = 4294967294;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-4294967294
-'#------------------FN_DYNVARS_089_05-----------------------#'
-SET @@global.min_examined_row_limit = 429496726;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-429496726
-SET @@global.min_examined_row_limit = -1024;
-Warnings:
-Warning 1292 Truncated incorrect min_examined_row_limit value: '-1024'
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-0
-SET @@global.min_examined_row_limit = 429496729500;
-Warnings:
-Warning 1292 Truncated incorrect min_examined_row_limit value: '429496729500'
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-4294967295
-SET @@global.min_examined_row_limit = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-4294967295
-SET @@global.min_examined_row_limit = test;
-ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-4294967295
-SET @@session.min_examined_row_limit = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect min_examined_row_limit value: '4294967296'
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-4294967295
-SET @@session.min_examined_row_limit = -1;
-Warnings:
-Warning 1292 Truncated incorrect min_examined_row_limit value: '-1'
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-0
-SET @@session.min_examined_row_limit = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
-SET @@session.min_examined_row_limit = 4294967295021;
-Warnings:
-Warning 1292 Truncated incorrect min_examined_row_limit value: '4294967295021'
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-4294967295
-SET @@session.min_examined_row_limit = test;
-ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-4294967295
-'#------------------FN_DYNVARS_089_06-----------------------#'
-SELECT @@global.min_examined_row_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='min_examined_row_limit';
-@@global.min_examined_row_limit = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_089_07-----------------------#'
-SELECT @@session.min_examined_row_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='min_examined_row_limit';
-@@session.min_examined_row_limit = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_089_08-----------------------#'
-SET @@global.min_examined_row_limit = TRUE;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-1
-SET @@global.min_examined_row_limit = FALSE;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-0
-'#---------------------FN_DYNVARS_089_09----------------------#'
-SET @@global.min_examined_row_limit = 10;
-SELECT @@min_examined_row_limit = @@global.min_examined_row_limit;
-@@min_examined_row_limit = @@global.min_examined_row_limit
-0
-'#---------------------FN_DYNVARS_089_10----------------------#'
-SET @@min_examined_row_limit = 100;
-SELECT @@min_examined_row_limit = @@local.min_examined_row_limit;
-@@min_examined_row_limit = @@local.min_examined_row_limit
-1
-SELECT @@local.min_examined_row_limit = @@session.min_examined_row_limit;
-@@local.min_examined_row_limit = @@session.min_examined_row_limit
-1
-'#---------------------FN_DYNVARS_089_11----------------------#'
-SET min_examined_row_limit = 1;
-SELECT @@min_examined_row_limit;
-@@min_examined_row_limit
-1
-SELECT local.min_examined_row_limit;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.min_examined_row_limit;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT min_examined_row_limit = @@session.min_examined_row_limit;
-ERROR 42S22: Unknown column 'min_examined_row_limit' in 'field list'
-SET @@global.min_examined_row_limit = @start_global_value;
-SELECT @@global.min_examined_row_limit;
-@@global.min_examined_row_limit
-0
-SET @@session.min_examined_row_limit = @start_session_value;
-SELECT @@session.min_examined_row_limit;
-@@session.min_examined_row_limit
-0
diff --git a/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result b/mysql-test/suite/sys_vars/r/multi_range_count_basic.result
index f41870c873b..e078da3f2f6 100644
--- a/mysql-test/suite/sys_vars/r/multi_range_count_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/multi_range_count_basic.result
@@ -109,11 +109,9 @@ SELECT @@global.multi_range_count;
@@global.multi_range_count
1
SET @@global.multi_range_count = 4294967296;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
SELECT @@global.multi_range_count;
@@global.multi_range_count
-4294967296
+4294967295
SET @@global.multi_range_count = -1024;
Warnings:
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
@@ -122,21 +120,19 @@ SELECT @@global.multi_range_count;
@@global.multi_range_count
1
SET @@global.multi_range_count = 429496729500;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
SELECT @@global.multi_range_count;
@@global.multi_range_count
-429496729500
+4294967295
SET @@global.multi_range_count = 65530.34;
ERROR 42000: Incorrect argument type to variable 'multi_range_count'
SELECT @@global.multi_range_count;
@@global.multi_range_count
-429496729500
+4294967295
SET @@global.multi_range_count = test;
ERROR 42000: Incorrect argument type to variable 'multi_range_count'
SELECT @@global.multi_range_count;
@@global.multi_range_count
-429496729500
+4294967295
SET @@session.multi_range_count = 0;
Warnings:
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
@@ -145,11 +141,9 @@ SELECT @@session.multi_range_count;
@@session.multi_range_count
1
SET @@session.multi_range_count = 4294967296;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
SELECT @@session.multi_range_count;
@@session.multi_range_count
-4294967296
+4294967295
SET @@session.multi_range_count = -1;
Warnings:
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
@@ -160,17 +154,15 @@ SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.' at line 1
SET @@session.multi_range_count = 4294967295021;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
SELECT @@session.multi_range_count;
@@session.multi_range_count
-4294967295021
+4294967295
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.multi_range_count = test;
ERROR 42000: Incorrect argument type to variable 'multi_range_count'
SELECT @@session.multi_range_count;
@@session.multi_range_count
-4294967295021
+4294967295
'#------------------FN_DYNVARS_090_06-----------------------#'
SELECT @@global.multi_range_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/multi_range_count_basic_32.result b/mysql-test/suite/sys_vars/r/multi_range_count_basic_32.result
deleted file mode 100644
index e7cda15215c..00000000000
--- a/mysql-test/suite/sys_vars/r/multi_range_count_basic_32.result
+++ /dev/null
@@ -1,245 +0,0 @@
-SET @start_global_value = @@global.multi_range_count;
-SELECT @start_global_value;
-@start_global_value
-256
-SET @start_session_value = @@session.multi_range_count;
-SELECT @start_session_value;
-@start_session_value
-256
-'#--------------------FN_DYNVARS_090_01-------------------------#'
-SET @@global.multi_range_count = 100;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SET @@global.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-256
-SET @@session.multi_range_count = 200;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SET @@session.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-256
-'#--------------------FN_DYNVARS_090_02-------------------------#'
-SET @@global.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count = 256;
-@@global.multi_range_count = 256
-1
-SET @@session.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count = 256;
-@@session.multi_range_count = 256
-1
-'#--------------------FN_DYNVARS_090_03-------------------------#'
-SET @@global.multi_range_count = 1;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 60020;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-60020
-SET @@global.multi_range_count = 65535;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-65535
-SET @@global.multi_range_count = 4294967295;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = 4294967294;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967294
-'#--------------------FN_DYNVARS_090_04-------------------------#'
-SET @@session.multi_range_count = 1;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 50050;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-50050
-SET @@session.multi_range_count = 65535;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-65535
-SET @@session.multi_range_count = 4294967295;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-SET @@session.multi_range_count = 4294967294;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967294
-'#------------------FN_DYNVARS_090_05-----------------------#'
-SET @@global.multi_range_count = 0;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 4294967296;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '4294967296'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = -1024;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '-1024'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 429496729500;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '429496729500'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = test;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@session.multi_range_count = 0;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 4294967296;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '4294967296'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-SET @@session.multi_range_count = -1;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '-1'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.' at line 1
-SET @@session.multi_range_count = 4294967295021;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '4294967295021'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@session.multi_range_count = test;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-'#------------------FN_DYNVARS_090_06-----------------------#'
-SELECT @@global.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-@@global.multi_range_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_090_07-----------------------#'
-SELECT @@session.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-@@session.multi_range_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_090_08-----------------------#'
-SET @@global.multi_range_count = TRUE;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = FALSE;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-'#---------------------FN_DYNVARS_090_09----------------------#'
-SET @@global.multi_range_count = 10;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count = @@global.multi_range_count;
-@@multi_range_count = @@global.multi_range_count
-0
-'#---------------------FN_DYNVARS_090_10----------------------#'
-SET @@multi_range_count = 100;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count = @@local.multi_range_count;
-@@multi_range_count = @@local.multi_range_count
-1
-SELECT @@local.multi_range_count = @@session.multi_range_count;
-@@local.multi_range_count = @@session.multi_range_count
-1
-'#---------------------FN_DYNVARS_090_11----------------------#'
-SET multi_range_count = 1;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count;
-@@multi_range_count
-1
-SELECT local.multi_range_count;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.multi_range_count;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT multi_range_count = @@session.multi_range_count;
-ERROR 42S22: Unknown column 'multi_range_count' in 'field list'
-SET @@global.multi_range_count = @start_global_value;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-256
-SET @@session.multi_range_count = @start_session_value;
-Warnings:
-Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-256
diff --git a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_32.result b/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic.result
index ab4f136db6f..ab4f136db6f 100644
--- a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
deleted file mode 100644
index 0cef4de3630..00000000000
--- a/mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result
+++ /dev/null
@@ -1,132 +0,0 @@
-SET @start_global_value = @@global.myisam_max_sort_file_size;
-SELECT @start_global_value;
-@start_global_value
-9223372036853727232
-'#--------------------FN_DYNVARS_094_01-------------------------#'
-SET @@global.myisam_max_sort_file_size = 500000;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '500000'
-SET @@global.myisam_max_sort_file_size = DEFAULT;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-9223372036853727232
-'#--------------------FN_DYNVARS_094_02-------------------------#'
-SET @@global.myisam_max_sort_file_size = DEFAULT;
-SELECT @@global.myisam_max_sort_file_size = 2147483648;
-@@global.myisam_max_sort_file_size = 2147483648
-0
-'#--------------------FN_DYNVARS_094_03-------------------------#'
-SET @@global.myisam_max_sort_file_size = 0;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = 1024;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '1024'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = 123456789;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '123456789'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-122683392
-SET @@global.myisam_max_sort_file_size = 2147483648*2;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-4294967296
-SET @@global.myisam_max_sort_file_size = 2147483648*1024;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-2199023255552
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-2199023255552
-SET @@global.myisam_max_sort_file_size = 2147483648*2147483648;
-'#--------------------FN_DYNVARS_094_04-------------------------#'
-SET @@myisam_max_sort_file_size = 2;
-ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@session.myisam_max_sort_file_size = 3;
-ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.myisam_max_sort_file_size = 4;
-ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
-'#------------------FN_DYNVARS_094_05-----------------------#'
-SET @@global.myisam_max_sort_file_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-1'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = -2147483648;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-2147483648'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = -2147483649;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '-2147483649'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'myisam_max_sort_file_size'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = 2147483649.56;
-ERROR 42000: Incorrect argument type to variable 'myisam_max_sort_file_size'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = 1G;
-ERROR 42000: Incorrect argument type to variable 'myisam_max_sort_file_size'
-'#------------------FN_DYNVARS_094_06-----------------------#'
-SET @@global.myisam_max_sort_file_size = 3000;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '3000'
-SELECT @@global.myisam_max_sort_file_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='myisam_max_sort_file_size';
-@@global.myisam_max_sort_file_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_094_07-----------------------#'
-SELECT count(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='myisam_max_sort_file_size';
-count(VARIABLE_VALUE)
-1
-'#------------------FN_DYNVARS_094_08-----------------------#'
-SET @@global.myisam_max_sort_file_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '1'
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-SET @@global.myisam_max_sort_file_size = FALSE;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-0
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.myisam_max_sort_file_size = 512;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '512'
-SELECT @@myisam_max_sort_file_size = @@global.myisam_max_sort_file_size;
-@@myisam_max_sort_file_size = @@global.myisam_max_sort_file_size
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET myisam_max_sort_file_size = 2048;
-ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT myisam_max_sort_file_size;
-ERROR 42S22: Unknown column 'myisam_max_sort_file_size' in 'field list'
-SELECT @@myisam_max_sort_file_size;
-@@myisam_max_sort_file_size
-0
-SET global myisam_max_sort_file_size = 64;
-Warnings:
-Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '64'
-SET @@global.myisam_max_sort_file_size = @start_global_value;
-SELECT @@global.myisam_max_sort_file_size;
-@@global.myisam_max_sort_file_size
-9223372036853727232
diff --git a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic.result
index 50589c4041c..8ed5277c682 100644
--- a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic.result
@@ -68,32 +68,32 @@ SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = 429496729533;
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@global.myisam_repair_threads = 65530.34;
ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@global.myisam_repair_threads = test;
ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@global.myisam_repair_threads = "test";
ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@global.myisam_repair_threads = 'test';
ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@global.myisam_repair_threads = ON;
ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
-429496729533
+4294967295
SET @@session.myisam_repair_threads = 0;
Warnings:
Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
diff --git a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_32.result b/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_32.result
deleted file mode 100644
index 491f25a3d07..00000000000
--- a/mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_32.result
+++ /dev/null
@@ -1,180 +0,0 @@
-SET @start_global_value = @@global.myisam_repair_threads;
-SELECT @start_global_value;
-@start_global_value
-1
-SET @start_session_value = @@session.myisam_repair_threads;
-SELECT @start_session_value;
-@start_session_value
-1
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.myisam_repair_threads = 100;
-SET @@global.myisam_repair_threads = DEFAULT;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = 200;
-SET @@session.myisam_repair_threads = DEFAULT;
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.myisam_repair_threads = DEFAULT;
-SELECT @@global.myisam_repair_threads = 1;
-@@global.myisam_repair_threads = 1
-1
-SET @@session.myisam_repair_threads = DEFAULT;
-SELECT @@session.myisam_repair_threads = 1;
-@@session.myisam_repair_threads = 1
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.myisam_repair_threads = 1;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@global.myisam_repair_threads = 4294967295;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = 655354;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-655354
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.myisam_repair_threads = 1;
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = 4294967295;
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-4294967295
-SET @@session.myisam_repair_threads = 655345;
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-655345
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.myisam_repair_threads = 0;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@global.myisam_repair_threads = -1024;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '-1024'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@global.myisam_repair_threads = 429496729533;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '429496729533'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = test;
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = "test";
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = 'test';
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@global.myisam_repair_threads = ON;
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-4294967295
-SET @@session.myisam_repair_threads = 0;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = -2;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '-2'
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = test;
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = "test";
-ERROR 42000: Incorrect argument type to variable 'myisam_repair_threads'
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.myisam_repair_threads = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='myisam_repair_threads ';
-@@global.myisam_repair_threads = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.myisam_repair_threads = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='myisam_repair_threads ';
-@@session.myisam_repair_threads = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_08-----------------------#'
-SET @@global.myisam_repair_threads = TRUE;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@global.myisam_repair_threads = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect myisam_repair_threads value: '0'
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.myisam_repair_threads = 10;
-SELECT @@myisam_repair_threads = @@global.myisam_repair_threads ;
-@@myisam_repair_threads = @@global.myisam_repair_threads
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@myisam_repair_threads = 100;
-SELECT @@myisam_repair_threads = @@local.myisam_repair_threads ;
-@@myisam_repair_threads = @@local.myisam_repair_threads
-1
-SELECT @@local.myisam_repair_threads = @@session.myisam_repair_threads ;
-@@local.myisam_repair_threads = @@session.myisam_repair_threads
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET myisam_repair_threads = 1;
-SELECT @@myisam_repair_threads ;
-@@myisam_repair_threads
-1
-SELECT local.myisam_repair_threads ;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.myisam_repair_threads ;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT myisam_repair_threads = @@session.myisam_repair_threads ;
-ERROR 42S22: Unknown column 'myisam_repair_threads' in 'field list'
-SET @@global.myisam_repair_threads = @start_global_value;
-SELECT @@global.myisam_repair_threads ;
-@@global.myisam_repair_threads
-1
-SET @@session.myisam_repair_threads = @start_session_value;
-SELECT @@session.myisam_repair_threads ;
-@@session.myisam_repair_threads
-1
diff --git a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
index e6be3c28251..85482be9ad4 100644
--- a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
@@ -76,32 +76,32 @@ SELECT @@global.myisam_sort_buffer_size ;
SET @@global.myisam_sort_buffer_size = 429496729533;
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@global.myisam_sort_buffer_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@global.myisam_sort_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@global.myisam_sort_buffer_size = "test";
ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@global.myisam_sort_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@global.myisam_sort_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
-429496729533
+4294967295
SET @@session.myisam_sort_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
diff --git a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
deleted file mode 100644
index b9ecef3e8cc..00000000000
--- a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
+++ /dev/null
@@ -1,196 +0,0 @@
-SET @start_global_value = @@global.myisam_sort_buffer_size ;
-SELECT @start_global_value;
-@start_global_value
-8388608
-SET @start_session_value = @@session.myisam_sort_buffer_size ;
-SELECT @start_session_value;
-@start_session_value
-8388608
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.myisam_sort_buffer_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '100'
-SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-8388608
-SET @@session.myisam_sort_buffer_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '200'
-SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-8388608
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.myisam_sort_buffer_size = DEFAULT;
-SELECT @@global.myisam_sort_buffer_size = 8388608;
-@@global.myisam_sort_buffer_size = 8388608
-1
-SET @@session.myisam_sort_buffer_size = DEFAULT;
-SELECT @@session.myisam_sort_buffer_size = 8388608;
-@@session.myisam_sort_buffer_size = 8388608
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.myisam_sort_buffer_size = 4;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4096
-SET @@global.myisam_sort_buffer_size = 4294967295;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = 655354;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-655354
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.myisam_sort_buffer_size = 4;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-SET @@session.myisam_sort_buffer_size = 4294967295;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4294967295
-SET @@session.myisam_sort_buffer_size = 655345;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-655345
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.myisam_sort_buffer_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4096
-SET @@global.myisam_sort_buffer_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-1024'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4096
-SET @@global.myisam_sort_buffer_size = 429496729533;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '429496729533'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = "test";
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@global.myisam_sort_buffer_size = ON;
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4294967295
-SET @@session.myisam_sort_buffer_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-SET @@session.myisam_sort_buffer_size = -2;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-2'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-SET @@session.myisam_sort_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-SET @@session.myisam_sort_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-SET @@session.myisam_sort_buffer_size = "test";
-ERROR 42000: Incorrect argument type to variable 'myisam_sort_buffer_size'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4096
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.myisam_sort_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='myisam_sort_buffer_size ';
-@@global.myisam_sort_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.myisam_sort_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='myisam_sort_buffer_size ';
-@@session.myisam_sort_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_08-----------------------#'
-SET @@global.myisam_sort_buffer_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '1'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4096
-SET @@global.myisam_sort_buffer_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4096
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.myisam_sort_buffer_size = 10;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '10'
-SELECT @@myisam_sort_buffer_size = @@global.myisam_sort_buffer_size ;
-@@myisam_sort_buffer_size = @@global.myisam_sort_buffer_size
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@myisam_sort_buffer_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '100'
-SELECT @@myisam_sort_buffer_size = @@local.myisam_sort_buffer_size ;
-@@myisam_sort_buffer_size = @@local.myisam_sort_buffer_size
-1
-SELECT @@local.myisam_sort_buffer_size = @@session.myisam_sort_buffer_size ;
-@@local.myisam_sort_buffer_size = @@session.myisam_sort_buffer_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET myisam_sort_buffer_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '1'
-SELECT @@myisam_sort_buffer_size ;
-@@myisam_sort_buffer_size
-4096
-SELECT local.myisam_sort_buffer_size ;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.myisam_sort_buffer_size ;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT myisam_sort_buffer_size = @@session.myisam_sort_buffer_size ;
-ERROR 42S22: Unknown column 'myisam_sort_buffer_size' in 'field list'
-SET @@global.myisam_sort_buffer_size = @start_global_value;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-8388608
-SET @@session.myisam_sort_buffer_size = @start_session_value;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-8388608
diff --git a/mysql-test/suite/sys_vars/r/net_retry_count_basic_32.result b/mysql-test/suite/sys_vars/r/net_retry_count_basic.result
index 46eb9d5e1c0..46eb9d5e1c0 100644
--- a/mysql-test/suite/sys_vars/r/net_retry_count_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/net_retry_count_basic.result
diff --git a/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result b/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
deleted file mode 100644
index 46eb9d5e1c0..00000000000
--- a/mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result
+++ /dev/null
@@ -1,191 +0,0 @@
-SET @start_global_value = @@global.net_retry_count;
-SELECT @start_global_value;
-@start_global_value
-10
-SET @start_session_value = @@session.net_retry_count;
-SELECT @start_session_value;
-@start_session_value
-10
-'#--------------------FN_DYNVARS_111_01-------------------------#'
-SET @@global.net_retry_count = 100;
-SET @@global.net_retry_count = DEFAULT;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-10
-SET @@session.net_retry_count = 200;
-SET @@session.net_retry_count = DEFAULT;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-10
-'#--------------------FN_DYNVARS_111_02-------------------------#'
-SET @@global.net_retry_count = DEFAULT;
-SELECT @@global.net_retry_count = 10;
-@@global.net_retry_count = 10
-1
-SET @@session.net_retry_count = DEFAULT;
-SELECT @@session.net_retry_count = 10;
-@@session.net_retry_count = 10
-1
-'#--------------------FN_DYNVARS_111_03-------------------------#'
-SET @@global.net_retry_count = 1;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-1
-SET @@global.net_retry_count = 2;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-2
-SET @@global.net_retry_count = 4294967295;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967295
-SET @@global.net_retry_count = 4294967294;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967294
-SET @@global.net_retry_count = 65536;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-65536
-'#--------------------FN_DYNVARS_111_04-------------------------#'
-SET @@session.net_retry_count = 1;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-1
-SET @@session.net_retry_count = 2;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-2
-SET @@session.net_retry_count = 65535;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-65535
-SET @@session.net_retry_count = 4294967295;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-4294967295
-SET @@session.net_retry_count = 4294967294;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-4294967294
-'#------------------FN_DYNVARS_111_05-----------------------#'
-SET @@global.net_retry_count = 0;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '0'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-1
-SET @@global.net_retry_count = -1024;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '-1024'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-1
-SET @@global.net_retry_count = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '4294967296'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967295
-SET @@global.net_retry_count = 429496729500;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '429496729500'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967295
-SET @@global.net_retry_count = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'net_retry_count'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967295
-SET @@global.net_retry_count = test;
-ERROR 42000: Incorrect argument type to variable 'net_retry_count'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-4294967295
-SET @@session.net_retry_count = 0;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '0'
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-1
-SET @@session.net_retry_count = -2;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '-2'
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-1
-SET @@session.net_retry_count = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'net_retry_count'
-SET @@session.net_retry_count = 6555015425;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '6555015425'
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-4294967295
-SET @@session.net_retry_count = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '4294967296'
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-4294967295
-SET @@session.net_retry_count = test;
-ERROR 42000: Incorrect argument type to variable 'net_retry_count'
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-4294967295
-'#------------------FN_DYNVARS_111_06-----------------------#'
-SELECT @@global.net_retry_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='net_retry_count';
-@@global.net_retry_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_111_07-----------------------#'
-SELECT @@session.net_retry_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='net_retry_count';
-@@session.net_retry_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_111_08-----------------------#'
-SET @@global.net_retry_count = TRUE;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-1
-SET @@global.net_retry_count = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect net_retry_count value: '0'
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-1
-'#---------------------FN_DYNVARS_111_09----------------------#'
-SET @@global.net_retry_count = 10;
-SELECT @@net_retry_count = @@global.net_retry_count;
-@@net_retry_count = @@global.net_retry_count
-0
-'#---------------------FN_DYNVARS_111_10----------------------#'
-SET @@net_retry_count = 100;
-SELECT @@net_retry_count = @@local.net_retry_count;
-@@net_retry_count = @@local.net_retry_count
-1
-SELECT @@local.net_retry_count = @@session.net_retry_count;
-@@local.net_retry_count = @@session.net_retry_count
-1
-'#---------------------FN_DYNVARS_111_11----------------------#'
-SET net_retry_count = 1;
-SELECT @@net_retry_count;
-@@net_retry_count
-1
-SELECT local.net_retry_count;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.net_retry_count;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT net_retry_count = @@session.net_retry_count;
-ERROR 42S22: Unknown column 'net_retry_count' in 'field list'
-SET @@global.net_retry_count = @start_global_value;
-SELECT @@global.net_retry_count;
-@@global.net_retry_count
-10
-SET @@session.net_retry_count = @start_session_value;
-SELECT @@session.net_retry_count;
-@@session.net_retry_count
-10
diff --git a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic.result
index eb6851baa93..eb6851baa93 100644
--- a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
deleted file mode 100644
index eb6851baa93..00000000000
--- a/mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result
+++ /dev/null
@@ -1,184 +0,0 @@
-SET @start_global_value = @@global.query_alloc_block_size;
-SELECT @start_global_value;
-@start_global_value
-8192
-SET @start_session_value = @@session.query_alloc_block_size;
-SELECT @start_session_value;
-@start_session_value
-8192
-'#--------------------FN_DYNVARS_130_01-------------------------#'
-SET @@global.query_alloc_block_size = 10000;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '10000'
-SET @@global.query_alloc_block_size = DEFAULT;
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-8192
-SET @@session.query_alloc_block_size = 20000;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '20000'
-SET @@session.query_alloc_block_size = DEFAULT;
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-8192
-'#--------------------FN_DYNVARS_130_02-------------------------#'
-SET @@global.query_alloc_block_size = DEFAULT;
-SELECT @@global.query_alloc_block_size = 8192;
-@@global.query_alloc_block_size = 8192
-1
-SET @@session.query_alloc_block_size = DEFAULT;
-SELECT @@session.query_alloc_block_size = 8192;
-@@session.query_alloc_block_size = 8192
-1
-'#--------------------FN_DYNVARS_130_03-------------------------#'
-SET @@global.query_alloc_block_size = 1024;
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = 1025;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1025'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = 65536;
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-65536
-'#--------------------FN_DYNVARS_130_04-------------------------#'
-SET @@session.query_alloc_block_size = 1024;
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = 1025;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1025'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = 655536;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '655536'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-655360
-'#------------------FN_DYNVARS_130_05-----------------------#'
-SET @@global.query_alloc_block_size = 64;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '64'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '-1'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = 1023;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1023'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'query_alloc_block_size'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = test;
-ERROR 42000: Incorrect argument type to variable 'query_alloc_block_size'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = 64;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '64'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = -2;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '-2'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'query_alloc_block_size'
-SET @@session.query_alloc_block_size = 1023;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1023'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-SET @@session.query_alloc_block_size = test;
-ERROR 42000: Incorrect argument type to variable 'query_alloc_block_size'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-1024
-'#------------------FN_DYNVARS_130_06-----------------------#'
-SET @@global.query_alloc_block_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1'
-SET @@session.query_alloc_block_size = 12;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '12'
-SELECT @@global.query_alloc_block_size =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='query_alloc_block_size';
-@@global.query_alloc_block_size =
-VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_130_07-----------------------#'
-SELECT @@session.query_alloc_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='query_alloc_block_size';
-@@session.query_alloc_block_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_130_08-----------------------#'
-SET @@global.query_alloc_block_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '1'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-SET @@global.query_alloc_block_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '0'
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-1024
-'#---------------------FN_DYNVARS_130_09----------------------#'
-SET @@global.query_alloc_block_size = 2048;
-SELECT @@query_alloc_block_size = @@global.query_alloc_block_size;
-@@query_alloc_block_size = @@global.query_alloc_block_size
-0
-'#---------------------FN_DYNVARS_130_10----------------------#'
-SET @@query_alloc_block_size = 5000;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '5000'
-SELECT @@query_alloc_block_size = @@local.query_alloc_block_size;
-@@query_alloc_block_size = @@local.query_alloc_block_size
-1
-SELECT @@local.query_alloc_block_size = @@session.query_alloc_block_size;
-@@local.query_alloc_block_size = @@session.query_alloc_block_size
-1
-'#---------------------FN_DYNVARS_130_11----------------------#'
-SET query_alloc_block_size = 1024;
-SELECT @@query_alloc_block_size;
-@@query_alloc_block_size
-1024
-SELECT local.query_alloc_block_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.query_alloc_block_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT query_alloc_block_size = @@session.query_alloc_block_size;
-ERROR 42S22: Unknown column 'query_alloc_block_size' in 'field list'
-SET @@global.query_alloc_block_size = @start_global_value;
-SELECT @@global.query_alloc_block_size;
-@@global.query_alloc_block_size
-8192
-SET @@session.query_alloc_block_size = @start_session_value;
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-8192
diff --git a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_32.result b/mysql-test/suite/sys_vars/r/query_cache_limit_basic.result
index 892bc306bcb..892bc306bcb 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_limit_basic.result
diff --git a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
deleted file mode 100644
index 892bc306bcb..00000000000
--- a/mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result
+++ /dev/null
@@ -1,129 +0,0 @@
-SET @start_value = @@global.query_cache_limit;
-SELECT @start_value;
-@start_value
-1048576
-'#--------------------FN_DYNVARS_131_01------------------------#'
-SET @@global.query_cache_limit = 99;
-SET @@global.query_cache_limit = DEFAULT;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1048576
-'#---------------------FN_DYNVARS_131_02-------------------------#'
-SET @@global.query_cache_limit = @start_value;
-SELECT @@global.query_cache_limit = 1048576;
-@@global.query_cache_limit = 1048576
-1
-'#--------------------FN_DYNVARS_131_03------------------------#'
-SET @@global.query_cache_limit = 0;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-0
-SET @@global.query_cache_limit = 1;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1
-SET @@global.query_cache_limit = 1048576;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1048576
-SET @@global.query_cache_limit = 1048575;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1048575
-'#--------------------FN_DYNVARS_131_04-------------------------#'
-SET @@global.query_cache_limit = -1;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_limit value: '-1'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-0
-SET @@global.query_cache_limit = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_limit value: '4294967296'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-SET @@global.query_cache_limit = 10240022115;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_limit value: '10240022115'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-SET @@global.query_cache_limit = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'query_cache_limit'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-SET @@global.query_cache_limit = -1024;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_limit value: '-1024'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-0
-SET @@global.query_cache_limit = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_limit value: '42949672950'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-SET @@global.query_cache_limit = ON;
-ERROR 42000: Incorrect argument type to variable 'query_cache_limit'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-SET @@global.query_cache_limit = 'test';
-ERROR 42000: Incorrect argument type to variable 'query_cache_limit'
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-4294967295
-'#-------------------FN_DYNVARS_131_05----------------------------#'
-SET @@session.query_cache_limit = 0;
-ERROR HY000: Variable 'query_cache_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_limit;
-@@query_cache_limit
-4294967295
-'#----------------------FN_DYNVARS_131_06------------------------#'
-SELECT @@global.query_cache_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='query_cache_limit';
-@@global.query_cache_limit = VARIABLE_VALUE
-1
-SELECT @@query_cache_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='query_cache_limit';
-@@query_cache_limit = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_131_07----------------------#'
-SET @@global.query_cache_limit = TRUE;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1
-SET @@global.query_cache_limit = FALSE;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-0
-'#---------------------FN_DYNVARS_131_08----------------------#'
-SET @@global.query_cache_limit = 1;
-SELECT @@query_cache_limit = @@global.query_cache_limit;
-@@query_cache_limit = @@global.query_cache_limit
-1
-'#---------------------FN_DYNVARS_131_09----------------------#'
-SET query_cache_limit = 1;
-ERROR HY000: Variable 'query_cache_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_limit;
-@@query_cache_limit
-1
-SET local.query_cache_limit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_limit = 1' at line 1
-SELECT local.query_cache_limit;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.query_cache_limit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_limit = 1' at line 1
-SELECT global.query_cache_limit;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT query_cache_limit = @@session.query_cache_limit;
-ERROR 42S22: Unknown column 'query_cache_limit' in 'field list'
-SET @@global.query_cache_limit = @start_value;
-SELECT @@global.query_cache_limit;
-@@global.query_cache_limit
-1048576
diff --git a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic.result
index f02232d4d39..bc93f966376 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic.result
@@ -4,6 +4,8 @@ SELECT @start_value;
4096
'#--------------------FN_DYNVARS_132_01------------------------#'
SET @@global.query_cache_min_res_unit = 99;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '99'
SET @@global.query_cache_min_res_unit = DEFAULT;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
@@ -19,6 +21,8 @@ SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
SET @@global.query_cache_min_res_unit = 1;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
@@ -27,17 +31,21 @@ SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
SET @@global.query_cache_min_res_unit = 513;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '513'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-520
+512
SET @@global.query_cache_min_res_unit = 1048576;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
1048576
SET @@global.query_cache_min_res_unit = 1048575;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1048575'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-1048576
+1048568
'#--------------------FN_DYNVARS_132_04-------------------------#'
SET @@global.query_cache_min_res_unit = -1;
Warnings:
@@ -50,8 +58,10 @@ Warnings:
Warning 1292 Truncated incorrect query_cache_min_res_unit value: '4294967296'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-4294967296
+4294967288
SET @@global.query_cache_min_res_unit = 511;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '511'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
@@ -71,23 +81,23 @@ Warnings:
Warning 1292 Truncated incorrect query_cache_min_res_unit value: '42949672950'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-4294967296
+4294967288
SET @@global.query_cache_min_res_unit = ON;
ERROR 42000: Incorrect argument type to variable 'query_cache_min_res_unit'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-4294967296
+4294967288
SET @@global.query_cache_min_res_unit = 'test';
ERROR 42000: Incorrect argument type to variable 'query_cache_min_res_unit'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
-4294967296
+4294967288
'#-------------------FN_DYNVARS_132_05----------------------------#'
SET @@session.query_cache_min_res_unit = 0;
ERROR HY000: Variable 'query_cache_min_res_unit' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@query_cache_min_res_unit;
@@query_cache_min_res_unit
-4294967296
+4294967288
'#----------------------FN_DYNVARS_132_06------------------------#'
SELECT @@global.query_cache_min_res_unit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -101,6 +111,8 @@ WHERE VARIABLE_NAME='query_cache_min_res_unit';
1
'#---------------------FN_DYNVARS_132_07----------------------#'
SET @@global.query_cache_min_res_unit = TRUE;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1'
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
@@ -110,6 +122,8 @@ SELECT @@global.query_cache_min_res_unit;
512
'#---------------------FN_DYNVARS_132_08----------------------#'
SET @@global.query_cache_min_res_unit = 1;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1'
SELECT @@query_cache_min_res_unit = @@global.query_cache_min_res_unit;
@@query_cache_min_res_unit = @@global.query_cache_min_res_unit
1
diff --git a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result b/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result
deleted file mode 100644
index 3d2c02c48fc..00000000000
--- a/mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result
+++ /dev/null
@@ -1,135 +0,0 @@
-SET @start_value = @@global.query_cache_min_res_unit;
-SELECT @start_value;
-@start_value
-4096
-'#--------------------FN_DYNVARS_132_01------------------------#'
-SET @@global.query_cache_min_res_unit = 99;
-SET @@global.query_cache_min_res_unit = DEFAULT;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-4096
-'#---------------------FN_DYNVARS_132_02-------------------------#'
-SET @@global.query_cache_min_res_unit = @start_value;
-SELECT @@global.query_cache_min_res_unit = 4096;
-@@global.query_cache_min_res_unit = 4096
-1
-'#--------------------FN_DYNVARS_132_03------------------------#'
-SET @@global.query_cache_min_res_unit = 0;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 1;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 512;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 513;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-520
-SET @@global.query_cache_min_res_unit = 1048576;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-1048576
-SET @@global.query_cache_min_res_unit = 1048575;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-1048576
-'#--------------------FN_DYNVARS_132_04-------------------------#'
-SET @@global.query_cache_min_res_unit = -1;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '-1'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '4294967296'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-0
-SET @@global.query_cache_min_res_unit = 511;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'query_cache_min_res_unit'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = -1024;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '-1024'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = 42949672950;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '42949672950'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-0
-SET @@global.query_cache_min_res_unit = ON;
-ERROR 42000: Incorrect argument type to variable 'query_cache_min_res_unit'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-0
-SET @@global.query_cache_min_res_unit = 'test';
-ERROR 42000: Incorrect argument type to variable 'query_cache_min_res_unit'
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-0
-'#-------------------FN_DYNVARS_132_05----------------------------#'
-SET @@session.query_cache_min_res_unit = 0;
-ERROR HY000: Variable 'query_cache_min_res_unit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_min_res_unit;
-@@query_cache_min_res_unit
-0
-'#----------------------FN_DYNVARS_132_06------------------------#'
-SELECT @@global.query_cache_min_res_unit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='query_cache_min_res_unit';
-@@global.query_cache_min_res_unit = VARIABLE_VALUE
-1
-SELECT @@query_cache_min_res_unit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='query_cache_min_res_unit';
-@@query_cache_min_res_unit = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_132_07----------------------#'
-SET @@global.query_cache_min_res_unit = TRUE;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-SET @@global.query_cache_min_res_unit = FALSE;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-512
-'#---------------------FN_DYNVARS_132_08----------------------#'
-SET @@global.query_cache_min_res_unit = 1;
-SELECT @@query_cache_min_res_unit = @@global.query_cache_min_res_unit;
-@@query_cache_min_res_unit = @@global.query_cache_min_res_unit
-1
-'#---------------------FN_DYNVARS_132_09----------------------#'
-SET query_cache_min_res_unit = 1;
-ERROR HY000: Variable 'query_cache_min_res_unit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_min_res_unit;
-@@query_cache_min_res_unit
-512
-SET local.query_cache_min_res_unit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_min_res_unit = 1' at line 1
-SELECT local.query_cache_min_res_unit;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.query_cache_min_res_unit = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_min_res_unit = 1' at line 1
-SELECT global.query_cache_min_res_unit;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT query_cache_min_res_unit = @@session.query_cache_min_res_unit;
-ERROR 42S22: Unknown column 'query_cache_min_res_unit' in 'field list'
-SET @@global.query_cache_min_res_unit = @start_value;
-SELECT @@global.query_cache_min_res_unit;
-@@global.query_cache_min_res_unit
-4096
diff --git a/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result b/mysql-test/suite/sys_vars/r/query_cache_size_basic.result
index 319948deefa..319948deefa 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
deleted file mode 100644
index 319948deefa..00000000000
--- a/mysql-test/suite/sys_vars/r/query_cache_size_basic_64.result
+++ /dev/null
@@ -1,133 +0,0 @@
-SET @start_value = @@global.query_cache_size;
-'#--------------------FN_DYNVARS_133_01------------------------#'
-SET @@global.query_cache_size = 99;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '99'
-SET @@global.query_cache_size = DEFAULT;
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-'#---------------------FN_DYNVARS_133_02-------------------------#'
-SET @@global.query_cache_size = @start_value;
-SELECT @@global.query_cache_size = @start_value;
-@@global.query_cache_size = @start_value
-1
-'#--------------------FN_DYNVARS_133_03------------------------#'
-SET @@global.query_cache_size = 0;
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 512;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '512'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 1024;
-Warnings:
-Warning 1282 Query cache failed to set size 1024; new query cache size is 0
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 1048576;
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-1048576
-SET @@global.query_cache_size = 1048575;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1048575'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-1047552
-'#--------------------FN_DYNVARS_133_04-------------------------#'
-SET @@global.query_cache_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '-1'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 511;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '511'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'query_cache_size'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '-1024'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = ON;
-ERROR 42000: Incorrect argument type to variable 'query_cache_size'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'query_cache_size'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-'#-------------------FN_DYNVARS_133_05----------------------------#'
-SET @@session.query_cache_size = 0;
-ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_size;
-@@query_cache_size
-0
-'#----------------------FN_DYNVARS_133_06------------------------#'
-SELECT @@global.query_cache_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='query_cache_size';
-@@global.query_cache_size = VARIABLE_VALUE
-1
-SELECT @@query_cache_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='query_cache_size';
-@@query_cache_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_133_07----------------------#'
-SET @@global.query_cache_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1'
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-SET @@global.query_cache_size = FALSE;
-SELECT @@global.query_cache_size;
-@@global.query_cache_size
-0
-'#---------------------FN_DYNVARS_133_08----------------------#'
-SET @@global.query_cache_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1'
-SELECT @@query_cache_size = @@global.query_cache_size;
-@@query_cache_size = @@global.query_cache_size
-1
-'#---------------------FN_DYNVARS_133_09----------------------#'
-SET query_cache_size = 1;
-ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@query_cache_size;
-@@query_cache_size
-0
-SET local.query_cache_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_size = 1' at line 1
-SELECT local.query_cache_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.query_cache_size = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_size = 1' at line 1
-SELECT global.query_cache_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT query_cache_size = @@session.query_cache_size;
-ERROR 42S22: Unknown column 'query_cache_size' in 'field list'
-SET @@global.query_cache_size = @start_value;
diff --git a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic.result
index 26b32b56e57..26b32b56e57 100644
--- a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
deleted file mode 100644
index 26b32b56e57..00000000000
--- a/mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result
+++ /dev/null
@@ -1,187 +0,0 @@
-SET @start_global_value = @@global.range_alloc_block_size;
-SELECT @start_global_value;
-@start_global_value
-4096
-SET @start_session_value = @@session.range_alloc_block_size;
-SELECT @start_session_value;
-@start_session_value
-4096
-'#--------------------FN_DYNVARS_137_01-------------------------#'
-SET @@global.range_alloc_block_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '100'
-SET @@global.range_alloc_block_size = DEFAULT;
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@session.range_alloc_block_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '200'
-SET @@session.range_alloc_block_size = DEFAULT;
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4096
-'#--------------------FN_DYNVARS_137_02-------------------------#'
-SET @@global.range_alloc_block_size = DEFAULT;
-SELECT @@global.range_alloc_block_size = 2048;
-@@global.range_alloc_block_size = 2048
-0
-SET @@session.range_alloc_block_size = DEFAULT;
-SELECT @@session.range_alloc_block_size = 2048;
-@@session.range_alloc_block_size = 2048
-0
-'#--------------------FN_DYNVARS_137_03-------------------------#'
-SET @@global.range_alloc_block_size = 2048;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '2048'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@global.range_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967295'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4294966272
-SET @@global.range_alloc_block_size = 4294967294;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967294'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4294966272
-'#--------------------FN_DYNVARS_137_04-------------------------#'
-SET @@session.range_alloc_block_size = 2048;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '2048'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4096
-SET @@session.range_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967295'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4294966272
-SET @@session.range_alloc_block_size = 4294967294;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967294'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4294966272
-'#------------------FN_DYNVARS_137_05-----------------------#'
-SET @@global.range_alloc_block_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '0'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@global.range_alloc_block_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '-1024'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@global.range_alloc_block_size = 42949672951;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '42949672951'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4294966272
-SET @@global.range_alloc_block_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4294966272
-SET @@global.range_alloc_block_size = test;
-ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4294966272
-SET @@session.range_alloc_block_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '0'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4096
-SET @@session.range_alloc_block_size = -2;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '-2'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4096
-SET @@session.range_alloc_block_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
-SET @@session.range_alloc_block_size = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967296'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4294966272
-SET @@session.range_alloc_block_size = test;
-ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4294966272
-'#------------------FN_DYNVARS_137_06-----------------------#'
-SELECT @@global.range_alloc_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='range_alloc_block_size';
-@@global.range_alloc_block_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_137_07-----------------------#'
-SELECT @@session.range_alloc_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='range_alloc_block_size';
-@@session.range_alloc_block_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_137_08-----------------------#'
-SET @@global.range_alloc_block_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '1'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@global.range_alloc_block_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '0'
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-'#---------------------FN_DYNVARS_137_09----------------------#'
-SET @@global.range_alloc_block_size = 10;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '10'
-SELECT @@range_alloc_block_size = @@global.range_alloc_block_size;
-@@range_alloc_block_size = @@global.range_alloc_block_size
-0
-'#---------------------FN_DYNVARS_137_10----------------------#'
-SET @@range_alloc_block_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '100'
-SELECT @@range_alloc_block_size = @@local.range_alloc_block_size;
-@@range_alloc_block_size = @@local.range_alloc_block_size
-1
-SELECT @@local.range_alloc_block_size = @@session.range_alloc_block_size;
-@@local.range_alloc_block_size = @@session.range_alloc_block_size
-1
-'#---------------------FN_DYNVARS_137_11----------------------#'
-SET range_alloc_block_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect range_alloc_block_size value: '1'
-SELECT @@range_alloc_block_size;
-@@range_alloc_block_size
-4096
-SELECT local.range_alloc_block_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.range_alloc_block_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT range_alloc_block_size = @@session.range_alloc_block_size;
-ERROR 42S22: Unknown column 'range_alloc_block_size' in 'field list'
-SET @@global.range_alloc_block_size = @start_global_value;
-SELECT @@global.range_alloc_block_size;
-@@global.range_alloc_block_size
-4096
-SET @@session.range_alloc_block_size = @start_session_value;
-SELECT @@session.range_alloc_block_size;
-@@session.range_alloc_block_size
-4096
diff --git a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result
index 5b685ae3706..af61d40e84e 100644
--- a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result
@@ -32,26 +32,17 @@ SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
123456789
SET @@global.rpl_recovery_rank = 2147483648*2;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
-4294967296
+4294967295
SET @@global.rpl_recovery_rank = 2147483648*1024;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
-2199023255552
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-2199023255552
+4294967295
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
-4611686018427387904
+4294967295
'#--------------------FN_DYNVARS_142_03-------------------------#'
SET @@rpl_recovery_rank = 2;
ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result
deleted file mode 100644
index b3572eda3c7..00000000000
--- a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result
+++ /dev/null
@@ -1,144 +0,0 @@
-SET @start_global_value = @@global.rpl_recovery_rank;
-SELECT @start_global_value;
-@start_global_value
-0
-'#--------------------FN_DYNVARS_142_01-------------------------#'
-SET @@global.rpl_recovery_rank = 500000;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SET @@global.rpl_recovery_rank = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-'#--------------------FN_DYNVARS_142_02-------------------------#'
-SET @@global.rpl_recovery_rank = 0;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-SET @@global.rpl_recovery_rank = 1024;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-1024
-SET @@global.rpl_recovery_rank = 123456789;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-123456789
-SET @@global.rpl_recovery_rank = 2147483648*2;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '4294967296'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-4294967295
-SET @@global.rpl_recovery_rank = 2147483648*1024;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '2199023255552'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-4294967295
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-4294967295
-SET @@global.rpl_recovery_rank = 2147483648*2147483648;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '4611686018427387904'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-4294967295
-'#--------------------FN_DYNVARS_142_03-------------------------#'
-SET @@rpl_recovery_rank = 2;
-ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@session.rpl_recovery_rank = 3;
-ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.rpl_recovery_rank = 4;
-ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
-'#------------------FN_DYNVARS_142_04-----------------------#'
-SET @@global.rpl_recovery_rank = -1;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-SET @@global.rpl_recovery_rank = -2147483648;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-SET @@global.rpl_recovery_rank = -2147483649;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-SET @@global.rpl_recovery_rank = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
-SET @@global.rpl_recovery_rank = 2147483649.56;
-ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
-SET @@global.rpl_recovery_rank = 1G;
-ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
-'#------------------FN_DYNVARS_142_05-----------------------#'
-SET @@global.rpl_recovery_rank = 3000;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='rpl_recovery_rank';
-@@global.rpl_recovery_rank = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_142_06-----------------------#'
-SELECT count(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='rpl_recovery_rank';
-count(VARIABLE_VALUE)
-1
-'#------------------FN_DYNVARS_142_07-----------------------#'
-SET @@global.rpl_recovery_rank = TRUE;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-1
-SET @@global.rpl_recovery_rank = FALSE;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
-'#---------------------FN_DYNVARS_001_08----------------------#'
-SET @@global.rpl_recovery_rank = 512;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
-@@rpl_recovery_rank = @@global.rpl_recovery_rank
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET rpl_recovery_rank = 2048;
-ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT rpl_recovery_rank;
-ERROR 42S22: Unknown column 'rpl_recovery_rank' in 'field list'
-SELECT @@rpl_recovery_rank;
-@@rpl_recovery_rank
-512
-SET global rpl_recovery_rank = 64;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SET @@global.rpl_recovery_rank = @start_global_value;
-Warnings:
-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
-SELECT @@global.rpl_recovery_rank;
-@@global.rpl_recovery_rank
-0
diff --git a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_32.result b/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic.result
index 86a760a5386..86a760a5386 100644
--- a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic.result
diff --git a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result b/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result
deleted file mode 100644
index 86a760a5386..00000000000
--- a/mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result
+++ /dev/null
@@ -1,120 +0,0 @@
-SET @start_global_value = @@global.slave_transaction_retries;
-SELECT @start_global_value;
-@start_global_value
-10
-'#--------------------FN_DYNVARS_149_01-------------------------#'
-SET @@global.slave_transaction_retries = 50;
-SET @@global.slave_transaction_retries = DEFAULT;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-10
-'#--------------------FN_DYNVARS_149_02-------------------------#'
-SET @@global.slave_transaction_retries = DEFAULT;
-SELECT @@global.slave_transaction_retries = 10;
-@@global.slave_transaction_retries = 10
-1
-'#--------------------FN_DYNVARS_149_03-------------------------#'
-SET @@global.slave_transaction_retries = 0;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-0
-SET @@global.slave_transaction_retries = 1;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-1
-SET @@global.slave_transaction_retries = 15;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-15
-SET @@global.slave_transaction_retries = 1024;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-1024
-SET @@global.slave_transaction_retries = 2147483648;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-2147483648
-SET @@global.slave_transaction_retries = 2147483648*2-1;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-4294967295
-SET @@global.slave_transaction_retries = 2147483649*2;
-Warnings:
-Warning 1292 Truncated incorrect slave_transaction_retries value: '4294967298'
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-4294967295
-SET @@global.slave_transaction_retries = 4294967295;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-4294967295
-'#--------------------FN_DYNVARS_149_04-------------------------#'
-SET @@slave_transaction_retries = 2;
-ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@session.slave_transaction_retries = 3;
-ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.slave_transaction_retries = 4;
-ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
-'#------------------FN_DYNVARS_149_05-----------------------#'
-SET @@global.slave_transaction_retries = -1;
-Warnings:
-Warning 1292 Truncated incorrect slave_transaction_retries value: '-1'
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-0
-SET @@global.slave_transaction_retries = 2147483649*2147483649;
-Warnings:
-Warning 1292 Truncated incorrect slave_transaction_retries value: '4611686022722355201'
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-4294967295
-SET @@global.slave_transaction_retries = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'slave_transaction_retries'
-SET @@global.slave_transaction_retries = '100';
-ERROR 42000: Incorrect argument type to variable 'slave_transaction_retries'
-SET @@global.slave_transaction_retries = 7483649.56;
-ERROR 42000: Incorrect argument type to variable 'slave_transaction_retries'
-SET @@global.slave_transaction_retries = ON;
-ERROR 42000: Incorrect argument type to variable 'slave_transaction_retries'
-SET @@global.slave_transaction_retries = OFF;
-ERROR 42000: Incorrect argument type to variable 'slave_transaction_retries'
-'#------------------FN_DYNVARS_149_06-----------------------#'
-SET @@global.slave_transaction_retries = 3000;
-SELECT @@global.slave_transaction_retries = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='slave_transaction_retries';
-@@global.slave_transaction_retries = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_149_07-----------------------#'
-SELECT count(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='slave_transaction_retries';
-count(VARIABLE_VALUE)
-1
-'#------------------FN_DYNVARS_149_08-----------------------#'
-SET @@global.slave_transaction_retries = TRUE;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-1
-SET @@global.slave_transaction_retries = FALSE;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-0
-'#---------------------FN_DYNVARS_149_09----------------------#'
-SET @@global.slave_transaction_retries = 60*60;
-SELECT @@slave_transaction_retries = @@global.slave_transaction_retries;
-@@slave_transaction_retries = @@global.slave_transaction_retries
-1
-'#---------------------FN_DYNVARS_149_10----------------------#'
-SET slave_transaction_retries = 2048;
-ERROR HY000: Variable 'slave_transaction_retries' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT slave_transaction_retries;
-ERROR 42S22: Unknown column 'slave_transaction_retries' in 'field list'
-SELECT @@slave_transaction_retries;
-@@slave_transaction_retries
-3600
-SET global slave_transaction_retries = 99;
-SET @@global.slave_transaction_retries = @start_global_value;
-SELECT @@global.slave_transaction_retries;
-@@global.slave_transaction_retries
-10
diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic.result
index b492a343a9b..b492a343a9b 100644
--- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result
deleted file mode 100644
index b492a343a9b..00000000000
--- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result
+++ /dev/null
@@ -1,140 +0,0 @@
-SET @start_global_value = @@global.sort_buffer_size;
-SET @start_session_value = @@session.sort_buffer_size;
-'#--------------------FN_DYNVARS_151_01-------------------------#'
-SET @@global.sort_buffer_size = 1000;
-SET @@global.sort_buffer_size = DEFAULT;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-2097152
-SET @@session.sort_buffer_size = 2000;
-SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-2097152
-'#--------------------FN_DYNVARS_151_02-------------------------#'
-SET @@global.sort_buffer_size = DEFAULT;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-2097152
-SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-2097152
-'#--------------------FN_DYNVARS_151_03-------------------------#'
-SET @@global.sort_buffer_size = 32776;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-32776
-SET @@global.sort_buffer_size = 32777;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-32777
-SET @@global.sort_buffer_size = 4294967295;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-4294967295
-SET @@global.sort_buffer_size = 4294967294;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-4294967294
-'#--------------------FN_DYNVARS_151_04-------------------------#'
-SET @@session.sort_buffer_size = 32776;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-32776
-SET @@session.sort_buffer_size = 32777;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-32777
-SET @@session.sort_buffer_size = 4294967295;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-4294967295
-SET @@session.sort_buffer_size = 4294967294;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-4294967294
-'#------------------FN_DYNVARS_151_05-----------------------#'
-SET @@global.sort_buffer_size = 32775;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-32775
-SET @@global.sort_buffer_size = -1024;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-1024
-SET @@global.sort_buffer_size = 4294967296;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-4294967296
-SET @@global.sort_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-4294967296
-SET @@global.sort_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-4294967296
-SET @@session.sort_buffer_size = 32775;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-32775
-SET @@session.sort_buffer_size = -2;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-1024
-SET @@session.sort_buffer_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
-SET @@session.sort_buffer_size = 4294967296;
-SELECT @@session.sort_buffer_size;
-@@session.sort_buffer_size
-4294967296
-SET @@session.sort_buffer_size = test;
-ERROR 42000: Incorrect argument type to variable 'sort_buffer_size'
-'#------------------FN_DYNVARS_151_06-----------------------#'
-SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
-INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
-@@global.sort_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_151_07-----------------------#'
-SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
-INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
-@@session.sort_buffer_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_151_08-----------------------#'
-SET @@global.sort_buffer_size = TRUE;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-1024
-SET @@global.sort_buffer_size = FALSE;
-SELECT @@global.sort_buffer_size;
-@@global.sort_buffer_size
-1024
-'#---------------------FN_DYNVARS_151_09----------------------#'
-SET @@global.sort_buffer_size = 9000;
-SELECT @@sort_buffer_size = @@global.sort_buffer_size;
-@@sort_buffer_size = @@global.sort_buffer_size
-0
-'#---------------------FN_DYNVARS_151_10----------------------#'
-SET @@sort_buffer_size = 9000;
-SELECT @@sort_buffer_size = @@local.sort_buffer_size;
-@@sort_buffer_size = @@local.sort_buffer_size
-1
-SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
-@@local.sort_buffer_size = @@session.sort_buffer_size
-1
-'#---------------------FN_DYNVARS_151_11----------------------#'
-SET sort_buffer_size = 9100;
-SELECT @@sort_buffer_size;
-@@sort_buffer_size
-9100
-SELECT local.sort_buffer_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.sort_buffer_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT sort_buffer_size = @@session.sort_buffer_size;
-ERROR 42S22: Unknown column 'sort_buffer_size' in 'field list'
-SET @@global.sort_buffer_size = @start_global_value;
-SET @@session.sort_buffer_size = @start_session_value;
diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
index a7afc334ba1..a7afc334ba1 100644
--- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
deleted file mode 100644
index a7afc334ba1..00000000000
--- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
+++ /dev/null
@@ -1,188 +0,0 @@
-SET @start_global_value = @@global.transaction_alloc_block_size;
-SELECT @start_global_value;
-@start_global_value
-8192
-SET @start_session_value = @@session.transaction_alloc_block_size;
-SELECT @start_session_value;
-@start_session_value
-8192
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.transaction_alloc_block_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100'
-SET @@global.transaction_alloc_block_size = DEFAULT;
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-8192
-SET @@session.transaction_alloc_block_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '200'
-SET @@session.transaction_alloc_block_size = DEFAULT;
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-8192
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.transaction_alloc_block_size = DEFAULT;
-SELECT @@global.transaction_alloc_block_size = 8192;
-@@global.transaction_alloc_block_size = 8192
-1
-SET @@session.transaction_alloc_block_size = DEFAULT;
-SELECT @@session.transaction_alloc_block_size = 8192;
-@@session.transaction_alloc_block_size = 8192
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.transaction_alloc_block_size = 1024;
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@global.transaction_alloc_block_size = 60020;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-59392
-SET @@global.transaction_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-4294966272
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.transaction_alloc_block_size = 1024;
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-1024
-SET @@session.transaction_alloc_block_size =4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-4294966272
-SET @@session.transaction_alloc_block_size = 65535;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-64512
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.transaction_alloc_block_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@global.transaction_alloc_block_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@global.transaction_alloc_block_size = 123456789201;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-4294966272
-SET @@global.transaction_alloc_block_size = ON;
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@global.transaction_alloc_block_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@global.transaction_alloc_block_size = True;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@global.transaction_alloc_block_size = False;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@global.transaction_alloc_block_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@global.transaction_alloc_block_size ="Test";
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@global.transaction_alloc_block_size = 1000;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-1024
-SET @@session.transaction_alloc_block_size = 12345678901;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-4294966272
-SET @@session.transaction_alloc_block_size = ON;
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@session.transaction_alloc_block_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@session.transaction_alloc_block_size = True;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-1024
-SET @@session.transaction_alloc_block_size = False;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-1024
-SET @@session.transaction_alloc_block_size = "Test";
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-SET @@session.transaction_alloc_block_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='transaction_alloc_block_size';
-@@global.transaction_alloc_block_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='transaction_alloc_block_size';
-@@session.transaction_alloc_block_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_001_08----------------------#'
-SET @@transaction_alloc_block_size = 1024;
-SET @@global.transaction_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
-SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
-@@transaction_alloc_block_size = @@global.transaction_alloc_block_size
-0
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@transaction_alloc_block_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100'
-SELECT @@transaction_alloc_block_size = @@local.transaction_alloc_block_size;
-@@transaction_alloc_block_size = @@local.transaction_alloc_block_size
-1
-SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size;
-@@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET transaction_alloc_block_size = 1027;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1027'
-SELECT @@transaction_alloc_block_size;
-@@transaction_alloc_block_size
-1024
-SELECT local.transaction_alloc_block_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.transaction_alloc_block_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT transaction_alloc_block_size = @@session.transaction_alloc_block_size;
-ERROR 42S22: Unknown column 'transaction_alloc_block_size' in 'field list'
-SET @@global.transaction_alloc_block_size = @start_global_value;
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-8192
-SET @@session.tmp_table_size = @start_session_value;
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-1024
diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
index cbd25426408..cbd25426408 100644
--- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
deleted file mode 100644
index cbd25426408..00000000000
--- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result
+++ /dev/null
@@ -1,162 +0,0 @@
-SET @start_global_value = @@global.transaction_prealloc_size;
-SELECT @start_global_value;
-@start_global_value
-4096
-SET @start_session_value = @@session.transaction_prealloc_size;
-SELECT @start_session_value;
-@start_session_value
-4096
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.transaction_prealloc_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '100'
-SET @@global.transaction_prealloc_size = DEFAULT;
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-4096
-SET @@session.transaction_prealloc_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '200'
-SET @@session.transaction_prealloc_size = DEFAULT;
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-4096
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.transaction_prealloc_size = DEFAULT;
-SELECT @@global.transaction_prealloc_size = 4096;
-@@global.transaction_prealloc_size = 4096
-1
-SET @@session.transaction_prealloc_size = DEFAULT;
-SELECT @@session.transaction_prealloc_size = 4096;
-@@session.transaction_prealloc_size = 4096
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.transaction_prealloc_size = 1024;
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@global.transaction_prealloc_size = 60020;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '60020'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-59392
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.transaction_prealloc_size = 1024;
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-1024
-SET @@session.transaction_prealloc_size = 65535;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '65535'
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-64512
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.transaction_prealloc_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@global.transaction_prealloc_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@global.transaction_prealloc_size = ON;
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@global.transaction_prealloc_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@global.transaction_prealloc_size = True;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '1'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@global.transaction_prealloc_size = False;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@global.transaction_prealloc_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@global.transaction_prealloc_size ="Test";
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@global.transaction_prealloc_size = 1000;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '1000'
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-1024
-SET @@session.transaction_prealloc_size = ON;
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@session.transaction_prealloc_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-SET @@session.transaction_prealloc_size = True;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '1'
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-1024
-SET @@session.transaction_prealloc_size = False;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-1024
-SET @@session.transaction_prealloc_size = "Test";
-ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='transaction_prealloc_size';
-@@global.transaction_prealloc_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='transaction_prealloc_size';
-@@session.transaction_prealloc_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.transaction_prealloc_size = 1024;
-SET @@global.transaction_prealloc_size = 10;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '10'
-SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size;
-@@transaction_prealloc_size = @@global.transaction_prealloc_size
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@transaction_prealloc_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '100'
-SELECT @@transaction_prealloc_size = @@local.transaction_prealloc_size;
-@@transaction_prealloc_size = @@local.transaction_prealloc_size
-1
-SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size;
-@@local.transaction_prealloc_size = @@session.transaction_prealloc_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET transaction_prealloc_size = 1027;
-Warnings:
-Warning 1292 Truncated incorrect transaction_prealloc_size value: '1027'
-SELECT @@transaction_prealloc_size;
-@@transaction_prealloc_size
-1024
-SELECT local.transaction_prealloc_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.transaction_prealloc_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT transaction_prealloc_size = @@session.transaction_prealloc_size;
-ERROR 42S22: Unknown column 'transaction_prealloc_size' in 'field list'
-SET @@global.transaction_prealloc_size = @start_global_value;
-SELECT @@global.transaction_prealloc_size;
-@@global.transaction_prealloc_size
-4096
-SET @@session.transaction_prealloc_size = @start_session_value;
-SELECT @@session.transaction_prealloc_size;
-@@session.transaction_prealloc_size
-4096
diff --git a/mysql-test/suite/sys_vars/inc/binlog_cache_size_basic.inc b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test
index 323e19c4d66..323e19c4d66 100644
--- a/mysql-test/suite/sys_vars/inc/binlog_cache_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_32.test b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_32.test
deleted file mode 100644
index 7506e2567a0..00000000000
--- a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/binlog_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_64.test b/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_64.test
deleted file mode 100644
index 384388fd631..00000000000
--- a/mysql-test/suite/sys_vars/t/binlog_cache_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/binlog_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test
index f5df54b7acd..f5df54b7acd 100644
--- a/mysql-test/suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test
deleted file mode 100644
index 5705467b8c4..00000000000
--- a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test
+++ /dev/null
@@ -1,7 +0,0 @@
-################################################################################
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test
deleted file mode 100644
index 763fca05014..00000000000
--- a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test
+++ /dev/null
@@ -1,7 +0,0 @@
-################################################################################
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc b/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic.test
index a9580028c7e..a9580028c7e 100644
--- a/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_32.test b/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_32.test
deleted file mode 100644
index 55f9f3fe010..00000000000
--- a/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_64.test b/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_64.test
deleted file mode 100644
index 8c8be473074..00000000000
--- a/mysql-test/suite/sys_vars/t/bulk_insert_buffer_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc b/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic.test
index 0c9a7d1ddb8..0c9a7d1ddb8 100644
--- a/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic.test
diff --git a/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_32.test b/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_32.test
deleted file mode 100644
index 750202df0f3..00000000000
--- a/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/delayed_insert_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_64.test b/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_64.test
deleted file mode 100644
index 960f00e4bcf..00000000000
--- a/mysql-test/suite/sys_vars/t/delayed_insert_limit_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/delayed_insert_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc b/mysql-test/suite/sys_vars/t/delayed_queue_size_basic.test
index e8b5ab31224..e8b5ab31224 100644
--- a/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/delayed_queue_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_32.test b/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_32.test
deleted file mode 100644
index 8c0027b2e3e..00000000000
--- a/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/delayed_queue_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_64.test b/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_64.test
deleted file mode 100644
index c58da380fe4..00000000000
--- a/mysql-test/suite/sys_vars/t/delayed_queue_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/delayed_queue_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc b/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test
index 618b70f3ac3..618b70f3ac3 100644
--- a/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/join_buffer_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/join_buffer_size_basic_32.test b/mysql-test/suite/sys_vars/t/join_buffer_size_basic_32.test
deleted file mode 100644
index 7886b1307ee..00000000000
--- a/mysql-test/suite/sys_vars/t/join_buffer_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/join_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/join_buffer_size_basic_64.test b/mysql-test/suite/sys_vars/t/join_buffer_size_basic_64.test
deleted file mode 100644
index 65327e7afea..00000000000
--- a/mysql-test/suite/sys_vars/t/join_buffer_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/join_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc b/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic.test
index e0970016577..e0970016577 100644
--- a/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc
+++ b/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic.test
diff --git a/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_32.test b/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_32.test
deleted file mode 100644
index 1f10d9a3297..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/key_cache_age_threshold_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_64.test b/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_64.test
deleted file mode 100644
index a3d27a7eae9..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_age_threshold_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/key_cache_age_threshold_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc b/mysql-test/suite/sys_vars/t/log_warnings_basic.test
index 54b4fc4c937..54b4fc4c937 100644
--- a/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
+++ b/mysql-test/suite/sys_vars/t/log_warnings_basic.test
diff --git a/mysql-test/suite/sys_vars/t/log_warnings_basic_32.test b/mysql-test/suite/sys_vars/t/log_warnings_basic_32.test
deleted file mode 100644
index c3ebd043b30..00000000000
--- a/mysql-test/suite/sys_vars/t/log_warnings_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/log_warnings_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/log_warnings_basic_64.test b/mysql-test/suite/sys_vars/t/log_warnings_basic_64.test
deleted file mode 100644
index 15781e7a912..00000000000
--- a/mysql-test/suite/sys_vars/t/log_warnings_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/log_warnings_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc b/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test
index ffad23f6ba7..ffad23f6ba7 100644
--- a/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_connect_errors_basic.test
diff --git a/mysql-test/suite/sys_vars/t/max_connect_errors_basic_32.test b/mysql-test/suite/sys_vars/t/max_connect_errors_basic_32.test
deleted file mode 100644
index 23aeb1eb8b5..00000000000
--- a/mysql-test/suite/sys_vars/t/max_connect_errors_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/max_connect_errors_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_connect_errors_basic_64.test b/mysql-test/suite/sys_vars/t/max_connect_errors_basic_64.test
deleted file mode 100644
index a206cdb580f..00000000000
--- a/mysql-test/suite/sys_vars/t/max_connect_errors_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/max_connect_errors_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc b/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic.test
index 08aff37054d..08aff37054d 100644
--- a/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic.test
diff --git a/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_32.test b/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_32.test
deleted file mode 100644
index fef100cd432..00000000000
--- a/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/max_seeks_for_key_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_64.test b/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_64.test
deleted file mode 100644
index 3f50a068023..00000000000
--- a/mysql-test/suite/sys_vars/t/max_seeks_for_key_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/max_seeks_for_key_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc b/mysql-test/suite/sys_vars/t/max_tmp_tables_basic.test
index 236c59837d8..236c59837d8 100644
--- a/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_tmp_tables_basic.test
diff --git a/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_32.test b/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_32.test
deleted file mode 100644
index 10446926f3d..00000000000
--- a/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/max_tmp_tables_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_64.test b/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_64.test
deleted file mode 100644
index dfc7d76d30e..00000000000
--- a/mysql-test/suite/sys_vars/t/max_tmp_tables_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/max_tmp_tables_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc b/mysql-test/suite/sys_vars/t/max_write_lock_count_basic.test
index 4e92a3057b0..4e92a3057b0 100644
--- a/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_write_lock_count_basic.test
diff --git a/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_32.test b/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_32.test
deleted file mode 100644
index faaf8666bad..00000000000
--- a/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/max_write_lock_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_64.test b/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_64.test
deleted file mode 100644
index 4ecd26bd505..00000000000
--- a/mysql-test/suite/sys_vars/t/max_write_lock_count_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/max_write_lock_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc b/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic.test
index cd80d1d0998..cd80d1d0998 100644
--- a/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic.test
diff --git a/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_32.test b/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_32.test
deleted file mode 100644
index 67ff9594f30..00000000000
--- a/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/min_examined_row_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_64.test b/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_64.test
deleted file mode 100644
index 29a168de906..00000000000
--- a/mysql-test/suite/sys_vars/t/min_examined_row_limit_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/min_examined_row_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/multi_range_count_basic.inc b/mysql-test/suite/sys_vars/t/multi_range_count_basic.test
index 47e8352196f..b54b3d348aa 100644
--- a/mysql-test/suite/sys_vars/inc/multi_range_count_basic.inc
+++ b/mysql-test/suite/sys_vars/t/multi_range_count_basic.test
@@ -108,33 +108,48 @@ SELECT @@session.multi_range_count;
SET @@global.multi_range_count = 0;
SELECT @@global.multi_range_count;
+--disable_warnings
SET @@global.multi_range_count = 4294967296;
+--enable_warnings
+--replace_result 4294967296 4294967295
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = -1024;
SELECT @@global.multi_range_count;
+--disable_warnings
SET @@global.multi_range_count = 429496729500;
+--enable_warnings
+--replace_result 429496729500 4294967295
SELECT @@global.multi_range_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.multi_range_count = 65530.34;
+--replace_result 429496729500 4294967295
SELECT @@global.multi_range_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.multi_range_count = test;
+--replace_result 429496729500 4294967295
SELECT @@global.multi_range_count;
SET @@session.multi_range_count = 0;
SELECT @@session.multi_range_count;
+--disable_warnings
SET @@session.multi_range_count = 4294967296;
+--enable_warnings
+--replace_result 4294967296 4294967295
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = -1;
SELECT @@session.multi_range_count;
--Error ER_PARSE_ERROR
SET @@session.multi_range_count = 65530.34.;
+--disable_warnings
SET @@session.multi_range_count = 4294967295021;
+--enable_warnings
+--replace_result 4294967295021 4294967295
SELECT @@session.multi_range_count;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.multi_range_count = test;
+--replace_result 4294967295021 4294967295
SELECT @@session.multi_range_count;
diff --git a/mysql-test/suite/sys_vars/t/multi_range_count_basic_32.test b/mysql-test/suite/sys_vars/t/multi_range_count_basic_32.test
deleted file mode 100644
index e4c6da9b25a..00000000000
--- a/mysql-test/suite/sys_vars/t/multi_range_count_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/multi_range_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/multi_range_count_basic_64.test b/mysql-test/suite/sys_vars/t/multi_range_count_basic_64.test
deleted file mode 100644
index 8f446633626..00000000000
--- a/mysql-test/suite/sys_vars/t/multi_range_count_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/multi_range_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc b/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic.test
index 9a975b977eb..a8ab34764ef 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic.test
@@ -36,6 +36,7 @@
#############################################################
SET @start_global_value = @@global.myisam_max_sort_file_size;
+--replace_result 9223372036853727232 2146435072
SELECT @start_global_value;
--echo '#--------------------FN_DYNVARS_094_01-------------------------#'
@@ -45,6 +46,7 @@ SELECT @start_global_value;
SET @@global.myisam_max_sort_file_size = 500000;
SET @@global.myisam_max_sort_file_size = DEFAULT;
+--replace_result 9223372036853727232 2146435072
SELECT @@global.myisam_max_sort_file_size;
--echo '#--------------------FN_DYNVARS_094_02-------------------------#'
@@ -171,6 +173,7 @@ SET global myisam_max_sort_file_size = 64;
####################################
SET @@global.myisam_max_sort_file_size = @start_global_value;
+--replace_result 9223372036853727232 2146435072
SELECT @@global.myisam_max_sort_file_size;
########################################################
diff --git a/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_32.test b/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_32.test
deleted file mode 100644
index 4511759fa69..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_64.test b/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_64.test
deleted file mode 100644
index 8ae0c086960..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_max_sort_file_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc b/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic.test
index e3aca46536d..b968f00d3b1 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc
+++ b/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic.test
@@ -109,29 +109,36 @@ SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = -1024;
SELECT @@global.myisam_repair_threads ;
-
+--disable_warnings
SET @@global.myisam_repair_threads = 429496729533;
+--enable_warnings
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = 65530.34;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = test;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = "test";
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = 'test';
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = ON;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_repair_threads ;
diff --git a/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_32.test b/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_32.test
deleted file mode 100644
index 12adb8aac07..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/myisam_repair_threads_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_64.test b/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_64.test
deleted file mode 100644
index 0bdf31b590b..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_repair_threads_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/myisam_repair_threads_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test
index c92c2f85adb..c35949ac5f3 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test
@@ -109,28 +109,36 @@ SELECT @@global.myisam_sort_buffer_size ;
SET @@global.myisam_sort_buffer_size = -1024;
SELECT @@global.myisam_sort_buffer_size ;
+--disable_warnings
SET @@global.myisam_sort_buffer_size = 429496729533;
+--enable_warnings
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_sort_buffer_size = 65530.34;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_sort_buffer_size = test;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_sort_buffer_size = "test";
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_sort_buffer_size = 'test';
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_sort_buffer_size = ON;
+--replace_result 429496729533 4294967295
SELECT @@global.myisam_sort_buffer_size ;
diff --git a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_32.test b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_32.test
deleted file mode 100644
index 5f5c2d1ad21..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_64.test b/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_64.test
deleted file mode 100644
index e416e8bc486..00000000000
--- a/mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc b/mysql-test/suite/sys_vars/t/net_retry_count_basic.test
index 46b8d0350fe..46b8d0350fe 100644
--- a/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc
+++ b/mysql-test/suite/sys_vars/t/net_retry_count_basic.test
diff --git a/mysql-test/suite/sys_vars/t/net_retry_count_basic_32.test b/mysql-test/suite/sys_vars/t/net_retry_count_basic_32.test
deleted file mode 100644
index 5256529b55c..00000000000
--- a/mysql-test/suite/sys_vars/t/net_retry_count_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/net_retry_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/net_retry_count_basic_64.test b/mysql-test/suite/sys_vars/t/net_retry_count_basic_64.test
deleted file mode 100644
index b7b0fafb2c9..00000000000
--- a/mysql-test/suite/sys_vars/t/net_retry_count_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/net_retry_count_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic.test
index 9def567b994..9def567b994 100644
--- a/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_32.test
deleted file mode 100644
index d86ae690990..00000000000
--- a/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/query_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_64.test
deleted file mode 100644
index 05267dac320..00000000000
--- a/mysql-test/suite/sys_vars/t/query_alloc_block_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/query_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc b/mysql-test/suite/sys_vars/t/query_cache_limit_basic.test
index c94ba3a52dd..c94ba3a52dd 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/t/query_cache_limit_basic.test
diff --git a/mysql-test/suite/sys_vars/t/query_cache_limit_basic_32.test b/mysql-test/suite/sys_vars/t/query_cache_limit_basic_32.test
deleted file mode 100644
index 09ee78519b0..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_limit_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/query_cache_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/query_cache_limit_basic_64.test b/mysql-test/suite/sys_vars/t/query_cache_limit_basic_64.test
deleted file mode 100644
index 2a64ee01da8..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_limit_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/query_cache_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc b/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic.test
index 9276a987dfb..9276a987dfb 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
+++ b/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic.test
diff --git a/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_32.test b/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_32.test
deleted file mode 100644
index 90601919cef..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_64.test b/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_64.test
deleted file mode 100644
index 37df6cae4d4..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_min_res_unit_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc b/mysql-test/suite/sys_vars/t/query_cache_size_basic.test
index 2a589ae3771..2a589ae3771 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/query_cache_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/query_cache_size_basic_32.test b/mysql-test/suite/sys_vars/t/query_cache_size_basic_32.test
deleted file mode 100644
index 452ed43b1ca..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/query_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/query_cache_size_basic_64.test b/mysql-test/suite/sys_vars/t/query_cache_size_basic_64.test
deleted file mode 100644
index 2ba81b66a2f..00000000000
--- a/mysql-test/suite/sys_vars/t/query_cache_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/query_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic.test
index cfa74665dd9..cfa74665dd9 100644
--- a/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_32.test
deleted file mode 100644
index 2921bde1d23..00000000000
--- a/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/range_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_64.test
deleted file mode 100644
index 3a638009c39..00000000000
--- a/mysql-test/suite/sys_vars/t/range_alloc_block_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/range_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc b/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test
index b185eeb21a7..b89cee9bdd4 100644
--- a/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc
+++ b/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic.test
@@ -57,12 +57,21 @@ SET @@global.rpl_recovery_rank = 1024;
SELECT @@global.rpl_recovery_rank;
SET @@global.rpl_recovery_rank = 123456789;
SELECT @@global.rpl_recovery_rank;
+
+--disable_warnings
SET @@global.rpl_recovery_rank = 2147483648*2;
+--enable_warnings
+--replace_result 4294967296 4294967295
SELECT @@global.rpl_recovery_rank;
+--disable_warnings
SET @@global.rpl_recovery_rank = 2147483648*1024;
+--enable_warnings
+--replace_result 2199023255552 4294967295
SELECT @@global.rpl_recovery_rank;
-SELECT @@global.rpl_recovery_rank;
+--disable_warnings
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
+--enable_warnings
+--replace_result 4611686018427387904 4294967295
SELECT @@global.rpl_recovery_rank;
diff --git a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_32.test b/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_32.test
deleted file mode 100644
index d0929039360..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/rpl_recovery_rank_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_64.test b/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_64.test
deleted file mode 100644
index 1f6de849999..00000000000
--- a/mysql-test/suite/sys_vars/t/rpl_recovery_rank_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/rpl_recovery_rank_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc b/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic.test
index 17146f07bc0..17146f07bc0 100644
--- a/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc
+++ b/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic.test
diff --git a/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_32.test b/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_32.test
deleted file mode 100644
index 9cdde198c3d..00000000000
--- a/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/slave_transaction_retries_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_64.test b/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_64.test
deleted file mode 100644
index 4284bc44bea..00000000000
--- a/mysql-test/suite/sys_vars/t/slave_transaction_retries_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/slave_transaction_retries_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/t/sort_buffer_size_basic.test
index a88ad65a076..a88ad65a076 100644
--- a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/sort_buffer_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_32.test b/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_32.test
deleted file mode 100644
index 86db7358473..00000000000
--- a/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/sort_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_64.test b/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_64.test
deleted file mode 100644
index 8336932fdcc..00000000000
--- a/mysql-test/suite/sys_vars/t/sort_buffer_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/sort_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
index 4a69bbcdb01..4a69bbcdb01 100644
--- a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test
deleted file mode 100644
index db7181a7715..00000000000
--- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test
deleted file mode 100644
index 54bfa0fd0dc..00000000000
--- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
index 5eabf457a0c..5eabf457a0c 100644
--- a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test
deleted file mode 100644
index 418d223bb47..00000000000
--- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 32 bit machines #
-################################################################################
-
---source include/have_32bit_ulong.inc
---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test
deleted file mode 100644
index 8f218cea1e0..00000000000
--- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test
+++ /dev/null
@@ -1,9 +0,0 @@
-################################################################################
-# Created by Horst Hunger 2008-05-07 #
-# #
-# Wrapper for 64 bit machines #
-################################################################################
-
---source include/have_64bit_ulong.inc
---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc
-
diff --git a/mysql-test/t/aborted_clients.test b/mysql-test/t/aborted_clients.test
new file mode 100644
index 00000000000..fafcfb6b3e9
--- /dev/null
+++ b/mysql-test/t/aborted_clients.test
@@ -0,0 +1,28 @@
+# Test case for MDEV-246, lp:992983
+# Check that ordinary connect/disconnect does not increase aborted_clients
+# status variable, but KILL connection does
+
+-- source include/not_embedded.inc
+-- source include/count_sessions.inc
+
+FLUSH STATUS;
+# Connect/Disconnect look that aborted_clients stays 0
+connect (con1,localhost,root,,);
+disconnect con1;
+connection default;
+-- source include/wait_until_count_sessions.inc
+# Check that there is 0 aborted clients so far
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
+
+# Kill a connection, check that aborted_clients is incremented
+connect(con2,localhost,root,,);
+--disable_reconnect
+--error ER_CONNECTION_KILLED
+KILL CONNECTION_ID();
+disconnect con2;
+connection default;
+-- source include/wait_until_count_sessions.inc
+
+# aborted clients must be 1 now
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
+FLUSH STATUS;
diff --git a/mysql-test/t/default_storage_engine.test b/mysql-test/t/default_storage_engine.test
new file mode 100644
index 00000000000..4ecfc3b8d44
--- /dev/null
+++ b/mysql-test/t/default_storage_engine.test
@@ -0,0 +1,16 @@
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'innodb' AND PLUGIN_LIBRARY IS NULL`)
+{
+ --skip Requires built-in InnoDB.
+}
+
+let $cmd=`select replace("$MYSQLD_BOOTSTRAP_CMD", " --default-storage-engine=myisam", "")`;
+
+#
+# Now it *must* fail, because if InnoDB is compiled in, it is used as a default
+# storage engine. but $MYSQLD_BOOTSTRAP_CMD includes --skip-innodb
+#
+error 1;
+exec $cmd;
+
+echo "all ok"; # to not have zero-length result file
+
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test
index 03d308b6c45..3320ca25136 100644
--- a/mysql-test/t/derived_view.test
+++ b/mysql-test/t/derived_view.test
@@ -1414,6 +1414,30 @@ drop table t1,t2;
set optimizer_switch=@save968720_optimizer_switch;
--echo #
+--echo # LP BUG#978847 Server crashes in Item_ref::real_item on
+--echo # INSERT .. SELECT with FROM subquery and derived_merge=ON
+SET @save978847_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch = 'derived_merge=on';
+
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES (2,1),(3,2);
+
+select * from t1;
+INSERT INTO t1 SELECT * FROM
+ ( SELECT * FROM t1 ) AS alias;
+select * from t1;
+prepare stmt1 from 'INSERT INTO t1 SELECT SQL_BIG_RESULT * FROM
+ ( SELECT * FROM t1 ) AS alias';
+execute stmt1;
+select * from t1;
+execute stmt1;
+select * from t1;
+
+drop table t1;
+
+set optimizer_switch=@save978847_optimizer_switch;
+
+--echo #
--echo # end of 5.3 tests
--echo #
diff --git a/mysql-test/t/flush-innodb.test b/mysql-test/t/flush-innodb.test
new file mode 100644
index 00000000000..207032b1acb
--- /dev/null
+++ b/mysql-test/t/flush-innodb.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+# MDEV-254: Server hang with FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT
+FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
+UNLOCK TABLES;
+CREATE TABLE t1 ( m MEDIUMTEXT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ( REPEAT('i',1048576) );
+
+DROP TABLE t1;
diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test
index 6dedeaa0fef..ca6e712f45c 100644
--- a/mysql-test/t/func_crypt.test
+++ b/mysql-test/t/func_crypt.test
@@ -23,7 +23,9 @@ select old_password('');
select password('gabbagabbahey');
select old_password('idkfa');
select length(password('1'));
+--replace_result 60 13
select length(encrypt('test'));
+--replace_result \$2a\$04\$aO....................ql.D6ROU4Byvysj72xrV1ZAkrMKS8I6 aaqPiZY5xR5l.
select encrypt('test','aa');
select old_password(NULL);
select password(NULL);
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index a1df990fa8e..b843cf8c364 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -17,6 +17,7 @@ explain extended select round(5.5),round(-5.5);
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
select abs(-10), sign(-5), sign(5), sign(0);
explain extended select abs(-10), sign(-5), sign(5), sign(0);
+--replace_result 2.0000000000000004 2
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test
index b48da25c3c9..d021bb0b53d 100644
--- a/mysql-test/t/gis-precise.test
+++ b/mysql-test/t/gis-precise.test
@@ -313,3 +313,15 @@ SELECT ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') ,
SELECT ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29)') );
+#bug 977201 ST_BUFFER fails with the negative D
+select ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3));
+
+#bug 986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int)
+SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
+ -2.910427500435995 0.727606875108998,
+ -0.910427500435995 8.727606875108998,
+ 7.664100588675687 1.503849116986468,
+ 1.664100588675687 -2.496150883013531,
+ 0.0 -3.0
+))' ), 3 )));
+
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index db8bfce2320..a6054e0a28a 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1339,6 +1339,45 @@ SELECT alias2.f3 AS field1 , alias2.f1 AS field2 FROM t1 AS alias1 JOIN t1 AS al
SET SESSION SQL_MODE=default;
drop table t1;
+--echo #
+--echo # LP bug#967242 Wrong result (extra rows, not grouped) with JOIN, AND in ON condition, multi-part key, GROUP BY, OR in WHERE
+--echo #
+
+CREATE TABLE t1 ( a VARCHAR(1) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('x');
+CREATE TABLE t2 ( b INT, c VARCHAR(1), KEY (c, b) ) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+(4, 'd'),(8, 'g'),(3, 'x'),(3, 'f'),
+(0, 'p'),(3, 'j'),(8, 'c');
+
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+rand() + 1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+
+SELECT t2_1.b as zzz
+FROM t1 JOIN t2 AS t2_1 JOIN t2 AS t2_2
+ON (t2_2.b = t2_1.b ) AND (t2_2.c = t2_1.c )
+WHERE
+t2_1.b + 1 > 0 OR
+a = t2_1.c
+GROUP BY zzz;
+
+--echo #TODO: in merge with 5.3 add original test suite
+
+drop table t1, t2;
+
--echo # End of 5.2 tests
--echo #
diff --git a/mysql-test/t/in_datetime_241.test b/mysql-test/t/in_datetime_241.test
new file mode 100644
index 00000000000..f95a456f5e2
--- /dev/null
+++ b/mysql-test/t/in_datetime_241.test
@@ -0,0 +1,9 @@
+#
+# MDEV-241 lp:992722 - Server crashes in get_datetime_value
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1 ( a DATE );
+SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-04-25','2012-04-26');
+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
index 9104e73e554..085c81d34bb 100644
--- a/mysql-test/t/information_schema_all_engines-master.opt
+++ b/mysql-test/t/information_schema_all_engines-master.opt
@@ -1 +1,18 @@
--loose-skip-safemalloc --loose-mutex-deadlock-detector=0
+--loose-innodb-buffer-pool-pages
+--loose-innodb-buffer-pool-pages-blob
+--loose-innodb-buffer-pool-pages-index
+--loose-innodb-cmp
+--loose-innodb-cmpmem-reset
+--loose-innodb-cmp-reset
+--loose-innodb-index-stats
+--loose-innodb-lock-waits
+--loose-innodb-rseg
+--loose-innodb-sys-columns
+--loose-innodb-sys-fields
+--loose-innodb-sys-foreign
+--loose-innodb-sys-foreign-cols
+--loose-innodb-sys-stats
+--loose-innodb-sys-tables
+--loose-innodb-sys-tablestats
+--loose-innodb-table-stats
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test
index 7ef1c0da14d..003ffc8ff19 100644
--- a/mysql-test/t/join_cache.test
+++ b/mysql-test/t/join_cache.test
@@ -2464,7 +2464,7 @@ CREATE TABLE t1 (
PRIMARY KEY (pk), INDEX idx1(i), INDEX idx2 (v,i)
) COLLATE latin1_bin;
INSERT INTO t1 VALUES
- (10,8,'v'), (11,8,'f'), (12,5,'v'), (13,8,'s'), (14,8,'a'),
+ (10,8,'v'), (11,8,'f'), (13,8,'s'), (14,8,'a'),
(15,6,'p'), (16,7,'z'), (17,2,'a'), (18,5,'h'), (19,7,'h'),
(25,3,'m'), (26,5,'a'), (27,9,'n'), (28,1,'d'), (29,107,'a');
INSERT INTO t1 VALUES
diff --git a/mysql-test/t/mysqltest_cont_on_error.test b/mysql-test/t/mysqltest_cont_on_error.test
new file mode 100644
index 00000000000..c6eeca9b5c3
--- /dev/null
+++ b/mysql-test/t/mysqltest_cont_on_error.test
@@ -0,0 +1,16 @@
+#
+# mysqltest --continue-on-error
+#
+
+-- source include/not_embedded.inc
+
+#
+# with or without --continue-on-error the failing test should return an error
+# but with --continue-on-error, the failing line does not abort the test
+#
+
+--error 1
+--exec echo "select error; select 1;" | $MYSQL_TEST 2>&1
+
+--exec echo "SELECT ERROR; SELECT 2;" | $MYSQL_TEST --continue-on-error 2>&1
+
diff --git a/mysql-test/t/plugin_loaderr.opt b/mysql-test/t/plugin_loaderr.opt
new file mode 100644
index 00000000000..38cb906723d
--- /dev/null
+++ b/mysql-test/t/plugin_loaderr.opt
@@ -0,0 +1 @@
+--innodb --innodb-page-size=6000
diff --git a/mysql-test/t/plugin_loaderr.test b/mysql-test/t/plugin_loaderr.test
new file mode 100644
index 00000000000..e319e2fb54d
--- /dev/null
+++ b/mysql-test/t/plugin_loaderr.test
@@ -0,0 +1,10 @@
+
+# We used an invalid command-line option and InnoDB failed to start.
+# Ignore all related warnings
+call mtr.add_suppression("InnoDB");
+
+--vertical_results
+SELECT
+PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE,PLUGIN_LIBRARY,PLUGIN_LIBRARY_VERSION,LOAD_OPTION
+FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb';
+
diff --git a/mysql-test/t/progress_976225.test b/mysql-test/t/progress_976225.test
new file mode 100644
index 00000000000..32ded8b0ee0
--- /dev/null
+++ b/mysql-test/t/progress_976225.test
@@ -0,0 +1,8 @@
+--source include/have_xtradb.inc
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3),(4);
+OPTIMIZE TABLE t1, t2;
+drop table t1, t2;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index f369f10a5e4..6e98c064d94 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -5499,6 +5499,35 @@ SELECT a FROM t1 WHERE ( SELECT MIN(a) = 100 );
drop table t1;
+--echo #
+--echo # LP BUG#985667 Wrong result with subquery in SELECT clause, and constant table in
+--echo # main query and implicit grouping
+--echo #
+
+CREATE TABLE t1 (f1 int) engine=MyISAM;
+INSERT INTO t1 VALUES (7),(8);
+
+CREATE TABLE t2 (f2 int, f3 varchar(1)) engine=MyISAM;
+INSERT INTO t2 VALUES (3,'f');
+
+EXPLAIN
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+SELECT COUNT(f1), (SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+
+EXPLAIN
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+SELECT COUNT(f1), exists(SELECT f1 FROM t1 WHERE f2 > 0 limit 1) AS f4 FROM t2, t1 WHERE 'v'= f3;
+
+EXPLAIN
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+SELECT COUNT(f1), f2 > ALL (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+
+EXPLAIN
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+SELECT COUNT(f1), f2 IN (SELECT f1 FROM t1 WHERE f2 > 0) AS f4 FROM t2, t1 WHERE 'v'= f3;
+
+drop table t1,t2;
+
--echo # return optimizer switch changed in the beginning of this test
set optimizer_switch=@subselect_tmp;
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 2fb6f6b53b8..7f1181bb562 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2366,5 +2366,38 @@ DEALLOCATE PREPARE pstmt;
DROP VIEW v1;
DROP TABLE t1, t2;
+--echo #
+--echo # BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF
+--echo #
+
+set @tmp_jcl_978479= @@join_cache_level;
+set join_cache_level=0;
+
+set @tmp_os_978479= @@optimizer_switch;
+set optimizer_switch = 'derived_with_keys=on,loosescan=on,semijoin=on,materialization=off';
+
+--echo # Part#1: make sure EXPLAIN is using LooseScan:
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES
+ (4,0),(6,8),(3,1),(5,8),(3,9),(2,4),
+ (2,6),(9,1),(5,4),(7,7),(5,4);
+
+CREATE ALGORITHM=TEMPTABLE
+ VIEW v1 AS SELECT * FROM t1;
+
+--echo # This will use LooseScan:
+EXPLAIN
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+ WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+
+SELECT * FROM t1 AS t1_1, t1 AS t1_2
+ WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
+
+DROP VIEW v1;
+DROP TABLE t1;
+set @@join_cache_level= @tmp_jcl_978479;
+set @@optimizer_switch= @tmp_os_978479;
+
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 22b1eb97dad..52895951787 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -26,6 +26,13 @@ INSERT INTO t2 VALUES ('1998-01-02','note02');
select name,t1.cdate,note from t1,t2 where t1.cdate=t2.cdate and t1.cdate='1998-01-01';
drop table t1,t2;
+# MariaDB lp:993103. WHERE LAST_DAY(zero_date) IS NULL does not evaluate to TRUE.
+
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;
+DROP TABLE t1;
+
#
# Date and BETWEEN
#
diff --git a/mysql-test/t/update_ignore_216.test b/mysql-test/t/update_ignore_216.test
new file mode 100644
index 00000000000..bae3930e1a7
--- /dev/null
+++ b/mysql-test/t/update_ignore_216.test
@@ -0,0 +1,13 @@
+#
+# MDEV-216 lp:976104 - Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
+#
+
+CREATE TABLE t1 ( a INT, b CHAR(3) );
+INSERT INTO t1 VALUES ( 1, 'foo' );
+CREATE TABLE t2 ( c CHAR(3), d INT );
+INSERT INTO t2 VALUES ( 'foo', 1 );
+
+UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar'
+ WHERE a != ( SELECT 1 UNION SELECT 2 );
+
+DROP TABLE t1, t2;
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 7397990eddb..832cd01e263 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -67,7 +67,7 @@ ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
- ${LIBNSL} ${LIBM} ${LIBRT} ${LIBSOCKET})
+ ${LIBNSL} ${LIBM} ${LIBRT} ${LIBSOCKET} ${LIBEXECINFO})
DTRACE_INSTRUMENT(mysys)
IF(HAVE_BFD_H)
diff --git a/mysys/my_init.c b/mysys/my_init.c
index c16602318ca..193c8281577 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -35,6 +35,8 @@ static my_bool win32_init_tcp_ip();
#define my_win_init()
#endif
+extern pthread_key(struct st_my_thread_var*, THR_KEY_mysys);
+
#define SCALE_SEC 100
#define SCALE_USEC 10000
@@ -221,7 +223,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
if (have_tcpip)
WSACleanup();
#endif /* __WIN__ */
-
+
+ /* At very last, delete mysys key, it is used everywhere including DBUG */
+ pthread_key_delete(THR_KEY_mysys);
my_init_done=0;
} /* my_end */
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 03041342787..ac16189f3a7 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -274,7 +274,6 @@ void my_thread_global_end(void)
*/
if (all_threads_killed)
{
- pthread_key_delete(THR_KEY_mysys);
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index cfcfd51dac7..31f0333725f 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -246,6 +246,7 @@ static void warn(const char *format,...)
{
void *frame[SF_REMEMBER_FRAMES + SF_FRAMES_SKIP];
int frames= backtrace(frame, array_elements(frame));
+ fprintf(stderr, " ");
if (frames < SF_REMEMBER_FRAMES + SF_FRAMES_SKIP)
frame[frames]= 0;
print_stack(frame + SF_FRAMES_SKIP);
diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c
index ddc06a3ae5e..f7e74e012d2 100644
--- a/mysys/waiting_threads.c
+++ b/mysys/waiting_threads.c
@@ -423,6 +423,8 @@ static void wt_resource_destroy(uchar *arg)
DBUG_VOID_RETURN;
}
+static int wt_init_done;
+
void wt_init()
{
DBUG_ENTER("wt_init");
@@ -456,18 +458,22 @@ void wt_init()
my_atomic_rwlock_init(&cycle_stats_lock);
my_atomic_rwlock_init(&success_stats_lock);
my_atomic_rwlock_init(&wait_stats_lock);
+ wt_init_done= 1;
DBUG_VOID_RETURN;
}
void wt_end()
{
DBUG_ENTER("wt_end");
+ if (!wt_init_done)
+ DBUG_VOID_RETURN;
DBUG_ASSERT(reshash.count == 0);
lf_hash_destroy(&reshash);
my_atomic_rwlock_destroy(&cycle_stats_lock);
my_atomic_rwlock_destroy(&success_stats_lock);
my_atomic_rwlock_destroy(&wait_stats_lock);
+ wt_init_done= 0;
DBUG_VOID_RETURN;
}
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc
index 48bbd72d530..f81fde2ab8f 100644
--- a/plugin/feedback/utils.cc
+++ b/plugin/feedback/utils.cc
@@ -152,26 +152,36 @@ namespace feedback {
static const bool UNSIGNED= true; ///< used below when inserting integers
/**
- callback for fill_plugin_version() - insert a plugin name and its version
+ callback for fill_plugins()
*/
static my_bool show_plugins(THD *thd, plugin_ref plugin, void *arg)
{
TABLE *table= (TABLE*) arg;
+ char name[NAME_LEN*2];
+ size_t name_len;
char version[20];
size_t version_len;
+ name_len= my_snprintf(name, sizeof(name), "%s version",
+ plugin_name(plugin)->str);
+
version_len= my_snprintf(version, sizeof(version), "%d.%d",
(plugin_decl(plugin)->version) >> 8,
(plugin_decl(plugin)->version) & 0xff);
- INSERT2(plugin_name(plugin)->str, plugin_name(plugin)->length,
+ INSERT2(name, name_len,
(version, version_len, system_charset_info));
+ name_len= my_snprintf(name, sizeof(name), "%s used",
+ plugin_name(plugin)->str);
+
+ INSERT2(name, name_len, (plugin_ref_to_int(plugin)->locks_total, UNSIGNED));
+
return 0;
}
/**
- inserts all plugins and their versions into I_S.FEEDBACK
+ inserts all plugins, their versions, and usage counters
*/
int fill_plugin_version(THD *thd, TABLE_LIST *tables)
{
diff --git a/plugin/handler_socket/CMakeLists.txt b/plugin/handler_socket/CMakeLists.txt
new file mode 100644
index 00000000000..358139eda1e
--- /dev/null
+++ b/plugin/handler_socket/CMakeLists.txt
@@ -0,0 +1,41 @@
+
+IF(WIN32)
+ # Handlersocket does not compile on Windows, compiles but does
+ # not start on FreeBSD.
+ RETURN()
+ENDIF()
+
+#Remove -fno-implicit-templates from compiler flags(handlersocket would not work with it)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+ENDIF()
+
+INCLUDE_DIRECTORIES(libhsclient)
+
+# Handlersocket client library. We do not distribute it,
+# it is just compiled in.
+SET(LIBHSCLIENT_SOURCES
+ libhsclient/config.cpp
+ libhsclient/escape.cpp
+ libhsclient/fatal.cpp
+ libhsclient/hstcpcli.cpp
+ libhsclient/socket.cpp
+ libhsclient/string_util.cpp
+)
+ADD_CONVENIENCE_LIBRARY(hsclient ${LIBHSCLIENT_SOURCES})
+# Solaris needs to link some network libraries
+TARGET_LINK_LIBRARIES(hsclient ${LIBSOCKET} ${LIBNLS} ${LIBBIND})
+
+# handlersocket daemon plugin itself.
+SET(HANDLERSOCKET_SOURCES
+ handlersocket/database.cpp
+ handlersocket/handlersocket.cpp
+ handlersocket/hstcpsvr_worker.cpp
+ handlersocket/hstcpsvr.cpp
+)
+MYSQL_ADD_PLUGIN(handlersocket
+ ${HANDLERSOCKET_SOURCES}
+ MODULE_ONLY COMPONENT Server
+ LINK_LIBRARIES hsclient
+)
+
diff --git a/plugin/handler_socket/handlersocket/mysql_incl.hpp b/plugin/handler_socket/handlersocket/mysql_incl.hpp
index d8dba709f28..ac937e4e74d 100644
--- a/plugin/handler_socket/handlersocket/mysql_incl.hpp
+++ b/plugin/handler_socket/handlersocket/mysql_incl.hpp
@@ -13,7 +13,10 @@
#define HAVE_CONFIG_H
#endif
+#ifndef MYSQL_DYNAMIC_PLUGIN
#define MYSQL_DYNAMIC_PLUGIN
+#endif
+
#define MYSQL_SERVER 1
#include <my_config.h>
diff --git a/plugin/handler_socket/libhsclient/auto_addrinfo.hpp b/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
index f0c07060be1..6a807a6fcc7 100644
--- a/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
+++ b/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
@@ -35,7 +35,7 @@ struct auto_addrinfo : private noncopyable {
int resolve(const char *node, const char *service, int flags = 0,
int family = AF_UNSPEC, int socktype = SOCK_STREAM, int protocol = 0) {
reset();
- addrinfo hints;
+ addrinfo hints = { };
hints.ai_flags = flags;
hints.ai_family = family;
hints.ai_socktype = socktype;
diff --git a/regex/CMakeLists.txt b/regex/CMakeLists.txt
index 83c13015671..b4a72620ac5 100644
--- a/regex/CMakeLists.txt
+++ b/regex/CMakeLists.txt
@@ -17,3 +17,5 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c)
ADD_CONVENIENCE_LIBRARY(regex ${REGEX_SOURCES})
+
+INSTALL(FILES "my_regex.h" DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development)
diff --git a/sql-common/client.c b/sql-common/client.c
index f6084d061b8..349d844ebd3 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2969,10 +2969,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const char *scramble_plugin;
ulong pkt_length;
NET *net= &mysql->net;
-#ifdef MYSQL_SERVER
- thr_alarm_t alarmed;
- ALARM alarm_buff;
-#endif
#ifdef __WIN__
HANDLE hPipe=INVALID_HANDLE_VALUE;
#endif
@@ -3181,17 +3177,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
my_snprintf(host_info=buff, sizeof(buff)-1, ER(CR_TCP_CONNECTION), host);
DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host, port));
-#ifdef MYSQL_SERVER
- thr_alarm_init(&alarmed);
- thr_alarm(&alarmed, mysql->options.connect_timeout, &alarm_buff);
-#endif
-
DBUG_PRINT("info",("IP '%s'", "client"));
-#ifdef MYSQL_SERVER
- thr_end_alarm(&alarmed);
-#endif
-
memset(&hints, 0, sizeof(hints));
hints.ai_socktype= SOCK_STREAM;
hints.ai_protocol= IPPROTO_TCP;
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index a4da6804cb3..468fc6976fe 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -272,7 +272,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
# We need to create empty directories (data/test) the installation.
# This does not work with current CPack due to http://www.cmake.org/Bug/view.php?id=8767
# Avoid completely empty directories and install dummy file instead.
-SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty )
+SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/db.opt )
FILE(WRITE ${DUMMY_FILE} "")
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test COMPONENT DataFiles)
@@ -304,7 +304,11 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
DEPENDS initdb.dep
)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION .
- COMPONENT DataFiles PATTERN "initdb.dep" EXCLUDE PATTERN "bootstrap.sql" EXCLUDE)
+ COMPONENT DataFiles
+ PATTERN "initdb.dep" EXCLUDE
+ PATTERN "bootstrap.sql" EXCLUDE
+ PATTERN "aria*" EXCLUDE
+ )
ELSE()
# Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles)
@@ -350,3 +354,9 @@ IF(WIN32)
COMPONENT Server)
TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice)
ENDIF(WIN32)
+
+INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN examples EXCLUDE
+ PATTERN share EXCLUDE
+ PATTERN CMakeFiles EXCLUDE)
diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc
index cd3717f186a..251869cad03 100644
--- a/sql/gcalc_slicescan.cc
+++ b/sql/gcalc_slicescan.cc
@@ -576,7 +576,7 @@ int gcalc_set_double(Gcalc_internal_coord *c, double d, double ext)
c[1]= 0;
c[0]++;
}
- if (sign)
+ if (sign && (c[0] | c[1]))
c[0]|= GCALC_COORD_MINUS;
#ifdef GCALC_CHECK_WITH_FLOAT
GCALC_DBUG_ASSERT(de_check(d, gcalc_get_double(c, 2)));
diff --git a/sql/handler.cc b/sql/handler.cc
index cdc367bbb18..546491c2f32 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -2194,6 +2194,8 @@ double handler::keyread_time(uint index, uint ranges, ha_rows rows)
The model counts in the time to read index entries from cache.
*/
ulong len= table->key_info[index].key_length + ref_length;
+ if (index == table->s->primary_key && table->file->primary_key_is_clustered())
+ len= table->s->stored_rec_length;
double keys_per_block= (stats.block_size/2.0/len+1);
return (rows + keys_per_block-1)/ keys_per_block +
len*rows/(stats.block_size+1)/TIME_FOR_COMPARE ;
diff --git a/include/mysql/innodb_priv.h b/sql/innodb_priv.h
index 5406c292b18..5406c292b18 100644
--- a/include/mysql/innodb_priv.h
+++ b/sql/innodb_priv.h
diff --git a/sql/item.cc b/sql/item.cc
index f9032c79c12..9400af0f79f 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -8787,7 +8787,7 @@ bool Item_cache_temporal::cache_value()
value_cached= true;
MYSQL_TIME ltime;
- if (example->get_date(&ltime, TIME_FUZZY_DATE))
+ if (example->get_date_result(&ltime, TIME_FUZZY_DATE))
value=0;
else
value= pack_time(&ltime);
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 5558b77d67d..b9740c7af03 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1560,6 +1560,7 @@ public:
friend int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
COND **conds);
void top_level_item() { abort_on_null=1; }
+ bool top_level() { return abort_on_null; }
void copy_andor_arguments(THD *thd, Item_cond *item);
bool walk(Item_processor processor, bool walk_subquery, uchar *arg);
Item *transform(Item_transformer transformer, uchar *arg);
diff --git a/sql/item_func.h b/sql/item_func.h
index f5c43360ee8..3b1a38cf447 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -150,7 +150,7 @@ public:
void count_only_length();
void count_real_length();
void count_decimal_length();
- inline bool get_arg0_date(MYSQL_TIME *ltime, uint fuzzy_date)
+ inline bool get_arg0_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
{
return (null_value=args[0]->get_date(ltime, fuzzy_date));
}
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index e1f06824d5b..fdd3cab8273 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1010,6 +1010,13 @@ static void calculate_perpendicular(
int Item_func_buffer::Transporter::single_point(double x, double y)
{
+ if (buffer_op == Gcalc_function::op_difference)
+ {
+ m_fn->add_operation(Gcalc_function::op_false, 0);
+ return 0;
+ }
+
+ m_nshapes= 0;
return add_point_buffer(x, y);
}
@@ -1109,6 +1116,7 @@ int Item_func_buffer::Transporter::start_line()
{
if (buffer_op == Gcalc_function::op_difference)
{
+ m_fn->add_operation(Gcalc_function::op_false, 0);
skip_line= TRUE;
return 0;
}
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index b1829c1892a..276f35fe301 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -769,7 +769,8 @@ void Item_subselect::fix_length_and_dec()
table_map Item_subselect::used_tables() const
{
- return (table_map) (engine->uncacheable() ? used_tables_cache : 0L);
+ return (table_map) ((engine->uncacheable() & ~UNCACHEABLE_EXPLAIN)?
+ used_tables_cache : 0L);
}
@@ -900,6 +901,15 @@ void Item_maxmin_subselect::print(String *str, enum_query_type query_type)
}
+void Item_maxmin_subselect::no_rows_in_result()
+{
+ value= 0;
+ null_value= 0;
+ was_values= 0;
+ make_const();
+}
+
+
void Item_singlerow_subselect::reset()
{
Item_subselect::reset();
@@ -1095,6 +1105,8 @@ void Item_singlerow_subselect::bring_value()
double Item_singlerow_subselect::val_real()
{
DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_real();
if (!exec() && !value->null_value)
{
null_value= FALSE;
@@ -1110,6 +1122,8 @@ double Item_singlerow_subselect::val_real()
longlong Item_singlerow_subselect::val_int()
{
DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_int();
if (!exec() && !value->null_value)
{
null_value= FALSE;
@@ -1124,6 +1138,9 @@ longlong Item_singlerow_subselect::val_int()
String *Item_singlerow_subselect::val_str(String *str)
{
+ DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_str(str);
if (!exec() && !value->null_value)
{
null_value= FALSE;
@@ -1139,6 +1156,9 @@ String *Item_singlerow_subselect::val_str(String *str)
my_decimal *Item_singlerow_subselect::val_decimal(my_decimal *decimal_value)
{
+ DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_decimal(decimal_value);
if (!exec() && !value->null_value)
{
null_value= FALSE;
@@ -1154,6 +1174,9 @@ my_decimal *Item_singlerow_subselect::val_decimal(my_decimal *decimal_value)
bool Item_singlerow_subselect::val_bool()
{
+ DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_bool();
if (!exec() && !value->null_value)
{
null_value= FALSE;
@@ -1167,6 +1190,24 @@ bool Item_singlerow_subselect::val_bool()
}
+bool Item_singlerow_subselect::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->get_date(ltime, fuzzydate);
+ if (!exec() && !value->null_value)
+ {
+ null_value= FALSE;
+ return value->get_date(ltime, fuzzydate);
+ }
+ else
+ {
+ reset();
+ return 0;
+ }
+}
+
+
Item_exists_subselect::Item_exists_subselect(st_select_lex *select_lex):
Item_subselect()
{
@@ -1323,10 +1364,17 @@ Item* Item_exists_subselect::expr_cache_insert_transformer(uchar *thd_arg)
}
+void Item_exists_subselect::no_rows_in_result()
+{
+ value= 0;
+ null_value= 0;
+ make_const();
+}
+
double Item_exists_subselect::val_real()
{
DBUG_ASSERT(fixed == 1);
- if (exec())
+ if (!forced_const && exec())
{
reset();
return 0;
@@ -1337,7 +1385,7 @@ double Item_exists_subselect::val_real()
longlong Item_exists_subselect::val_int()
{
DBUG_ASSERT(fixed == 1);
- if (exec())
+ if (!forced_const && exec())
{
reset();
return 0;
@@ -1362,7 +1410,7 @@ longlong Item_exists_subselect::val_int()
String *Item_exists_subselect::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
- if (exec())
+ if (!forced_const && exec())
reset();
str->set((ulonglong)value,&my_charset_bin);
return str;
@@ -1385,7 +1433,7 @@ String *Item_exists_subselect::val_str(String *str)
my_decimal *Item_exists_subselect::val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
- if (exec())
+ if (!forced_const && exec())
reset();
int2my_decimal(E_DEC_FATAL_ERROR, value, 0, decimal_value);
return decimal_value;
@@ -1395,7 +1443,7 @@ my_decimal *Item_exists_subselect::val_decimal(my_decimal *decimal_value)
bool Item_exists_subselect::val_bool()
{
DBUG_ASSERT(fixed == 1);
- if (exec())
+ if (!forced_const && exec())
{
reset();
return 0;
@@ -2660,6 +2708,15 @@ void Item_allany_subselect::print(String *str, enum_query_type query_type)
}
+void Item_allany_subselect::no_rows_in_result()
+{
+ value= 0;
+ null_value= 0;
+ was_null= 0;
+ make_const();
+}
+
+
void subselect_engine::set_thd(THD *thd_arg)
{
thd= thd_arg;
@@ -2869,7 +2926,7 @@ void subselect_engine::set_row(List<Item> &item_list, Item_cache **row)
item->decimals= sel_item->decimals;
item->unsigned_flag= sel_item->unsigned_flag;
maybe_null= sel_item->maybe_null;
- if (!(row[i]= Item_cache::get_cache(sel_item)))
+ if (!(row[i]= Item_cache::get_cache(sel_item, sel_item->cmp_type())))
return;
row[i]->setup(sel_item);
//psergey-backport-timours: row[i]->store(sel_item);
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 57f413f1ccd..1a4c8a25a01 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -158,6 +158,11 @@ public:
eliminated= FALSE;
null_value= 1;
}
+ /**
+ Set the subquery result to the default value for the predicate when the
+ subquery is known to produce an empty result.
+ */
+ void no_rows_in_result()= 0;
virtual bool select_transformer(JOIN *join);
bool assigned() { return value_assigned; }
void assigned(bool a) { value_assigned= a; }
@@ -274,6 +279,7 @@ public:
subs_type substype() { return SINGLEROW_SUBS; }
void reset();
+ void no_rows_in_result() { reset(); make_const(); }
bool select_transformer(JOIN *join);
void store(uint i, Item* item);
double val_real();
@@ -281,6 +287,7 @@ public:
String *val_str (String *);
my_decimal *val_decimal(my_decimal *);
bool val_bool();
+ bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
enum Item_result result_type() const;
enum_field_types field_type() const;
void fix_length_and_dec();
@@ -326,6 +333,7 @@ public:
bool any_value() { return was_values; }
void register_value() { was_values= TRUE; }
void reset_value_registration() { was_values= FALSE; }
+ void no_rows_in_result();
};
/* exists subselect */
@@ -347,6 +355,7 @@ public:
eliminated= FALSE;
value= 0;
}
+ void no_rows_in_result();
enum Item_result result_type() const { return INT_RESULT;}
longlong val_int();
@@ -676,6 +685,7 @@ public:
virtual void print(String *str, enum_query_type query_type);
bool is_maxmin_applicable(JOIN *join);
bool transform_into_max_min(JOIN *join);
+ void no_rows_in_result();
};
diff --git a/sql/lock.cc b/sql/lock.cc
index c5a4674bfb0..3a1a6d41ce3 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -1041,6 +1041,15 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
DBUG_ASSERT(m_mdl_global_shared_lock && m_state);
+ if (thd->global_disable_checkpoint)
+ {
+ thd->global_disable_checkpoint= 0;
+ if (!--global_disable_checkpoint)
+ {
+ ha_checkpoint_state(0); // Enable checkpoints
+ }
+ }
+
if (m_mdl_blocks_commits_lock)
{
thd->mdl_context.release_lock(m_mdl_blocks_commits_lock);
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc
index 086dc292dec..364dca9120a 100644
--- a/sql/mysql_install_db.cc
+++ b/sql/mysql_install_db.cc
@@ -316,9 +316,9 @@ static int create_myini()
static const char update_root_passwd_part1[]=
- "UPDATE mysql.user SET Password = PASSWORD('";
+ "UPDATE mysql.user SET Password = PASSWORD(";
static const char update_root_passwd_part2[]=
- "') where User='root';\n";
+ ") where User='root';\n";
static const char remove_default_user_cmd[]=
"DELETE FROM mysql.user where User='';\n";
static const char allow_remote_root_access_cmd[]=
@@ -589,11 +589,19 @@ static int create_db_instance()
}
/* Change root password if requested. */
- if (opt_password)
+ if (opt_password && opt_password[0])
{
- verbose("Changing root password",remove_default_user_cmd);
+ verbose("Setting root password",remove_default_user_cmd);
fputs(update_root_passwd_part1, in);
- fputs(opt_password, in);
+
+ /* Use hex encoding for password, to avoid escaping problems.*/
+ fputc('0', in);
+ fputc('x', in);
+ for(int i= 0; opt_password[i]; i++)
+ {
+ fprintf(in,"%02x",opt_password[i]);
+ }
+
fputs(update_root_passwd_part2, in);
fflush(in);
}
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5da2bac74e3..d5760a42d73 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2221,8 +2221,8 @@ static void network_init(void)
{
#ifdef HAVE_SYS_UN_H
struct sockaddr_un UNIXaddr;
-#endif
int arg;
+#endif
DBUG_ENTER("network_init");
if (MYSQL_CALLBACK_ELSE(thread_scheduler, init, (), 0))
@@ -3492,10 +3492,10 @@ static int init_common_variables()
(except in the embedded server, where the default continues to
be MyISAM)
*/
-#ifndef WITH_INNOBASE_STORAGE_ENGINE
- default_storage_engine= const_cast<char *>("MyISAM");
-#else
+#if defined(WITH_INNOBASE_STORAGE_ENGINE) || defined(WITH_XTRADB_STORAGE_ENGINE)
default_storage_engine= const_cast<char *>("InnoDB");
+#else
+ default_storage_engine= const_cast<char *>("MyISAM");
#endif
/*
@@ -6944,7 +6944,7 @@ SHOW_VAR status_vars[]= {
{"Handler_delete", (char*) offsetof(STATUS_VAR, ha_delete_count), SHOW_LONG_STATUS},
{"Handler_discover", (char*) offsetof(STATUS_VAR, ha_discover_count), SHOW_LONG_STATUS},
- {"Handler_icp_attempts ", (char*) offsetof(STATUS_VAR, ha_icp_attempts), SHOW_LONG_STATUS},
+ {"Handler_icp_attempts", (char*) offsetof(STATUS_VAR, ha_icp_attempts), SHOW_LONG_STATUS},
{"Handler_icp_match", (char*) offsetof(STATUS_VAR, ha_icp_match), SHOW_LONG_STATUS},
{"Handler_mrr_init", (char*) offsetof(STATUS_VAR, ha_mrr_init_count), SHOW_LONG_STATUS},
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 56b76f5982e..9bf1aaf4039 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5467,8 +5467,8 @@ bool JOIN::choose_tableless_subquery_plan()
/*
If the optimizer determined that his query has an empty result,
in most cases the subquery predicate is a known constant value -
- either FALSE or NULL. The implementation of Item_subselect::reset()
- determines which one.
+ either of TRUE, FALSE or NULL. The implementation of
+ Item_subselect::no_rows_in_result() determines which one.
*/
if (zero_result_cause)
{
@@ -5476,14 +5476,13 @@ bool JOIN::choose_tableless_subquery_plan()
{
/*
Both group by queries and non-group by queries without aggregate
- functions produce empty subquery result.
+ functions produce empty subquery result. There is no need to further
+ rewrite the subquery because it will not be executed at all.
*/
- subs_predicate->reset();
- subs_predicate->make_const();
return FALSE;
}
- /* TODO:
+ /* @todo
A further optimization is possible when a non-group query with
MIN/MAX/COUNT is optimized by opt_sum_query. Then, if there are
only MIN/MAX functions over an empty result set, the subquery
diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h
index a12e0c11620..7b8f3142851 100644
--- a/sql/opt_subselect.h
+++ b/sql/opt_subselect.h
@@ -146,7 +146,9 @@ public:
void add_keyuse(table_map remaining_tables, KEYUSE *keyuse)
{
- if (try_loosescan && keyuse->sj_pred_no != UINT_MAX)
+ if (try_loosescan && keyuse->sj_pred_no != UINT_MAX &&
+ (keyuse->table->file->index_flags(keyuse->key, 0, 1 ) & HA_READ_ORDER))
+
{
if (!(remaining_tables & keyuse->used_tables))
{
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 699aa7e2b95..a6e3aa7ed66 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -86,6 +86,40 @@ write_escaped_string(IO_CACHE *file, LEX_STRING *val_s)
return FALSE;
}
+static ulonglong view_algo_to_frm(ulonglong val)
+{
+ switch(val)
+ {
+ case VIEW_ALGORITHM_UNDEFINED:
+ return VIEW_ALGORITHM_UNDEFINED_FRM;
+ case VIEW_ALGORITHM_MERGE:
+ return VIEW_ALGORITHM_MERGE_FRM;
+ case VIEW_ALGORITHM_TMPTABLE:
+ return VIEW_ALGORITHM_TMPTABLE_FRM;
+ }
+ DBUG_ASSERT(0); /* Should never happen */
+ return VIEW_ALGORITHM_UNDEFINED;
+}
+
+static ulonglong view_algo_from_frm(ulonglong val)
+{
+ switch(val)
+ {
+ case VIEW_ALGORITHM_UNDEFINED_FRM:
+ return VIEW_ALGORITHM_UNDEFINED;
+ case VIEW_ALGORITHM_MERGE_FRM:
+ return VIEW_ALGORITHM_MERGE;
+ case VIEW_ALGORITHM_TMPTABLE_FRM:
+ return VIEW_ALGORITHM_TMPTABLE;
+ }
+
+ /*
+ Early versions of MariaDB 5.2/5.3 had identical in-memory and frm values
+ Return input value.
+ */
+ return val;
+}
+
/**
Write parameter value to IO_CACHE.
@@ -124,8 +158,14 @@ write_parameter(IO_CACHE *file, uchar* base, File_option *parameter)
break;
}
case FILE_OPTIONS_ULONGLONG:
+ case FILE_OPTIONS_VIEW_ALGO:
{
- num.set(*((ulonglong *)(base + parameter->offset)), &my_charset_bin);
+ ulonglong val= *(ulonglong *)(base + parameter->offset);
+
+ if (parameter->type == FILE_OPTIONS_VIEW_ALGO)
+ val= view_algo_to_frm(val);
+
+ num.set(val, &my_charset_bin);
if (my_b_append(file, (const uchar *)num.ptr(), num.length()))
DBUG_RETURN(TRUE);
break;
@@ -769,6 +809,7 @@ File_parser::parse(uchar* base, MEM_ROOT *mem_root,
break;
}
case FILE_OPTIONS_ULONGLONG:
+ case FILE_OPTIONS_VIEW_ALGO:
if (!(eol= strchr(ptr, '\n')))
{
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
@@ -777,8 +818,12 @@ File_parser::parse(uchar* base, MEM_ROOT *mem_root,
}
{
int not_used;
- *((ulonglong*)(base + parameter->offset))=
- my_strtoll10(ptr, 0, &not_used);
+ ulonglong val= (ulonglong)my_strtoll10(ptr, 0, &not_used);
+
+ if (parameter->type == FILE_OPTIONS_VIEW_ALGO)
+ val= view_algo_from_frm(val);
+
+ *((ulonglong*)(base + parameter->offset))= val;
}
ptr= eol+1;
break;
diff --git a/sql/parse_file.h b/sql/parse_file.h
index 20e3051e671..2a0266e98b7 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -31,6 +31,7 @@ enum file_opt_type {
FILE_OPTIONS_STRING, /**< String (LEX_STRING) */
FILE_OPTIONS_ESTRING, /**< Escaped string (LEX_STRING) */
FILE_OPTIONS_ULONGLONG, /**< ulonglong parameter (ulonglong) */
+ FILE_OPTIONS_VIEW_ALGO, /**< Similar to longlong, but needs conversion */
FILE_OPTIONS_TIMESTAMP, /**< timestamp (LEX_STRING have to be
allocated with length 20 (19+1) */
FILE_OPTIONS_STRLIST, /**< list of escaped strings
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index 3e194805dbc..37f28844a7c 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -167,7 +167,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"where mysqld died. If you see no messages after this, something went\n"
"terribly wrong...\n");
my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL,
- my_thread_stack_size);
+ (ulong)my_thread_stack_size);
}
if (thd)
{
diff --git a/sql/slave.cc b/sql/slave.cc
index 9f593b3075e..94af12472c1 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4155,8 +4155,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
{
int error= 0;
String error_msg;
- ulong inc_pos;
- ulong event_pos;
+ ulonglong inc_pos;
+ ulonglong event_pos;
Relay_log_info *rli= &mi->rli;
mysql_mutex_t *log_lock= rli->relay_log.get_log_lock();
ulong s_id;
@@ -4431,10 +4431,9 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
(event_pos= uint4korr(buf+LOG_POS_OFFSET)) > mi->master_log_pos + inc_pos)
{
inc_pos= event_pos - mi->master_log_pos;
- DBUG_PRINT("info", ("Adjust master_log_pos %lu->%lu to account for "
+ DBUG_PRINT("info", ("Adjust master_log_pos %llu->%llu to account for "
"master-side filtering",
- (unsigned long)(mi->master_log_pos + inc_pos),
- event_pos));
+ mi->master_log_pos + inc_pos, event_pos));
}
/*
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 15c3999be54..41c04b9c413 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -8559,14 +8559,16 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
if (find_mpvio_user(mpvio))
return packet_error;
- if (thd->client_capabilities & CLIENT_PLUGIN_AUTH)
+ if ((thd->client_capabilities & CLIENT_PLUGIN_AUTH) &&
+ (client_plugin < (char *)net->read_pos + pkt_len))
{
- if (client_plugin >= (char *)net->read_pos + pkt_len)
- return packet_error;
client_plugin= fix_plugin_ptr(client_plugin);
}
else
{
+ /* Some clients lie. Sad, but true */
+ thd->client_capabilities &= ~CLIENT_PLUGIN_AUTH;
+
if (thd->client_capabilities & CLIENT_SECURE_CONNECTION)
client_plugin= native_password_plugin_name.str;
else
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index c2d06a149e8..a3271e94c38 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -80,6 +80,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
{
int error= 0;
TABLE tmp_table, *table;
+ TABLE_LIST *pos_in_locked_tables= 0;
TABLE_SHARE *share;
bool has_mdl_lock= FALSE;
char from[FN_REFLEN],tmp[FN_REFLEN+32];
@@ -194,9 +195,13 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
Table was successfully open in mysql_admin_table(). Now we need
to close it, but leave it protected by exclusive metadata lock.
*/
- if (wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN))
+ pos_in_locked_tables= table->pos_in_locked_tables;
+ if (wait_while_table_is_used(thd, table,
+ HA_EXTRA_PREPARE_FOR_FORCED_CLOSE))
goto end;
- close_all_tables_for_name(thd, table_list->table->s, FALSE);
+ /* Close table but don't remove from locked list */
+ close_all_tables_for_name(thd, table_list->table->s,
+ HA_EXTRA_NOT_USED);
table_list->table= 0;
}
/*
@@ -230,18 +235,25 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
goto end;
}
- if (thd->locked_tables_list.reopen_tables(thd))
- goto end;
-
- /*
- Now we should be able to open the partially repaired table
- to finish the repair in the handler later on.
- */
- if (open_table(thd, table_list, thd->mem_root, &ot_ctx))
+ if (thd->locked_tables_list.locked_tables())
{
- error= send_check_errmsg(thd, table_list, "repair",
- "Failed to open partially repaired table");
- goto end;
+ if (thd->locked_tables_list.reopen_tables(thd))
+ goto end;
+ /* Restore the table in the table list with the new opened table */
+ table_list->table= pos_in_locked_tables->table;
+ }
+ else
+ {
+ /*
+ Now we should be able to open the partially repaired table
+ to finish the repair in the handler later on.
+ */
+ if (open_table(thd, table_list, thd->mem_root, &ot_ctx))
+ {
+ error= send_check_errmsg(thd, table_list, "repair",
+ "Failed to open partially repaired table");
+ goto end;
+ }
}
end:
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index e1967c35031..9e973cec6ea 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1097,7 +1097,7 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
TABLE_LIST *tables_to_reopen= (tables ? tables :
thd->locked_tables_list.locked_tables());
- /* Close open HANLER instances to avoid self-deadlock. */
+ /* Close open HANDLER instances to avoid self-deadlock. */
mysql_ha_flush_tables(thd, tables_to_reopen);
for (TABLE_LIST *table_list= tables_to_reopen; table_list;
@@ -1111,12 +1111,13 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
if (! table)
continue;
- if (wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN))
+ if (wait_while_table_is_used(thd, table,
+ HA_EXTRA_PREPARE_FOR_FORCED_CLOSE))
{
result= TRUE;
goto err_with_reopen;
}
- close_all_tables_for_name(thd, table->s, FALSE);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED);
}
}
@@ -1382,9 +1383,11 @@ static void close_open_tables(THD *thd)
@param[in] share table share, but is just a handy way to
access the table cache key
- @param[in] remove_from_locked_tables
- TRUE if the table is being dropped or renamed.
- In that case the documented behaviour is to
+ @param[in] extra
+ HA_EXTRA_PREPRE_FOR_DROP if the table is being dropped
+ HA_EXTRA_PREPARE_FOR_REANME if the table is being renamed
+ HA_EXTRA_NOT_USED no drop/rename
+ In case of drop/reanme the documented behaviour is to
implicitly remove the table from LOCK TABLES
list.
@@ -1393,7 +1396,7 @@ static void close_open_tables(THD *thd)
void
close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
- bool remove_from_locked_tables)
+ ha_extra_function extra)
{
char key[MAX_DBKEY_LENGTH];
uint key_length= share->table_cache_key.length;
@@ -1412,19 +1415,20 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
{
thd->locked_tables_list.unlink_from_list(thd,
table->pos_in_locked_tables,
- remove_from_locked_tables);
+ extra != HA_EXTRA_NOT_USED);
+ /* Inform handler that there is a drop table or a rename going on */
+ if (extra != HA_EXTRA_NOT_USED && table->db_stat)
+ {
+ table->file->extra(extra);
+ extra= HA_EXTRA_NOT_USED; // Call extra once!
+ }
+
/*
Does nothing if the table is not locked.
This allows one to use this function after a table
has been unlocked, e.g. in partition management.
*/
mysql_lock_remove(thd, thd->lock, table);
-
- /* Inform handler that table will be dropped after close */
-#ifdef MERGE_FOR_MONTY_TO_FIX
- if (remove_from_locked_tables && table->db_stat) /* Not true for partitioned tables. */
- table->file->extra(HA_EXTRA_PREPARE_FOR_DROP);
-#endif
close_thread_table(thd, prev);
}
else
@@ -2314,6 +2318,7 @@ bool rename_temporary_table(THD* thd, TABLE *table, const char *db,
@param function HA_EXTRA_PREPARE_FOR_DROP if table is to be deleted
HA_EXTRA_FORCE_REOPEN if table is not be used
HA_EXTRA_PREPARE_FOR_RENAME if table is to be renamed
+ HA_EXTRA_NOT_USED Don't call extra()
@note When returning, the table will be unusable for other threads
until metadata lock is downgraded.
@@ -2338,7 +2343,8 @@ bool wait_while_table_is_used(THD *thd, TABLE *table,
table->s->db.str, table->s->table_name.str,
FALSE);
/* extra() call must come only after all instances above are closed */
- (void) table->file->extra(function);
+ if (function != HA_EXTRA_NOT_USED)
+ (void) table->file->extra(function);
DBUG_RETURN(FALSE);
}
@@ -3386,7 +3392,6 @@ Locked_tables_list::init_locked_tables(THD *thd)
void
Locked_tables_list::unlock_locked_tables(THD *thd)
-
{
if (thd)
{
@@ -3408,7 +3413,8 @@ Locked_tables_list::unlock_locked_tables(THD *thd)
Clear the position in the list, the TABLE object will be
returned to the table cache.
*/
- table_list->table->pos_in_locked_tables= NULL;
+ if (table_list->table) // If not closed
+ table_list->table->pos_in_locked_tables= NULL;
}
thd->leave_locked_tables_mode();
@@ -8506,6 +8512,11 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
}
}
#endif
+ /*
+ field_iterator.create_item() builds used_items which we
+ have to save because changes made once and they are persistent
+ */
+ tables->persistent_used_items= tables->used_items;
if ((field= field_iterator.field()))
{
@@ -9244,6 +9255,7 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
uint key_length;
TABLE *table;
TABLE_SHARE *share;
+ DBUG_ENTER("tdc_remove_table");
if (! has_lock)
mysql_mutex_lock(&LOCK_open);
@@ -9301,6 +9313,7 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
if (! has_lock)
mysql_mutex_unlock(&LOCK_open);
+ DBUG_VOID_RETURN;
}
diff --git a/sql/sql_base.h b/sql/sql_base.h
index 203f8c18e14..44d107376b0 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -292,7 +292,7 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
bool wait_for_refresh, ulong timeout);
bool close_cached_connection_tables(THD *thd, LEX_STRING *connect_string);
void close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
- bool remove_from_locked_tables);
+ ha_extra_function extra);
OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild);
void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 210d259f364..96814562757 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1348,9 +1348,10 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
ulong Query_cache::set_min_res_unit(ulong size)
{
+ DBUG_ASSERT(size % 8 == 0);
if (size < min_allocation_unit)
- size= min_allocation_unit;
- return (min_result_data_size= ALIGN_SIZE(size));
+ size= ALIGN_SIZE(min_allocation_unit);
+ return (min_result_data_size= size);
}
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index 134fd055110..87291e80a85 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -41,7 +41,7 @@ typedef struct st_changed_table_list CHANGED_TABLE_LIST;
#define QUERY_CACHE_DEF_TABLE_HASH_SIZE 1024
/* minimal result data size when data allocated */
-#define QUERY_CACHE_MIN_RESULT_DATA_SIZE 1024*4
+#define QUERY_CACHE_MIN_RESULT_DATA_SIZE (1024*4)
/*
start estimation of first result block size only when number of queries
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 246f03a7754..6fd6e53424f 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -3420,6 +3420,11 @@ bool st_select_lex::optimize_unflattened_subqueries()
continue;
}
+ bool empty_union_result= true;
+ /*
+ If the subquery is a UNION, optimize all the subqueries in the UNION. If
+ there is no UNION, then the loop will execute once for the subquery.
+ */
for (SELECT_LEX *sl= un->first_select(); sl; sl= sl->next_select())
{
JOIN *inner_join= sl->join;
@@ -3442,9 +3447,19 @@ bool st_select_lex::optimize_unflattened_subqueries()
res= inner_join->optimize();
inner_join->select_options= save_options;
un->thd->lex->current_select= save_select;
+ if (empty_union_result)
+ {
+ /*
+ If at least one subquery in a union is non-empty, the UNION result
+ is non-empty. If there is no UNION, the only subquery is non-empy.
+ */
+ empty_union_result= inner_join->empty_result();
+ }
if (res)
return TRUE;
}
+ if (empty_union_result)
+ subquery_predicate->no_rows_in_result();
}
}
return FALSE;
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 9ba0569f1e0..a9c79589faa 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -6270,7 +6270,7 @@ static void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
THD *thd= lpt->thd;
if (lpt->old_table)
- close_all_tables_for_name(thd, lpt->old_table->s, FALSE);
+ close_all_tables_for_name(thd, lpt->old_table->s, HA_EXTRA_NOT_USED);
if (lpt->table)
{
/*
@@ -6307,7 +6307,7 @@ static int alter_close_tables(ALTER_PARTITION_PARAM_TYPE *lpt, bool close_old)
}
if (close_old && lpt->old_table)
{
- close_all_tables_for_name(lpt->thd, lpt->old_table->s, FALSE);
+ close_all_tables_for_name(lpt->thd, lpt->old_table->s, HA_EXTRA_NOT_USED);
lpt->old_table= 0;
}
DBUG_RETURN(0);
@@ -6640,7 +6640,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
ERROR_INJECT_CRASH("crash_drop_partition_2") ||
ERROR_INJECT_ERROR("fail_drop_partition_2") ||
- wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN) ||
+ wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
ERROR_INJECT_CRASH("crash_drop_partition_3") ||
ERROR_INJECT_ERROR("fail_drop_partition_3") ||
(close_table_on_failure= TRUE, FALSE) ||
@@ -6714,7 +6714,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
ERROR_INJECT_CRASH("crash_add_partition_2") ||
ERROR_INJECT_ERROR("fail_add_partition_2") ||
- wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN) ||
+ wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
ERROR_INJECT_CRASH("crash_add_partition_3") ||
ERROR_INJECT_ERROR("fail_add_partition_3") ||
(close_table_on_failure= TRUE, FALSE) ||
@@ -6820,7 +6820,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
mysql_change_partitions(lpt) ||
ERROR_INJECT_CRASH("crash_change_partition_4") ||
ERROR_INJECT_ERROR("fail_change_partition_4") ||
- wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN) ||
+ wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
ERROR_INJECT_CRASH("crash_change_partition_5") ||
ERROR_INJECT_ERROR("fail_change_partition_5") ||
write_log_final_change_partition(lpt) ||
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 0dc71550b73..a7d7f464fca 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -980,9 +980,13 @@ plugin_ref plugin_lock(THD *thd, plugin_ref ptr)
without a mutex.
*/
if (! plugin_dlib(ptr))
+ {
+ plugin_ref_to_int(ptr)->locks_total++;
DBUG_RETURN(ptr);
+ }
#endif
mysql_mutex_lock(&LOCK_plugin);
+ plugin_ref_to_int(ptr)->locks_total++;
rc= my_intern_plugin_lock_ci(lex, ptr);
mysql_mutex_unlock(&LOCK_plugin);
DBUG_RETURN(rc);
@@ -1179,6 +1183,10 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check)
}
plugin->state= PLUGIN_IS_UNINITIALIZED;
+ /* maintain the obsolete @@have_innodb variable */
+ if (!my_strcasecmp(&my_charset_latin1, plugin->name.str, "InnoDB"))
+ have_innodb= SHOW_OPTION_DISABLED;
+
/*
We do the check here because NDB has a worker THD which doesn't
exit until NDB is shut down.
@@ -1587,7 +1595,11 @@ int plugin_init(int *argc, char **argv, int flags)
{
if (plugin_ptr->state == PLUGIN_IS_UNINITIALIZED &&
plugin_initialize(plugin_ptr))
- goto err_unlock;
+ {
+ if (mandatory)
+ goto err_unlock;
+ plugin_ptr->state= PLUGIN_IS_DISABLED;
+ }
}
/*
@@ -3551,19 +3563,6 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
opt->name, plugin_name);
}
}
- /*
- PLUGIN_VAR_STR command-line options without PLUGIN_VAR_MEMALLOC, point
- directly to values in the argv[] array. For plugins started at the
- server startup, argv[] array is allocated with load_defaults(), and
- freed when the server is shut down. But for plugins loaded with
- INSTALL PLUGIN, the memory allocated with load_defaults() is freed with
- freed() at the end of mysql_install_plugin(). Which means we cannot
- allow any pointers into that area.
- Thus, for all plugins loaded after the server was started,
- we force all command-line options to be PLUGIN_VAR_MEMALLOC
- */
- if (mysqld_server_started && !(opt->flags & PLUGIN_VAR_NOCMDOPT))
- opt->flags|= PLUGIN_VAR_MEMALLOC;
break;
case PLUGIN_VAR_ENUM:
if (!opt->check)
@@ -3791,8 +3790,29 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
error= 1;
for (opt= tmp->plugin->system_vars; opt && *opt; opt++)
{
- st_mysql_sys_var *o;
- if (((o= *opt)->flags & PLUGIN_VAR_NOSYSVAR))
+ st_mysql_sys_var *o= *opt;
+
+ /*
+ PLUGIN_VAR_STR command-line options without PLUGIN_VAR_MEMALLOC, point
+ directly to values in the argv[] array. For plugins started at the
+ server startup, argv[] array is allocated with load_defaults(), and
+ freed when the server is shut down. But for plugins loaded with
+ INSTALL PLUGIN, the memory allocated with load_defaults() is freed with
+ freed() at the end of mysql_install_plugin(). Which means we cannot
+ allow any pointers into that area.
+ Thus, for all plugins loaded after the server was started,
+ we copy string values to a plugin's memroot.
+ */
+ if (mysqld_server_started &&
+ ((o->flags & (PLUGIN_VAR_STR | PLUGIN_VAR_NOCMDOPT |
+ PLUGIN_VAR_MEMALLOC)) == PLUGIN_VAR_STR))
+ {
+ sysvar_str_t* str= (sysvar_str_t *)o;
+ if (*str->value)
+ *str->value= strdup_root(mem_root, *str->value);
+ }
+
+ if (o->flags & PLUGIN_VAR_NOSYSVAR)
continue;
if ((var= find_bookmark(plugin_name.str, o->name, o->flags)))
v= new (mem_root) sys_var_pluginvar(&chain, var->key + 1, o);
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h
index fc059142e24..eaa368f3515 100644
--- a/sql/sql_plugin.h
+++ b/sql/sql_plugin.h
@@ -99,6 +99,7 @@ struct st_plugin_int
struct st_plugin_dl *plugin_dl;
uint state;
uint ref_count; /* number of threads using the plugin */
+ uint locks_total; /* how many times the plugin was locked */
void *data; /* plugin type specific, e.g. handlerton */
MEM_ROOT mem_root; /* memory for dynamic plugin structures */
sys_var *system_vars; /* server variables for this plugin */
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index d2f118b62c9..1f3b1effff3 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -243,9 +243,9 @@ bool reload_acl_and_cache(THD *thd, unsigned long options,
{
/*
It is not safe to upgrade the metadata lock without GLOBAL IX lock.
- This can happen with FLUSH TABLES <list> WITH READ LOCK as we in these
- cases don't take a GLOBAL IX lock in order to be compatible with
- global read lock.
+ This can happen with FLUSH TABLES <list> WITH READ LOCK as we in
+ these cases don't take a GLOBAL IX lock in order to be compatible
+ with global read lock.
*/
if (thd->open_tables &&
!thd->mdl_context.is_lock_owner(MDL_key::GLOBAL, "", "",
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 9aa44a5a417..3d01f63e89b 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -10082,12 +10082,14 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
{
join->need_tmp= 1;
join->simple_order= join->simple_group= 0;
- if (sort_by_tab->type == JT_NEXT)
+ if (sort_by_tab->type == JT_NEXT &&
+ !sort_by_tab->table->covering_keys.is_set(sort_by_tab->index))
{
sort_by_tab->type= JT_ALL;
sort_by_tab->read_first_record= join_init_read_record;
}
- else if (sort_by_tab->type == JT_HASH_NEXT)
+ else if (sort_by_tab->type == JT_HASH_NEXT &&
+ !sort_by_tab->table->covering_keys.is_set(sort_by_tab->index))
{
sort_by_tab->type= JT_HASH;
sort_by_tab->read_first_record= join_init_read_record;
@@ -12180,9 +12182,10 @@ static COND* substitute_for_best_equal_field(JOIN_TAB *context_tab,
@param cond condition whose multiple equalities are to be checked
@param table constant table that has been read
+ @param const_key mark key parts as constant
*/
-static void update_const_equal_items(COND *cond, JOIN_TAB *tab)
+static void update_const_equal_items(COND *cond, JOIN_TAB *tab, bool const_key)
{
if (!(cond->used_tables() & tab->table->map))
return;
@@ -12193,7 +12196,10 @@ static void update_const_equal_items(COND *cond, JOIN_TAB *tab)
List_iterator_fast<Item> li(*cond_list);
Item *item;
while ((item= li++))
- update_const_equal_items(item, tab);
+ update_const_equal_items(item, tab,
+ (((Item_cond*) cond)->top_level() &&
+ ((Item_cond*) cond)->functype() ==
+ Item_func::COND_AND_FUNC));
}
else if (cond->type() == Item::FUNC_ITEM &&
((Item_cond*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
@@ -12223,7 +12229,8 @@ static void update_const_equal_items(COND *cond, JOIN_TAB *tab)
TABLE *tab= field->table;
KEYUSE *use;
for (use= stat->keyuse; use && use->table == tab; use++)
- if (!use->is_for_hash_join() && possible_keys.is_set(use->key) &&
+ if (const_key &&
+ !use->is_for_hash_join() && possible_keys.is_set(use->key) &&
tab->key_info[use->key].key_part[use->keypart].field ==
field)
tab->const_key_parts[use->key]|= use->keypart_map;
@@ -15430,7 +15437,6 @@ free_tmp_table(THD *thd, TABLE *entry)
else
entry->file->ha_delete_table(entry->s->table_name.str);
delete entry->file;
- entry->file= 0;
}
/* free blobs */
@@ -16437,7 +16443,7 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
List_iterator<TABLE_LIST> ti(join->select_lex->leaf_tables);
/* Check appearance of new constant items in Item_equal objects */
if (join->conds)
- update_const_equal_items(join->conds, tab);
+ update_const_equal_items(join->conds, tab, TRUE);
while ((tbl= ti++))
{
TABLE_LIST *embedded;
@@ -16446,7 +16452,7 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
{
embedded= embedding;
if (embedded->on_expr)
- update_const_equal_items(embedded->on_expr, tab);
+ update_const_equal_items(embedded->on_expr, tab, TRUE);
embedding= embedded->embedding;
}
while (embedding &&
@@ -18274,7 +18280,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
int ref_key;
uint UNINIT_VAR(ref_key_parts);
int order_direction= 0;
- uint used_key_parts;
+ uint used_key_parts= 0;
TABLE *table=tab->table;
SQL_SELECT *select=tab->select;
key_map usable_keys;
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 53f2356853e..08ddc27e204 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -36,7 +36,7 @@
#if defined(WITH_ARIA_STORAGE_ENGINE)
-#include "../storage/maria/ha_maria.h"
+#include <maria.h>
#endif
#if defined(USE_ARIA_FOR_TMP_TABLES)
#define TMP_ENGINE_HTON maria_hton
@@ -1319,6 +1319,7 @@ public:
return (do_send_rows && implicit_grouping && !group_optimized_away &&
having_value != Item::COND_FALSE);
}
+ bool empty_result() { return (zero_result_cause && !implicit_grouping); }
bool change_result(select_result *result);
bool is_top_level_join() const
{
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index ec0749f4693..278eac2141b 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -6841,6 +6841,7 @@ static my_bool find_schema_table_in_plugin(THD *thd, plugin_ref plugin,
if (!my_strcasecmp(system_charset_info,
schema_table->table_name,
table_name)) {
+ my_plugin_lock(thd, plugin);
p_schema_table->schema_table= schema_table;
DBUG_RETURN(1);
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 75f430b451e..6e9d1709c8a 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -379,7 +379,7 @@ uint filename_to_tablename(const char *from, char *to, uint to_length
DBUG_ENTER("filename_to_tablename");
DBUG_PRINT("enter", ("from '%s'", from));
- if (!memcmp(from, tmp_file_prefix, tmp_file_prefix_length))
+ if (!strncmp(from, tmp_file_prefix, tmp_file_prefix_length))
{
/* Temporary table name. */
res= (strnmov(to, from, to_length) - to);
@@ -2126,7 +2126,8 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
error= -1;
goto err;
}
- close_all_tables_for_name(thd, table->table->s, TRUE);
+ close_all_tables_for_name(thd, table->table->s,
+ HA_EXTRA_PREPARE_FOR_DROP);
table->table= 0;
}
@@ -2134,11 +2135,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db,
table->table_name,
MDL_EXCLUSIVE));
- if (thd->killed)
- {
- error= -1;
- goto err;
- }
+
alias= (lower_case_table_names == 2) ? table->alias : table->table_name;
/* remove .frm file and engine files */
path_length= build_table_filename(path, sizeof(path) - 1, db, alias,
@@ -6188,7 +6185,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
*/
if (wait_while_table_is_used(thd, table, extra_func))
goto err;
- close_all_tables_for_name(thd, table->s, TRUE);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_PREPARE_FOR_RENAME);
/*
Then, we want check once again that target table does not exist.
Actually the order of these two steps does not matter since
@@ -6895,7 +6892,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
close_all_tables_for_name(thd, table->s,
- new_name != table_name || new_db != db);
+ new_name != table_name || new_db != db ?
+ HA_EXTRA_PREPARE_FOR_RENAME :
+ HA_EXTRA_NOT_USED);
error=0;
table_list->table= table= 0; /* Safety */
@@ -7381,6 +7380,7 @@ err:
error=1;
if (error < 0 && to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME))
error= 1;
+ thd_progress_end(thd);
DBUG_RETURN(error > 0 ? -1 : 0);
}
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 46f27f184fa..25ab84fe4db 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -618,8 +618,8 @@ Open streams: %10lu\n",
(ulong) my_file_opened,
(ulong) my_stream_opened);
- ALARM_INFO alarm_info;
#ifndef DONT_USE_THR_ALARM
+ ALARM_INFO alarm_info;
thr_alarm_info(&alarm_info);
printf("\nAlarm status:\n\
Active alarms: %u\n\
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 1ac1d7bbb5e..1b942ecc93b 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -561,7 +561,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
if (result)
goto end;
- close_all_tables_for_name(thd, table->s, FALSE);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED);
/*
Reopen the table if we were under LOCK TABLES.
Ignore the return value for now. It's better to
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index 67ed608f114..3c1b231d3f2 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -358,12 +358,12 @@ bool Truncate_statement::lock_table(THD *thd, TABLE_LIST *table_ref,
{
DEBUG_SYNC(thd, "upgrade_lock_for_truncate");
/* To remove the table from the cache we need an exclusive lock. */
- if (wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN))
+ if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_DROP))
DBUG_RETURN(TRUE);
m_ticket_downgrade= table->mdl_ticket;
/* Close if table is going to be recreated. */
if (*hton_can_recreate)
- close_all_tables_for_name(thd, table->s, FALSE);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED);
}
else
{
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index f9502589beb..7d5fe875d64 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1406,11 +1406,7 @@ bool mysql_multi_update(THD *thd,
DBUG_PRINT("info",("res: %d report_error: %d", res, (int) thd->is_error()));
res|= thd->is_error();
if (unlikely(res))
- {
- /* If we had a another error reported earlier then this will be ignored */
- (*result)->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR));
(*result)->abort_result_set();
- }
thd->abort_on_warning= 0;
DBUG_RETURN(res);
}
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index b6a7cf010ed..bbc5c324573 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -752,7 +752,7 @@ static File_option view_parameters[]=
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("algorithm")},
my_offsetof(TABLE_LIST, algorithm),
- FILE_OPTIONS_ULONGLONG},
+ FILE_OPTIONS_VIEW_ALGO},
{{ C_STRING_WITH_LEN("definer_user")},
my_offsetof(TABLE_LIST, definer.user),
FILE_OPTIONS_STRING},
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 040d7abfcba..78664398fa9 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1892,7 +1892,7 @@ static Sys_var_ulong Sys_query_cache_min_res_unit(
"The minimum size for blocks allocated by the query cache",
GLOBAL_VAR(query_cache_min_res_unit), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, UINT_MAX), DEFAULT(QUERY_CACHE_MIN_RESULT_DATA_SIZE),
- BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+ BLOCK_SIZE(8), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_qcache_min_res_unit));
static const char *query_cache_type_names[]= { "OFF", "ON", "DEMAND", 0 };
diff --git a/sql/table.cc b/sql/table.cc
index bbccd38d83c..de5c11ed92d 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -6723,7 +6723,8 @@ bool TABLE_LIST::change_refs_to_fields()
We need to restore the pointers after the execution of the
prepared statement.
*/
- thd->change_item_tree((Item **)&ref->ref, (Item*)materialized_items + idx);
+ thd->change_item_tree((Item **)&ref->ref,
+ (Item*)(materialized_items + idx));
}
return FALSE;
diff --git a/sql/table.h b/sql/table.h
index bad0894a786..b9a7041392c 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1386,12 +1386,6 @@ typedef struct st_schema_table
/*
Types of derived tables. The ending part is a bitmap of phases that are
applicable to a derived table of the type.
- * /
-#define VIEW_ALGORITHM_UNDEFINED 0
-#define VIEW_ALGORITHM_MERGE 1 + DT_COMMON + DT_MERGE
-#define DERIVED_ALGORITHM_MERGE 2 + DT_COMMON + DT_MERGE
-#define VIEW_ALGORITHM_TMPTABLE 3 + DT_COMMON + DT_MATERIALIZE
-#define DERIVED_ALGORITHM_MATERIALIZE 4 + DT_COMMON + DT_MATERIALIZE
*/
#define DTYPE_ALGORITHM_UNDEFINED 0
#define DTYPE_VIEW 1
@@ -1424,7 +1418,16 @@ typedef struct st_schema_table
#define VIEW_ALGORITHM_UNDEFINED 0
#define VIEW_ALGORITHM_MERGE (DTYPE_VIEW | DTYPE_MERGE)
-#define VIEW_ALGORITHM_TMPTABLE (DTYPE_VIEW + DTYPE_MATERIALIZE )
+#define VIEW_ALGORITHM_TMPTABLE (DTYPE_VIEW | DTYPE_MATERIALIZE)
+
+/*
+ View algorithm values as stored in the FRM. Values differ from in-memory
+ representation for backward compatibility.
+*/
+
+#define VIEW_ALGORITHM_UNDEFINED_FRM 0
+#define VIEW_ALGORITHM_MERGE_FRM 1
+#define VIEW_ALGORITHM_TMPTABLE_FRM 2
#define JOIN_TYPE_LEFT 1
#define JOIN_TYPE_RIGHT 2
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 03ccb3fa861..7e5bbd11c69 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -167,7 +167,6 @@ void threadpool_remove_connection(THD *thd)
worker_context.save();
thread_attach(thd);
- thd->killed= KILL_CONNECTION;
thd->net.reading_or_writing= 0;
end_connection(thd);
diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc
index c8cc38e612a..6359f81cd2b 100644
--- a/sql/threadpool_win.cc
+++ b/sql/threadpool_win.cc
@@ -573,6 +573,10 @@ static VOID CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance,
}
connection_t *connection = (connection_t*)context;
+
+ if (io_result != ERROR_SUCCESS)
+ goto error;
+
THD *thd= connection->thd;
ulonglong old_timeout = connection->timeout;
connection->timeout = ULONGLONG_MAX;
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 04b5fd8d19d..e4455630bc8 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -214,6 +214,15 @@ IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
PROPERTIES COMPILE_FLAGS -Od)
ENDIF()
+IF(MSVC)
+ # Avoid "unreferenced label" warning in generated file
+ GET_FILENAME_COMPONENT(_SRC_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+ SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/pars0grm.c
+ PROPERTIES COMPILE_FLAGS "/wd4102")
+ SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/lexyy.c
+ PROPERTIES COMPILE_FLAGS "/wd4003")
+ENDIF()
+
SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 2d38dfadeb3..4fb8ee84952 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -49,7 +49,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <m_ctype.h>
#include <mysys_err.h>
#include <mysql/plugin.h>
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
#include <mysql/psi/psi.h>
#include <my_sys.h>
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index e76bed387d3..7bb370a8dc4 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -24,7 +24,7 @@ Smart ALTER TABLE
#include <unireg.h>
#include <mysqld_error.h>
#include <sql_lex.h> // SQLCOM_CREATE_INDEX
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
extern "C" {
#include "log0log.h"
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index af168c3f848..abbb8b10ce7 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -33,7 +33,7 @@ Created July 18, 2007 Vasil Dimov
#include <my_sys.h>
#include "i_s.h"
#include <sql_plugin.h>
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
extern "C" {
#include "btr0types.h"
diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c
index d2ce68fc063..c11de6f8242 100644
--- a/storage/maria/ma_test3.c
+++ b/storage/maria/ma_test3.c
@@ -17,7 +17,7 @@
#ifndef _WIN32 /*no fork() in Windows*/
-#include "maria.h"
+#include "maria_def.h"
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index a2a19924a73..1eb720c9607 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -16,6 +16,7 @@
/* This file is included by all internal maria files */
#include "maria.h" /* Structs & some defines */
+#include "ma_pagecache.h"
#include <myisampack.h> /* packing of keys */
#include <my_tree.h>
#include <my_bitmap.h>
@@ -45,6 +46,75 @@
/* maria_open() flag, specific for maria_pack */
#define HA_OPEN_IGNORE_MOVED_STATE (1U << 30)
+extern PAGECACHE maria_pagecache_var, *maria_pagecache;
+int maria_assign_to_pagecache(MARIA_HA *info, ulonglong key_map,
+ PAGECACHE *key_cache);
+void maria_change_pagecache(PAGECACHE *old_key_cache,
+ PAGECACHE *new_key_cache);
+
+typedef struct st_maria_sort_info
+{
+ /* sync things */
+ mysql_mutex_t mutex;
+ mysql_cond_t cond;
+ MARIA_HA *info, *new_info;
+ HA_CHECK *param;
+ char *buff;
+ SORT_KEY_BLOCKS *key_block, *key_block_end;
+ SORT_FT_BUF *ft_buf;
+ my_off_t filelength, dupp, buff_length;
+ pgcache_page_no_t page;
+ ha_rows max_records;
+ uint current_key, total_keys;
+ uint got_error, threads_running;
+ myf myf_rw;
+ enum data_file_type new_data_file_type, org_data_file_type;
+} MARIA_SORT_INFO;
+
+typedef struct st_maria_sort_param
+{
+ pthread_t thr;
+ IO_CACHE read_cache, tempfile, tempfile_for_exceptions;
+ DYNAMIC_ARRAY buffpek;
+ MARIA_BIT_BUFF bit_buff; /* For parallel repair of packrec. */
+
+ MARIA_KEYDEF *keyinfo;
+ MARIA_SORT_INFO *sort_info;
+ HA_KEYSEG *seg;
+ uchar **sort_keys;
+ uchar *rec_buff;
+ void *wordlist, *wordptr;
+ MEM_ROOT wordroot;
+ uchar *record;
+ MY_TMPDIR *tmpdir;
+
+ /*
+ The next two are used to collect statistics, see maria_update_key_parts for
+ description.
+ */
+ ulonglong unique[HA_MAX_KEY_SEG+1];
+ ulonglong notnull[HA_MAX_KEY_SEG+1];
+
+ MARIA_RECORD_POS pos,max_pos,filepos,start_recpos, current_filepos;
+ uint key, key_length,real_key_length,sortbuff_size;
+ uint maxbuffers, keys, find_length, sort_keys_length;
+ my_bool fix_datafile, master;
+ my_bool calc_checksum; /* calculate table checksum */
+ size_t rec_buff_size;
+
+ int (*key_cmp)(struct st_maria_sort_param *, const void *, const void *);
+ int (*key_read)(struct st_maria_sort_param *, uchar *);
+ int (*key_write)(struct st_maria_sort_param *, const uchar *);
+ void (*lock_in_memory)(HA_CHECK *);
+ int (*write_keys)(struct st_maria_sort_param *, register uchar **,
+ uint , struct st_buffpek *, IO_CACHE *);
+ uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
+ int (*write_key)(struct st_maria_sort_param *, IO_CACHE *,uchar *,
+ uint, uint);
+} MARIA_SORT_PARAM;
+
+int maria_write_data_suffix(MARIA_SORT_INFO *sort_info, my_bool fix_datafile);
+
struct st_transaction;
/* undef map from my_nosys; We need test-if-disk full */
diff --git a/storage/maria/unittest/ma_control_file-t.c b/storage/maria/unittest/ma_control_file-t.c
index 8533e461361..b4e757788c2 100644
--- a/storage/maria/unittest/ma_control_file-t.c
+++ b/storage/maria/unittest/ma_control_file-t.c
@@ -23,7 +23,9 @@
#include <my_global.h>
#include <my_sys.h>
#include <tap.h>
-
+#ifdef _WIN32
+#include <direct.h> /* rmdir */
+#endif
#ifndef WITH_ARIA_STORAGE_ENGINE
/*
If Aria is not compiled in, normally we don't come to building this test.
diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
index 5933059263a..18fbaeace5a 100644
--- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
@@ -289,7 +289,7 @@ int main(int argc __attribute__((unused)),
fprintf(stderr, "End of memory\n");
exit(1);
}
- for (i= 0; i < (LONG_BUFFER_SIZE + 7 * 2 + 2); i++)
+ for (i= 0; i < (uint32)(LONG_BUFFER_SIZE + 7 * 2 + 2); i++)
long_buffer[i]= (i & 0xFF);
#ifndef DBUG_OFF
diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc
index d99ca4d513c..8bad6e99b3a 100644
--- a/storage/perfschema/pfs_instr_class.cc
+++ b/storage/perfschema/pfs_instr_class.cc
@@ -823,16 +823,14 @@ const char *sanitize_table_schema_name(const char *unsafe)
intptr first= (intptr) &table_share_array[0];
intptr last= (intptr) &table_share_array[table_share_max];
- PFS_table_share dummy;
/* Check if unsafe points inside table_share_array[] */
if (likely((first <= ptr) && (ptr < last)))
{
intptr offset= (ptr - first) % sizeof(PFS_table_share);
intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key);
- intptr len= sizeof(dummy.m_key.m_hash_key);
/* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
- if (likely((from <= offset) && (offset < from + len)))
+ if (likely((from <= offset) && (offset < from + PFS_TABLESHARE_HASHKEY_SIZE)))
{
PFS_table_share *base= (PFS_table_share*) (ptr - offset);
/* Check if unsafe really is the schema name */
@@ -849,16 +847,14 @@ const char *sanitize_table_object_name(const char *unsafe)
intptr first= (intptr) &table_share_array[0];
intptr last= (intptr) &table_share_array[table_share_max];
- PFS_table_share dummy;
/* Check if unsafe points inside table_share_array[] */
if (likely((first <= ptr) && (ptr < last)))
{
intptr offset= (ptr - first) % sizeof(PFS_table_share);
intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key);
- intptr len= sizeof(dummy.m_key.m_hash_key);
/* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
- if (likely((from <= offset) && (offset < from + len)))
+ if (likely((from <= offset) && (offset < from + PFS_TABLESHARE_HASHKEY_SIZE)))
{
PFS_table_share *base= (PFS_table_share*) (ptr - offset);
/* Check if unsafe really is the table name */
diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h
index 107db628226..b84691ccde5 100644
--- a/storage/perfschema/pfs_instr_class.h
+++ b/storage/perfschema/pfs_instr_class.h
@@ -128,6 +128,8 @@ struct PFS_thread_class
bool m_enabled;
};
+#define PFS_TABLESHARE_HASHKEY_SIZE (NAME_LEN + 1 + NAME_LEN + 1)
+
/** Key identifying a table share. */
struct PFS_table_share_key
{
@@ -137,7 +139,7 @@ struct PFS_table_share_key
the format is "<schema_name><0x00><object_name><0x00>"
@see create_table_def_key
*/
- char m_hash_key[NAME_LEN + 1 + NAME_LEN + 1];
+ char m_hash_key[PFS_TABLESHARE_HASHKEY_SIZE];
/** Length in bytes of @c m_hash_key. */
uint m_key_length;
};
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index 4d6b729196c..27a463bf61f 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -50,7 +50,6 @@
#else
// Windows-specific
#include <io.h>
- #define strcasecmp stricmp
#define snprintf _snprintf
#define RECV_FLAGS 0
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 4cb21d46804..1f004fe72c1 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -51,7 +51,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <m_ctype.h>
#include <mysys_err.h>
#include <mysql/plugin.h>
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
#include <mysql/psi/psi.h>
#include <my_sys.h>
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index 2fd05901393..97bb8ac59de 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -25,7 +25,7 @@ Smart ALTER TABLE
#include <mysqld_error.h>
#include <sql_class.h>
#include <sql_lex.h> // SQLCOM_CREATE_INDEX
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
extern "C" {
#include "log0log.h"
diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc
index 3b87b860a4a..1c40b87bbbd 100644
--- a/storage/xtradb/handler/i_s.cc
+++ b/storage/xtradb/handler/i_s.cc
@@ -34,7 +34,7 @@ Created July 18, 2007 Vasil Dimov
#include <my_sys.h>
#include "i_s.h"
#include <sql_plugin.h>
-#include <mysql/innodb_priv.h>
+#include <innodb_priv.h>
extern "C" {
#include "btr0pcur.h" /* for file sys_tables related info. */
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt
index 795732e946b..0b5e2f98f16 100644
--- a/win/packaging/CMakeLists.txt
+++ b/win/packaging/CMakeLists.txt
@@ -24,6 +24,7 @@ FIND_PATH(WIX_DIR heat.exe
"$ENV{ProgramFiles}/Windows Installer XML v3/bin"
"$ENV{ProgramFiles}/Windows Installer XML v3.5/bin"
"$ENV{ProgramFiles}/Windows Installer XML v3.6/bin"
+ "$ENV{WIX}/bin"
)
SET(CPACK_WIX_PACKAGE_BASE_NAME "MariaDB")
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
index 7dd30123587..940e9e3a7d1 100644
--- a/win/packaging/ca/CMakeLists.txt
+++ b/win/packaging/ca/CMakeLists.txt
@@ -22,28 +22,40 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(WIX_ARCH_SUFFIX "_x64")
+ SET(WIX36_ARCH_SUFFIX "x64")
ELSE()
SET(WIX_ARCH_SUFFIX)
+ SET(WIX36_ARCH_SUFFIX "x86")
ENDIF()
IF(MSVC_VERSION EQUAL 1400)
SET(WIX35_MSVC_SUFFIX "_2005")
ELSEIF(MSVC_VERSION EQUAL 1500)
SET(WIX35_MSVC_SUFFIX "_2008")
+ SET(WIX36_MSVC_SUFFIX "VS2008")
ELSEIF(MSVC_VERSION EQUAL 1600)
SET(WIX35_MSVC_SUFFIX "_2010")
+ SET(WIX36_MSVC_SUFFIX "VS2010")
ELSE()
# When next VS is out, add the correct version here
MESSAGE(FATAL_ERROR "Unknown VS version")
ENDIF()
+INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/inc)
FIND_LIBRARY(WIX_WCAUTIL_LIBRARY
NAMES wcautil${WIX_ARCH_SUFFIX} wcautil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
- HINTS ${WIX_DIR}/../SDK/lib)
+ wcautil
+ PATHS
+ ${WIX_DIR}/../SDK/lib
+ ${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/lib/${WIX36_ARCH_SUFFIX})
FIND_LIBRARY(WIX_DUTIL_LIBRARY
NAMES dutil${WIX_ARCH_SUFFIX} dutil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
- PATHS ${WIX_DIR}/../SDK/lib)
+ dutil
+ PATHS
+ ${WIX_DIR}/../SDK/lib
+ ${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/lib/${WIX36_ARCH_SUFFIX}
+ )
ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index ed26dd45a94..50b39adc0b1 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -73,6 +73,82 @@ LExit:
return WcaFinalize(er);
}
+/*
+ Escape command line parameter fpr pass to CreateProcess().
+
+ We assume out has enough space to include encoded string
+ 2*wcslen(in) is enough.
+
+ It is assumed that called will add double quotation marks before and after
+ the string.
+*/
+static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
+{
+ const wchar_t special_chars[]=L" \t\n\v\"";
+ bool needs_escaping= false;
+ size_t pos;
+
+ for(int i=0; i< sizeof(special_chars) -1; i++)
+ {
+ if (wcschr(in, special_chars[i]))
+ {
+ needs_escaping = true;
+ break;
+ }
+ }
+
+ if(!needs_escaping)
+ {
+ wcscpy_s(out, buflen, in);
+ return;
+ }
+
+ pos= 0;
+ for(int i = 0 ; ; i++)
+ {
+ size_t n_backslashes = 0;
+ wchar_t c;
+ while (in[i] == L'\\')
+ {
+ i++;
+ n_backslashes++;
+ }
+
+ c= in[i];
+ if (c == 0)
+ {
+ /*
+ Escape all backslashes, but let the terminating double quotation mark
+ that caller adds be interpreted as a metacharacter.
+ */
+ for(size_t j= 0; j < 2*n_backslashes;j++)
+ {
+ out[pos++]=L'\\';
+ }
+ break;
+ }
+ else if (c == L'"')
+ {
+ /*
+ Escape all backslashes and the following double quotation mark.
+ */
+ for(size_t j= 0; j < 2*n_backslashes + 1; j++)
+ {
+ out[pos++]=L'\\';
+ }
+ out[pos++]= L'"';
+ }
+ else
+ {
+ /* Backslashes aren't special here. */
+ for (size_t j=0; j < n_backslashes; j++)
+ out[pos++] = L'\\';
+
+ out[pos++]= c;
+ }
+ }
+ out[pos++]= 0;
+}
/*
Check for if directory is empty during install,
sets "<PROPERTY>_NOT_EMPTY" otherise
@@ -462,6 +538,8 @@ unsigned long long GetMaxBufferSize(unsigned long long totalPhys)
return totalPhys;
#endif
}
+
+
/*
Checks SERVICENAME, PORT and BUFFERSIZE parameters
*/
@@ -470,6 +548,8 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
wchar_t ServiceName[MAX_PATH]={0};
wchar_t SkipNetworking[MAX_PATH]={0};
wchar_t QuickConfig[MAX_PATH]={0};
+ wchar_t Password[MAX_PATH]={0};
+ wchar_t EscapedPassword[2*MAX_PATH+2];
wchar_t Port[6];
wchar_t BufferPoolSize[16];
DWORD PortLen=6;
@@ -512,8 +592,13 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
}
}
- DWORD SkipNetworkingLen= MAX_PATH;
+ DWORD PasswordLen= MAX_PATH;
+ MsiGetPropertyW (hInstall, L"PASSWORD", Password, &PasswordLen);
+ EscapeCommandLine(Password, EscapedPassword,
+ sizeof(EscapedPassword)/sizeof(EscapedPassword[0]));
+ MsiSetPropertyW(hInstall,L"ESCAPEDPASSWORD",EscapedPassword);
+ DWORD SkipNetworkingLen= MAX_PATH;
MsiGetPropertyW(hInstall, L"SKIPNETWORKING", SkipNetworking,
&SkipNetworkingLen);
MsiGetPropertyW(hInstall, L"PORT", Port, &PortLen);
diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake.in
index d02791d3b9f..a8ca35906e8 100644
--- a/win/packaging/create_msi.cmake.in
+++ b/win/packaging/create_msi.cmake.in
@@ -8,6 +8,7 @@ SET(VERSION "@VERSION@")
SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH_VERSION "@PATCH_VERSION@")
+SET(TINY_VERSION "@TINY_VERSION@")
SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
SET(MANUFACTURER "@MANUFACTURER@")
SET(WIXCA_LOCATION "@WIXCA_LOCATION@")
@@ -421,7 +422,7 @@ EXECUTE_PROCESS(
EXECUTE_PROCESS(
COMMAND ${LIGHT_EXECUTABLE} -ext WixUIExtension -ext WixUtilExtension
- -ext WixFirewallExtension
+ -ext WixFirewallExtension -sice:ICE61
mysql_server.wixobj extra.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi
${EXTRA_LIGHT_ARGS}
)
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index 37b12575328..d4adc959333 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -34,6 +34,7 @@
<!-- Root password -->
<Property Id="PASSWORD" Hidden="yes" Secure="yes" />
+ <Property Id="ESCAPEDPASSWORD" Hidden="yes" Secure="yes" />
<!-- Database port -->
<Property Id="PORT" Value="3306" Secure="yes"/>
<!-- Whether to allow remote access for root user -->
@@ -233,7 +234,7 @@
</Control>
<Control Id="CheckBoxModifyRootPassword" Type="CheckBox" X="8" Y="62" Width="222" Height="18" Property="ModifyRootPassword" CheckBoxValue="1" TabSkip="no">
- <Text>{\Font1}Modify root password</Text>
+ <Text>{\Font1}Modify password for database user 'root'</Text>
<Publish Property="PASSWORD" >NOT ModifyRootPassword</Publish>
<Publish Property="RootPasswordConfirm">NOT ModifyRootPassword</Publish>
<Publish Property="ALLOWREMOTEROOTACCESS">NOT ModifyRootPassword</Publish>
@@ -255,7 +256,7 @@
</Control>
<Control Id="CheckBoxALLOWREMOTEROOTACCESS" Type="CheckBox" X="23" Y="122" Width="196" Height="18" Property="ALLOWREMOTEROOTACCESS"
CheckBoxValue="--allow-remote-root-access" TabSkip="no">
- <Text>{\Font1}Enable root access from remote machines</Text>
+ <Text>{\Font1}Enable access from remote machines for 'root' user</Text>
<Condition Action="enable">ModifyRootPassword</Condition>
<Condition Action="disable">NOT ModifyRootPassword</Condition>
</Control>
@@ -668,7 +669,7 @@
<CustomAction Id='PresetDatabaseProperties' BinaryKey='wixca.dll' DllEntry='PresetDatabaseProperties' />
<CustomAction Id="CreateDatabaseCommand" Property="CreateDatabase"
Value=
- "&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; --port=[PORT] &quot;--password=[PASSWORD]&quot; &quot;--datadir=[DATADIR]\&quot; [SKIPNETWORKING] [ALLOWREMOTEROOTACCESS] [DEFAULTUSER]"
+ "&quot;[#F.bin.mysql_install_db.exe]&quot; &quot;--service=[SERVICENAME]&quot; --port=[PORT] &quot;--password=[ESCAPEDPASSWORD]&quot; &quot;--datadir=[DATADIR]\&quot; [SKIPNETWORKING] [ALLOWREMOTEROOTACCESS] [DEFAULTUSER]"
Execute="immediate"
HideTarget="yes"
/>
@@ -703,7 +704,7 @@
<![CDATA[&DBInstance=3 AND NOT !DBInstance=3 AND OLDERVERSIONBEINGUPGRADED=""]]>
</Custom>
<Custom Action="ErrorDataDirNotEmpty" After="CheckDataDirectoryEmpty" >DATADIRNOTEMPTY</Custom>
-
+ <Custom Action="CheckDatabaseProperties" Before="CreateDatabaseCommand">SERVICENAME</Custom>
<Custom Action="CreateDatabaseCommand" After="CostFinalize" >
<![CDATA[&DBInstance=3 AND NOT !DBInstance=3 AND OLDERVERSIONBEINGUPGRADED=""]]>
</Custom>
diff --git a/win/packaging/mysql_server.wxs.in b/win/packaging/mysql_server.wxs.in
index 82c17d7577c..79fde801cf5 100644
--- a/win/packaging/mysql_server.wxs.in
+++ b/win/packaging/mysql_server.wxs.in
@@ -4,7 +4,7 @@
Id="*"
UpgradeCode="@CPACK_WIX_UPGRADE_CODE@"
Name="@CPACK_WIX_PACKAGE_NAME@"
- Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@"
+ Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@"
Language="1033"
Manufacturer="@MANUFACTURER@">
@@ -26,14 +26,16 @@
<UpgradeVersion
Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.0"
IncludeMinimum="yes"
- Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@"
+ Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@"
+ IncludeMaximum="yes"
Property="OLDERVERSIONBEINGUPGRADED"
MigrateFeatures="yes"
/>
<?endif?>
<UpgradeVersion
- Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@"
+ Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@"
Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.999"
+ IncludeMinimum="no"
OnlyDetect="yes"
Property="NEWERVERSIONDETECTED" />
</Upgrade>