summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am3
-rw-r--r--mysql-test/collections/mysql-next-mr.push2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_charset.test4
-rw-r--r--mysql-test/include/diff_tables.inc1
-rw-r--r--mysql-test/include/have_thread_concurrency.inc10
-rw-r--r--mysql-test/include/index_merge1.inc2
-rw-r--r--mysql-test/include/mysqld--help.inc39
-rw-r--r--mysql-test/include/query_cache.inc2
-rw-r--r--mysql-test/include/query_cache_sql_prepare.inc10
-rw-r--r--mysql-test/include/show_slave_status2.inc2
-rwxr-xr-xmysql-test/mysql-test-run.pl52
-rw-r--r--mysql-test/r/archive.result2
-rw-r--r--mysql-test/r/bug46080.result2
-rw-r--r--mysql-test/r/cache_innodb.result2
-rw-r--r--mysql-test/r/change_user.result2
-rw-r--r--mysql-test/r/date_formats.result65
-rw-r--r--mysql-test/r/errors.result8
-rw-r--r--mysql-test/r/events_2.result6
-rw-r--r--mysql-test/r/events_bugs.result11
-rw-r--r--mysql-test/r/have_profiling.require2
-rw-r--r--mysql-test/r/index_merge_myisam.result5
-rw-r--r--mysql-test/r/innodb.result4
-rw-r--r--mysql-test/r/innodb_bug42101-nonzero.result4
-rw-r--r--mysql-test/r/innodb_bug42101.result4
-rw-r--r--mysql-test/r/key_cache.result21
-rw-r--r--mysql-test/r/mysqld--help-notwin.result947
-rw-r--r--mysql-test/r/mysqld--help-win.result953
-rw-r--r--mysql-test/r/partition_key_cache.result4
-rw-r--r--mysql-test/r/plugin.result6
-rw-r--r--mysql-test/r/profiling.result2
-rw-r--r--mysql-test/r/query_cache.result12
-rw-r--r--mysql-test/r/query_cache_ps_no_prot.result10
-rw-r--r--mysql-test/r/query_cache_ps_ps_prot.result10
-rw-r--r--mysql-test/r/select_safe.result4
-rw-r--r--mysql-test/r/sp.result9
-rw-r--r--mysql-test/r/subselect.result2
-rw-r--r--mysql-test/r/union.result2
-rw-r--r--mysql-test/r/user_limits.result2
-rw-r--r--mysql-test/r/user_var.result2
-rw-r--r--mysql-test/r/variables.result99
-rw-r--r--mysql-test/suite/binlog/r/binlog_grant.result4
-rw-r--r--mysql-test/suite/binlog/t/binlog_grant.test4
-rw-r--r--mysql-test/suite/innodb/r/innodb-zip.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug47167.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb_file_format.result12
-rw-r--r--mysql-test/suite/innodb/t/innodb-zip.test12
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug47167.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb_file_format.test12
-rw-r--r--mysql-test/suite/ndb/r/ndb_basic.result4
-rw-r--r--mysql-test/suite/ndb/r/ndb_dd_ddl.result1
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_ddl.test1
-rw-r--r--mysql-test/suite/rpl/r/rpl_charset.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_basic.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_idempotency.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_max_relay_size.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_variables_stm.result5
-rw-r--r--mysql-test/suite/rpl/t/rpl_idempotency.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp_effects-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_variables_stm.test5
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result1
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result1
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test1
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test1
-rw-r--r--mysql-test/suite/sys_vars/README3
-rw-r--r--mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc1
-rw-r--r--mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc1
-rw-r--r--mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc1
-rw-r--r--mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc59
-rw-r--r--mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc7
-rw-r--r--mysql-test/suite/sys_vars/inc/log_warnings_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc4
-rw-r--r--mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc8
-rw-r--r--mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc4
-rw-r--r--mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc9
-rw-r--r--mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc10
-rw-r--r--mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc17
-rw-r--r--mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc1
-rw-r--r--mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc3
-rw-r--r--mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc4
-rw-r--r--mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc11
-rw-r--r--mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc4
-rw-r--r--mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc6
-rw-r--r--mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc44
-rw-r--r--mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc6
-rw-r--r--mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc4
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result12
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_increment_func.result3
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_offset_func.result6
-rw-r--r--mysql-test/suite/sys_vars/r/autocommit_basic.result (renamed from mysql-test/suite/sys_vars/r/auto_commit_basic.result)17
-rw-r--r--mysql-test/suite/sys_vars/r/autocommit_func.result1
-rw-r--r--mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/back_log_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/big_tables_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_basic_32.result6
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_basic_64.result8
-rw-r--r--mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_32.result1
-rw-r--r--mysql-test/suite/sys_vars/r/bulk_insert_buffer_size_basic_64.result1
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_client_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_client_func.result13
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_connection_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_database_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_database_func.result3
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_results_basic.resultbin16478 -> 16478 bytes
-rw-r--r--mysql-test/suite/sys_vars/r/character_set_server_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/character_sets_dir_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/collation_database_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/collation_database_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/completion_type_basic.result69
-rw-r--r--mysql-test/suite/sys_vars/r/concurrent_insert_basic.result71
-rw-r--r--mysql-test/suite/sys_vars/r/concurrent_insert_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/connect_timeout_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/date_format_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/datetime_format_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/debug_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/debug_sync_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/default_storage_engine_basic.result117
-rw-r--r--mysql-test/suite/sys_vars/r/default_week_format_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/delay_key_write_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_32.result1
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_insert_limit_basic_64.result1
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_queue_size_basic_32.result1
-rw-r--r--mysql-test/suite/sys_vars/r/delayed_queue_size_basic_64.result1
-rw-r--r--mysql-test/suite/sys_vars/r/div_precision_increment_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/div_precision_increment_func.result7
-rw-r--r--mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/event_scheduler_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/expire_logs_days_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/flush_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/flush_time_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/foreign_key_checks_func.result3
-rw-r--r--mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result7
-rw-r--r--mysql-test/suite/sys_vars/r/ft_max_word_len_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/ft_min_word_len_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/ft_query_expansion_limit_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/ft_stopword_file_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_file_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_func.result13
-rw-r--r--mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/have_profiling_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/identity_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/ignore_builtin_innodb_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/init_connect_basic.resultbin3580 -> 3867 bytes
-rw-r--r--mysql-test/suite/sys_vars/r/init_file_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result20
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result43
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result (renamed from mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_64.result)14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_32.result100
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result (renamed from mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_64.result)8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_32.result94
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result28
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result (renamed from mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result)8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result94
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/insert_id_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/interactive_timeout_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_size_basic_32.result115
-rw-r--r--mysql-test/suite/sys_vars/r/join_buffer_size_basic_64.result123
-rw-r--r--mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/key_buffer_size_basic.result (renamed from mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result)59
-rw-r--r--mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result100
-rw-r--r--mysql-test/suite/sys_vars/r/key_buffer_size_func.result3
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_32.result23
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_age_threshold_basic_64.result25
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_block_size_basic.result (renamed from mysql-test/suite/sys_vars/r/key_cache_block_size_basic_64.result)19
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_block_size_basic_32.result142
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_division_limit_basic.result (renamed from mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_64.result)14
-rw-r--r--mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_32.result139
-rw-r--r--mysql-test/suite/sys_vars/r/large_files_support_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/large_page_size_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/large_pages_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/last_insert_id_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/lc_messages_basic.result46
-rw-r--r--mysql-test/suite/sys_vars/r/lc_messages_dir_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/lc_time_names_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/locked_in_memory_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/log_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result121
-rw-r--r--mysql-test/suite/sys_vars/r/log_error_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/log_output_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result33
-rw-r--r--mysql-test/suite/sys_vars/r/log_slave_updates_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/log_slow_queries_basic.result112
-rw-r--r--mysql-test/suite/sys_vars/r/log_warnings_basic_32.result9
-rw-r--r--mysql-test/suite/sys_vars/r/log_warnings_basic_64.result9
-rw-r--r--mysql-test/suite/sys_vars/r/long_query_time_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/low_priority_updates_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result (renamed from mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_32.result)29
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result141
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_size_basic.result13
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic_32.result3
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic_64.result3
-rw-r--r--mysql-test/suite/sys_vars/r/max_connections_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/max_error_count_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result (renamed from mysql-test/suite/sys_vars/r/max_heap_table_size_basic_32.result)43
-rw-r--r--mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result196
-rw-r--r--mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result71
-rw-r--r--mysql-test/suite/sys_vars/r/max_join_size_basic.result51
-rw-r--r--mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_32.result9
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_basic_64.result9
-rw-r--r--mysql-test/suite/sys_vars/r/max_sort_length_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/max_tmp_tables_basic_32.result8
-rw-r--r--mysql-test/suite/sys_vars/r/max_tmp_tables_basic_64.result8
-rw-r--r--mysql-test/suite/sys_vars/r/max_user_connections_basic.result40
-rw-r--r--mysql-test/suite/sys_vars/r/max_write_lock_count_basic_32.result4
-rw-r--r--mysql-test/suite/sys_vars/r/max_write_lock_count_basic_64.result4
-rw-r--r--mysql-test/suite/sys_vars/r/maximum_basic.result18
-rw-r--r--mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_32.result9
-rw-r--r--mysql-test/suite/sys_vars/r/min_examined_row_limit_basic_64.result9
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result1
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_32.result20
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_max_sort_file_size_basic_64.result20
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_mmap_size_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_32.result8
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_repair_threads_basic_64.result8
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result184
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result8
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result8
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result30
-rw-r--r--mysql-test/suite/sys_vars/r/named_pipe_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/net_buffer_length_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/net_read_timeout_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/net_retry_count_basic_32.result9
-rw-r--r--mysql-test/suite/sys_vars/r/net_retry_count_basic_64.result9
-rw-r--r--mysql-test/suite/sys_vars/r/net_write_timeout_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/new_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/old_alter_table_basic.result40
-rw-r--r--mysql-test/suite/sys_vars/r/old_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/old_passwords_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/open_files_limit_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result54
-rw-r--r--mysql-test/suite/sys_vars/r/pid_file_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/plugin_dir_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/port_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/profiling_basic.result40
-rw-r--r--mysql-test/suite/sys_vars/r/profiling_history_size_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/protocol_version_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_32.result31
-rw-r--r--mysql-test/suite/sys_vars/r/query_alloc_block_size_basic_64.result37
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_limit_basic_32.result1
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_limit_basic_64.result1
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_32.result3
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_min_res_unit_basic_64.result3
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_type_basic.result35
-rw-r--r--mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/query_prealloc_size_basic.result (renamed from mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result)12
-rw-r--r--mysql-test/suite/sys_vars/r/query_prealloc_size_basic_32.result166
-rw-r--r--mysql-test/suite/sys_vars/r/rand_seed1_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/rand_seed2_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_32.result11
-rw-r--r--mysql-test/suite/sys_vars/r/range_alloc_block_size_basic_64.result21
-rw-r--r--mysql-test/suite/sys_vars/r/read_buffer_size_basic.result86
-rw-r--r--mysql-test/suite/sys_vars/r/read_only_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result117
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_index_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_info_file_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_space_limit_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/report_host_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/report_password_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/report_port_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/report_user_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_init_slave_func.result12
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result32
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result35
-rw-r--r--mysql-test/suite/sys_vars/r/secure_file_priv_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/server_id_basic.result (renamed from mysql-test/suite/sys_vars/r/server_id_basic_64.result)5
-rw-r--r--mysql-test/suite/sys_vars/r/server_id_basic_32.result121
-rw-r--r--mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/shared_memory_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/skip_external_locking_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/skip_networking_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/skip_show_database_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/slave_load_tmpdir_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/slave_skip_errors_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_32.result5
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retries_basic_64.result5
-rw-r--r--mysql-test/suite/sys_vars/r/slow_launch_time_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/r/socket_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result98
-rw-r--r--mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result98
-rw-r--r--mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result62
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_selects_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_selects_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_tables_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result37
-rw-r--r--mysql-test/suite/sys_vars/r/sql_log_bin_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/sql_log_off_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sql_log_off_func.result1
-rw-r--r--mysql-test/suite/sys_vars/r/sql_log_update_basic.result46
-rw-r--r--mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result61
-rw-r--r--mysql-test/suite/sys_vars/r/sql_max_join_size_func.result14
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_basic.result76
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_func.result4
-rw-r--r--mysql-test/suite/sys_vars/r/sql_notes_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sql_select_limit_basic.result40
-rw-r--r--mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result13
-rw-r--r--mysql-test/suite/sys_vars/r/sql_warnings_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/storage_engine_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/sync_binlog_basic.result (renamed from mysql-test/suite/sys_vars/r/sync_binlog_basic_32.result)1
-rw-r--r--mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result109
-rw-r--r--mysql-test/suite/sys_vars/r/sync_master_info_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/sync_relay_log_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/sync_relay_log_info_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/table_definition_cache_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/table_open_cache_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/thread_cache_size_basic.result47
-rw-r--r--mysql-test/suite/sys_vars/r/thread_concurrency_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/thread_stack_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/time_format_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/timestamp_basic.result (renamed from mysql-test/suite/sys_vars/r/timestamp_basic_32.result)24
-rw-r--r--mysql-test/suite/sys_vars/r/timestamp_basic_64.result68
-rw-r--r--mysql-test/suite/sys_vars/r/tmp_table_size_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result10
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result20
-rw-r--r--mysql-test/suite/sys_vars/r/tx_isolation_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/r/unique_checks_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/wait_timeout_basic.result (renamed from mysql-test/suite/sys_vars/r/wait_timeout_basic_32.result)1
-rw-r--r--mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result129
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars.test35
-rw-r--r--mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/auto_increment_increment_func.test5
-rw-r--r--mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/auto_increment_offset_func.test7
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_basic.test (renamed from mysql-test/suite/sys_vars/t/auto_commit_basic.test)11
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/autocommit_func.test1
-rw-r--r--mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/back_log_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/big_tables_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_client_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_client_func.test6
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_connection_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_database_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_database_func.test6
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/character_set_server_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/character_sets_dir_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/collation_connection_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/collation_database_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/collation_database_func.test3
-rw-r--r--mysql-test/suite/sys_vars/t/collation_server_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/completion_type_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/completion_type_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/concurrent_insert_basic.test36
-rw-r--r--mysql-test/suite/sys_vars/t/connect_timeout_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/date_format_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/datetime_format_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/debug_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/debug_sync_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/default_storage_engine_basic.test183
-rw-r--r--mysql-test/suite/sys_vars/t/default_week_format_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/delay_key_write_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test18
-rw-r--r--mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/disabled.def17
-rw-r--r--mysql-test/suite/sys_vars/t/div_precision_increment_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/div_precision_increment_func.test5
-rw-r--r--mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/event_scheduler_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/expire_logs_days_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/flush_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/flush_time_basic.test50
-rw-r--r--mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/foreign_key_checks_func.test3
-rw-r--r--mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test8
-rw-r--r--mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/ft_query_expansion_limit_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/general_log_file_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/general_log_func.test17
-rw-r--r--mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/have_profiling_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/identity_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/init_connect_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/init_file_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test (renamed from mysql-test/suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test (renamed from mysql-test/suite/sys_vars/inc/innodb_max_purge_lag_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test (renamed from mysql-test/suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc)0
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/insert_id_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/interactive_timeout_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/key_buffer_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc)55
-rw-r--r--mysql-test/suite/sys_vars/t/key_buffer_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_buffer_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_buffer_size_func.test5
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/key_cache_block_size_basic.inc)7
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_block_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_block_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test (renamed from mysql-test/suite/sys_vars/inc/key_cache_division_limit_basic.inc)5
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/large_files_support_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/large_page_size_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/large_pages_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/last_insert_id_basic.test30
-rw-r--r--mysql-test/suite/sys_vars/t/lc_messages_basic.test35
-rw-r--r--mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/lc_time_names_basic.test36
-rw-r--r--mysql-test/suite/sys_vars/t/locked_in_memory_basic.test20
-rw-r--r--mysql-test/suite/sys_vars/t/log_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_trust_routine_creators_basic.test164
-rw-r--r--mysql-test/suite/sys_vars/t/log_error_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/log_output_basic.test29
-rw-r--r--mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test25
-rw-r--r--mysql-test/suite/sys_vars/t/log_slave_updates_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/log_slow_queries_basic.test170
-rw-r--r--mysql-test/suite/sys_vars/t/long_query_time_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/low_priority_updates_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_binlog_cache_size_basic.inc)4
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_size_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/max_connections_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/max_error_count_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/max_heap_table_size_basic.inc)13
-rw-r--r--mysql-test/suite/sys_vars/t/max_heap_table_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_heap_table_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test81
-rw-r--r--mysql-test/suite/sys_vars/t/max_join_size_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/max_sort_length_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/max_user_connections_basic.test15
-rw-r--r--mysql-test/suite/sys_vars/t/maximum_basic-master.opt3
-rw-r--r--mysql-test/suite/sys_vars/t/maximum_basic.test20
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_mmap_size_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_recover_options_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/named_pipe_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/net_buffer_length_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/net_read_timeout_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/net_write_timeout_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/new_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/old_alter_table_basic.test33
-rw-r--r--mysql-test/suite/sys_vars/t/old_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/old_passwords_basic.test11
-rw-r--r--mysql-test/suite/sys_vars/t/open_files_limit_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/optimizer_switch_basic.test41
-rw-r--r--mysql-test/suite/sys_vars/t/pid_file_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/plugin_dir_basic.test29
-rw-r--r--mysql-test/suite/sys_vars/t/port_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/profiling_basic.test35
-rw-r--r--mysql-test/suite/sys_vars/t/profiling_history_size_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/protocol_version_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test32
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_type_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test (renamed from mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc)9
-rw-r--r--mysql-test/suite/sys_vars/t/query_prealloc_size_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/query_prealloc_size_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rand_seed1_basic.test30
-rw-r--r--mysql-test/suite/sys_vars/t/rand_seed2_basic.test30
-rw-r--r--mysql-test/suite/sys_vars/t/read_buffer_size_basic.test33
-rw-r--r--mysql-test/suite/sys_vars/t/read_only_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test52
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_index_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_info_file_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test39
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_space_limit_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/report_host_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/report_password_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/report_port_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/report_user_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_init_slave_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/secure_file_priv_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/server_id_basic.test (renamed from mysql-test/suite/sys_vars/inc/server_id_basic.inc)7
-rw-r--r--mysql-test/suite/sys_vars/t/server_id_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/server_id_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/shared_memory_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/skip_external_locking_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/skip_networking_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/skip_show_database_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/slave_exec_mode_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/slave_load_tmpdir_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/slave_skip_errors_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/slow_launch_time_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/socket_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test59
-rw-r--r--mysql-test/suite/sys_vars/t/sql_big_selects_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/sql_big_tables_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test21
-rw-r--r--mysql-test/suite/sys_vars/t/sql_log_bin_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/sql_log_off_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/sql_log_update_basic.test35
-rw-r--r--mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/sql_mode_basic.test50
-rw-r--r--mysql-test/suite/sys_vars/t/sql_notes_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/sql_select_limit_basic.test33
-rw-r--r--mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sql_warnings_basic.test20
-rw-r--r--mysql-test/suite/sys_vars/t/storage_engine_basic.test17
-rw-r--r--mysql-test/suite/sys_vars/t/sync_binlog_basic.test (renamed from mysql-test/suite/sys_vars/inc/sync_binlog_basic.inc)1
-rw-r--r--mysql-test/suite/sys_vars/t/sync_binlog_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sync_binlog_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sync_master_info_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/sync_relay_log_basic.test44
-rw-r--r--mysql-test/suite/sys_vars/t/sync_relay_log_info_basic.test44
-rw-r--r--mysql-test/suite/sys_vars/t/table_definition_cache_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/table_open_cache_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/thread_cache_size_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/thread_concurrency_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/thread_stack_basic.test23
-rw-r--r--mysql-test/suite/sys_vars/t/time_format_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/timestamp_basic.test (renamed from mysql-test/suite/sys_vars/inc/timestamp_basic.inc)16
-rw-r--r--mysql-test/suite/sys_vars/t/timestamp_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/timestamp_basic_64.test9
-rw-r--r--mysql-test/suite/sys_vars/t/tx_isolation_basic.test43
-rw-r--r--mysql-test/suite/sys_vars/t/unique_checks_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/wait_timeout_basic.test (renamed from mysql-test/suite/sys_vars/inc/wait_timeout_basic.inc)2
-rw-r--r--mysql-test/suite/sys_vars/t/wait_timeout_basic_32.test9
-rw-r--r--mysql-test/suite/sys_vars/t/wait_timeout_basic_64.test9
-rw-r--r--mysql-test/t/archive.test2
-rw-r--r--mysql-test/t/bug46080-master.opt2
-rw-r--r--mysql-test/t/bug46080.test2
-rw-r--r--mysql-test/t/change_user.test2
-rw-r--r--mysql-test/t/date_formats.test139
-rw-r--r--mysql-test/t/ddl_i18n_koi8r.test26
-rw-r--r--mysql-test/t/ddl_i18n_utf8.test26
-rw-r--r--mysql-test/t/errors.test10
-rw-r--r--mysql-test/t/events_2.test9
-rw-r--r--mysql-test/t/events_bugs.test8
-rw-r--r--mysql-test/t/index_merge_myisam.test1
-rw-r--r--mysql-test/t/innodb_bug42101-nonzero.test4
-rw-r--r--mysql-test/t/innodb_bug42101.test4
-rw-r--r--mysql-test/t/key_cache.test10
-rw-r--r--mysql-test/t/mysql-bug45236-master.opt1
-rw-r--r--mysql-test/t/mysql_locale_posix.test16
-rw-r--r--mysql-test/t/mysqld--help-notwin.test8
-rw-r--r--mysql-test/t/mysqld--help-win.test8
-rw-r--r--mysql-test/t/mysqldump.test30
-rw-r--r--mysql-test/t/partition_key_cache.test2
-rw-r--r--mysql-test/t/profiling.test4
-rw-r--r--mysql-test/t/query_cache.test8
-rw-r--r--mysql-test/t/select_safe.test4
-rw-r--r--mysql-test/t/show_check.test2
-rw-r--r--mysql-test/t/sp.test7
-rw-r--r--mysql-test/t/user_limits.test2
-rw-r--r--mysql-test/t/user_var.test2
-rw-r--r--mysql-test/t/variables.test37
617 files changed, 8610 insertions, 5524 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index b1d0e85c70e..2686cd36355 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -99,7 +99,8 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/ndb suite/ndb/t suite/ndb/r \
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
- suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include
+ suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
+ suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r
# Used by dist-hook and install-data-local to copy all
# test files into either dist or install directory
diff --git a/mysql-test/collections/mysql-next-mr.push b/mysql-test/collections/mysql-next-mr.push
index 97101d5994c..7699e2532c3 100644
--- a/mysql-test/collections/mysql-next-mr.push
+++ b/mysql-test/collections/mysql-next-mr.push
@@ -1,4 +1,4 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl
+perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog
diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test
index 8bcb60b0227..d884bd1178c 100644
--- a/mysql-test/extra/rpl_tests/rpl_charset.test
+++ b/mysql-test/extra/rpl_tests/rpl_charset.test
@@ -114,9 +114,7 @@ set @@character_set_server=latin5;
select @@character_set_server;
select @@character_set_server;
-# ONE_SHOT on not charset/collation stuff is not allowed
--- error 1382
-set one_shot max_join_size=10;
+set one_shot max_join_size=1000000;
# Test of wrong character set numbers;
error 1115;
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc
index d15dd56b35d..ad42615511a 100644
--- a/mysql-test/include/diff_tables.inc
+++ b/mysql-test/include/diff_tables.inc
@@ -60,6 +60,7 @@ disable_query_log;
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
+
let $_diff_table=$diff_table_2;
let $_diff_i=2;
while ($_diff_i) {
diff --git a/mysql-test/include/have_thread_concurrency.inc b/mysql-test/include/have_thread_concurrency.inc
new file mode 100644
index 00000000000..730edbf4895
--- /dev/null
+++ b/mysql-test/include/have_thread_concurrency.inc
@@ -0,0 +1,10 @@
+disable_query_log;
+disable_result_log;
+set @have_thread_concurrency=0;
+select @have_thread_concurrency:=1 from information_schema.global_variables where variable_name='thread_concurrency';
+if (`select @have_thread_concurrency = 0`)
+{
+ skip Need @@thread_concurrency;
+}
+enable_result_log;
+enable_query_log;
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index d137b0957c0..ef116c5addc 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -303,7 +303,7 @@ drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
-set join_buffer_size= 4000;
+set join_buffer_size= 4096;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc
new file mode 100644
index 00000000000..11945e6606a
--- /dev/null
+++ b/mysql-test/include/mysqld--help.inc
@@ -0,0 +1,39 @@
+#
+# mysqld --help
+#
+--source include/not_embedded.inc
+
+#
+# force lower-case-table-names=1 (linux/macosx have different defaults)
+# force symbolic-links=0 (valgrind build has a different default)
+#
+exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1;
+
+perl;
+ @skipvars=qw/basedir character-sets-dir datadir
+ general-log-file language lc-messages-dir
+ log log-slow-queries pid-file plugin-dir slave-load-tmpdir
+ slow-query-log-file tmpdir open-files-limit/;
+ @plugins=qw/innodb ndb ndbcluster safemalloc debug temp-pool
+ thread-concurrency super-large-pages/;
+ $re1=join('|', @skipvars, @plugins);
+ $re2=join('|', @plugins);
+ $skip=0;
+ open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
+ while (<F>) {
+ next if 1../The following groups are read/;
+ next if /^($re1) /;
+ next if /^($re2)-/;
+ $skip=0 if /^ -/;
+ $skip=1 if / --($re2)\b/;
+ # fixes for 32-bit
+ s/\b4294967295\b/18446744073709551615/;
+ s/\b2146435072\b/9223372036853727232/;
+ s/\b196608\b/262144/;
+ next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
+ next if $skip;
+ print;
+ }
+ close F;
+EOF
+
diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc
index 7ce97b42158..0cc1ebb21d6 100644
--- a/mysql-test/include/query_cache.inc
+++ b/mysql-test/include/query_cache.inc
@@ -114,7 +114,7 @@ connection default;
# This should be 'YES'.
SHOW VARIABLES LIKE 'have_query_cache';
-SET GLOBAL query_cache_size = 200000;
+SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
eval SET SESSION STORAGE_ENGINE = $engine_type;
diff --git a/mysql-test/include/query_cache_sql_prepare.inc b/mysql-test/include/query_cache_sql_prepare.inc
index baa041aa058..769cd535f37 100644
--- a/mysql-test/include/query_cache_sql_prepare.inc
+++ b/mysql-test/include/query_cache_sql_prepare.inc
@@ -27,7 +27,7 @@ connect (con1,localhost,root,,test,$MASTER_MYPORT,);
connection default;
set @initial_query_cache_size = @@global.query_cache_size;
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
flush status;
--disable_warnings
drop table if exists t1;
@@ -178,7 +178,7 @@ show status like 'Qcache_hits';
# then QC is re-enabled for more EXECUTE.
--echo ---- switch to connection default ----
connection default;
-set global query_cache_size=100000;
+set global query_cache_size=102400;
# Expect to see additional Qcache_hits.
# The fact that the QC was temporary disabled should have no affect
# except that the first execute will not hit results from the
@@ -235,7 +235,7 @@ prepare stmt3 from "select * from t1 where c1=10";
--echo ---- switch to connection default ----
connection default;
# then QC is enabled at EXECUTE
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
@@ -260,7 +260,7 @@ connection default;
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
# then QC is enabled at EXECUTE
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
set @a=1;
execute stmt1 using @a;
@@ -509,7 +509,7 @@ execute stmt;
set @@global.query_cache_size=0;
alter table t1 add column b int;
execute stmt;
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
execute stmt;
execute stmt;
--echo #
diff --git a/mysql-test/include/show_slave_status2.inc b/mysql-test/include/show_slave_status2.inc
index 9c4e14c62c2..7e970b31d8e 100644
--- a/mysql-test/include/show_slave_status2.inc
+++ b/mysql-test/include/show_slave_status2.inc
@@ -3,6 +3,6 @@
# masked out log positions
---replace_result $MASTER_MYPORT MASTER_PORT
+--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 03c0acfd2d0..27f4891c39e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -68,8 +68,8 @@ use My::File::Path; # Patched version of File::Path
use File::Basename;
use File::Copy;
use File::Find;
-use File::Temp qw /tempdir/;
-use File::Spec::Functions qw / splitdir /;
+use File::Temp qw/tempdir/;
+use File::Spec::Functions qw/splitdir/;
use My::Platform;
use My::SafeProcess;
use My::ConfigFactory;
@@ -118,6 +118,8 @@ END {
}
}
+sub env_or_val($$) { defined $ENV{$_[0]} ? $ENV{$_[0]} : $_[1] }
+
my $path_config_file; # The generated config file, var/my.cnf
# Visual Studio produces executables in different sub-directories based on the
@@ -126,7 +128,7 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
-my $DEFAULT_SUITES= "main,binlog,federated,rpl,rpl_ndb,ndb,innodb";
+my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -213,7 +215,7 @@ my $start_only;
my $opt_wait_all;
my $opt_repeat= 1;
my $opt_retry= 3;
-my $opt_retry_failure= 2;
+my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
my $opt_strace_client;
@@ -242,9 +244,9 @@ our %mysqld_variables;
my $source_dist= 0;
-my $opt_max_save_core= $ENV{MTR_MAX_SAVE_CORE} || 5;
-my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20;
-my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10;
+my $opt_max_save_core= env_or_val(MTR_MAX_SAVE_CORE => 5);
+my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
+my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
@@ -783,11 +785,12 @@ sub set_vardir {
sub command_line_setup {
my $opt_comment;
my $opt_usage;
+ my $opt_list_options;
# Read the command line options
# Note: Keep list, and the order, in sync with usage at end of this file
Getopt::Long::Configure("pass_through");
- GetOptions(
+ my %options=(
# Control what engine/variation to run
'embedded-server' => \$opt_embedded_server,
'ps-protocol' => \$opt_ps_protocol,
@@ -905,9 +908,13 @@ sub command_line_setup {
'timediff' => \&report_option,
'help|h' => \$opt_usage,
- ) or usage("Can't read options");
+ 'list-options' => \$opt_list_options,
+ );
+
+ GetOptions(%options) or usage("Can't read options");
usage("") if $opt_usage;
+ list_options(\%options) if $opt_list_options;
# --------------------------------------------------------------------------
# Setup verbosity
@@ -1925,7 +1932,6 @@ sub environment_setup {
split(':', $ENV{'LIBPATH'}) : ());
mtr_debug("LIBPATH: $ENV{'LIBPATH'}");
- $ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
@@ -1943,9 +1949,11 @@ sub environment_setup {
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= using_extern();
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
- $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'master-port'} || 3306;
+ $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
+ $ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
+ $ENV{'MYSQL_SHAREDIR'}= $path_language;
# ----------------------------------------------------
# Setup env for NDB
@@ -3784,7 +3792,7 @@ sub start_check_warnings ($$) {
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
- mtr_add_arg($args, "--skip-safemalloc");
+ mtr_add_arg($args, "--loose-skip-safemalloc");
mtr_add_arg($args, "--test-file=%s", "include/check-warnings.test");
mtr_add_arg($args, "--verbose");
@@ -4208,7 +4216,7 @@ sub mysqld_arguments ($$$) {
if ( $opt_valgrind_mysqld )
{
- mtr_add_arg($args, "--skip-safemalloc");
+ mtr_add_arg($args, "--loose-skip-safemalloc");
if ( $mysql_version_id < 50100 )
{
@@ -4993,7 +5001,7 @@ sub gdb_arguments {
my $type= shift;
# Write $args to gdb init file
- my $str= join(" ", @$$args);
+ my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
# Remove the old gdbinit file
@@ -5057,7 +5065,7 @@ sub ddd_arguments {
my $type= shift;
# Write $args to ddd init file
- my $str= join(" ", @$$args);
+ my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
# Remove the old gdbinit file
@@ -5122,8 +5130,8 @@ sub debugger_arguments {
# vc[express] /debugexe exe arg1 .. argn
# Add /debugexe and name of the exe before args
- unshift(@$$args, "/debugexe");
unshift(@$$args, "$$exe");
+ unshift(@$$args, "/debugexe");
# Set exe to debuggername
$$exe= $debugger;
@@ -5392,3 +5400,15 @@ HERE
}
+sub list_options ($) {
+ my $hash= shift;
+
+ for (keys %$hash) {
+ s/([:=].*|[+!])$//;
+ s/\|/\n--/g;
+ print "--$_\n" unless /list-options/;
+ }
+
+ exit(1);
+}
+
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 08618f81808..b3a634b07e2 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -12707,7 +12707,7 @@ DATA_LENGTH AVG_ROW_LENGTH
8700 4350
DROP TABLE t1;
SET @save_join_buffer_size= @@join_buffer_size;
-SET @@join_buffer_size= 8228;
+SET @@join_buffer_size= 8192;
CREATE TABLE t1(a CHAR(255)) ENGINE=archive;
INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result
index 2173768cdad..f1abcde7766 100644
--- a/mysql-test/r/bug46080.result
+++ b/mysql-test/r/bug46080.result
@@ -8,6 +8,8 @@ CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');
SET @@SESSION.sort_buffer_size=5*16*1000000;
SET @@SESSION.max_heap_table_size=5*1000000;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '5000000'
# Must not crash.
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
DROP TABLE t1;
diff --git a/mysql-test/r/cache_innodb.result b/mysql-test/r/cache_innodb.result
index b59298727c5..600ed84c3c9 100644
--- a/mysql-test/r/cache_innodb.result
+++ b/mysql-test/r/cache_innodb.result
@@ -134,7 +134,7 @@ connection default
SHOW VARIABLES LIKE 'have_query_cache';
Variable_name Value
have_query_cache YES
-SET GLOBAL query_cache_size = 200000;
+SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
SET SESSION STORAGE_ENGINE = InnoDB;
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
index f8d5d900a80..1ed7fcbb8fa 100644
--- a/mysql-test/r/change_user.result
+++ b/mysql-test/r/change_user.result
@@ -18,7 +18,7 @@ change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
0
-SET @@global.max_join_size = -1;
+SET @@global.max_join_size = 18446744073709551615;
SET @@session.max_join_size = default;
change_user
SELECT @@session.sql_big_selects;
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index b0b8316fe33..432b9b14a85 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -15,71 +15,6 @@ variable_name variable_value
DATETIME_FORMAT %Y-%m-%d %H:%i:%s
DATE_FORMAT %d.%m.%Y
TIME_FORMAT %H.%i.%s
-SET time_format='%H%i%s';
-SET time_format='%H:%i:%s.%f';
-SET time_format='%h-%i-%s.%f%p';
-SET time_format='%h:%i:%s.%f %p';
-SET time_format='%h:%i:%s%p';
-SET date_format='%Y%m%d';
-SET date_format='%Y.%m.%d';
-SET date_format='%d.%m.%Y';
-SET date_format='%m-%d-%Y';
-set datetime_format= '%Y%m%d%H%i%s';
-set datetime_format= '%Y-%m-%d %H:%i:%s';
-set datetime_format= '%m-%d-%y %H:%i:%s.%f';
-set datetime_format= '%d-%m-%Y %h:%i:%s%p';
-set datetime_format= '%H:%i:%s %Y-%m-%d';
-set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
-set datetime_format= '%h:%i:%s %p %Y-%m-%d';
-set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
-SELECT variable_name, variable_value
-FROM information_schema.session_variables
-WHERE variable_name IN ('date_format', 'datetime_format', 'time_format')
-ORDER BY variable_name;
-variable_name variable_value
-DATETIME_FORMAT %h:%i:%s.%f %p %Y-%m-%d
-DATE_FORMAT %m-%d-%Y
-TIME_FORMAT %h:%i:%s%p
-SET time_format='%h:%i:%s';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s'
-SET time_format='%H %i:%s';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H %i:%s'
-SET time_format='%H::%i:%s';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H::%i:%s'
-SET time_format='%H:%i:%s%f';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i:%s%f'
-SET time_format='%H:%i.%f:%s';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i.%f:%s'
-SET time_format='%H:%i:%s%p';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i:%s%p'
-SET time_format='%h:%i:%s.%f %p %Y-%m-%d';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s.%f %p %Y-%m-%d'
-SET time_format='%H%i%s.%f';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H%i%s.%f'
-SET time_format='%H:%i-%s.%f';
-ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i-%s.%f'
-SET date_format='%d.%m.%d';
-ERROR 42000: Variable 'date_format' can't be set to the value of '%d.%m.%d'
-SET datetime_format='%h.%m.%y %d.%i.%s';
-ERROR 42000: Variable 'datetime_format' can't be set to the value of '%h.%m.%y %d.%i.%s'
-set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d';
-ERROR 42000: Variable 'datetime_format' can't be set to the value of '%H:%i:%s.%f %p %Y-%m-%d'
-set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d';
-SET SESSION datetime_format=default;
-select @@global.datetime_format, @@session.datetime_format;
-@@global.datetime_format @@session.datetime_format
-%H:%i:%s %Y-%m-%d %H:%i:%s %Y-%m-%d
-SET GLOBAL datetime_format=default;
-SET SESSION datetime_format=default;
-select @@global.datetime_format, @@session.datetime_format;
-@@global.datetime_format @@session.datetime_format
-%Y-%m-%d %H:%i:%s %Y-%m-%d %H:%i:%s
-SET GLOBAL date_format=default;
-SET GLOBAL time_format=default;
-SET GLOBAL datetime_format=default;
-SET time_format=default;
-SET date_format=default;
-SET datetime_format=default;
select str_to_date(concat('15-01-2001',' 2:59:58.999'),
concat('%d-%m-%Y',' ','%H:%i:%s.%f'));
str_to_date(concat('15-01-2001',' 2:59:58.999'),
diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result
index b5863b94026..79474b960f5 100644
--- a/mysql-test/r/errors.result
+++ b/mysql-test/r/errors.result
@@ -109,10 +109,10 @@ SET sql_quote_show_create= _utf8 x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR蹺'
SET sql_quote_show_create=_latin1 x'5452DC45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR蹺'
-SET sql_quote_show_create='TR.E';
-ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR.E'
-SET sql_quote_show_create=TR.E;
-ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'E'
+SET sql_quote_show_create='TR蹺';
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR蹺'
+SET sql_quote_show_create=TR蹺;
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR蹺'
SET NAMES binary;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result
index 44eaa668b04..530d8559f11 100644
--- a/mysql-test/r/events_2.result
+++ b/mysql-test/r/events_2.result
@@ -13,12 +13,6 @@ ERROR HY000: Incorrect AT value: 'definitely not a datetime'
set names utf8;
create event 蟹邪写邪褔泻邪 on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
drop event 蟹邪写邪褔泻邪;
-set event_scheduler=off;
-ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
-set global event_scheduler=3;
-ERROR 42000: Variable 'event_scheduler' can't be set to the value of '3'
-set global event_scheduler=disabled;
-ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
"DISABLE the scheduler. Testing that it does not work when the variable is 0"
set global event_scheduler=off;
select definer, name, db from mysql.event;
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result
index efe6df41ac6..a5003c936e8 100644
--- a/mysql-test/r/events_bugs.result
+++ b/mysql-test/r/events_bugs.result
@@ -725,16 +725,15 @@ DROP USER mysqltest_u1@localhost;
drop procedure if exists p;
set @old_mode= @@sql_mode;
-set @@sql_mode= pow(2,32)-1;
+set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1;
-select @@sql_mode;
-@@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
+select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode;
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
+select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
-select name from mysql.event where name = 'p' and sql_mode = @full_mode;
+select name from mysql.event where name = 'e1' and sql_mode = @full_mode;
name
+e1
drop event e1;
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
diff --git a/mysql-test/r/have_profiling.require b/mysql-test/r/have_profiling.require
index 453ee5bb084..54caeba1dae 100644
--- a/mysql-test/r/have_profiling.require
+++ b/mysql-test/r/have_profiling.require
@@ -1,2 +1,2 @@
Variable_name Value
-have_profiling YES
+have_profiling YES
diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result
index c639b20de91..922f7241102 100644
--- a/mysql-test/r/index_merge_myisam.result
+++ b/mysql-test/r/index_merge_myisam.result
@@ -341,9 +341,7 @@ drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
-set join_buffer_size= 4000;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '4000'
+set join_buffer_size= 4096;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
@@ -1435,7 +1433,6 @@ select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on
set optimizer_switch=4;
-ERROR 42000: Variable 'optimizer_switch' can't be set to the value of '4'
set optimizer_switch=NULL;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
set optimizer_switch='default,index_merge';
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 7208c529e89..6cee55482e3 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1788,7 +1788,7 @@ Variable_name Value
innodb_thread_concurrency 0
set global innodb_thread_concurrency=1001;
Warnings:
-Warning 1292 Truncated incorrect thread_concurrency value: '1001'
+Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001'
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1000
@@ -1809,7 +1809,7 @@ Variable_name Value
innodb_concurrency_tickets 1000
set global innodb_concurrency_tickets=0;
Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1
diff --git a/mysql-test/r/innodb_bug42101-nonzero.result b/mysql-test/r/innodb_bug42101-nonzero.result
index 277dfffdd35..f43cb9da239 100644
--- a/mysql-test/r/innodb_bug42101-nonzero.result
+++ b/mysql-test/r/innodb_bug42101-nonzero.result
@@ -1,5 +1,5 @@
set global innodb_commit_concurrency=0;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
@@ -16,7 +16,7 @@ select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=0;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
diff --git a/mysql-test/r/innodb_bug42101.result b/mysql-test/r/innodb_bug42101.result
index 805097ffe9d..4e3367d5a54 100644
--- a/mysql-test/r/innodb_bug42101.result
+++ b/mysql-test/r/innodb_bug42101.result
@@ -3,12 +3,12 @@ select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=1;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=42;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '42'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 08d8059f61b..844109dba1f 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -274,8 +274,26 @@ Key_blocks_used 4
show status like 'key_blocks_unused';
Variable_name Value
Key_blocks_unused KEY_BLOCKS_UNUSED
+create table t1 (a int primary key);
+cache index t1 in keycache2;
+Table Op Msg_type Msg_text
+test.t1 assign_to_keycache status OK
+insert t1 values (1),(2),(3),(4),(5),(6),(7),(8);
set global keycache2.key_buffer_size=0;
+select * from t1;
+a
+1
+2
+3
+4
+5
+6
+7
+8
+drop table t1;
set global keycache3.key_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '100'
set global keycache3.key_buffer_size=0;
create table t1 (mytext text, FULLTEXT (mytext));
insert t1 values ('aaabbb');
@@ -334,8 +352,7 @@ test.t1 check status OK
DROP TABLE t1,t2;
set global key_cache_block_size= @my_key_cache_block_size;
set @@global.key_buffer_size=0;
-Warnings:
-Warning 1438 Cannot drop default keycache
+ERROR HY000: Cannot drop default keycache
select @@global.key_buffer_size;
@@global.key_buffer_size
2097152
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
new file mode 100644
index 00000000000..623b4a119e4
--- /dev/null
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -0,0 +1,947 @@
+The following options may be given as the first argument:
+--print-defaults Print the program argument list and exit
+--no-defaults Don't read default options from any options file
+--defaults-file=# Only read default options from the given file #
+--defaults-extra-file=# Read this file after the global files are read
+
+ --abort-slave-event-count=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --allow-suspicious-udfs
+ Allows use of UDFs consisting of only one symbol xxx()
+ without corresponding xxx_init() or xxx_deinit(). That
+ also means that one can load any function from any
+ library, for example exit() from libc.so
+ -a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
+ will also set transaction isolation level 'serializable'.
+ --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON,
+ OFF, FORCE (don't start if the plugin fails to load).
+ --auto-increment-increment[=#]
+ Auto-increment columns are incremented by this
+ --auto-increment-offset[=#]
+ Offset added to Auto-increment columns. Used when
+ auto-increment-increment != 1
+ --automatic-sp-privileges
+ Creating and dropping stored procedures alters ACLs
+ (Defaults to on; use --skip-automatic-sp-privileges to disable.)
+ --back-log=# The number of outstanding connection requests MySQL can
+ have. This comes into play when the main MySQL thread
+ gets very many connection requests in a very short time
+ -b, --basedir=name Path to installation directory. All paths are usually
+ resolved relative to this
+ --big-tables Allow big result sets by saving all temporary sets on
+ file (Solves most 'table full' errors)
+ --bind-address=name IP address to bind to.
+ --binlog-cache-size=#
+ The size of the cache to hold the SQL statements for the
+ binary log during a transaction. If you often use big,
+ multi-statement transactions you can increase this to get
+ more performance
+ --binlog-do-db=name Tells the master it should log updates for the specified
+ database, and exclude all others not explicitly
+ mentioned.
+ --binlog-format=name
+ What form of binary logging the master will use: either
+ ROW for row-based binary logging, STATEMENT for
+ statement-based binary logging, or MIXED. MIXED is
+ statement-based binary logging except for those
+ statements where only row-based is correct: those which
+ involve user-defined functions (i.e. UDFs) or the UUID()
+ function; for those, row-based binary logging is
+ automatically used. If NDBCLUSTER is enabled and
+ binlog-format is MIXED, the format switches to row-based
+ and back implicitly per each query accessing an
+ NDBCLUSTER table
+ --binlog-ignore-db=name
+ Tells the master that updates to the given database
+ should not be logged tothe binary log.
+ --binlog-row-event-max-size=#
+ The maximum size of a row-based binary log event in
+ bytes. Rows will be grouped into events smaller than this
+ size if possible. The value has to be a multiple of 256.
+ --blackhole[=name] Enable or disable BLACKHOLE plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --bootstrap Used by mysql installation scripts.
+ --bulk-insert-buffer-size=#
+ Size of tree cache used in bulk insert optimisation. Note
+ that this is a limit per thread!
+ --character-set-client-handshake
+ Don't ignore client side character set value sent during
+ handshake.
+ (Defaults to on; use --skip-character-set-client-handshake to disable.)
+ --character-set-filesystem=name
+ Set the filesystem character set.
+ -C, --character-set-server=name
+ Set the default character set.
+ --character-sets-dir=name
+ Directory where character sets are
+ -r, --chroot=name Chroot mysqld daemon during startup.
+ --collation-server=name
+ Set the default collation.
+ --completion-type=name
+ The transaction completion type, one of NO_CHAIN, CHAIN,
+ RELEASE
+ --concurrent-insert[=name]
+ Use concurrent insert with MyISAM. Possible values are
+ NEVER, AUTO, ALWAYS
+ --connect-timeout=# The number of seconds the mysqld server is waiting for a
+ connect packet before responding with 'Bad handshake'
+ --console Write error output on screen; Don't remove the console
+ window on windows.
+ --core-file Write core on errors.
+ -h, --datadir=name Path to the database root directory
+ --date-format=name The DATE format (ignored)
+ --datetime-format=name
+ The DATETIME format (ignored)
+ -C, --default-character-set=name
+ Set the default character set (deprecated option, use
+ --character-set-server instead).
+ --default-collation=name
+ Set the default collation (deprecated option, use
+ --collation-server instead).
+ --default-storage-engine=name
+ The default storage engine for new tables
+ --default-time-zone=name
+ Set the default time zone.
+ --default-week-format=#
+ The default week format used by WEEK() functions
+ --delay-key-write[=name]
+ Type of DELAY_KEY_WRITE
+ --delay-key-write-for-all-tables
+ Don't flush key buffers between writes for any MyISAM
+ table (Deprecated option, use --delay-key-write=all
+ instead).
+ --delayed-insert-limit=#
+ After inserting delayed_insert_limit rows, the INSERT
+ DELAYED handler will check if there are any SELECT
+ statements pending. If so, it allows these to execute
+ before continuing
+ --delayed-insert-timeout=#
+ How long a INSERT DELAYED thread should wait for INSERT
+ statements before terminating
+ --delayed-queue-size=#
+ What size queue (in rows) should be allocated for
+ handling INSERT DELAYED. If the queue becomes full, any
+ client that does INSERT DELAYED will wait until there is
+ room in the queue again
+ --des-key-file=name Load keys for des_encrypt() and des_encrypt from given
+ file.
+ --disconnect-slave-event-count=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --div-precision-increment=#
+ Precision of the result of '/' operator will be increased
+ on that value
+ --enable-locking Deprecated option, use --external-locking instead.
+ --engine-condition-pushdown
+ Push supported query conditions to the storage engine
+ (Defaults to on; use --skip-engine-condition-pushdown to disable.)
+ --event-scheduler[=name]
+ Enable the event scheduler. Possible values are ON, OFF,
+ and DISABLED (keep the event scheduler completely
+ deactivated, it cannot be activated run-time)
+ -T, --exit-info[=#] Used for debugging; Use at your own risk!
+ --expire-logs-days=#
+ If non-zero, binary logs will be purged after
+ expire_logs_days days; possible purges happen at startup
+ and at binary log rotation
+ --external-locking Use system (external) locking (disabled by default).
+ With this option enabled you can run myisamchk to test
+ (not repair) tables while the MySQL server is running.
+ Disable with --skip-external-locking.
+ --federated[=name] Enable or disable FEDERATED plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --flush Flush MyISAM tables to disk between SQL commands
+ --flush-time=# A dedicated thread is created to flush all tables at the
+ given interval
+ --ft-boolean-syntax=name
+ List of operators for MATCH ... AGAINST ( ... IN BOOLEAN
+ MODE)
+ --ft-max-word-len=# The maximum length of the word to be included in a
+ FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
+ after changing this variable
+ --ft-min-word-len=# The minimum length of the word to be included in a
+ FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
+ after changing this variable
+ --ft-query-expansion-limit=#
+ Number of best matches to use for query expansion
+ --ft-stopword-file=name
+ Use stopwords from this file instead of built-in list
+ --gdb Set up signals usable for debugging
+ --general-log Log connections and queries to a table or log file.
+ Defaults logging to a file hostname.log or a table
+ mysql.general_logif --log-output=TABLE is used
+ --general-log-file=name
+ Log connections and queries to given file
+ --group-concat-max-len=#
+ The maximum length of the result of function
+ GROUP_CONCAT()
+ -?, --help Display this help and exit.
+ --ignore-builtin-innodb
+ Disable initialization of builtin InnoDB plugin
+ --init-connect=name Command(s) that are executed for each new connection
+ --init-file=name Read SQL commands from this file at startup
+ --init-rpl-role=name
+ Set the replication role.
+ --init-slave=name Command(s) that are executed by a slave server each time
+ the SQL thread starts
+ --interactive-timeout=#
+ The number of seconds the server waits for activity on an
+ interactive connection before closing it
+ --join-buffer-size=#
+ The size of the buffer that is used for full joins
+ --keep-files-on-create
+ Don't overwrite stale .MYD and .MYI even if no directory
+ is specified
+ --key-buffer-size=# The size of the buffer used for index blocks for MyISAM
+ tables. Increase this to get better index handling (for
+ all reads and multiple writes) to as much as you can
+ afford
+ --key-cache-age-threshold=#
+ This characterizes the number of hits a hot block has to
+ be untouched until it is considered aged enough to be
+ downgraded to a warm block. This specifies the percentage
+ ratio of that number of hits to the total number of
+ blocks in key cache
+ --key-cache-block-size=#
+ The default size of key cache blocks
+ --key-cache-division-limit=#
+ The minimum percentage of warm blocks in key cache
+ -L, --language=name Client error messages in given language. May be given as
+ a full path. Deprecated. Use --lc-messages-dir instead.
+ --large-pages Enable support for large pages
+ --lc-messages=name Set the language used for the error messages.
+ -L, --lc-messages-dir=name
+ Directory where error messages are
+ --lc-time-names=name
+ Set the language used for the month names and the days of
+ the week.
+ --local-infile Enable LOAD DATA LOCAL INFILE
+ (Defaults to on; use --skip-local-infile to disable.)
+ -l, --log[=name] Log connections and queries to file (deprecated option,
+ use --general-log/--general-log-file instead).
+ --log-bin[=name] Log update queries in binary format. Optional (but
+ strongly recommended to avoid replication problems if
+ server's hostname changes) argument should be the chosen
+ location for the binary log files.
+ --log-bin-index=name
+ File that holds the names for last binary log files.
+ --log-bin-trust-function-creators
+ If set to FALSE (the default), then when --log-bin is
+ used, creation of a stored function (or trigger) is
+ allowed only to users having the SUPER privilege and only
+ if this stored function (trigger) may not break binary
+ logging. Note that if ALL connections to this server
+ ALWAYS use row-based binary logging, the security issues
+ do not exist and the binary logging cannot break, so you
+ can safely set this to TRUE
+ --log-error[=name] Error log file
+ --log-isam[=name] Log all MyISAM changes to file.
+ -0, --log-long-format
+ Log some extra information to update log. Please note
+ that this option is deprecated; see --log-short-format
+ option.
+ --log-output=name Syntax: log-output=value[,value...], where "value" could
+ be TABLE, FILE or NONE
+ --log-queries-not-using-indexes
+ Log queries that are executed without benefit of any
+ index to the slow log if it is open
+ --log-short-format Don't log extra information to update and slow-query
+ logs.
+ --log-slave-updates Tells the slave to log the updates from the slave thread
+ to the binary log. You will need to turn it on if you
+ plan to daisy-chain the slaves
+ --log-slow-admin-statements
+ Log slow OPTIMIZE, ANALYZE, ALTER and other
+ administrative statements to the slow log if it is open.
+ --log-slow-queries[=name]
+ Log slow queries to a table or log file. Defaults logging
+ to table mysql.slow_log or hostname-slow.log if
+ --log-output=file is used. Must be enabled to activate
+ other slow log options. Deprecated option, use
+ --slow-query-log/--slow-query-log-file instead.
+ --log-slow-slave-statements
+ Log slow statements executed by slave thread to the slow
+ log if it is open.
+ --log-tc=name Path to transaction coordinator log (used for
+ transactions that affect more than one storage engine,
+ when binary log is disabled)
+ --log-tc-size=# Size of transaction coordinator log.
+ --log-update[=name] The update log is deprecated since version 5.0, is
+ replaced by the binary log and this option justs turns on
+ --log-bin instead.
+ -W, --log-warnings[=#]
+ Log some not critical warnings to the log file
+ --long-query-time=# Log all queries that have taken more than long_query_time
+ seconds to execute to file. The argument will be treated
+ as a decimal value with microsecond precision
+ --low-priority-updates
+ INSERT/DELETE/UPDATE has lower priority than selects
+ --lower-case-table-names[=#]
+ If set to 1 table names are stored in lowercase on disk
+ and table names will be case-insensitive. Should be set
+ to 2 if you are using a case insensitive file system
+ --master-info-file=name
+ The location and name of the file that remembers the
+ master and where the I/O replication thread is in the
+ master's binlogs.
+ --master-retry-count=#
+ The number of tries the slave will make to connect to the
+ master before giving up.
+ --max-allowed-packet=#
+ Max packet length to send to or receive from the server
+ --max-binlog-cache-size=#
+ Can be used to restrict the total size used to cache a
+ multi-transaction query
+ --max-binlog-dump-events=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --max-binlog-size=# Binary log will be rotated automatically when the size
+ exceeds this value. Will also apply to relay logs if
+ max_relay_log_size is 0
+ --max-connect-errors=#
+ If there is more than this number of interrupted
+ connections from a host this host will be blocked from
+ further connections
+ --max-connections=# The number of simultaneous clients allowed
+ --max-delayed-threads=#
+ Don't start more than this number of threads to handle
+ INSERT DELAYED statements. If set to zero INSERT DELAYED
+ will be not used
+ --max-error-count=# Max number of errors/warnings to store for a statement
+ --max-heap-table-size=#
+ Don't allow creation of heap tables bigger than this
+ --max-join-size=# Joins that are probably going to read more than
+ max_join_size records return an error
+ --max-length-for-sort-data=#
+ Max number of bytes in sorted records
+ --max-prepared-stmt-count=#
+ Maximum number of prepared statements in the server
+ --max-relay-log-size=#
+ If non-zero: relay log will be rotated automatically when
+ the size exceeds this value; if zero: when the size
+ exceeds max_binlog_size
+ --max-seeks-for-key=#
+ Limit assumed max number of seeks when looking up rows
+ based on a key
+ --max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
+ values (only the first max_sort_length bytes of each
+ value are used; the rest are ignored)
+ --max-sp-recursion-depth[=#]
+ Maximum stored procedure recursion depth
+ --max-tmp-tables=# Maximum number of temporary tables a client can keep open
+ at a time
+ --max-user-connections=#
+ The maximum number of active connections for a single
+ user (0 = no limit)
+ --max-write-lock-count=#
+ After this many write locks, allow some read locks to run
+ in between
+ --memlock Lock mysqld in memory.
+ --min-examined-row-limit=#
+ Don't write queries to slow log that examine fewer rows
+ than that
+ --multi-range-count=#
+ Number of key ranges to request at once
+ --myisam-block-size=#
+ Block size to be used for MyISAM index pages
+ --myisam-data-pointer-size=#
+ Default pointer size to be used for MyISAM tables
+ --myisam-max-sort-file-size=#
+ Don't use the fast sort index method to created index if
+ the temporary file would get bigger than this
+ --myisam-mmap-size=#
+ Restricts the total memory used for memory mapping of
+ MySQL tables
+ --myisam-recover-options[=name]
+ Syntax: myisam-recover-options[=option[,option...]],
+ where option can be DEFAULT, BACKUP, FORCE, QUICK, or OFF
+ --myisam-repair-threads=#
+ If larger than 1, when repairing a MyISAM table all
+ indexes will be created in parallel, with one thread per
+ index. The value of 1 disables parallel repair
+ --myisam-sort-buffer-size=#
+ The buffer that is allocated when sorting the index when
+ doing a REPAIR or when creating indexes with CREATE INDEX
+ or ALTER TABLE
+ --myisam-stats-method=name
+ Specifies how MyISAM index statistics collection code
+ should treat NULLs. Possible values of name are
+ NULLS_UNEQUAL (default behavior for 4.1 and later),
+ NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
+ --myisam-use-mmap Use memory mapping for reading and writing MyISAM tables
+ --net-buffer-length=#
+ Buffer length for TCP/IP and socket communication
+ --net-read-timeout=#
+ Number of seconds to wait for more data from a connection
+ before aborting the read
+ --net-retry-count=# If a read on a communication port is interrupted, retry
+ this many times before giving up
+ --net-write-timeout=#
+ Number of seconds to wait for a block to be written to a
+ connection before aborting the write
+ -n, --new Use very new possible "unsafe" functions
+ --old Use compatible behavior
+ --old-alter-table Use old, non-optimized alter table
+ --old-passwords Use old password encryption method (needed for 4.0 and
+ older clients)
+ --old-style-user-limits
+ Enable old-style user limits (before 5.0.3 user resources
+ were counted per each user+host vs. per account)
+ --one-thread (deprecated): Only use one thread (for debugging under
+ Linux). Use thread-handling=no-threads instead
+ --open-files-limit=#
+ If this is not 0, then mysqld will use this value to
+ reserve file descriptors to use with setrlimit(). If this
+ value is 0 then mysqld will reserve max_connections*5 or
+ max_connections + table_cache*2 (whichever is larger)
+ number of file descriptors
+ --optimizer-prune-level=#
+ Controls the heuristic(s) applied during query
+ optimization to prune less-promising partial plans from
+ the optimizer search space. Meaning: 0 - do not apply any
+ heuristic, thus perform exhaustive search; 1 - prune
+ plans based on number of retrieved rows
+ --optimizer-search-depth=#
+ Maximum depth of search performed by the query optimizer.
+ Values larger than the number of relations in a query
+ result in better query plans, but take longer to compile
+ a query. Values smaller than the number of tables in a
+ relation result in faster optimization, but may produce
+ very bad query plans. If set to 0, the system will
+ automatically pick a reasonable value; if set to 63, the
+ optimizer will switch to the original find_best
+ search(used for testing/comparison)
+ --optimizer-switch=name
+ optimizer_switch=option=val[,option=val...], where option
+ is one of {index_merge, index_merge_union,
+ index_merge_sort_union, index_merge_intersection} and val
+ is one of {on, off, default}
+ --partition[=name] Enable or disable partition plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --pid-file=name Pid file used by safe_mysqld
+ --plugin-dir=name Directory for plugins
+ --plugin-load=name Optional semicolon-separated list of plugins to load,
+ where each plugin is identified as name=library, where
+ name is the plugin name and library is the plugin library
+ in plugin_dir.
+ -P, --port=# Port number to use for connection or 0 to default to,
+ my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
+ (3306), whatever comes first
+ --port-open-timeout=#
+ Maximum time in seconds to wait for the port to become
+ free. (Default: no wait)
+ --preload-buffer-size=#
+ The size of the buffer that is allocated when preloading
+ indexes
+ --profiling-history-size=#
+ Limit of query profiling memory
+ --query-alloc-block-size=#
+ Allocation block size for query parsing and execution
+ --query-cache-limit=#
+ Don't cache results that are bigger than this
+ --query-cache-min-res-unit=#
+ The minimum size for blocks allocated by the query cache
+ --query-cache-size=#
+ The memory allocated to store results from old queries
+ --query-cache-type=name
+ OFF = Don't cache or retrieve results. ON = Cache all
+ results except SELECT SQL_NO_CACHE ... queries. DEMAND =
+ Cache only SELECT SQL_CACHE ... queries
+ --query-cache-wlock-invalidate
+ Invalidate queries in query cache on LOCK for write
+ --query-prealloc-size=#
+ Persistent buffer for query parsing and execution
+ --range-alloc-block-size=#
+ Allocation block size for storing ranges during
+ optimization
+ --read-buffer-size=#
+ Each thread that does a sequential scan allocates a
+ buffer of this size for each table it scans. If you do
+ many sequential scans, you may want to increase this
+ value
+ --read-only Make all non-temporary tables read-only, with the
+ exception for replication (slave) threads and users with
+ the SUPER privilege
+ --read-rnd-buffer-size=#
+ When reading rows in sorted order after a sort, the rows
+ are read through this buffer to avoid a disk seeks. If
+ not set, then it's set to the value of record_buffer
+ --record-buffer=# Deprecated; use --read-buffer-size instead.
+ --relay-log=name The location and name to use for relay logs
+ --relay-log-index=name
+ The location and name to use for the file that keeps a
+ list of the last relay logs
+ --relay-log-info-file=name
+ The location and name of the file that remembers where
+ the SQL replication thread is in the relay logs
+ --relay-log-purge if disabled - do not purge relay logs. if enabled - purge
+ them as soon as they are no more needed
+ (Defaults to on; use --skip-relay-log-purge to disable.)
+ --relay-log-recovery
+ Enables automatic relay log recovery right after the
+ database startup, which means that the IO Thread starts
+ re-fetching from the master right after the last
+ transaction processed
+ --relay-log-space-limit=#
+ Maximum space to use for all relay logs
+ --replicate-do-db=name
+ Tells the slave thread to restrict replication to the
+ specified database. To specify more than one database,
+ use the directive multiple times, once for each database.
+ Note that this will only work if you do not use
+ cross-database queries such as UPDATE some_db.some_table
+ SET foo='bar' while having selected a different or no
+ database. If you need cross database updates to work,
+ make sure you have 3.23.28 or later, and use
+ replicate-wild-do-table=db_name.%.
+ --replicate-do-table=name
+ Tells the slave thread to restrict replication to the
+ specified table. To specify more than one table, use the
+ directive multiple times, once for each table. This will
+ work for cross-database updates, in contrast to
+ replicate-do-db.
+ --replicate-ignore-db=name
+ Tells the slave thread to not replicate to the specified
+ database. To specify more than one database to ignore,
+ use the directive multiple times, once for each database.
+ This option will not work if you use cross database
+ updates. If you need cross database updates to work, make
+ sure you have 3.23.28 or later, and use
+ replicate-wild-ignore-table=db_name.%.
+ --replicate-ignore-table=name
+ Tells the slave thread to not replicate to the specified
+ table. To specify more than one table to ignore, use the
+ directive multiple times, once for each table. This will
+ work for cross-datbase updates, in contrast to
+ replicate-ignore-db.
+ --replicate-rewrite-db=name
+ Updates to a database with a different name than the
+ original. Example:
+ replicate-rewrite-db=master_db_name->slave_db_name.
+ --replicate-same-server-id
+ In replication, if set to 1, do not skip events having
+ our server id. Default value is 0 (to break infinite
+ loops in circular replication). Can't be set to 1 if
+ --log-slave-updates is used.
+ --replicate-wild-do-table=name
+ Tells the slave thread to restrict replication to the
+ tables that match the specified wildcard pattern. To
+ specify more than one table, use the directive multiple
+ times, once for each table. This will work for
+ cross-database updates. Example:
+ replicate-wild-do-table=foo%.bar% will replicate only
+ updates to tables in all databases that start with foo
+ and whose table names start with bar.
+ --replicate-wild-ignore-table=name
+ Tells the slave thread to not replicate to the tables
+ that match the given wildcard pattern. To specify more
+ than one table to ignore, use the directive multiple
+ times, once for each table. This will work for
+ cross-database updates. Example:
+ replicate-wild-ignore-table=foo%.bar% will not do updates
+ to tables in databases that start with foo and whose
+ table names start with bar.
+ --report-host=name Hostname or IP of the slave to be reported to the master
+ during slave registration. Will appear in the output of
+ SHOW SLAVE HOSTS. Leave unset if you do not want the
+ slave to register itself with the master. Note that it is
+ not sufficient for the master to simply read the IP of
+ the slave off the socket once the slave connects. Due to
+ NAT and other routing issues, that IP may not be valid
+ for connecting to the slave from the master or other
+ hosts
+ --report-password=name
+ The account password of the slave to be reported to the
+ master during slave registration
+ --report-port=# Port for connecting to slave reported to the master
+ during slave registration. Set it only if the slave is
+ listening on a non-default port or if you have a special
+ tunnel from the master or other clients to the slave. If
+ not sure, leave this option unset
+ --report-user=name The account user name of the slave to be reported to the
+ master during slave registration
+ --rpl-recovery-rank=#
+ Unused, will be removed
+ --safe-mode Skip some optimize stages (for testing).
+ --safe-show-database
+ Deprecated option; use GRANT SHOW DATABASES instead...
+ --safe-user-create Don't allow new user creation by the user who has no
+ write privileges to the mysql.user table.
+ --secure-auth Disallow authentication for accounts that have old
+ (pre-4.1) passwords
+ --secure-file-priv=name
+ Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
+ files within specified directory
+ --server-id=# Uniquely identifies the server instance in the community
+ of replication partners
+ -O, --set-variable=name
+ Change the value of a variable. Please note that this
+ option is deprecated;you can set variables directly with
+ --variable-name=value.
+ --show-slave-auth-info
+ Show user and password in SHOW SLAVE HOSTS on this master
+ --skip-grant-tables Start without grant tables. This gives all users FULL
+ ACCESS to all tables!
+ --skip-host-cache Don't cache host names.
+ --skip-locking Deprecated option, use --skip-external-locking instead.
+ --skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
+ 'localhost'.
+ --skip-networking Don't allow connection with TCP/IP
+ --skip-new Don't use new, possible wrong routines.
+ --skip-show-database
+ Don't allow 'SHOW DATABASE' commands
+ --skip-slave-start If set, slave is not autostarted.
+ --skip-stack-trace Don't print a stack trace on failure.
+ --skip-symlink Don't allow symlinking of tables. Deprecated option. Use
+ --skip-symbolic-links instead.
+ --skip-thread-priority
+ Don't give threads different priorities. This option is
+ deprecated because it has no effect; the implied behavior
+ is already the default.
+ --slave-compressed-protocol
+ Use compression on master/slave protocol
+ --slave-exec-mode=name
+ Modes for how replication events should be executed.
+ Legal values are STRICT (default) and IDEMPOTENT. In
+ IDEMPOTENT mode, replication will not stop for operations
+ that are idempotent. In STRICT mode, replication will
+ stop on any unexpected difference between the master and
+ the slave
+ --slave-load-tmpdir=name
+ The location where the slave should put its temporary
+ files when replicating a LOAD DATA INFILE command
+ --slave-net-timeout=#
+ Number of seconds to wait for more data from a
+ master/slave connection before aborting the read
+ --slave-skip-errors=name
+ Tells the slave thread to continue replication when a
+ query event returns an error from the provided list
+ --slave-transaction-retries=#
+ Number of times the slave SQL thread will retry a
+ transaction in case it failed with a deadlock or elapsed
+ lock wait timeout, before giving up and stopping
+ --slow-launch-time=#
+ If creating the thread takes longer than this value (in
+ seconds), the Slow_launch_threads counter will be
+ incremented
+ --slow-query-log Log slow queries to a table or log file. Defaults logging
+ to a file hostname-slow.log or a table mysql.slow_log if
+ --log-output=TABLE is used. Must be enabled to activate
+ other slow log options
+ --slow-query-log-file=name
+ Log slow queries to given log file. Defaults logging to
+ hostname-slow.log. Must be enabled to activate other slow
+ log options
+ --socket=name Socket file to use for connection
+ --sort-buffer-size=#
+ Each thread that needs to do a sort allocates a buffer of
+ this size
+ --sporadic-binlog-dump-fail
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --sql-bin-update-same
+ The update log is deprecated since version 5.0, is
+ replaced by the binary log and this option does nothing
+ anymore.
+ --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
+ for the complete list of valid sql modes
+ --ssl Enable SSL for connection (automatically enabled with
+ other flags).
+ --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies --ssl)
+ --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl)
+ --ssl-cert=name X509 cert in PEM format (implies --ssl)
+ --ssl-cipher=name SSL cipher to use (implies --ssl)
+ --ssl-key=name X509 key in PEM format (implies --ssl)
+ -s, --symbolic-links
+ Enable symbolic link support.
+ --sync-binlog=# Synchronously flush binary log to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-frm Sync .frm files to disk on creation
+ (Defaults to on; use --skip-sync-frm to disable.)
+ --sync-master-info=#
+ Synchronously flush master info to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-relay-log=# Synchronously flush relay log to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-relay-log-info=#
+ Synchronously flush relay log info to disk after every
+ #th transaction. Use 0 (default) to disable synchronous
+ flushing
+ --sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
+ safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
+ value different for different invocations, even within
+ the same statement.
+ --table-cache=# Deprecated; use --table-open-cache instead.
+ --table-definition-cache=#
+ The number of cached table definitions
+ --table-lock-wait-timeout=#
+ Timeout in seconds to wait for a table level lock before
+ returning an error. Used only if the connection has
+ active cursors
+ --table-open-cache=#
+ The number of cached open tables
+ --tc-heuristic-recover=name
+ Decision to use in heuristic recover process. Possible
+ values are COMMIT or ROLLBACK.
+ --thread-cache-size=#
+ How many threads we should keep in a cache for reuse
+ --thread-handling=name
+ Define threads usage for handling queries, one of
+ one-thread-per-connection, no-threads
+ --thread-stack=# The stack size for each thread
+ --time-format=name The TIME format (ignored)
+ --timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
+ currently supported)
+ --tmp-table-size=# If an internal in-memory temporary table exceeds this
+ size, MySQL will automatically convert it to an on-disk
+ MyISAM table
+ -t, --tmpdir=name Path for temporary files. Several paths may be specified,
+ separated by a colon (:), in this case they are used in a
+ round-robin fashion
+ --transaction-alloc-block-size=#
+ Allocation block size for transactions to be stored in
+ binary log
+ --transaction-isolation=name
+ Default transaction isolation level.
+ --transaction-prealloc-size=#
+ Persistent buffer for transactions to be stored in binary
+ log
+ --updatable-views-with-limit=name
+ YES = Don't issue an error message (warning only) if a
+ VIEW without presence of a key of the underlying table is
+ used in queries with a LIMIT clause for updating. NO =
+ Prohibit update of a VIEW, which does not contain a key
+ of the underlying table and the query uses a LIMIT clause
+ (usually get from GUI tools)
+ -s, --use-symbolic-links
+ Enable symbolic link support. Deprecated option; use
+ --symbolic-links instead.
+ -u, --user=name Run mysqld daemon as user.
+ -v, --verbose Used with --help option for detailed help
+ -V, --version Output version information and exit.
+ --wait-timeout=# The number of seconds the server waits for activity on a
+ connection before closing it
+ -W, --warnings[=#] Deprecated; use --log-warnings instead.
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE} Value (after reading options)
+----------------------------------- --------------------------------------
+abort-slave-event-count 0
+allow-suspicious-udfs FALSE
+archive ON
+auto-increment-increment 1
+auto-increment-offset 1
+automatic-sp-privileges TRUE
+back-log 50
+big-tables FALSE
+bind-address (No default value)
+binlog-cache-size 32768
+binlog-format STATEMENT
+binlog-row-event-max-size 1024
+blackhole ON
+bulk-insert-buffer-size 8388608
+character-set-client-handshake TRUE
+character-set-filesystem binary
+character-set-server latin1
+chroot (No default value)
+collation-server latin1_swedish_ci
+completion-type NO_CHAIN
+concurrent-insert AUTO
+connect-timeout 10
+console FALSE
+date-format %Y-%m-%d
+datetime-format %Y-%m-%d %H:%i:%s
+default-character-set latin1
+default-collation latin1_swedish_ci
+default-storage-engine MyISAM
+default-time-zone (No default value)
+default-week-format 0
+delay-key-write ON
+delayed-insert-limit 100
+delayed-insert-timeout 300
+delayed-queue-size 1000
+des-key-file (No default value)
+disconnect-slave-event-count 0
+div-precision-increment 4
+enable-locking FALSE
+engine-condition-pushdown TRUE
+event-scheduler OFF
+expire-logs-days 0
+external-locking FALSE
+federated ON
+flush FALSE
+flush-time 0
+ft-boolean-syntax + -><()~*:""&|
+ft-max-word-len 84
+ft-min-word-len 4
+ft-query-expansion-limit 20
+ft-stopword-file (No default value)
+gdb FALSE
+general-log FALSE
+group-concat-max-len 1024
+help TRUE
+ignore-builtin-innodb FALSE
+init-connect
+init-file (No default value)
+init-rpl-role MASTER
+init-slave
+interactive-timeout 28800
+join-buffer-size 131072
+keep-files-on-create FALSE
+key-buffer-size 8388608
+key-cache-age-threshold 300
+key-cache-block-size 1024
+key-cache-division-limit 100
+large-pages FALSE
+lc-messages en_US
+lc-time-names en_US
+local-infile TRUE
+log-bin (No default value)
+log-bin-index (No default value)
+log-bin-trust-function-creators FALSE
+log-error
+log-isam myisam.log
+log-output FILE
+log-queries-not-using-indexes FALSE
+log-short-format FALSE
+log-slave-updates FALSE
+log-slow-admin-statements FALSE
+log-slow-slave-statements FALSE
+log-tc tc.log
+log-tc-size 24576
+log-update (No default value)
+log-warnings 1
+long-query-time 10
+low-priority-updates FALSE
+lower-case-table-names 1
+master-info-file master.info
+master-retry-count 86400
+max-allowed-packet 1048576
+max-binlog-cache-size 18446744073709547520
+max-binlog-dump-events 0
+max-binlog-size 1073741824
+max-connect-errors 10
+max-connections 151
+max-delayed-threads 20
+max-error-count 64
+max-heap-table-size 16777216
+max-join-size 18446744073709551615
+max-length-for-sort-data 1024
+max-prepared-stmt-count 16382
+max-relay-log-size 0
+max-seeks-for-key 18446744073709551615
+max-sort-length 1024
+max-sp-recursion-depth 0
+max-tmp-tables 32
+max-user-connections 0
+max-write-lock-count 18446744073709551615
+memlock FALSE
+min-examined-row-limit 0
+multi-range-count 256
+myisam-block-size 1024
+myisam-data-pointer-size 6
+myisam-max-sort-file-size 9223372036853727232
+myisam-mmap-size 18446744073709551615
+myisam-recover-options OFF
+myisam-repair-threads 1
+myisam-sort-buffer-size 8388608
+myisam-stats-method nulls_unequal
+myisam-use-mmap FALSE
+net-buffer-length 16384
+net-read-timeout 30
+net-retry-count 10
+net-write-timeout 60
+new FALSE
+old FALSE
+old-alter-table FALSE
+old-passwords FALSE
+old-style-user-limits FALSE
+optimizer-prune-level 1
+optimizer-search-depth 62
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+partition ON
+plugin-load (No default value)
+port 3306
+port-open-timeout 0
+preload-buffer-size 32768
+profiling-history-size 15
+query-alloc-block-size 8192
+query-cache-limit 1048576
+query-cache-min-res-unit 4096
+query-cache-size 0
+query-cache-type ON
+query-cache-wlock-invalidate FALSE
+query-prealloc-size 8192
+range-alloc-block-size 4096
+read-buffer-size 131072
+read-only FALSE
+read-rnd-buffer-size 262144
+record-buffer 131072
+relay-log (No default value)
+relay-log-index (No default value)
+relay-log-info-file relay-log.info
+relay-log-purge TRUE
+relay-log-recovery FALSE
+relay-log-space-limit 0
+replicate-same-server-id FALSE
+report-host (No default value)
+report-password (No default value)
+report-port 3306
+report-user (No default value)
+rpl-recovery-rank 0
+safe-user-create FALSE
+secure-auth FALSE
+secure-file-priv (No default value)
+server-id 0
+show-slave-auth-info FALSE
+skip-grant-tables TRUE
+skip-networking FALSE
+skip-show-database FALSE
+skip-slave-start FALSE
+slave-compressed-protocol FALSE
+slave-exec-mode STRICT
+slave-net-timeout 3600
+slave-skip-errors (No default value)
+slave-transaction-retries 10
+slow-launch-time 2
+slow-query-log FALSE
+socket /tmp/mysql.sock
+sort-buffer-size 2097152
+sporadic-binlog-dump-fail FALSE
+sql-mode
+ssl FALSE
+ssl-ca (No default value)
+ssl-capath (No default value)
+ssl-cert (No default value)
+ssl-cipher (No default value)
+ssl-key (No default value)
+symbolic-links FALSE
+sync-binlog 0
+sync-frm TRUE
+sync-master-info 0
+sync-relay-log 0
+sync-relay-log-info 0
+sysdate-is-now FALSE
+table-cache 400
+table-definition-cache 400
+table-lock-wait-timeout 50
+table-open-cache 400
+tc-heuristic-recover COMMIT
+thread-cache-size 0
+thread-handling one-thread-per-connection
+thread-stack 262144
+time-format %H:%i:%s
+timed-mutexes FALSE
+tmp-table-size 16777216
+transaction-alloc-block-size 8192
+transaction-isolation REPEATABLE-READ
+transaction-prealloc-size 4096
+updatable-views-with-limit YES
+use-symbolic-links FALSE
+verbose TRUE
+wait-timeout 28800
+warnings 1
+
+To see what values a running MySQL server is using, type
+'mysqladmin variables' instead of 'mysqld --verbose --help'.
diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result
new file mode 100644
index 00000000000..ec621d72bef
--- /dev/null
+++ b/mysql-test/r/mysqld--help-win.result
@@ -0,0 +1,953 @@
+The following options may be given as the first argument:
+--print-defaults Print the program argument list and exit
+--no-defaults Don't read default options from any options file
+--defaults-file=# Only read default options from the given file #
+--defaults-extra-file=# Read this file after the global files are read
+
+ --abort-slave-event-count=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --allow-suspicious-udfs
+ Allows use of UDFs consisting of only one symbol xxx()
+ without corresponding xxx_init() or xxx_deinit(). That
+ also means that one can load any function from any
+ library, for example exit() from libc.so
+ -a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
+ will also set transaction isolation level 'serializable'.
+ --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON,
+ OFF, FORCE (don't start if the plugin fails to load).
+ --auto-increment-increment[=#]
+ Auto-increment columns are incremented by this
+ --auto-increment-offset[=#]
+ Offset added to Auto-increment columns. Used when
+ auto-increment-increment != 1
+ --automatic-sp-privileges
+ Creating and dropping stored procedures alters ACLs
+ (Defaults to on; use --skip-automatic-sp-privileges to disable.)
+ --back-log=# The number of outstanding connection requests MySQL can
+ have. This comes into play when the main MySQL thread
+ gets very many connection requests in a very short time
+ -b, --basedir=name Path to installation directory. All paths are usually
+ resolved relative to this
+ --big-tables Allow big result sets by saving all temporary sets on
+ file (Solves most 'table full' errors)
+ --bind-address=name IP address to bind to.
+ --binlog-cache-size=#
+ The size of the cache to hold the SQL statements for the
+ binary log during a transaction. If you often use big,
+ multi-statement transactions you can increase this to get
+ more performance
+ --binlog-do-db=name Tells the master it should log updates for the specified
+ database, and exclude all others not explicitly
+ mentioned.
+ --binlog-format=name
+ What form of binary logging the master will use: either
+ ROW for row-based binary logging, STATEMENT for
+ statement-based binary logging, or MIXED. MIXED is
+ statement-based binary logging except for those
+ statements where only row-based is correct: those which
+ involve user-defined functions (i.e. UDFs) or the UUID()
+ function; for those, row-based binary logging is
+ automatically used. If NDBCLUSTER is enabled and
+ binlog-format is MIXED, the format switches to row-based
+ and back implicitly per each query accessing an
+ NDBCLUSTER table
+ --binlog-ignore-db=name
+ Tells the master that updates to the given database
+ should not be logged tothe binary log.
+ --binlog-row-event-max-size=#
+ The maximum size of a row-based binary log event in
+ bytes. Rows will be grouped into events smaller than this
+ size if possible. The value has to be a multiple of 256.
+ --blackhole[=name] Enable or disable BLACKHOLE plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --bootstrap Used by mysql installation scripts.
+ --bulk-insert-buffer-size=#
+ Size of tree cache used in bulk insert optimisation. Note
+ that this is a limit per thread!
+ --character-set-client-handshake
+ Don't ignore client side character set value sent during
+ handshake.
+ (Defaults to on; use --skip-character-set-client-handshake to disable.)
+ --character-set-filesystem=name
+ Set the filesystem character set.
+ -C, --character-set-server=name
+ Set the default character set.
+ --character-sets-dir=name
+ Directory where character sets are
+ -r, --chroot=name Chroot mysqld daemon during startup.
+ --collation-server=name
+ Set the default collation.
+ --completion-type=name
+ The transaction completion type, one of NO_CHAIN, CHAIN,
+ RELEASE
+ --concurrent-insert[=name]
+ Use concurrent insert with MyISAM. Possible values are
+ NEVER, AUTO, ALWAYS
+ --connect-timeout=# The number of seconds the mysqld server is waiting for a
+ connect packet before responding with 'Bad handshake'
+ --console Write error output on screen; Don't remove the console
+ window on windows.
+ --core-file Write core on errors.
+ -h, --datadir=name Path to the database root directory
+ --date-format=name The DATE format (ignored)
+ --datetime-format=name
+ The DATETIME format (ignored)
+ -C, --default-character-set=name
+ Set the default character set (deprecated option, use
+ --character-set-server instead).
+ --default-collation=name
+ Set the default collation (deprecated option, use
+ --collation-server instead).
+ --default-storage-engine=name
+ The default storage engine for new tables
+ --default-time-zone=name
+ Set the default time zone.
+ --default-week-format=#
+ The default week format used by WEEK() functions
+ --delay-key-write[=name]
+ Type of DELAY_KEY_WRITE
+ --delay-key-write-for-all-tables
+ Don't flush key buffers between writes for any MyISAM
+ table (Deprecated option, use --delay-key-write=all
+ instead).
+ --delayed-insert-limit=#
+ After inserting delayed_insert_limit rows, the INSERT
+ DELAYED handler will check if there are any SELECT
+ statements pending. If so, it allows these to execute
+ before continuing
+ --delayed-insert-timeout=#
+ How long a INSERT DELAYED thread should wait for INSERT
+ statements before terminating
+ --delayed-queue-size=#
+ What size queue (in rows) should be allocated for
+ handling INSERT DELAYED. If the queue becomes full, any
+ client that does INSERT DELAYED will wait until there is
+ room in the queue again
+ --des-key-file=name Load keys for des_encrypt() and des_encrypt from given
+ file.
+ --disconnect-slave-event-count=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --div-precision-increment=#
+ Precision of the result of '/' operator will be increased
+ on that value
+ --enable-locking Deprecated option, use --external-locking instead.
+ --engine-condition-pushdown
+ Push supported query conditions to the storage engine
+ (Defaults to on; use --skip-engine-condition-pushdown to disable.)
+ --event-scheduler[=name]
+ Enable the event scheduler. Possible values are ON, OFF,
+ and DISABLED (keep the event scheduler completely
+ deactivated, it cannot be activated run-time)
+ -T, --exit-info[=#] Used for debugging; Use at your own risk!
+ --expire-logs-days=#
+ If non-zero, binary logs will be purged after
+ expire_logs_days days; possible purges happen at startup
+ and at binary log rotation
+ --external-locking Use system (external) locking (disabled by default).
+ With this option enabled you can run myisamchk to test
+ (not repair) tables while the MySQL server is running.
+ Disable with --skip-external-locking.
+ --federated[=name] Enable or disable FEDERATED plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --flush Flush MyISAM tables to disk between SQL commands
+ --flush-time=# A dedicated thread is created to flush all tables at the
+ given interval
+ --ft-boolean-syntax=name
+ List of operators for MATCH ... AGAINST ( ... IN BOOLEAN
+ MODE)
+ --ft-max-word-len=# The maximum length of the word to be included in a
+ FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
+ after changing this variable
+ --ft-min-word-len=# The minimum length of the word to be included in a
+ FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
+ after changing this variable
+ --ft-query-expansion-limit=#
+ Number of best matches to use for query expansion
+ --ft-stopword-file=name
+ Use stopwords from this file instead of built-in list
+ --gdb Set up signals usable for debugging
+ --general-log Log connections and queries to a table or log file.
+ Defaults logging to a file hostname.log or a table
+ mysql.general_logif --log-output=TABLE is used
+ --general-log-file=name
+ Log connections and queries to given file
+ --group-concat-max-len=#
+ The maximum length of the result of function
+ GROUP_CONCAT()
+ -?, --help Display this help and exit.
+ --ignore-builtin-innodb
+ Disable initialization of builtin InnoDB plugin
+ --init-connect=name Command(s) that are executed for each new connection
+ --init-file=name Read SQL commands from this file at startup
+ --init-rpl-role=name
+ Set the replication role.
+ --init-slave=name Command(s) that are executed by a slave server each time
+ the SQL thread starts
+ --interactive-timeout=#
+ The number of seconds the server waits for activity on an
+ interactive connection before closing it
+ --join-buffer-size=#
+ The size of the buffer that is used for full joins
+ --keep-files-on-create
+ Don't overwrite stale .MYD and .MYI even if no directory
+ is specified
+ --key-buffer-size=# The size of the buffer used for index blocks for MyISAM
+ tables. Increase this to get better index handling (for
+ all reads and multiple writes) to as much as you can
+ afford
+ --key-cache-age-threshold=#
+ This characterizes the number of hits a hot block has to
+ be untouched until it is considered aged enough to be
+ downgraded to a warm block. This specifies the percentage
+ ratio of that number of hits to the total number of
+ blocks in key cache
+ --key-cache-block-size=#
+ The default size of key cache blocks
+ --key-cache-division-limit=#
+ The minimum percentage of warm blocks in key cache
+ -L, --language=name Client error messages in given language. May be given as
+ a full path. Deprecated. Use --lc-messages-dir instead.
+ --lc-messages=name Set the language used for the error messages.
+ -L, --lc-messages-dir=name
+ Directory where error messages are
+ --lc-time-names=name
+ Set the language used for the month names and the days of
+ the week.
+ --local-infile Enable LOAD DATA LOCAL INFILE
+ (Defaults to on; use --skip-local-infile to disable.)
+ -l, --log[=name] Log connections and queries to file (deprecated option,
+ use --general-log/--general-log-file instead).
+ --log-bin[=name] Log update queries in binary format. Optional (but
+ strongly recommended to avoid replication problems if
+ server's hostname changes) argument should be the chosen
+ location for the binary log files.
+ --log-bin-index=name
+ File that holds the names for last binary log files.
+ --log-bin-trust-function-creators
+ If set to FALSE (the default), then when --log-bin is
+ used, creation of a stored function (or trigger) is
+ allowed only to users having the SUPER privilege and only
+ if this stored function (trigger) may not break binary
+ logging. Note that if ALL connections to this server
+ ALWAYS use row-based binary logging, the security issues
+ do not exist and the binary logging cannot break, so you
+ can safely set this to TRUE
+ --log-error[=name] Error log file
+ --log-isam[=name] Log all MyISAM changes to file.
+ -0, --log-long-format
+ Log some extra information to update log. Please note
+ that this option is deprecated; see --log-short-format
+ option.
+ --log-output=name Syntax: log-output=value[,value...], where "value" could
+ be TABLE, FILE or NONE
+ --log-queries-not-using-indexes
+ Log queries that are executed without benefit of any
+ index to the slow log if it is open
+ --log-short-format Don't log extra information to update and slow-query
+ logs.
+ --log-slave-updates Tells the slave to log the updates from the slave thread
+ to the binary log. You will need to turn it on if you
+ plan to daisy-chain the slaves
+ --log-slow-admin-statements
+ Log slow OPTIMIZE, ANALYZE, ALTER and other
+ administrative statements to the slow log if it is open.
+ --log-slow-queries[=name]
+ Log slow queries to a table or log file. Defaults logging
+ to table mysql.slow_log or hostname-slow.log if
+ --log-output=file is used. Must be enabled to activate
+ other slow log options. Deprecated option, use
+ --slow-query-log/--slow-query-log-file instead.
+ --log-slow-slave-statements
+ Log slow statements executed by slave thread to the slow
+ log if it is open.
+ --log-tc=name Path to transaction coordinator log (used for
+ transactions that affect more than one storage engine,
+ when binary log is disabled)
+ --log-tc-size=# Size of transaction coordinator log.
+ --log-update[=name] The update log is deprecated since version 5.0, is
+ replaced by the binary log and this option justs turns on
+ --log-bin instead.
+ -W, --log-warnings[=#]
+ Log some not critical warnings to the log file
+ --long-query-time=# Log all queries that have taken more than long_query_time
+ seconds to execute to file. The argument will be treated
+ as a decimal value with microsecond precision
+ --low-priority-updates
+ INSERT/DELETE/UPDATE has lower priority than selects
+ --lower-case-table-names[=#]
+ If set to 1 table names are stored in lowercase on disk
+ and table names will be case-insensitive. Should be set
+ to 2 if you are using a case insensitive file system
+ --master-info-file=name
+ The location and name of the file that remembers the
+ master and where the I/O replication thread is in the
+ master's binlogs.
+ --master-retry-count=#
+ The number of tries the slave will make to connect to the
+ master before giving up.
+ --max-allowed-packet=#
+ Max packet length to send to or receive from the server
+ --max-binlog-cache-size=#
+ Can be used to restrict the total size used to cache a
+ multi-transaction query
+ --max-binlog-dump-events=#
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --max-binlog-size=# Binary log will be rotated automatically when the size
+ exceeds this value. Will also apply to relay logs if
+ max_relay_log_size is 0
+ --max-connect-errors=#
+ If there is more than this number of interrupted
+ connections from a host this host will be blocked from
+ further connections
+ --max-connections=# The number of simultaneous clients allowed
+ --max-delayed-threads=#
+ Don't start more than this number of threads to handle
+ INSERT DELAYED statements. If set to zero INSERT DELAYED
+ will be not used
+ --max-error-count=# Max number of errors/warnings to store for a statement
+ --max-heap-table-size=#
+ Don't allow creation of heap tables bigger than this
+ --max-join-size=# Joins that are probably going to read more than
+ max_join_size records return an error
+ --max-length-for-sort-data=#
+ Max number of bytes in sorted records
+ --max-prepared-stmt-count=#
+ Maximum number of prepared statements in the server
+ --max-relay-log-size=#
+ If non-zero: relay log will be rotated automatically when
+ the size exceeds this value; if zero: when the size
+ exceeds max_binlog_size
+ --max-seeks-for-key=#
+ Limit assumed max number of seeks when looking up rows
+ based on a key
+ --max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
+ values (only the first max_sort_length bytes of each
+ value are used; the rest are ignored)
+ --max-sp-recursion-depth[=#]
+ Maximum stored procedure recursion depth
+ --max-tmp-tables=# Maximum number of temporary tables a client can keep open
+ at a time
+ --max-user-connections=#
+ The maximum number of active connections for a single
+ user (0 = no limit)
+ --max-write-lock-count=#
+ After this many write locks, allow some read locks to run
+ in between
+ --memlock Lock mysqld in memory.
+ --min-examined-row-limit=#
+ Don't write queries to slow log that examine fewer rows
+ than that
+ --multi-range-count=#
+ Number of key ranges to request at once
+ --myisam-block-size=#
+ Block size to be used for MyISAM index pages
+ --myisam-data-pointer-size=#
+ Default pointer size to be used for MyISAM tables
+ --myisam-max-sort-file-size=#
+ Don't use the fast sort index method to created index if
+ the temporary file would get bigger than this
+ --myisam-mmap-size=#
+ Restricts the total memory used for memory mapping of
+ MySQL tables
+ --myisam-recover-options[=name]
+ Syntax: myisam-recover-options[=option[,option...]],
+ where option can be DEFAULT, BACKUP, FORCE, QUICK, or OFF
+ --myisam-repair-threads=#
+ If larger than 1, when repairing a MyISAM table all
+ indexes will be created in parallel, with one thread per
+ index. The value of 1 disables parallel repair
+ --myisam-sort-buffer-size=#
+ The buffer that is allocated when sorting the index when
+ doing a REPAIR or when creating indexes with CREATE INDEX
+ or ALTER TABLE
+ --myisam-stats-method=name
+ Specifies how MyISAM index statistics collection code
+ should treat NULLs. Possible values of name are
+ NULLS_UNEQUAL (default behavior for 4.1 and later),
+ NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
+ --myisam-use-mmap Use memory mapping for reading and writing MyISAM tables
+ --named-pipe Enable the named pipe (NT)
+ --net-buffer-length=#
+ Buffer length for TCP/IP and socket communication
+ --net-read-timeout=#
+ Number of seconds to wait for more data from a connection
+ before aborting the read
+ --net-retry-count=# If a read on a communication port is interrupted, retry
+ this many times before giving up
+ --net-write-timeout=#
+ Number of seconds to wait for a block to be written to a
+ connection before aborting the write
+ -n, --new Use very new possible "unsafe" functions
+ --old Use compatible behavior
+ --old-alter-table Use old, non-optimized alter table
+ --old-passwords Use old password encryption method (needed for 4.0 and
+ older clients)
+ --old-style-user-limits
+ Enable old-style user limits (before 5.0.3 user resources
+ were counted per each user+host vs. per account)
+ --one-thread (deprecated): Only use one thread (for debugging under
+ Linux). Use thread-handling=no-threads instead
+ --open-files-limit=#
+ If this is not 0, then mysqld will use this value to
+ reserve file descriptors to use with setrlimit(). If this
+ value is 0 then mysqld will reserve max_connections*5 or
+ max_connections + table_cache*2 (whichever is larger)
+ number of file descriptors
+ --optimizer-prune-level=#
+ Controls the heuristic(s) applied during query
+ optimization to prune less-promising partial plans from
+ the optimizer search space. Meaning: 0 - do not apply any
+ heuristic, thus perform exhaustive search; 1 - prune
+ plans based on number of retrieved rows
+ --optimizer-search-depth=#
+ Maximum depth of search performed by the query optimizer.
+ Values larger than the number of relations in a query
+ result in better query plans, but take longer to compile
+ a query. Values smaller than the number of tables in a
+ relation result in faster optimization, but may produce
+ very bad query plans. If set to 0, the system will
+ automatically pick a reasonable value; if set to 63, the
+ optimizer will switch to the original find_best
+ search(used for testing/comparison)
+ --optimizer-switch=name
+ optimizer_switch=option=val[,option=val...], where option
+ is one of {index_merge, index_merge_union,
+ index_merge_sort_union, index_merge_intersection} and val
+ is one of {on, off, default}
+ --partition[=name] Enable or disable partition plugin. Possible values are
+ ON, OFF, FORCE (don't start if the plugin fails to load).
+ --pid-file=name Pid file used by safe_mysqld
+ --plugin-dir=name Directory for plugins
+ --plugin-load=name Optional semicolon-separated list of plugins to load,
+ where each plugin is identified as name=library, where
+ name is the plugin name and library is the plugin library
+ in plugin_dir.
+ -P, --port=# Port number to use for connection or 0 to default to,
+ my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
+ (3306), whatever comes first
+ --port-open-timeout=#
+ Maximum time in seconds to wait for the port to become
+ free. (Default: no wait)
+ --preload-buffer-size=#
+ The size of the buffer that is allocated when preloading
+ indexes
+ --profiling-history-size=#
+ Limit of query profiling memory
+ --query-alloc-block-size=#
+ Allocation block size for query parsing and execution
+ --query-cache-limit=#
+ Don't cache results that are bigger than this
+ --query-cache-min-res-unit=#
+ The minimum size for blocks allocated by the query cache
+ --query-cache-size=#
+ The memory allocated to store results from old queries
+ --query-cache-type=name
+ OFF = Don't cache or retrieve results. ON = Cache all
+ results except SELECT SQL_NO_CACHE ... queries. DEMAND =
+ Cache only SELECT SQL_CACHE ... queries
+ --query-cache-wlock-invalidate
+ Invalidate queries in query cache on LOCK for write
+ --query-prealloc-size=#
+ Persistent buffer for query parsing and execution
+ --range-alloc-block-size=#
+ Allocation block size for storing ranges during
+ optimization
+ --read-buffer-size=#
+ Each thread that does a sequential scan allocates a
+ buffer of this size for each table it scans. If you do
+ many sequential scans, you may want to increase this
+ value
+ --read-only Make all non-temporary tables read-only, with the
+ exception for replication (slave) threads and users with
+ the SUPER privilege
+ --read-rnd-buffer-size=#
+ When reading rows in sorted order after a sort, the rows
+ are read through this buffer to avoid a disk seeks. If
+ not set, then it's set to the value of record_buffer
+ --record-buffer=# Deprecated; use --read-buffer-size instead.
+ --relay-log=name The location and name to use for relay logs
+ --relay-log-index=name
+ The location and name to use for the file that keeps a
+ list of the last relay logs
+ --relay-log-info-file=name
+ The location and name of the file that remembers where
+ the SQL replication thread is in the relay logs
+ --relay-log-purge if disabled - do not purge relay logs. if enabled - purge
+ them as soon as they are no more needed
+ (Defaults to on; use --skip-relay-log-purge to disable.)
+ --relay-log-recovery
+ Enables automatic relay log recovery right after the
+ database startup, which means that the IO Thread starts
+ re-fetching from the master right after the last
+ transaction processed
+ --relay-log-space-limit=#
+ Maximum space to use for all relay logs
+ --replicate-do-db=name
+ Tells the slave thread to restrict replication to the
+ specified database. To specify more than one database,
+ use the directive multiple times, once for each database.
+ Note that this will only work if you do not use
+ cross-database queries such as UPDATE some_db.some_table
+ SET foo='bar' while having selected a different or no
+ database. If you need cross database updates to work,
+ make sure you have 3.23.28 or later, and use
+ replicate-wild-do-table=db_name.%.
+ --replicate-do-table=name
+ Tells the slave thread to restrict replication to the
+ specified table. To specify more than one table, use the
+ directive multiple times, once for each table. This will
+ work for cross-database updates, in contrast to
+ replicate-do-db.
+ --replicate-ignore-db=name
+ Tells the slave thread to not replicate to the specified
+ database. To specify more than one database to ignore,
+ use the directive multiple times, once for each database.
+ This option will not work if you use cross database
+ updates. If you need cross database updates to work, make
+ sure you have 3.23.28 or later, and use
+ replicate-wild-ignore-table=db_name.%.
+ --replicate-ignore-table=name
+ Tells the slave thread to not replicate to the specified
+ table. To specify more than one table to ignore, use the
+ directive multiple times, once for each table. This will
+ work for cross-datbase updates, in contrast to
+ replicate-ignore-db.
+ --replicate-rewrite-db=name
+ Updates to a database with a different name than the
+ original. Example:
+ replicate-rewrite-db=master_db_name->slave_db_name.
+ --replicate-same-server-id
+ In replication, if set to 1, do not skip events having
+ our server id. Default value is 0 (to break infinite
+ loops in circular replication). Can't be set to 1 if
+ --log-slave-updates is used.
+ --replicate-wild-do-table=name
+ Tells the slave thread to restrict replication to the
+ tables that match the specified wildcard pattern. To
+ specify more than one table, use the directive multiple
+ times, once for each table. This will work for
+ cross-database updates. Example:
+ replicate-wild-do-table=foo%.bar% will replicate only
+ updates to tables in all databases that start with foo
+ and whose table names start with bar.
+ --replicate-wild-ignore-table=name
+ Tells the slave thread to not replicate to the tables
+ that match the given wildcard pattern. To specify more
+ than one table to ignore, use the directive multiple
+ times, once for each table. This will work for
+ cross-database updates. Example:
+ replicate-wild-ignore-table=foo%.bar% will not do updates
+ to tables in databases that start with foo and whose
+ table names start with bar.
+ --report-host=name Hostname or IP of the slave to be reported to the master
+ during slave registration. Will appear in the output of
+ SHOW SLAVE HOSTS. Leave unset if you do not want the
+ slave to register itself with the master. Note that it is
+ not sufficient for the master to simply read the IP of
+ the slave off the socket once the slave connects. Due to
+ NAT and other routing issues, that IP may not be valid
+ for connecting to the slave from the master or other
+ hosts
+ --report-password=name
+ The account password of the slave to be reported to the
+ master during slave registration
+ --report-port=# Port for connecting to slave reported to the master
+ during slave registration. Set it only if the slave is
+ listening on a non-default port or if you have a special
+ tunnel from the master or other clients to the slave. If
+ not sure, leave this option unset
+ --report-user=name The account user name of the slave to be reported to the
+ master during slave registration
+ --rpl-recovery-rank=#
+ Unused, will be removed
+ --safe-mode Skip some optimize stages (for testing).
+ --safe-show-database
+ Deprecated option; use GRANT SHOW DATABASES instead...
+ --safe-user-create Don't allow new user creation by the user who has no
+ write privileges to the mysql.user table.
+ --secure-auth Disallow authentication for accounts that have old
+ (pre-4.1) passwords
+ --secure-file-priv=name
+ Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
+ files within specified directory
+ --server-id=# Uniquely identifies the server instance in the community
+ of replication partners
+ -O, --set-variable=name
+ Change the value of a variable. Please note that this
+ option is deprecated;you can set variables directly with
+ --variable-name=value.
+ --shared-memory Enable the shared memory
+ --shared-memory-base-name=name
+ Base name of shared memory
+ --show-slave-auth-info
+ Show user and password in SHOW SLAVE HOSTS on this master
+ --skip-grant-tables Start without grant tables. This gives all users FULL
+ ACCESS to all tables!
+ --skip-host-cache Don't cache host names.
+ --skip-locking Deprecated option, use --skip-external-locking instead.
+ --skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
+ 'localhost'.
+ --skip-networking Don't allow connection with TCP/IP
+ --skip-new Don't use new, possible wrong routines.
+ --skip-show-database
+ Don't allow 'SHOW DATABASE' commands
+ --skip-slave-start If set, slave is not autostarted.
+ --skip-stack-trace Don't print a stack trace on failure.
+ --skip-symlink Don't allow symlinking of tables. Deprecated option. Use
+ --skip-symbolic-links instead.
+ --skip-thread-priority
+ Don't give threads different priorities. This option is
+ deprecated because it has no effect; the implied behavior
+ is already the default.
+ --slave-compressed-protocol
+ Use compression on master/slave protocol
+ --slave-exec-mode=name
+ Modes for how replication events should be executed.
+ Legal values are STRICT (default) and IDEMPOTENT. In
+ IDEMPOTENT mode, replication will not stop for operations
+ that are idempotent. In STRICT mode, replication will
+ stop on any unexpected difference between the master and
+ the slave
+ --slave-load-tmpdir=name
+ The location where the slave should put its temporary
+ files when replicating a LOAD DATA INFILE command
+ --slave-net-timeout=#
+ Number of seconds to wait for more data from a
+ master/slave connection before aborting the read
+ --slave-skip-errors=name
+ Tells the slave thread to continue replication when a
+ query event returns an error from the provided list
+ --slave-transaction-retries=#
+ Number of times the slave SQL thread will retry a
+ transaction in case it failed with a deadlock or elapsed
+ lock wait timeout, before giving up and stopping
+ --slow-launch-time=#
+ If creating the thread takes longer than this value (in
+ seconds), the Slow_launch_threads counter will be
+ incremented
+ --slow-query-log Log slow queries to a table or log file. Defaults logging
+ to a file hostname-slow.log or a table mysql.slow_log if
+ --log-output=TABLE is used. Must be enabled to activate
+ other slow log options
+ --slow-query-log-file=name
+ Log slow queries to given log file. Defaults logging to
+ hostname-slow.log. Must be enabled to activate other slow
+ log options
+ --socket=name Socket file to use for connection
+ --sort-buffer-size=#
+ Each thread that needs to do a sort allocates a buffer of
+ this size
+ --sporadic-binlog-dump-fail
+ Option used by mysql-test for debugging and testing of
+ replication.
+ --sql-bin-update-same
+ The update log is deprecated since version 5.0, is
+ replaced by the binary log and this option does nothing
+ anymore.
+ --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
+ for the complete list of valid sql modes
+ --ssl Enable SSL for connection (automatically enabled with
+ other flags).
+ --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies --ssl)
+ --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl)
+ --ssl-cert=name X509 cert in PEM format (implies --ssl)
+ --ssl-cipher=name SSL cipher to use (implies --ssl)
+ --ssl-key=name X509 key in PEM format (implies --ssl)
+ --standalone Dummy option to start as a standalone program (NT).
+ -s, --symbolic-links
+ Enable symbolic link support.
+ --sync-binlog=# Synchronously flush binary log to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-frm Sync .frm files to disk on creation
+ (Defaults to on; use --skip-sync-frm to disable.)
+ --sync-master-info=#
+ Synchronously flush master info to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-relay-log=# Synchronously flush relay log to disk after every #th
+ event. Use 0 (default) to disable synchronous flushing
+ --sync-relay-log-info=#
+ Synchronously flush relay log info to disk after every
+ #th transaction. Use 0 (default) to disable synchronous
+ flushing
+ --sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
+ safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
+ value different for different invocations, even within
+ the same statement.
+ --table-cache=# Deprecated; use --table-open-cache instead.
+ --table-definition-cache=#
+ The number of cached table definitions
+ --table-lock-wait-timeout=#
+ Timeout in seconds to wait for a table level lock before
+ returning an error. Used only if the connection has
+ active cursors
+ --table-open-cache=#
+ The number of cached open tables
+ --tc-heuristic-recover=name
+ Decision to use in heuristic recover process. Possible
+ values are COMMIT or ROLLBACK.
+ --thread-cache-size=#
+ How many threads we should keep in a cache for reuse
+ --thread-handling=name
+ Define threads usage for handling queries, one of
+ one-thread-per-connection, no-threads
+ --thread-stack=# The stack size for each thread
+ --time-format=name The TIME format (ignored)
+ --timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
+ currently supported)
+ --tmp-table-size=# If an internal in-memory temporary table exceeds this
+ size, MySQL will automatically convert it to an on-disk
+ MyISAM table
+ -t, --tmpdir=name Path for temporary files. Several paths may be specified,
+ separated by a semicolon (;), in this case they are used
+ in a round-robin fashion
+ --transaction-alloc-block-size=#
+ Allocation block size for transactions to be stored in
+ binary log
+ --transaction-isolation=name
+ Default transaction isolation level.
+ --transaction-prealloc-size=#
+ Persistent buffer for transactions to be stored in binary
+ log
+ --updatable-views-with-limit=name
+ YES = Don't issue an error message (warning only) if a
+ VIEW without presence of a key of the underlying table is
+ used in queries with a LIMIT clause for updating. NO =
+ Prohibit update of a VIEW, which does not contain a key
+ of the underlying table and the query uses a LIMIT clause
+ (usually get from GUI tools)
+ -s, --use-symbolic-links
+ Enable symbolic link support. Deprecated option; use
+ --symbolic-links instead.
+ -u, --user=name Run mysqld daemon as user.
+ -v, --verbose Used with --help option for detailed help
+ -V, --version Output version information and exit.
+ --wait-timeout=# The number of seconds the server waits for activity on a
+ connection before closing it
+ -W, --warnings[=#] Deprecated; use --log-warnings instead.
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE} Value (after reading options)
+--------------------------------- ----------------------------------------
+abort-slave-event-count 0
+allow-suspicious-udfs FALSE
+archive ON
+auto-increment-increment 1
+auto-increment-offset 1
+automatic-sp-privileges TRUE
+back-log 50
+big-tables FALSE
+bind-address (No default value)
+binlog-cache-size 32768
+binlog-format STATEMENT
+binlog-row-event-max-size 1024
+blackhole ON
+bulk-insert-buffer-size 8388608
+character-set-client-handshake TRUE
+character-set-filesystem binary
+character-set-server latin1
+chroot (No default value)
+collation-server latin1_swedish_ci
+completion-type NO_CHAIN
+concurrent-insert AUTO
+connect-timeout 10
+console FALSE
+date-format %Y-%m-%d
+datetime-format %Y-%m-%d %H:%i:%s
+default-character-set latin1
+default-collation latin1_swedish_ci
+default-storage-engine MyISAM
+default-time-zone (No default value)
+default-week-format 0
+delay-key-write ON
+delayed-insert-limit 100
+delayed-insert-timeout 300
+delayed-queue-size 1000
+des-key-file (No default value)
+disconnect-slave-event-count 0
+div-precision-increment 4
+enable-locking FALSE
+engine-condition-pushdown TRUE
+event-scheduler OFF
+expire-logs-days 0
+external-locking FALSE
+federated ON
+flush FALSE
+flush-time 1800
+ft-boolean-syntax + -><()~*:""&|
+ft-max-word-len 84
+ft-min-word-len 4
+ft-query-expansion-limit 20
+ft-stopword-file (No default value)
+gdb FALSE
+general-log FALSE
+group-concat-max-len 1024
+help TRUE
+ignore-builtin-innodb FALSE
+init-connect
+init-file (No default value)
+init-rpl-role MASTER
+init-slave
+interactive-timeout 28800
+join-buffer-size 131072
+keep-files-on-create FALSE
+key-buffer-size 8388608
+key-cache-age-threshold 300
+key-cache-block-size 1024
+key-cache-division-limit 100
+lc-messages en_US
+lc-time-names en_US
+local-infile TRUE
+log-bin (No default value)
+log-bin-index (No default value)
+log-bin-trust-function-creators FALSE
+log-error
+log-isam myisam.log
+log-output FILE
+log-queries-not-using-indexes FALSE
+log-short-format FALSE
+log-slave-updates FALSE
+log-slow-admin-statements FALSE
+log-slow-slave-statements FALSE
+log-tc tc.log
+log-tc-size 24576
+log-update (No default value)
+log-warnings 1
+long-query-time 10
+low-priority-updates FALSE
+lower-case-table-names 1
+master-info-file master.info
+master-retry-count 86400
+max-allowed-packet 1048576
+max-binlog-cache-size 18446744073709547520
+max-binlog-dump-events 0
+max-binlog-size 1073741824
+max-connect-errors 10
+max-connections 151
+max-delayed-threads 20
+max-error-count 64
+max-heap-table-size 16777216
+max-join-size 18446744073709551615
+max-length-for-sort-data 1024
+max-prepared-stmt-count 16382
+max-relay-log-size 0
+max-seeks-for-key 18446744073709551615
+max-sort-length 1024
+max-sp-recursion-depth 0
+max-tmp-tables 32
+max-user-connections 0
+max-write-lock-count 18446744073709551615
+memlock FALSE
+min-examined-row-limit 0
+multi-range-count 256
+myisam-block-size 1024
+myisam-data-pointer-size 6
+myisam-max-sort-file-size 9223372036853727232
+myisam-mmap-size 18446744073709551615
+myisam-recover-options OFF
+myisam-repair-threads 1
+myisam-sort-buffer-size 8388608
+myisam-stats-method nulls_unequal
+myisam-use-mmap FALSE
+named-pipe FALSE
+net-buffer-length 16384
+net-read-timeout 30
+net-retry-count 10
+net-write-timeout 60
+new FALSE
+old FALSE
+old-alter-table FALSE
+old-passwords FALSE
+old-style-user-limits FALSE
+optimizer-prune-level 1
+optimizer-search-depth 62
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+partition ON
+plugin-load (No default value)
+port 3306
+port-open-timeout 0
+preload-buffer-size 32768
+profiling-history-size 15
+query-alloc-block-size 8192
+query-cache-limit 1048576
+query-cache-min-res-unit 4096
+query-cache-size 0
+query-cache-type ON
+query-cache-wlock-invalidate FALSE
+query-prealloc-size 8192
+range-alloc-block-size 4096
+read-buffer-size 131072
+read-only FALSE
+read-rnd-buffer-size 262144
+record-buffer 131072
+relay-log (No default value)
+relay-log-index (No default value)
+relay-log-info-file relay-log.info
+relay-log-purge TRUE
+relay-log-recovery FALSE
+relay-log-space-limit 0
+replicate-same-server-id FALSE
+report-host (No default value)
+report-password (No default value)
+report-port 3306
+report-user (No default value)
+rpl-recovery-rank 0
+safe-user-create FALSE
+secure-auth FALSE
+secure-file-priv (No default value)
+server-id 0
+shared-memory FALSE
+shared-memory-base-name MYSQL
+show-slave-auth-info FALSE
+skip-grant-tables TRUE
+skip-networking FALSE
+skip-show-database FALSE
+skip-slave-start FALSE
+slave-compressed-protocol FALSE
+slave-exec-mode STRICT
+slave-net-timeout 3600
+slave-skip-errors (No default value)
+slave-transaction-retries 10
+slow-launch-time 2
+slow-query-log FALSE
+socket MySQL
+sort-buffer-size 2097152
+sporadic-binlog-dump-fail FALSE
+sql-mode
+ssl FALSE
+ssl-ca (No default value)
+ssl-capath (No default value)
+ssl-cert (No default value)
+ssl-cipher (No default value)
+ssl-key (No default value)
+symbolic-links FALSE
+sync-binlog 0
+sync-frm TRUE
+sync-master-info 0
+sync-relay-log 0
+sync-relay-log-info 0
+sysdate-is-now FALSE
+table-cache 400
+table-definition-cache 400
+table-lock-wait-timeout 50
+table-open-cache 400
+tc-heuristic-recover COMMIT
+thread-cache-size 0
+thread-handling one-thread-per-connection
+thread-stack 262144
+time-format %H:%i:%s
+timed-mutexes FALSE
+tmp-table-size 16777216
+transaction-alloc-block-size 8192
+transaction-isolation REPEATABLE-READ
+transaction-prealloc-size 4096
+updatable-views-with-limit YES
+use-symbolic-links FALSE
+verbose TRUE
+wait-timeout 28800
+warnings 1
+
+To see what values a running MySQL server is using, type
+'mysqladmin variables' instead of 'mysqld --verbose --help'.
diff --git a/mysql-test/r/partition_key_cache.result b/mysql-test/r/partition_key_cache.result
index 7fbab34fa41..c5241c6ea90 100644
--- a/mysql-test/r/partition_key_cache.result
+++ b/mysql-test/r/partition_key_cache.result
@@ -5,9 +5,7 @@ SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size;
@org_key_cache_buffer_size:= @@global.default.key_buffer_size
1048576
# Minimize default key cache (almost disabled).
-SET @@global.default.key_buffer_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '1'
+SET @@global.default.key_buffer_size = 4096;
CREATE TABLE t1 (
a INT,
b INT,
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 85fbd1353cc..9cae2b487b2 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -34,7 +34,7 @@ INSTALL PLUGIN example SONAME 'ha_example.so';
SET GLOBAL example_enum_var= e1;
SET GLOBAL example_enum_var= e2;
SET GLOBAL example_enum_var= impossible;
-ERROR 42000: Variable 'enum_var' can't be set to the value of 'impossible'
+ERROR 42000: Variable 'example_enum_var' can't be set to the value of 'impossible'
UNINSTALL PLUGIN example;
INSTALL PLUGIN example SONAME 'ha_example.so';
select @@session.sql_mode into @old_sql_mode;
@@ -45,7 +45,7 @@ select @@global.example_ulong_var;
500
set global example_ulong_var=1111;
Warnings:
-Warning 1292 Truncated incorrect ulong_var value: '1111'
+Warning 1292 Truncated incorrect example_ulong_var value: '1111'
select @@global.example_ulong_var;
@@global.example_ulong_var
1000
@@ -55,7 +55,7 @@ select @@global.example_ulong_var;
@@global.example_ulong_var
500
set global example_ulong_var=1111;
-ERROR 42000: Variable 'ulong_var' can't be set to the value of '1111'
+ERROR 42000: Variable 'example_ulong_var' can't be set to the value of '1111'
select @@global.example_ulong_var;
@@global.example_ulong_var
500
diff --git a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result
index f20c459d7dc..6292cd085e4 100644
--- a/mysql-test/r/profiling.result
+++ b/mysql-test/r/profiling.result
@@ -9,8 +9,6 @@ profiling_history_size 15
select @@profiling;
@@profiling
0
-set global profiling = ON;
-ERROR HY000: Variable 'profiling' is a SESSION variable and can't be used with SET GLOBAL
set @start_value= @@global.profiling_history_size;
set global profiling_history_size=100;
show global variables like 'profil%';
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 9cde630e4ed..eab0c51f974 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -508,6 +508,8 @@ AAA
drop table t1;
create table t1 (a int);
set GLOBAL query_cache_size=1000;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_size value: '1000'
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@@ -1342,9 +1344,9 @@ set global query_cache_size=0;
create table t1 (a int);
insert into t1 values (1),(2),(3);
set GLOBAL query_cache_type=1;
-set GLOBAL query_cache_limit=10000;
+set GLOBAL query_cache_limit=10240;
set GLOBAL query_cache_min_res_unit=0;
-set GLOBAL query_cache_size= 100000;
+set GLOBAL query_cache_size= 102400;
reset query cache;
set LOCAL default_week_format = 0;
select week('2007-01-04');
@@ -1434,7 +1436,7 @@ set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
set GLOBAL query_cache_size= default;
-set GLOBAL query_cache_size=1000000;
+set GLOBAL query_cache_size=1024000;
create table t1 (a char);
insert into t1 values ('c');
a
@@ -1562,7 +1564,7 @@ SET GLOBAL query_cache_size= default;
#
# Bug#25132 disabled query cache: Qcache_free_blocks = 1
#
-set global query_cache_size=100000;
+set global query_cache_size=102400;
set global query_cache_size=0;
set global query_cache_type=0;
show status like 'Qcache_free_blocks';
@@ -1581,7 +1583,7 @@ CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=MyISAM;
INSERT INTO t1 (c1) VALUES (1), (2);
SHOW GLOBAL VARIABLES LIKE 'concurrent_insert';
Variable_name Value
-concurrent_insert 0
+concurrent_insert NEVER
SHOW STATUS LIKE 'Qcache_hits';
Variable_name Value
Qcache_hits 0
diff --git a/mysql-test/r/query_cache_ps_no_prot.result b/mysql-test/r/query_cache_ps_no_prot.result
index f686e876a60..02e660450d1 100644
--- a/mysql-test/r/query_cache_ps_no_prot.result
+++ b/mysql-test/r/query_cache_ps_no_prot.result
@@ -1,7 +1,7 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
flush status;
drop table if exists t1;
create table t1(c1 int);
@@ -211,7 +211,7 @@ show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 16
---- switch to connection default ----
-set global query_cache_size=100000;
+set global query_cache_size=102400;
execute stmt1;
c1
10
@@ -297,7 +297,7 @@ prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 21
@@ -344,7 +344,7 @@ Qcache_hits 21
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 21
@@ -548,7 +548,7 @@ alter table t1 add column b int;
execute stmt;
a
Pack my box with five dozen liquor jugs.
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
execute stmt;
a
Pack my box with five dozen liquor jugs.
diff --git a/mysql-test/r/query_cache_ps_ps_prot.result b/mysql-test/r/query_cache_ps_ps_prot.result
index e594161f2e9..2115ecc62ff 100644
--- a/mysql-test/r/query_cache_ps_ps_prot.result
+++ b/mysql-test/r/query_cache_ps_ps_prot.result
@@ -1,7 +1,7 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
flush status;
drop table if exists t1;
create table t1(c1 int);
@@ -211,7 +211,7 @@ show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection default ----
-set global query_cache_size=100000;
+set global query_cache_size=102400;
execute stmt1;
c1
10
@@ -297,7 +297,7 @@ prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
@@ -344,7 +344,7 @@ Qcache_hits 19
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
-set global query_cache_size=100000;
+set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
@@ -548,7 +548,7 @@ alter table t1 add column b int;
execute stmt;
a
Pack my box with five dozen liquor jugs.
-set @@global.query_cache_size=100000;
+set @@global.query_cache_size=102400;
execute stmt;
a
Pack my box with five dozen liquor jugs.
diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result
index feac9efcb13..5e5ef55477c 100644
--- a/mysql-test/r/select_safe.result
+++ b/mysql-test/r/select_safe.result
@@ -1,5 +1,5 @@
drop table if exists t1;
-SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, SQL_MAX_JOIN_SIZE=9;
+SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9;
create table t1 (a int auto_increment primary key, b char(20));
insert into t1 values(1,"test");
SELECT SQL_BUFFER_RESULT * from t1;
@@ -90,4 +90,4 @@ set local max_join_size=1;
select * from (select 1 union select 2 union select 3) x;
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
drop table t1;
-SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
+SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index ac118d0bab2..7ef69df56bd 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -3030,7 +3030,7 @@ set @x = @x + 1;
return @x;
end|
set @qcs1 = @@query_cache_size|
-set global query_cache_size = 100000|
+set global query_cache_size = 102400|
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
@@ -6903,15 +6903,12 @@ DROP FUNCTION f1;
drop procedure if exists p;
set @old_mode= @@sql_mode;
-set @@sql_mode= pow(2,32)-1;
+set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
select @@sql_mode into @full_mode;
create procedure p() begin end;
call p();
-select @@sql_mode;
-@@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
set @@sql_mode= @old_mode;
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
+select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
select name from mysql.proc where name = 'p' and sql_mode = @full_mode;
name
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index ccea954c214..615ba21c811 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -3669,8 +3669,6 @@ CREATE TABLE t1 (a int, b int auto_increment, PRIMARY KEY (b));
CREATE TABLE t2 (x int auto_increment, y int, z int,
PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b));
SET SESSION sort_buffer_size = 32 * 1024;
-Warnings:
-Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 3b6541ce56a..4f492d05558 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1305,6 +1305,8 @@ SELECT @tmp_max:= @@global.max_allowed_packet;
@tmp_max:= @@global.max_allowed_packet
1048576
SET @@global.max_allowed_packet=25000000;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '25000000'
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a');
diff --git a/mysql-test/r/user_limits.result b/mysql-test/r/user_limits.result
index a94eb4616d1..80ec5517b16 100644
--- a/mysql-test/r/user_limits.result
+++ b/mysql-test/r/user_limits.result
@@ -70,7 +70,7 @@ select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections @@global.max_user_connections
0 0
set session max_user_connections= 2;
-ERROR HY000: Variable 'max_user_connections' is a GLOBAL variable and should be set with SET GLOBAL
+ERROR HY000: SESSION variable 'max_user_connections' is read-only. Use SET GLOBAL to assign the value
set global max_user_connections= 2;
select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections @@global.max_user_connections
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 28da1dae931..fe3dd4171ce 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -192,8 +192,6 @@ coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
2 2 2 2
set session @honk=99;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@honk=99' at line 1
-set one_shot @honk=99;
-ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
select @@local.max_allowed_packet;
@@local.max_allowed_packet
#
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index f98872d93b3..e99f4e3deb9 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -24,7 +24,7 @@ set @my_query_cache_type =@@global.query_cache_type;
set @my_rpl_recovery_rank =@@global.rpl_recovery_rank;
set @my_server_id =@@global.server_id;
set @my_slow_launch_time =@@global.slow_launch_time;
-set @my_storage_engine =@@global.storage_engine;
+set @my_storage_engine =@@global.default_storage_engine;
set @my_thread_cache_size =@@global.thread_cache_size;
set @my_max_allowed_packet =@@global.max_allowed_packet;
set @my_join_buffer_size =@@global.join_buffer_size;
@@ -165,28 +165,28 @@ set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF",
set global concurrent_insert=2;
show variables like 'concurrent_insert';
Variable_name Value
-concurrent_insert 2
+concurrent_insert ALWAYS
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
VARIABLE_NAME VARIABLE_VALUE
-CONCURRENT_INSERT 2
+CONCURRENT_INSERT ALWAYS
set global concurrent_insert=1;
show variables like 'concurrent_insert';
Variable_name Value
-concurrent_insert 1
+concurrent_insert AUTO
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
VARIABLE_NAME VARIABLE_VALUE
-CONCURRENT_INSERT 1
+CONCURRENT_INSERT AUTO
set global concurrent_insert=0;
show variables like 'concurrent_insert';
Variable_name Value
-concurrent_insert 0
+concurrent_insert NEVER
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
VARIABLE_NAME VARIABLE_VALUE
-CONCURRENT_INSERT 0
+CONCURRENT_INSERT NEVER
set global concurrent_insert=DEFAULT;
select @@concurrent_insert;
@@concurrent_insert
-1
+AUTO
set global timed_mutexes=ON;
show variables like 'timed_mutexes';
Variable_name Value
@@ -201,21 +201,23 @@ timed_mutexes OFF
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
VARIABLE_NAME VARIABLE_VALUE
TIMED_MUTEXES OFF
-set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
-show local variables like 'storage_engine';
+set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE";
+show local variables like 'default_storage_engine';
Variable_name Value
-storage_engine MEMORY
-select * from information_schema.session_variables where variable_name like 'storage_engine';
+default_storage_engine MEMORY
+select * from information_schema.session_variables where variable_name like 'default_storage_engine';
VARIABLE_NAME VARIABLE_VALUE
-STORAGE_ENGINE MEMORY
-show global variables like 'storage_engine';
+DEFAULT_STORAGE_ENGINE MEMORY
+show global variables like 'default_storage_engine';
Variable_name Value
-storage_engine MRG_MYISAM
-select * from information_schema.global_variables where variable_name like 'storage_engine';
+default_storage_engine MRG_MYISAM
+select * from information_schema.global_variables where variable_name like 'default_storage_engine';
VARIABLE_NAME VARIABLE_VALUE
-STORAGE_ENGINE MRG_MYISAM
-set GLOBAL query_cache_size=100000;
+DEFAULT_STORAGE_ENGINE MRG_MYISAM
+set GLOBAL query_cache_size=102400;
set GLOBAL myisam_max_sort_file_size=2000000;
+Warnings:
+Warning 1292 Truncated incorrect myisam_max_sort_file_size value: '2000000'
show global variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size 1048576
@@ -256,6 +258,8 @@ NET_READ_TIMEOUT 30
NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 60
set global net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '8000'
show global variables like 'net_%';
Variable_name Value
net_buffer_length 7168
@@ -359,13 +363,20 @@ TRANSACTION_PREALLOC_SIZE 19456
==+ Manipulate variable values +==
Testing values that are not 1024 multiples
set @@range_alloc_block_size=1024*16+1023;
+Warnings:
+Warning 1292 Truncated incorrect range_alloc_block_size value: '17407'
set @@query_alloc_block_size=1024*17+2;
+Warnings:
+Warning 1292 Truncated incorrect query_alloc_block_size value: '17410'
set @@query_prealloc_size=1024*18-1023;
+Warnings:
+Warning 1292 Truncated incorrect query_prealloc_size value: '17409'
set @@transaction_alloc_block_size=1024*20-1;
+Warnings:
+Warning 1292 Truncated incorrect transaction_alloc_block_size value: '20479'
set @@transaction_prealloc_size=1024*21-1;
-select @@query_alloc_block_size;
-@@query_alloc_block_size
-17408
+Warnings:
+Warning 1292 Truncated incorrect transaction_prealloc_size value: '21503'
==+ Check manipulated values ==+
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
@@ -415,17 +426,15 @@ set unknown_variable=1;
ERROR HY000: Unknown system variable 'unknown_variable'
set max_join_size="hello";
ERROR 42000: Incorrect argument type to variable 'max_join_size'
-set storage_engine=UNKNOWN_TABLE_TYPE;
+set default_storage_engine=UNKNOWN_TABLE_TYPE;
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
-set storage_engine=MERGE, big_tables=2;
+set default_storage_engine=MERGE, big_tables=2;
ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
-show local variables like 'storage_engine';
+show local variables like 'default_storage_engine';
Variable_name Value
-storage_engine MEMORY
+default_storage_engine MEMORY
set SESSION query_cache_size=10000;
ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-set GLOBAL storage_engine=DEFAULT;
-ERROR 42000: Variable 'storage_engine' doesn't have a default value
set character_set_client=UNKNOWN_CHARACTER_SET;
ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET'
set collation_connection=UNKNOWN_COLLATION;
@@ -434,18 +443,12 @@ set character_set_client=NULL;
ERROR 42000: Variable 'character_set_client' can't be set to the value of 'NULL'
set collation_connection=NULL;
ERROR 42000: Variable 'collation_connection' can't be set to the value of 'NULL'
-set global autocommit=1;
-ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
select @@global.timestamp;
ERROR HY000: Variable 'timestamp' is a SESSION variable
set @@version='';
ERROR HY000: Variable 'version' is a read only variable
set @@concurrent_insert=1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
-set @@global.sql_auto_is_null=1;
-ERROR HY000: Variable 'sql_auto_is_null' is a SESSION variable and can't be used with SET GLOBAL
-select @@global.sql_auto_is_null;
-ERROR HY000: Variable 'sql_auto_is_null' is a SESSION variable
set myisam_max_sort_file_size=100;
ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set @@SQL_WARNINGS=NULL;
@@ -530,14 +533,16 @@ set net_read_timeout=100;
set net_write_timeout=100;
set global query_cache_limit=100;
set global query_cache_size=100;
+Warnings:
+Warning 1292 Truncated incorrect query_cache_size value: '100'
set global query_cache_type=demand;
set read_buffer_size=100;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '100'
set read_rnd_buffer_size=100;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '100'
set global rpl_recovery_rank=100;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
set global server_id=100;
set global slow_launch_time=100;
set sort_buffer_size=100;
@@ -568,17 +573,13 @@ set sql_log_update=1;
Warnings:
Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
set sql_low_priority_updates=1;
-set sql_max_join_size=200;
-select @@sql_max_join_size,@@max_join_size;
-@@sql_max_join_size @@max_join_size
-200 200
set sql_quote_show_create=1;
set sql_safe_updates=1;
set sql_select_limit=1;
set sql_select_limit=default;
set sql_warnings=1;
set global table_open_cache=100;
-set storage_engine=myisam;
+set default_storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=100;
@@ -615,6 +616,8 @@ create table t2 (a int not null auto_increment, primary key(a));
insert into t1 values(null),(null),(null);
insert into t2 values(null),(null),(null);
set global key_buffer_size=100000;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '100000'
select @@key_buffer_size;
@@key_buffer_size
98304
@@ -658,11 +661,11 @@ MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
set global myisam_max_sort_file_size=default;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 200
+100 100
set @svc=@@global.max_user_connections, @svj=@@local.max_join_size;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 200
+100 100
set @@global.max_user_connections=111,@@local.max_join_size=222;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
@@ -674,7 +677,7 @@ select @@global.max_user_connections,@@local.max_join_size;
set @@global.max_user_connections=@svc, @@local.max_join_size=@svj;
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@local.max_join_size
-100 200
+100 100
set @a=1, @b=2;
set @a=@b, @b=@a;
select @a, @b;
@@ -1055,9 +1058,11 @@ set global net_read_timeout =@my_net_read_timeout;
set global query_cache_limit =@my_query_cache_limit;
set global query_cache_type =@my_query_cache_type;
set global rpl_recovery_rank =@my_rpl_recovery_rank;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time;
-set global storage_engine =@my_storage_engine;
+set global default_storage_engine =@my_storage_engine;
set global thread_cache_size =@my_thread_cache_size;
set global max_allowed_packet =@my_max_allowed_packet;
set global join_buffer_size =@my_join_buffer_size;
@@ -1440,10 +1445,10 @@ Warning 1292 Truncated incorrect auto_increment_offset value: '-1'
SET GLOBAL auto_increment_offset=0;
Warnings:
Warning 1292 Truncated incorrect auto_increment_offset value: '0'
-select @@storage_engine;
+select @@default_storage_engine;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @@storage_engine 253 6 6 Y 0 31 8
-@@storage_engine
+def @@default_storage_engine 253 6 6 Y 0 31 8
+@@default_storage_engine
MyISAM
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;
diff --git a/mysql-test/suite/binlog/r/binlog_grant.result b/mysql-test/suite/binlog/r/binlog_grant.result
index 548013fcbf2..1c0e73f8842 100644
--- a/mysql-test/suite/binlog/r/binlog_grant.result
+++ b/mysql-test/suite/binlog/r/binlog_grant.result
@@ -6,12 +6,8 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
**** Variable SQL_LOG_BIN ****
[root]
-set global sql_log_bin = 1;
-ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL
set session sql_log_bin = 1;
[plain]
-set global sql_log_bin = 1;
-ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL
set session sql_log_bin = 1;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
**** Variable BINLOG_FORMAT ****
diff --git a/mysql-test/suite/binlog/t/binlog_grant.test b/mysql-test/suite/binlog/t/binlog_grant.test
index d36dcce4cc3..9d9c6031b5a 100644
--- a/mysql-test/suite/binlog/t/binlog_grant.test
+++ b/mysql-test/suite/binlog/t/binlog_grant.test
@@ -22,14 +22,10 @@ connect (root,localhost,root,,test);
connection root;
--echo [root]
---error ER_LOCAL_VARIABLE
-set global sql_log_bin = 1;
set session sql_log_bin = 1;
connection plain;
--echo [plain]
---error ER_LOCAL_VARIABLE
-set global sql_log_bin = 1;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set session sql_log_bin = 1;
diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result
index 21396d81ba8..bcd3849238f 100644
--- a/mysql-test/suite/innodb/r/innodb-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-zip.result
@@ -173,19 +173,19 @@ select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=`2`;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
set global innodb_file_format=`-1`;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
set global innodb_file_format=`Antelope`;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format=`Cheetah`;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
set global innodb_file_format=`abc`;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc'
set global innodb_file_format=`1a`;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a'
set global innodb_file_format=``;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
set innodb_strict_mode = off;
diff --git a/mysql-test/suite/innodb/r/innodb_bug47167.result b/mysql-test/suite/innodb/r/innodb_bug47167.result
index cbec363d78f..cf8cb0c0d7b 100644
--- a/mysql-test/suite/innodb/r/innodb_bug47167.result
+++ b/mysql-test/suite/innodb/r/innodb_bug47167.result
@@ -15,10 +15,10 @@ select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format_check = cheetah;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah'
set global innodb_file_format_check = Bear;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Bear'
set global innodb_file_format_check = on;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'ON'
set global innodb_file_format_check = off;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'off'
diff --git a/mysql-test/suite/innodb/r/innodb_file_format.result b/mysql-test/suite/innodb/r/innodb_file_format.result
index 36f176c616a..107025e4e52 100644
--- a/mysql-test/suite/innodb/r/innodb_file_format.result
+++ b/mysql-test/suite/innodb/r/innodb_file_format.result
@@ -8,7 +8,7 @@ Antelope
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
set global innodb_file_format=cheetah;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'cheetah'
select @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -17,16 +17,16 @@ select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=on;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
set global innodb_file_format_check=cheetah;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah'
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
@@ -35,9 +35,9 @@ select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format=on;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
-ERROR HY000: Incorrect arguments to SET
+ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test
index fdb9b89e37a..eb517563416 100644
--- a/mysql-test/suite/innodb/t/innodb-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-zip.test
@@ -142,19 +142,19 @@ set global innodb_file_format=`0`;
select @@innodb_file_format;
set global innodb_file_format=`1`;
select @@innodb_file_format;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`2`;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`-1`;
set global innodb_file_format=`Antelope`;
set global innodb_file_format=`Barracuda`;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`Cheetah`;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`abc`;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`1a`;
--- error ER_WRONG_ARGUMENTS
+-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=``;
#test strict mode.
diff --git a/mysql-test/suite/innodb/t/innodb_bug47167.test b/mysql-test/suite/innodb/t/innodb_bug47167.test
index 88e927c01bd..9b8bff0292f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug47167.test
+++ b/mysql-test/suite/innodb/t/innodb_bug47167.test
@@ -31,15 +31,15 @@ select @@innodb_file_format_check;
# Following are negative tests, all should fail.
--disable_warnings
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_check = cheetah;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_check = Bear;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_check = on;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_check = off;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test
index 3bd1dd2fa6f..4e11da5f123 100644
--- a/mysql-test/suite/innodb/t/innodb_file_format.test
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test
@@ -9,26 +9,26 @@ select @@innodb_file_format;
select @@innodb_file_format_check;
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=cheetah;
select @@innodb_file_format;
set global innodb_file_format=default;
select @@innodb_file_format;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=on;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=off;
select @@innodb_file_format;
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_check=cheetah;
select @@innodb_file_format_check;
set global innodb_file_format_check=default;
select @@innodb_file_format_check;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=on;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=off;
select @@innodb_file_format_check;
diff --git a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result
index 9f4f8c0755c..cbc320908ac 100644
--- a/mysql-test/suite/ndb/r/ndb_basic.result
+++ b/mysql-test/suite/ndb/r/ndb_basic.result
@@ -18,11 +18,15 @@ Variable_name Value
ndb_autoincrement_prefetch_sz #
ndb_cache_check_time #
ndb_connectstring #
+ndb_distribution #
ndb_extra_logging #
ndb_force_send #
ndb_index_stat_cache_entries #
ndb_index_stat_enable #
ndb_index_stat_update_freq #
+ndb_mgmd_host #
+ndb_nodeid #
+ndb_optimized_node_selection #
ndb_report_thresh_binlog_epoch_slip #
ndb_report_thresh_binlog_mem_usage #
ndb_use_copying_alter_table #
diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result
index 9714a89c2ab..35516efb48c 100644
--- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result
+++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result
@@ -308,6 +308,7 @@ ENGINE = NDB;
DROP USER mysqltest_u1@localhost;
DROP USER mysqltest_u2@localhost;
+DROP DATABASE mysqltest2;
# -----------------------------------------------------------------
# End 6.0 test
diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test
index e8db0730687..ca39be87c94 100644
--- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test
+++ b/mysql-test/suite/ndb/t/ndb_dd_ddl.test
@@ -462,6 +462,7 @@ ENGINE = NDB;
DROP USER mysqltest_u1@localhost;
DROP USER mysqltest_u2@localhost;
+DROP DATABASE mysqltest2;
--echo
--echo # -----------------------------------------------------------------
diff --git a/mysql-test/suite/rpl/r/rpl_charset.result b/mysql-test/suite/rpl/r/rpl_charset.result
index ae5cf3b0fd1..a4841b0baf3 100644
--- a/mysql-test/suite/rpl/r/rpl_charset.result
+++ b/mysql-test/suite/rpl/r/rpl_charset.result
@@ -116,8 +116,7 @@ latin5
select @@character_set_server;
@@character_set_server
latin5
-set one_shot max_join_size=10;
-ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
+set one_shot max_join_size=1000000;
set character_set_client=9999999;
ERROR 42000: Unknown character set: '9999999'
set collation_server=9999998;
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result
index 92ba8549ee4..44b3964f632 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result
@@ -42,7 +42,7 @@ Variable_name Slave_heartbeat_period
Value 4.000
set @@global.slave_net_timeout= 3 /* must be a warning */;
Warnings:
-Warning 1624 The currect value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
+Warning 1624 The current value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
reset slave;
drop table if exists t1;
set @@global.slave_net_timeout= 10;
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index d229e1260dd..5a47d1da596 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -38,7 +38,7 @@ RESET SLAVE;
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
Warnings:
-Warning 1624 The currect value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
+Warning 1624 The current value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result
index bfdcbc6fa23..6a20480fb5a 100644
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result
@@ -113,7 +113,7 @@ a b
set global slave_exec_mode='IDEMPOTENT';
set global slave_exec_mode='STRICT';
set global slave_exec_mode='IDEMPOTENT,STRICT';
-ERROR HY000: Ambiguous slave modes combination.
+ERROR 42000: Variable 'slave_exec_mode' can't be set to the value of 'IDEMPOTENT,STRICT'
select @@global.slave_exec_mode /* must be STRICT */;
@@global.slave_exec_mode
STRICT
diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
index c2554218f73..a21bec6ae55 100644
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
@@ -17,6 +17,8 @@ reset slave;
set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '8191'
select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
index c2554218f73..a21bec6ae55 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
@@ -17,6 +17,8 @@ reset slave;
set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '8191'
select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
index 7447d12f9b2..37781aeac0c 100644
--- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
@@ -23,7 +23,7 @@ binlog_format ROW
set global binlog_format=DEFAULT;
show global variables like "binlog_format%";
Variable_name Value
-binlog_format MIXED
+binlog_format STATEMENT
set global binlog_format=MIXED;
show global variables like "binlog_format%";
Variable_name Value
diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result
index 51484187215..7a1bcc4f44f 100644
--- a/mysql-test/suite/rpl/r/rpl_variables_stm.result
+++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result
@@ -6,7 +6,6 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
==== Initialization ====
[on master]
-SET @m_pseudo_thread_id= @@global.pseudo_thread_id;
SET @m_auto_increment_increment= @@global.auto_increment_increment;
SET @m_auto_increment_offset= @@global.auto_increment_offset;
SET @m_character_set_client= @@global.character_set_client;
@@ -16,7 +15,6 @@ SET @m_time_zone= @@global.time_zone;
SET @m_lc_time_names= @@global.lc_time_names;
SET @m_collation_database= @@global.collation_database;
[on slave]
-SET @s_pseudo_thread_id= @@global.pseudo_thread_id;
SET @s_auto_increment_increment= @@global.auto_increment_increment;
SET @s_auto_increment_offset= @@global.auto_increment_offset;
SET @s_character_set_client= @@global.character_set_client;
@@ -25,7 +23,6 @@ SET @s_collation_server= @@global.collation_server;
SET @s_time_zone= @@global.time_zone;
SET @s_lc_time_names= @@global.lc_time_names;
SET @s_collation_database= @@global.collation_database;
-SET @@global.pseudo_thread_id= 4711;
SET @@global.auto_increment_increment=19;
SET @@global.auto_increment_offset=4;
SET @@global.character_set_client='latin2';
@@ -505,7 +502,6 @@ DROP PROCEDURE proc;
DROP FUNCTION func;
DROP TRIGGER trig;
DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table;
-SET @@global.pseudo_thread_id= @m_pseudo_thread_id;
SET @@global.auto_increment_increment= @m_auto_increment_increment;
SET @@global.auto_increment_offset= @m_auto_increment_offset;
SET @@global.character_set_client= @m_character_set_client;
@@ -515,7 +511,6 @@ SET @@global.time_zone= @m_time_zone;
SET @@global.lc_time_names= @m_lc_time_names;
SET @@global.collation_database= @m_collation_database;
[on slave]
-SET @@global.pseudo_thread_id= @s_pseudo_thread_id;
SET @@global.auto_increment_increment= @s_auto_increment_increment;
SET @@global.auto_increment_offset= @s_auto_increment_offset;
SET @@global.character_set_client= @s_character_set_client;
diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test
index c96b88a1b1a..b1abe916806 100644
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test
@@ -165,7 +165,7 @@ set global slave_exec_mode='IDEMPOTENT';
set global slave_exec_mode='STRICT';
# checking mutual exclusion for the options
---error ER_SLAVE_AMBIGOUS_EXEC_MODE
+--error ER_WRONG_VALUE_FOR_VAR
set global slave_exec_mode='IDEMPOTENT,STRICT';
select @@global.slave_exec_mode /* must be STRICT */;
diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt b/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt
index 61dd7a6ad0e..27fad1403d2 100644
--- a/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt
@@ -1 +1 @@
---log_bin_trust_routine_creators=1
+--log_bin_trust_function_creators=1
diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt b/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt
index 61dd7a6ad0e..27fad1403d2 100644
--- a/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt
+++ b/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt
@@ -1 +1 @@
---log_bin_trust_routine_creators=1
+--log_bin_trust_function_creators=1
diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test
index 67f2e50e041..c05bc42b1c2 100644
--- a/mysql-test/suite/rpl/t/rpl_variables_stm.test
+++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test
@@ -63,7 +63,6 @@ source include/have_binlog_format_mixed_or_statement.inc;
--echo [on master]
connection master;
-SET @m_pseudo_thread_id= @@global.pseudo_thread_id;
SET @m_auto_increment_increment= @@global.auto_increment_increment;
SET @m_auto_increment_offset= @@global.auto_increment_offset;
SET @m_character_set_client= @@global.character_set_client;
@@ -75,7 +74,6 @@ SET @m_collation_database= @@global.collation_database;
--echo [on slave]
connection slave;
-SET @s_pseudo_thread_id= @@global.pseudo_thread_id;
SET @s_auto_increment_increment= @@global.auto_increment_increment;
SET @s_auto_increment_offset= @@global.auto_increment_offset;
SET @s_character_set_client= @@global.character_set_client;
@@ -85,7 +83,6 @@ SET @s_time_zone= @@global.time_zone;
SET @s_lc_time_names= @@global.lc_time_names;
SET @s_collation_database= @@global.collation_database;
-SET @@global.pseudo_thread_id= 4711;
SET @@global.auto_increment_increment=19;
SET @@global.auto_increment_offset=4;
SET @@global.character_set_client='latin2';
@@ -612,7 +609,6 @@ DROP FUNCTION func;
DROP TRIGGER trig;
DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table;
-SET @@global.pseudo_thread_id= @m_pseudo_thread_id;
SET @@global.auto_increment_increment= @m_auto_increment_increment;
SET @@global.auto_increment_offset= @m_auto_increment_offset;
SET @@global.character_set_client= @m_character_set_client;
@@ -624,7 +620,6 @@ SET @@global.collation_database= @m_collation_database;
--echo [on slave]
connection slave;
-SET @@global.pseudo_thread_id= @s_pseudo_thread_id;
SET @@global.auto_increment_increment= @s_auto_increment_increment;
SET @@global.auto_increment_offset= @s_auto_increment_offset;
SET @@global.character_set_client= @s_character_set_client;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
index 9857f621bbe..b4e6c7c77b5 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
@@ -924,4 +924,5 @@ DELETE FROM t1;
--- End test 5 key partition testing ---
--- Do Cleanup ---
DROP TABLE IF EXISTS t1;
+set @@global.slave_exec_mode= DEFAULT;
drop table mysql.ndb_apply_status;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
index 44ee9d01709..935a7d61dfa 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
@@ -924,4 +924,5 @@ DELETE FROM t1;
--- End test 5 key partition testing ---
--- Do Cleanup ---
DROP TABLE IF EXISTS t1;
+set @@global.slave_exec_mode= DEFAULT;
drop table mysql.ndb_apply_status;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
index 3b075808481..21265f730d3 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
@@ -31,5 +31,6 @@ CREATE TABLE mysql.ndb_apply_status
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
+set @@global.slave_exec_mode= DEFAULT;
--connection slave
drop table mysql.ndb_apply_status;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
index 560efec255b..785222f85e4 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
@@ -30,5 +30,6 @@ CREATE TABLE mysql.ndb_apply_status
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
+set @@global.slave_exec_mode= DEFAULT;
--connection slave
drop table mysql.ndb_apply_status;
diff --git a/mysql-test/suite/sys_vars/README b/mysql-test/suite/sys_vars/README
deleted file mode 100644
index a84f00f1f62..00000000000
--- a/mysql-test/suite/sys_vars/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Some of these tests allocate more than 4GB RAM.
-So, assure that the machine on which the suite will be executed has more than 4GB RAM.
-
diff --git a/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
index 56ffbace173..a9580028c7e 100644
--- a/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/bulk_insert_buffer_size_basic.inc
@@ -115,7 +115,6 @@ SET @@session.bulk_insert_buffer_size = 42949672950;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = -2;
SELECT @@session.bulk_insert_buffer_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.bulk_insert_buffer_size = test;
diff --git a/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc b/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc
index ab158bc593e..0c9a7d1ddb8 100644
--- a/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/delayed_insert_limit_basic.inc
@@ -79,7 +79,6 @@ SET @@global.delayed_insert_limit = -1024;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = 42949672950;
SELECT @@global.delayed_insert_limit;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_insert_limit = 429496729.5;
diff --git a/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc b/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc
index 2d16f75d4e1..e8b5ab31224 100644
--- a/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/delayed_queue_size_basic.inc
@@ -77,7 +77,6 @@ SET @@global.delayed_queue_size = -1024;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = 42949672950;
SELECT @@global.delayed_queue_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_queue_size = 429496729.5;
diff --git a/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc
index 880dac4cac4..618b70f3ac3 100644
--- a/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/join_buffer_size_basic.inc
@@ -45,40 +45,24 @@ SELECT @start_session_value;
# Display the DEFAULT value of join_buffer_size #
################################################################
-SET @@global.join_buffer_size = 8200;
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size;
-SET @@session.join_buffer_size = 8200;
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size;
---echo '#--------------------FN_DYNVARS_053_02-------------------------#'
-###################################################################
-# Check the DEFAULT value of join_buffer_size #
-###################################################################
-
-SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size = 131072;
-
-SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size = 131072;
-
-
--echo '#--------------------FN_DYNVARS_053_03-------------------------#'
##########################################################################
# Change the value of join_buffer_size to a valid value for GLOBAL Scope #
##########################################################################
SET @@global.join_buffer_size = 8200;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
+SELECT @@global.join_buffer_size;
SET @@global.join_buffer_size = 65536;
SELECT @@global.join_buffer_size;
SET @@global.join_buffer_size = 4294967295;
SELECT @@global.join_buffer_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--echo '#--------------------FN_DYNVARS_053_04-------------------------#'
###########################################################################
@@ -86,13 +70,11 @@ echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable
###########################################################################
SET @@session.join_buffer_size = 8200;
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
+SELECT @@session.join_buffer_size;
SET @@session.join_buffer_size = 65536;
SELECT @@session.join_buffer_size;
SET @@session.join_buffer_size = 4294967295;
SELECT @@session.join_buffer_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--echo '#------------------FN_DYNVARS_053_05-----------------------#'
############################################################
@@ -100,40 +82,38 @@ echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable
############################################################
SET @@global.join_buffer_size = 0;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
+SELECT @@global.join_buffer_size;
SET @@global.join_buffer_size = -1024;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-SET @@global.join_buffer_size = 8199;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
+SELECT @@global.join_buffer_size;
+SET @@global.join_buffer_size = 127;
+SELECT @@global.join_buffer_size;
SET @@global.join_buffer_size = 42949672951;
SELECT @@global.join_buffer_size;
---Error ER_PARSE_ERROR
-SET @@global.join_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.join_buffer_size = 65530.34;
SELECT @@global.join_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.join_buffer_size = test;
SELECT @@global.join_buffer_size;
SET @@session.join_buffer_size = 0;
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-SET @@session.join_buffer_size = -2;
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-SET @@session.join_buffer_size = 8199;
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
+SELECT @@session.join_buffer_size;
+SET @@session.join_buffer_size = -1024;
+SELECT @@session.join_buffer_size;
+SET @@session.join_buffer_size = 127;
+SELECT @@session.join_buffer_size;
SET @@session.join_buffer_size = 42949672951;
SELECT @@session.join_buffer_size;
---Error ER_PARSE_ERROR
-SET @@session.join_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.join_buffer_size = 65530.34;
SELECT @@session.join_buffer_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.join_buffer_size = test;
SELECT @@session.join_buffer_size;
-
--echo '#------------------FN_DYNVARS_053_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
@@ -160,11 +140,7 @@ WHERE VARIABLE_NAME='join_buffer_size';
####################################################################
SET @@global.join_buffer_size = TRUE;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = FALSE;
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
---echo 'Bug: Errors are not coming on assigning TRUE/FALSE to variable';
-
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
#################################################################################
@@ -174,7 +150,6 @@ SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = 10;
SELECT @@join_buffer_size = @@global.join_buffer_size;
-
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
@@ -184,14 +159,13 @@ SET @@join_buffer_size = 100;
SELECT @@join_buffer_size = @@local.join_buffer_size;
SELECT @@local.join_buffer_size = @@session.join_buffer_size;
-
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
##############################################################################
# Check if join_buffer_size can be accessed with and without @@ sign #
##############################################################################
SET join_buffer_size = 1;
-SELECT @@join_buffer_size=8200 OR @@join_buffer_size= 8228;
+SELECT @@join_buffer_size;
--Error ER_UNKNOWN_TABLE
SELECT local.join_buffer_size;
--Error ER_UNKNOWN_TABLE
@@ -199,7 +173,6 @@ SELECT session.join_buffer_size;
--Error ER_BAD_FIELD_ERROR
SELECT join_buffer_size = @@session.join_buffer_size;
-
####################################
# Restore initial value #
####################################
diff --git a/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc b/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc
index 7841ad2cedc..e0970016577 100644
--- a/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/key_cache_age_threshold_basic.inc
@@ -43,10 +43,7 @@ SELECT @start_value;
# Display the DEFAULT value of key_cache_age_threshold #
################################################################################
-SET @@global.key_cache_age_threshold = 99;
---Error ER_NO_DEFAULT
SET @@global.key_cache_age_threshold = DEFAULT;
---echo 'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_age_threshold;
@@ -72,8 +69,6 @@ SET @@global.key_cache_age_threshold = 1800;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 65535;
SELECT @@global.key_cache_age_threshold;
---echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
-
--echo '#--------------------FN_DYNVARS_056_04-------------------------#'
###########################################################################
@@ -92,8 +87,6 @@ SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 99;
SELECT @@global.key_cache_age_threshold;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_age_threshold = ON;
SELECT @@global.key_cache_age_threshold;
diff --git a/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc b/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
index cd7e1023649..54b4fc4c937 100644
--- a/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/log_warnings_basic.inc
@@ -109,8 +109,8 @@ SET @@global.log_warnings = 100000000000;
SELECT @@global.log_warnings;
SET @@global.log_warnings = -1024;
SELECT @@global.log_warnings;
---Error ER_PARSE_ERROR
-SET @@global.log_warnings = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.log_warnings = 65530.34;
SELECT @@global.log_warnings;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.log_warnings = test;
@@ -120,9 +120,8 @@ SET @@session.log_warnings = 100000000000;
SELECT @@session.log_warnings;
SET @@session.log_warnings = -2;
SELECT @@session.log_warnings;
---Error ER_PARSE_ERROR
-SET @@session.log_warnings = 65530.34.;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.log_warnings = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.log_warnings = test;
diff --git a/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc b/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc
index 530022652a1..ffad23f6ba7 100644
--- a/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/max_connect_errors_basic.inc
@@ -46,7 +46,6 @@ SELECT @start_value;
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#---------------------FN_DYNVARS_073_02-------------------------#'
###############################################
@@ -71,7 +70,6 @@ SET @@global.max_connect_errors = 1;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 2;
SELECT @@global.max_connect_errors;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_073_04-------------------------#'
@@ -93,8 +91,6 @@ SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 4294967296;
SELECT @@global.max_connect_errors;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_connect_errors = ON;
SELECT @@global.max_connect_errors;
diff --git a/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc b/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc
index 23c3c5b2a95..08aff37054d 100644
--- a/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/max_seeks_for_key_basic.inc
@@ -110,8 +110,8 @@ SET @@global.max_seeks_for_key = -1024;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 4294967296;
SELECT @@global.max_seeks_for_key;
---Error ER_PARSE_ERROR
-SET @@global.max_seeks_for_key = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_seeks_for_key = 65530.34;
SELECT @@global.max_seeks_for_key;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_seeks_for_key = test;
@@ -121,11 +121,10 @@ SET @@session.max_seeks_for_key = 0;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = -2;
SELECT @@session.max_seeks_for_key;
---Error ER_PARSE_ERROR
-SET @@session.max_seeks_for_key = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_seeks_for_key = 65530.34;
SET @@session.max_seeks_for_key = 4294967296;
SELECT @@session.max_seeks_for_key;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_seeks_for_key = test;
diff --git a/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc b/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc
index e24d97f47dd..236c59837d8 100644
--- a/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/max_tmp_tables_basic.inc
@@ -121,8 +121,8 @@ SET @@global.max_tmp_tables = -1;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 429496729500;
SELECT @@global.max_tmp_tables;
---Error ER_PARSE_ERROR
-SET @@global.max_tmp_tables = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_tmp_tables = 65530.34;
SELECT @@global.max_tmp_tables;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_tmp_tables = test;
@@ -136,8 +136,8 @@ SET @@session.max_tmp_tables = 429496729500;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = -001;
SELECT @@session.max_tmp_tables;
---Error ER_PARSE_ERROR
-SET @@session.max_tmp_tables = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_tmp_tables = 65530.34;
SET @@session.max_tmp_tables = 10737418241;
SELECT @@session.max_tmp_tables;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc b/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc
index 80d5b7cc747..4e92a3057b0 100644
--- a/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/max_write_lock_count_basic.inc
@@ -88,8 +88,8 @@ SET @@global.max_write_lock_count = -1;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 429496729500;
SELECT @@global.max_write_lock_count;
---Error ER_PARSE_ERROR
-SET @@global.max_write_lock_count = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_write_lock_count = 65530.34;
SELECT @@global.max_write_lock_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_write_lock_count = test;
diff --git a/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc b/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc
index c032d4a9d6d..cd80d1d0998 100644
--- a/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/min_examined_row_limit_basic.inc
@@ -116,8 +116,8 @@ SET @@global.min_examined_row_limit = -1024;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 429496729500;
SELECT @@global.min_examined_row_limit;
---Error ER_PARSE_ERROR
-SET @@global.min_examined_row_limit = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.min_examined_row_limit = 65530.34;
SELECT @@global.min_examined_row_limit;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.min_examined_row_limit = test;
@@ -127,11 +127,10 @@ SET @@session.min_examined_row_limit = 4294967296;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = -1;
SELECT @@session.min_examined_row_limit;
---Error ER_PARSE_ERROR
-SET @@session.min_examined_row_limit = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.min_examined_row_limit = 65530.34;
SET @@session.min_examined_row_limit = 4294967295021;
SELECT @@session.min_examined_row_limit;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.min_examined_row_limit = test;
diff --git a/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc b/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
index 23f0607b439..9a975b977eb 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/myisam_max_sort_file_size_basic.inc
@@ -47,8 +47,6 @@ SET @@global.myisam_max_sort_file_size = 500000;
SET @@global.myisam_max_sort_file_size = DEFAULT;
SELECT @@global.myisam_max_sort_file_size;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
-
--echo '#--------------------FN_DYNVARS_094_02-------------------------#'
###################################################################
# Check the DEFAULT value of myisam_max_sort_file_size #
@@ -102,8 +100,8 @@ SET @@global.myisam_max_sort_file_size = -2147483648;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = -2147483649;
SELECT @@global.myisam_max_sort_file_size;
---Error ER_PARSE_ERROR
-SET @@global.myisam_max_sort_file_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.myisam_max_sort_file_size = 65530.34;
SELECT @@global.myisam_max_sort_file_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_max_sort_file_size = 2147483649.56;
@@ -111,9 +109,6 @@ SELECT @@global.myisam_max_sort_file_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_max_sort_file_size = 1G;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-
--echo '#------------------FN_DYNVARS_094_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
diff --git a/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc b/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc
index 8485e79ff03..e3aca46536d 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/myisam_repair_threads_basic.inc
@@ -114,8 +114,8 @@ SET @@global.myisam_repair_threads = 429496729533;
SELECT @@global.myisam_repair_threads ;
---Error ER_PARSE_ERROR
-SET @@global.myisam_repair_threads = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.myisam_repair_threads = 65530.34;
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
@@ -141,9 +141,8 @@ SELECT @@session.myisam_repair_threads ;
SET @@session.myisam_repair_threads = -2;
SELECT @@session.myisam_repair_threads ;
---Error ER_PARSE_ERROR
-
-SET @@session.myisam_repair_threads = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.myisam_repair_threads = 65530.34;
SELECT @@session.myisam_repair_threads ;
diff --git a/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
index 8e36d8a2c70..c92c2f85adb 100644
--- a/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/myisam_sort_buffer_size_basic.inc
@@ -113,8 +113,8 @@ SET @@global.myisam_sort_buffer_size = 429496729533;
SELECT @@global.myisam_sort_buffer_size ;
---Error ER_PARSE_ERROR
-SET @@global.myisam_sort_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.myisam_sort_buffer_size = 65530.34;
SELECT @@global.myisam_sort_buffer_size ;
--Error ER_WRONG_TYPE_FOR_VAR
@@ -140,9 +140,8 @@ SELECT @@session.myisam_sort_buffer_size ;
SET @@session.myisam_sort_buffer_size = -2;
SELECT @@session.myisam_sort_buffer_size ;
---Error ER_PARSE_ERROR
-
-SET @@session.myisam_sort_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.myisam_sort_buffer_size = 65530.34;
SELECT @@session.myisam_sort_buffer_size ;
diff --git a/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc b/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc
index 537d8eea6c6..46b8d0350fe 100644
--- a/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/net_retry_count_basic.inc
@@ -111,8 +111,8 @@ SET @@global.net_retry_count = 4294967296;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 429496729500;
SELECT @@global.net_retry_count;
---Error ER_PARSE_ERROR
-SET @@global.net_retry_count = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.net_retry_count = 65530.34;
SELECT @@global.net_retry_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.net_retry_count = test;
@@ -122,15 +122,13 @@ SET @@session.net_retry_count = 0;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = -2;
SELECT @@session.net_retry_count;
---Error ER_PARSE_ERROR
-SET @@session.net_retry_count = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.net_retry_count = 65530.34;
SET @@session.net_retry_count = 6555015425;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 4294967296;
SELECT @@session.net_retry_count;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.net_retry_count = test;
SELECT @@session.net_retry_count;
diff --git a/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
index 208fe6b3da4..35d80f36f6d 100644
--- a/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/query_alloc_block_size_basic.inc
@@ -82,9 +82,6 @@ SELECT @@global.query_alloc_block_size;
SET @@global.query_alloc_block_size = 65536;
SELECT @@global.query_alloc_block_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
-
--echo '#--------------------FN_DYNVARS_130_04-------------------------#'
#################################################################################
# Change the value of query_alloc_block_size to a valid value for SESSION Scope #
@@ -114,8 +111,8 @@ SET @@global.query_alloc_block_size = 1023;
SELECT @@global.query_alloc_block_size;
SET @@global.query_alloc_block_size = 4294967296;
SELECT @@global.query_alloc_block_size;
---Error ER_PARSE_ERROR
-SET @@global.query_alloc_block_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_alloc_block_size = 65530.34;
SELECT @@global.query_alloc_block_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.query_alloc_block_size = test;
@@ -125,13 +122,12 @@ SET @@session.query_alloc_block_size = 64;
SELECT @@session.query_alloc_block_size;
SET @@session.query_alloc_block_size = -2;
SELECT @@session.query_alloc_block_size;
---Error ER_PARSE_ERROR
-SET @@session.query_alloc_block_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.query_alloc_block_size = 65530.34;
SET @@session.query_alloc_block_size = 1023;
SELECT @@session.query_alloc_block_size;
-SET @@session.query_alloc_block_size = 4294967296;
-SELECT @@session.query_alloc_block_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+#SET @@session.query_alloc_block_size = 4294967296;
+#SELECT @@session.query_alloc_block_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.query_alloc_block_size = test;
@@ -144,7 +140,6 @@ SELECT @@session.query_alloc_block_size;
#SET @@global.query_alloc_block_size = 1;
#SET @@session.query_alloc_block_size = 12;
---echo 'Bug# 34877: OutOFMemeory errors are coming if we dont assign these values to variable before comparision statement';
SET @@global.query_alloc_block_size = 1;
SET @@session.query_alloc_block_size = 12;
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc b/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc
index 2eb4a597eef..c94ba3a52dd 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/query_cache_limit_basic.inc
@@ -91,7 +91,6 @@ SET @@global.query_cache_limit = -1024;
SELECT @@global.query_cache_limit;
SET @@global.query_cache_limit = 42949672950;
SELECT @@global.query_cache_limit;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.query_cache_limit = ON;
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc b/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
index 1b65e035b18..9276a987dfb 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/query_cache_min_res_unit_basic.inc
@@ -70,12 +70,10 @@ SET @@global.query_cache_min_res_unit = 0;
SELECT @@global.query_cache_min_res_unit;
SET @@global.query_cache_min_res_unit = 1;
SELECT @@global.query_cache_min_res_unit;
---echo 'Bug#34842: FN_DYNVARS_132_03 - Minimum value according to documentation is 0, and here it is 512';
SET @@global.query_cache_min_res_unit = 512;
SELECT @@global.query_cache_min_res_unit;
SET @@global.query_cache_min_res_unit = 513;
SELECT @@global.query_cache_min_res_unit;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.query_cache_min_res_unit = 1048576;
SELECT @@global.query_cache_min_res_unit;
SET @@global.query_cache_min_res_unit = 1048575;
@@ -100,7 +98,6 @@ SET @@global.query_cache_min_res_unit = -1024;
SELECT @@global.query_cache_min_res_unit;
SET @@global.query_cache_min_res_unit = 42949672950;
SELECT @@global.query_cache_min_res_unit;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.query_cache_min_res_unit = ON;
diff --git a/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc b/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc
index 1f8c63c55bb..83edefaaf25 100644
--- a/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/query_cache_size_basic.inc
@@ -68,8 +68,6 @@ SET @@global.query_cache_size = 512;
SELECT @@global.query_cache_size;
SET @@global.query_cache_size = 1024;
SELECT @@global.query_cache_size;
---echo : 'Bug#34880: Warnings are coming on assinging valid values to variable
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.query_cache_size = 1048576;
SELECT @@global.query_cache_size;
SET @@global.query_cache_size = 1048575;
@@ -93,8 +91,6 @@ SET @@global.query_cache_size = -1024;
SELECT @@global.query_cache_size;
SET @@global.query_cache_size = 42949672950;
SELECT @@global.query_cache_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.query_cache_size = ON;
SELECT @@global.query_cache_size;
diff --git a/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc
index 37692cc8c35..cfa74665dd9 100644
--- a/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/range_alloc_block_size_basic.inc
@@ -73,12 +73,10 @@ SELECT @@session.range_alloc_block_size = 2048;
SET @@global.range_alloc_block_size = 2048;
SELECT @@global.range_alloc_block_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.range_alloc_block_size = 4294967295;
SELECT @@global.range_alloc_block_size;
SET @@global.range_alloc_block_size = 4294967294;
SELECT @@global.range_alloc_block_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_137_04-------------------------#'
@@ -105,8 +103,8 @@ SET @@global.range_alloc_block_size = -1024;
SELECT @@global.range_alloc_block_size;
SET @@global.range_alloc_block_size = 42949672951;
SELECT @@global.range_alloc_block_size;
---Error ER_PARSE_ERROR
-SET @@global.range_alloc_block_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.range_alloc_block_size = 65530.34;
SELECT @@global.range_alloc_block_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.range_alloc_block_size = test;
@@ -116,11 +114,10 @@ SET @@session.range_alloc_block_size = 0;
SELECT @@session.range_alloc_block_size;
SET @@session.range_alloc_block_size = -2;
SELECT @@session.range_alloc_block_size;
---Error ER_PARSE_ERROR
-SET @@session.range_alloc_block_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.range_alloc_block_size = 65530.34;
SET @@session.range_alloc_block_size = 4294967296;
SELECT @@session.range_alloc_block_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.range_alloc_block_size = test;
diff --git a/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc b/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc
index f9ae3968b31..b185eeb21a7 100644
--- a/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/rpl_recovery_rank_basic.inc
@@ -93,8 +93,8 @@ SET @@global.rpl_recovery_rank = -2147483648;
SELECT @@global.rpl_recovery_rank;
SET @@global.rpl_recovery_rank = -2147483649;
SELECT @@global.rpl_recovery_rank;
---Error ER_PARSE_ERROR
-SET @@global.rpl_recovery_rank = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.rpl_recovery_rank = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.rpl_recovery_rank = 2147483649.56;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc b/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc
index 28ba8791b0a..17146f07bc0 100644
--- a/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/slave_transaction_retries_basic.inc
@@ -105,10 +105,8 @@ SELECT @@global.slave_transaction_retries;
SET @@global.slave_transaction_retries = 2147483649*2147483649;
SELECT @@global.slave_transaction_retries;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
---Error ER_PARSE_ERROR
-SET @@global.slave_transaction_retries = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.slave_transaction_retries = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_transaction_retries = '100';
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
index 19d8b442c2c..a88ad65a076 100644
--- a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
@@ -40,12 +40,6 @@
# Save initial value #
#############################################################
-# due to differences when running on Windows (Bug#36695)
---source include/not_windows.inc
-
-let $kbrange32 = BETWEEN 32776 AND 32999;
-let $mbrange2 = BETWEEN 2097116 AND 2100000;
-
--disable_warnings
SET @start_global_value = @@global.sort_buffer_size;
@@ -59,12 +53,12 @@ SET @start_session_value = @@session.sort_buffer_size;
SET @@global.sort_buffer_size = 1000;
SET @@global.sort_buffer_size = DEFAULT;
eval
-SELECT @@global.sort_buffer_size $mbrange2;
+SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = 2000;
SET @@session.sort_buffer_size = DEFAULT;
eval
-SELECT @@session.sort_buffer_size $mbrange2;
+SELECT @@session.sort_buffer_size;
--echo '#--------------------FN_DYNVARS_151_02-------------------------#'
@@ -74,11 +68,11 @@ SELECT @@session.sort_buffer_size $mbrange2;
SET @@global.sort_buffer_size = DEFAULT;
eval
-SELECT @@global.sort_buffer_size $mbrange2;
+SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = DEFAULT;
eval
-SELECT @@session.sort_buffer_size $mbrange2;
+SELECT @@session.sort_buffer_size;
--echo '#--------------------FN_DYNVARS_151_03-------------------------#'
@@ -88,10 +82,10 @@ SELECT @@session.sort_buffer_size $mbrange2;
SET @@global.sort_buffer_size = 32776;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 32777;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 4294967295;
SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 4294967294;
@@ -104,10 +98,10 @@ SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = 32776;
eval
-SELECT @@session.sort_buffer_size $kbrange32;
+SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 32777;
eval
-SELECT @@session.sort_buffer_size $kbrange32;
+SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 4294967295;
SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 4294967294;
@@ -121,14 +115,14 @@ SELECT @@session.sort_buffer_size;
SET @@global.sort_buffer_size = 32775;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = -1024;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 4294967296;
SELECT @@global.sort_buffer_size;
---Error ER_PARSE_ERROR
-SET @@global.sort_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.sort_buffer_size = 65530.34;
SELECT @@global.sort_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.sort_buffer_size = test;
@@ -136,12 +130,12 @@ SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = 32775;
eval
-SELECT @@session.sort_buffer_size $kbrange32;
+SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = -2;
eval
-SELECT @@session.sort_buffer_size $kbrange32;
---Error ER_PARSE_ERROR
-SET @@session.sort_buffer_size = 65530.34.;
+SELECT @@session.sort_buffer_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.sort_buffer_size = 65530.34;
SET @@session.sort_buffer_size = 4294967296;
SELECT @@session.sort_buffer_size;
@@ -173,10 +167,10 @@ INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
SET @@global.sort_buffer_size = TRUE;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = FALSE;
eval
-SELECT @@global.sort_buffer_size $kbrange32;
+SELECT @@global.sort_buffer_size;
--echo '#---------------------FN_DYNVARS_151_09----------------------#'
####################################################################################
@@ -203,7 +197,7 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
SET sort_buffer_size = 9100;
eval
-SELECT @@sort_buffer_size $kbrange32;
+SELECT @@sort_buffer_size;
--Error ER_UNKNOWN_TABLE
SELECT local.sort_buffer_size;
--Error ER_UNKNOWN_TABLE
diff --git a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
index c14383b86c6..4a69bbcdb01 100644
--- a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
@@ -82,7 +82,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 4294967295;
SELECT @@global.transaction_alloc_block_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
###################################################################
@@ -97,7 +96,6 @@ SELECT @@session.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 65535;
SELECT @@session.transaction_alloc_block_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
@@ -115,8 +113,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 123456789201;
SELECT @@global.transaction_alloc_block_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@global.transaction_alloc_block_size = ON;
@@ -143,8 +139,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 12345678901;
SELECT @@session.transaction_alloc_block_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@session.transaction_alloc_block_size = ON;
diff --git a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc
index 1ca302a19e0..56c93163621 100644
--- a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc
@@ -39,8 +39,6 @@ SELECT @start_global_value;
SET @start_session_value = @@session.transaction_prealloc_size;
SELECT @start_session_value;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
-
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
########################################################################
# Display the DEFAULT value of transaction_prealloc_size #
@@ -106,8 +104,6 @@ SELECT @@global.transaction_prealloc_size;
SET @@global.transaction_prealloc_size = -1024;
SELECT @@global.transaction_prealloc_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@global.transaction_prealloc_size = ON;
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
new file mode 100644
index 00000000000..abd1f5d2bd6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -0,0 +1,12 @@
+create table t1 (test_name text);
+load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
+select variable_name as `There should be *no* variables listed below:`
+ from information_schema.global_variables
+left join t1 on variable_name=test_name where
+test_name is null
+union
+select variable_name from information_schema.session_variables
+left join t1 on variable_name=test_name where
+test_name is null;
+There should be *no* variables listed below:
+drop table t1;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result b/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result
index 3cfdc54457b..3e66041856f 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result
@@ -71,8 +71,8 @@ Warning 1292 Truncated incorrect auto_increment_increment value: '65536'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
-SET @@global.auto_increment_increment = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.auto_increment_increment = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'auto_increment_increment'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
@@ -93,15 +93,14 @@ Warning 1292 Truncated incorrect auto_increment_increment value: '-2'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1
-SET @@session.auto_increment_increment = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.auto_increment_increment = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'auto_increment_increment'
SET @@session.auto_increment_increment = 65550;
Warnings:
Warning 1292 Truncated incorrect auto_increment_increment value: '65550'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
65535
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.auto_increment_increment = test;
ERROR 42000: Incorrect argument type to variable 'auto_increment_increment'
SELECT @@session.auto_increment_increment;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result b/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
index eeaa3949886..df3ca1ab093 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
@@ -95,8 +95,6 @@ id name
113 Record_8
115 Record_9
116 Record_10
-'Bug#35362: Here Record_10 id should be 120 instead of 115 because we'
-'have set the value of variable to 5'
SET @@session.auto_increment_increment = 1;
SELECT @@auto_increment_increment;
@@auto_increment_increment
@@ -189,7 +187,6 @@ id name
127 Record_16
128 Record_17
129 Record_18
-'Bug#35364: Variable is incrementing some random values on assigning -ve value'
## Disconnecting test_con2 ##
## Dropping table t1 ##
DROP table if exists t1;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result b/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result
index 7752851cb4c..cc7b6b693c0 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result
@@ -104,7 +104,6 @@ Warning 1292 Truncated incorrect auto_increment_offset value: '65550'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.auto_increment_offset = ON;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@session.auto_increment_offset;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result b/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
index e166cb149f6..d2b5b828c04 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
@@ -84,8 +84,6 @@ id name
## Setting value of variable less than last insert id ##
SET @@session.auto_increment_offset = 5;
INSERT into t1(name) values('Record_9');
-'Bug#35367: Random value of id is increasing on assigning value to';
-'variable that is less than current offset';
INSERT into t1(name) values('Record_10');
INSERT into t1(name) values('Record_11');
INSERT into t1(name) values('Record_12');
@@ -125,8 +123,6 @@ id name
125 Record_12
134 Record_13
140 Record_14
-'Bug#35369: Some invalid value of id is increasing on assigning value to';
-'variable that is greater than auto_increment_increment';
'#--------------------FN_DYNVARS_002_06-------------------------#'
## Changing datatype of column id with primary key to SmallInt ##
ALTER table t1 modify id SMALLINT NOT NULL auto_increment;
@@ -206,8 +202,6 @@ id name
180 Record_18
181 Record_17
191 Record_18
-'Bug#35370: Some invalid value of id is increasing on assigning negative';
-' value in variable';
## Assigning value that is out of range of variable ##
SET @@auto_increment_offset = 65536;
Warnings:
diff --git a/mysql-test/suite/sys_vars/r/auto_commit_basic.result b/mysql-test/suite/sys_vars/r/autocommit_basic.result
index 96cfd3e7ee6..68531f8b5a6 100644
--- a/mysql-test/suite/sys_vars/r/auto_commit_basic.result
+++ b/mysql-test/suite/sys_vars/r/autocommit_basic.result
@@ -1,4 +1,4 @@
-SET @start_value = @@autocommit;
+SET @start_value = @@global.autocommit;
SELECT @start_value;
@start_value
1
@@ -7,8 +7,7 @@ SET @@autocommit = 0;
SET @@autocommit = DEFAULT;
SELECT @@autocommit;
@@autocommit
-0
-'Bug: variable DEFAULT value not working and is not throwing error'
+1
'#---------------------FN_DYNVARS_003_02-------------------------#'
SET @@autocommit = @start_value;
SELECT @@autocommit = 1;
@@ -50,16 +49,16 @@ SET @@autocommit = '';
ERROR 42000: Variable 'autocommit' can't be set to the value of ''
'#-------------------FN_DYNVARS_003_05----------------------------#'
SET @@global.autocommit = 0;
-ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.autocommit;
-ERROR HY000: Variable 'autocommit' is a SESSION variable
+@@global.autocommit
+0
+SET @@global.autocommit = 1;
'#----------------------FN_DYNVARS_003_06------------------------#'
SELECT IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='autocommit';
IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
1
-Bug # 34839: Values in variable and information_schema do not match for autocommit
'#----------------------FN_DYNVARS_003_07------------------------#'
SET @@autocommit = 1;
SELECT IF(@@autocommit, "ON", "OFF") = VARIABLE_VALUE
@@ -111,7 +110,7 @@ SELECT session.autocommit;
ERROR 42S02: Unknown table 'session' in field list
SELECT autocommit = @@session.autocommit;
ERROR 42S22: Unknown column 'autocommit' in 'field list'
-SET @@autocommit = @start_value;
-SELECT @@autocommit;
-@@autocommit
+SET @@global.autocommit = @start_value;
+SELECT @@global.autocommit;
+@@global.autocommit
1
diff --git a/mysql-test/suite/sys_vars/r/autocommit_func.result b/mysql-test/suite/sys_vars/r/autocommit_func.result
index 47c2c921022..8fe7c0bc90e 100644
--- a/mysql-test/suite/sys_vars/r/autocommit_func.result
+++ b/mysql-test/suite/sys_vars/r/autocommit_func.result
@@ -89,7 +89,6 @@ id name
1 Record_1
2 Record_2
3 Record_3
-'Bug#35373: Records donot get committed in transaction on switching connections'
INSERT into t1(name) values('Record_6');
SELECT * from t1;
id name
diff --git a/mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result b/mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result
index 26e33a384b9..e0a939758d5 100644
--- a/mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result
+++ b/mysql-test/suite/sys_vars/r/automatic_sp_privileges_basic.result
@@ -58,7 +58,6 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='automatic_sp_privileges';
IF(@@global.automatic_sp_privileges, "ON", "OFF") = VARIABLE_VALUE
1
-'Bug# 34839: Values in variable and information_schema donot match'
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.automatic_sp_privileges = OFF;
SELECT @@global.automatic_sp_privileges;
diff --git a/mysql-test/suite/sys_vars/r/back_log_basic.result b/mysql-test/suite/sys_vars/r/back_log_basic.result
new file mode 100644
index 00000000000..5cfb0da65d6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/back_log_basic.result
@@ -0,0 +1,21 @@
+select @@global.back_log;
+@@global.back_log
+50
+select @@session.back_log;
+ERROR HY000: Variable 'back_log' is a GLOBAL variable
+show global variables like 'back_log';
+Variable_name Value
+back_log 50
+show session variables like 'back_log';
+Variable_name Value
+back_log 50
+select * from information_schema.global_variables where variable_name='back_log';
+VARIABLE_NAME VARIABLE_VALUE
+BACK_LOG 50
+select * from information_schema.session_variables where variable_name='back_log';
+VARIABLE_NAME VARIABLE_VALUE
+BACK_LOG 50
+set global back_log=1;
+ERROR HY000: Variable 'back_log' is a read only variable
+set session back_log=1;
+ERROR HY000: Variable 'back_log' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/big_tables_basic.result b/mysql-test/suite/sys_vars/r/big_tables_basic.result
index e88caae47cf..fac9be20d8d 100644
--- a/mysql-test/suite/sys_vars/r/big_tables_basic.result
+++ b/mysql-test/suite/sys_vars/r/big_tables_basic.result
@@ -7,8 +7,7 @@ SET @@big_tables = 1;
SET @@big_tables = DEFAULT;
SELECT @@big_tables;
@@big_tables
-1
-'Bug# 34829: No default value for variable and setting default does not raise error';
+0
'#--------------------FN_DYNVARS_005_02------------------------#'
SET @@big_tables = 0;
SELECT @@big_tables;
@@ -44,17 +43,17 @@ ERROR 42000: Variable 'big_tables' can't be set to the value of ' '
SET @@big_tables = '';
ERROR 42000: Variable 'big_tables' can't be set to the value of ''
'#-------------------FN_DYNVARS_005_04----------------------------#'
-SET @@global.big_tables = 0;
-ERROR HY000: Variable 'big_tables' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.big_tables = 1-@@global.big_tables;
SELECT @@global.big_tables;
-ERROR HY000: Variable 'big_tables' is a SESSION variable
+@@global.big_tables
+1
+SET @@global.big_tables = 1-@@global.big_tables;
'#----------------------FN_DYNVARS_005_05------------------------#'
SELECT IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='big_tables';
IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
1
-Bug # 34839: Values in variable and information_schema do not match for autocommit
'#---------------------FN_DYNVARS_005_06----------------------#'
SET @@big_tables = OFF;
SELECT @@big_tables;
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_32.result
index 2f439c8f834..d378765d96f 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_32.result
@@ -21,14 +21,20 @@ 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
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
index 3858df0f4d6..95693c6a1ba 100644
--- 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
@@ -21,14 +21,20 @@ 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
@@ -49,6 +55,8 @@ 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
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_32.result
index 3e071f76f98..497fe531fec 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_32.result
@@ -91,7 +91,6 @@ Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-2'
SELECT @@session.bulk_insert_buffer_size;
@@session.bulk_insert_buffer_size
0
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
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;
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
index 320290fbca1..e687a86c68d 100644
--- 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
@@ -87,7 +87,6 @@ Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-2'
SELECT @@session.bulk_insert_buffer_size;
@@session.bulk_insert_buffer_size
0
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
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;
diff --git a/mysql-test/suite/sys_vars/r/character_set_client_basic.result b/mysql-test/suite/sys_vars/r/character_set_client_basic.result
index c946d5109a8..78993015a24 100644
--- a/mysql-test/suite/sys_vars/r/character_set_client_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_client_basic.result
@@ -162,11 +162,8 @@ SET @@character_set_client = utf8;
SELECT @@character_set_client;
@@character_set_client
utf8
-'Bug: Assignment of ucs2 to session character-set does not raise error';
-'but selecting variable after setting it does.';
-'Even catching this does not allow any further character-set to be set.';
-'Offending querry seems to be:';
-'SET @@character_set_client = ucs2;'
+SET @@character_set_client = ucs2;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
SET @@character_set_client = cp866;
SELECT @@character_set_client;
@@character_set_client
@@ -426,9 +423,6 @@ SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
-'Bug # 34843: character sets are mapped in such a way that 100 and following';
-'numbers gives error, and before 100 the 36 mapped wraps arround';
-'several times.';
'#--------------------FN_DYNVARS_010_10-------------------------#'
SET @@character_set_client = abc;
ERROR 42000: Unknown character set: 'abc'
diff --git a/mysql-test/suite/sys_vars/r/character_set_client_func.result b/mysql-test/suite/sys_vars/r/character_set_client_func.result
index 087db21639b..82c1548d438 100644
--- a/mysql-test/suite/sys_vars/r/character_set_client_func.result
+++ b/mysql-test/suite/sys_vars/r/character_set_client_func.result
@@ -10,7 +10,6 @@ utf8
SELECT @@session.character_set_client;
@@session.character_set_client
latin1
-'Bug# 35372: session character_set_client is not effected by global character_set_client'
'#--------------------FN_DYNVARS_010_02-------------------------#'
'connection default'
SHOW VARIABLES like 'character_set_client';
@@ -22,16 +21,16 @@ CREATE TABLE t1(a CHAR(3) character set utf8);
'For latin1 characterset';
SET @@session.character_set_client = latin1;
INSERT INTO t1 values('');
-SELECT a,CHAR_LENGTH(a) FROM t1;
-a CHAR_LENGTH(a)
- 2
+SELECT hex(a),CHAR_LENGTH(a) FROM t1;
+hex(a) CHAR_LENGTH(a)
+03C3A8 2
DELETE FROM t1;
'For utf8 characterset';
SET @@session.character_set_client = utf8;
INSERT INTO t1 values('');
-SELECT a,CHAR_LENGTH(a) FROM t1;
-a CHAR_LENGTH(a)
- 1
+SELECT hex(a),CHAR_LENGTH(a) FROM t1;
+hex(a) CHAR_LENGTH(a)
+03 1
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
SET @@global.character_set_client = @global_character_set_client;
diff --git a/mysql-test/suite/sys_vars/r/character_set_connection_basic.result b/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
index 18697a20fb9..dd1052d27ef 100644
--- a/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_connection_basic.result
@@ -425,9 +425,6 @@ SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
-'Bug # 34843: character sets are mapped in such a way that 100 and following ';
-'numbers gives error, and before 100 the 36 mapped wraps arround';
-'several times.';
'#--------------------FN_DYNVARS_011_10-------------------------#'
SET @@character_set_connection = abc;
ERROR 42000: Unknown character set: 'abc'
diff --git a/mysql-test/suite/sys_vars/r/character_set_database_basic.result b/mysql-test/suite/sys_vars/r/character_set_database_basic.result
index 4380fea4c81..9aa449816f5 100644
--- a/mysql-test/suite/sys_vars/r/character_set_database_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_database_basic.result
@@ -425,8 +425,6 @@ SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
-'Bug # 34843: character sets are mapped in such a way that 100 and following';
-'numbers gives error, and before 100 the 36 mapped wraps arround several times.';
'#--------------------FN_DYNVARS_012_10-------------------------#'
SET @@character_set_database = "grek";
ERROR 42000: Unknown character set: 'grek'
diff --git a/mysql-test/suite/sys_vars/r/character_set_database_func.result b/mysql-test/suite/sys_vars/r/character_set_database_func.result
index 746824c58ff..3cadadd0f3f 100644
--- a/mysql-test/suite/sys_vars/r/character_set_database_func.result
+++ b/mysql-test/suite/sys_vars/r/character_set_database_func.result
@@ -12,7 +12,6 @@ utf8
SELECT @@session.character_set_database;
@@session.character_set_database
latin1
-'Bug#35356: session character_set_database differ from global character_set_database'
'#--------------------FN_DYNVARS_008_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
@@ -39,7 +38,6 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8
DROP TABLE t1;
DROP DATABASE db1;
-'Bug#35357: character_set_database does not effects CREATE DATABASE without characater set'
'--ascii character set specified--'
CREATE DATABASE db1 CHARACTER SET ascii;
USE db1;
@@ -72,7 +70,6 @@ SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
count(*)
1
DROP TABLE IF EXISTS t1;
-'Bug#27208: If no current database, character_set_database !=character_set_server'
SET GLOBAL character_set_server=latin5;
CREATE DATABASE csdb CHARACTER SET = utf8;
USE csdb;
diff --git a/mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result b/mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
index 11f85528593..e33df353c74 100644
--- a/mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result
@@ -403,8 +403,6 @@ SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
-'Bug # 34843: character sets are mapped in such a way that 100 and following '
-'numbers give error, and before 100 the 36 mapped wraps arround several times.'
'#--------------------FN_DYNVARS_008_10-------------------------#'
SET @@character_set_filesystem = abc;
ERROR 42000: Unknown character set: 'abc'
diff --git a/mysql-test/suite/sys_vars/r/character_set_results_basic.result b/mysql-test/suite/sys_vars/r/character_set_results_basic.result
index 71c01a3dc0d..0b59f60cd45 100644
--- a/mysql-test/suite/sys_vars/r/character_set_results_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_results_basic.result
Binary files differ
diff --git a/mysql-test/suite/sys_vars/r/character_set_server_basic.result b/mysql-test/suite/sys_vars/r/character_set_server_basic.result
index 83545128a76..966489c6cbb 100644
--- a/mysql-test/suite/sys_vars/r/character_set_server_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_set_server_basic.result
@@ -29,6 +29,8 @@ ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_server=utf8;
SELECT global character_set_server;
ERROR 42S22: Unknown column 'global' in 'field list'
+SET @@character_set_server = null;
+ERROR 42000: Variable 'character_set_server' can't be set to the value of 'NULL'
'#--------------------FN_DYNVARS_009_02-------------------------#'
SET @@character_set_server = latin5;
SET @@character_set_server = DEFAULT;
@@ -417,13 +419,6 @@ SELECT @@global.character_set_server;
cp1250
SET @@global.character_set_server = 100;
ERROR 42000: Unknown character set: '100'
-SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
-SELECT @total_charset;
-@total_charset
-36
-'Bug # 34843: character sets are mapped in such a way that 100 and following ';
-'numbers gives error, and before 100 the 36 mapped wraps arround ';
-'several times.';
'#--------------------FN_DYNVARS_009_10-------------------------#'
SET @@character_set_server = abc;
ERROR 42000: Unknown character set: 'abc'
diff --git a/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result b/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
new file mode 100644
index 00000000000..0ee774c1e9d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
@@ -0,0 +1,21 @@
+select @@global.character_sets_dir;
+@@global.character_sets_dir
+MYSQL_SHAREDIR/charsets/
+select @@session.character_sets_dir;
+ERROR HY000: Variable 'character_sets_dir' is a GLOBAL variable
+show global variables like 'character_sets_dir';
+Variable_name Value
+character_sets_dir MYSQL_SHAREDIR/charsets/
+show session variables like 'character_sets_dir';
+Variable_name Value
+character_sets_dir MYSQL_SHAREDIR/charsets/
+select * from information_schema.global_variables where variable_name='character_sets_dir';
+VARIABLE_NAME VARIABLE_VALUE
+CHARACTER_SETS_DIR MYSQL_SHAREDIR/charsets/
+select * from information_schema.session_variables where variable_name='character_sets_dir';
+VARIABLE_NAME VARIABLE_VALUE
+CHARACTER_SETS_DIR MYSQL_SHAREDIR/charsets/
+set global character_sets_dir="foo";
+ERROR HY000: Variable 'character_sets_dir' is a read only variable
+set session character_sets_dir="foo";
+ERROR HY000: Variable 'character_sets_dir' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/collation_database_basic.result b/mysql-test/suite/sys_vars/r/collation_database_basic.result
index d4375b7c8e4..50787b4bc7d 100644
--- a/mysql-test/suite/sys_vars/r/collation_database_basic.result
+++ b/mysql-test/suite/sys_vars/r/collation_database_basic.result
@@ -32,9 +32,12 @@ ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_016_02-------------------------#'
SET @@collation_database = latin1_bin;
SET @@collation_database = DEFAULT;
+SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME=DATABASE();
+DEFAULT_COLLATION_NAME
+latin1_swedish_ci
SELECT @@collation_database AS DEFAULT_VALUE;
DEFAULT_VALUE
-utf8_unicode_ci
+latin1_swedish_ci
SET @@global.collation_database = latin1_bin;
SET @@global.collation_database = DEFAULT;
SELECT @@global.collation_database;
diff --git a/mysql-test/suite/sys_vars/r/collation_database_func.result b/mysql-test/suite/sys_vars/r/collation_database_func.result
index dae8677eecf..38b1c7e22ba 100644
--- a/mysql-test/suite/sys_vars/r/collation_database_func.result
+++ b/mysql-test/suite/sys_vars/r/collation_database_func.result
@@ -11,7 +11,6 @@ latin1_danish_ci
SELECT @@session.collation_database;
@@session.collation_database
latin1_swedish_ci
-'Bug#35378: New session collation_database is not change by global collation_database'
'#--------------------FN_DYNVARS_011_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1,t2;
@@ -31,7 +30,6 @@ USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_roman_ci */
-'Bug#35380: collation_database does not effects CREATE DATABASE without characater set'
CREATE TABLE t1(a CHAR(20));
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/sys_vars/r/completion_type_basic.result b/mysql-test/suite/sys_vars/r/completion_type_basic.result
index 93bfe581182..c0f307cf238 100644
--- a/mysql-test/suite/sys_vars/r/completion_type_basic.result
+++ b/mysql-test/suite/sys_vars/r/completion_type_basic.result
@@ -1,58 +1,74 @@
SET @start_global_value = @@global.completion_type;
SELECT @start_global_value;
@start_global_value
-0
+NO_CHAIN
SET @start_session_value = @@session.completion_type;
SELECT @start_session_value;
@start_session_value
-0
+NO_CHAIN
'#--------------------FN_DYNVARS_017_01-------------------------#'
SET @@global.completion_type = 2;
SET @@global.completion_type = DEFAULT;
SELECT @@global.completion_type;
@@global.completion_type
-0
+NO_CHAIN
SET @@session.completion_type = 1;
SET @@session.completion_type = DEFAULT;
SELECT @@session.completion_type;
@@session.completion_type
-0
-'#--------------------FN_DYNVARS_017_02-------------------------#'
-SET @@global.completion_type = @start_global_value;
-SELECT @@global.completion_type = 0;
-@@global.completion_type = 0
-1
-SET @@session.completion_type = @start_session_value;
-SELECT @@session.completion_type = 0;
-@@session.completion_type = 0
-1
+NO_CHAIN
'#--------------------FN_DYNVARS_017_03-------------------------#'
SET @@global.completion_type = 0;
SELECT @@global.completion_type;
@@global.completion_type
-0
+NO_CHAIN
SET @@global.completion_type = 1;
SELECT @@global.completion_type;
@@global.completion_type
-1
+CHAIN
SET @@global.completion_type = 2;
SELECT @@global.completion_type;
@@global.completion_type
-2
+RELEASE
+SET @@global.completion_type = NO_CHAIN;
+SELECT @@global.completion_type;
+@@global.completion_type
+NO_CHAIN
+SET @@global.completion_type = CHAIN;
+SELECT @@global.completion_type;
+@@global.completion_type
+CHAIN
+SET @@global.completion_type = 'RELEASE';
+SELECT @@global.completion_type;
+@@global.completion_type
+RELEASE
'#--------------------FN_DYNVARS_017_04-------------------------#'
SET @@session.completion_type = 0;
SELECT @@session.completion_type;
@@session.completion_type
-0
+NO_CHAIN
SET @@session.completion_type = 1;
SELECT @@session.completion_type;
@@session.completion_type
-1
+CHAIN
SET @@session.completion_type = 2;
SELECT @@session.completion_type;
@@session.completion_type
-2
+RELEASE
+SET @@session.completion_type = 'NO_CHAIN';
+SELECT @@session.completion_type;
+@@session.completion_type
+NO_CHAIN
+SET @@session.completion_type = 'CHAIN';
+SELECT @@session.completion_type;
+@@session.completion_type
+CHAIN
+SET @@session.completion_type = 'RELEASE';
+SELECT @@session.completion_type;
+@@session.completion_type
+RELEASE
'#------------------FN_DYNVARS_017_05-----------------------#'
+set sql_mode=TRADITIONAL;
SET @@global.completion_type = 10;
ERROR 42000: Variable 'completion_type' can't be set to the value of '10'
SET @@global.completion_type = -1024;
@@ -60,7 +76,7 @@ ERROR 42000: Variable 'completion_type' can't be set to the value of '-1024'
SET @@global.completion_type = 2.4;
ERROR 42000: Incorrect argument type to variable 'completion_type'
SET @@global.completion_type = OFF;
-ERROR 42000: Incorrect argument type to variable 'completion_type'
+ERROR 42000: Variable 'completion_type' can't be set to the value of 'OFF'
SET @@session.completion_type = 10;
ERROR 42000: Variable 'completion_type' can't be set to the value of '10'
SET @@session.completion_type = -2;
@@ -68,7 +84,7 @@ ERROR 42000: Variable 'completion_type' can't be set to the value of '-2'
SET @@session.completion_type = 1.2;
ERROR 42000: Incorrect argument type to variable 'completion_type'
SET @@session.completion_type = ON;
-ERROR 42000: Incorrect argument type to variable 'completion_type'
+ERROR 42000: Variable 'completion_type' can't be set to the value of 'ON'
'#------------------FN_DYNVARS_017_06-----------------------#'
SELECT @@global.completion_type = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -84,11 +100,11 @@ WHERE VARIABLE_NAME='completion_type';
SET @@global.completion_type = TRUE;
SELECT @@global.completion_type;
@@global.completion_type
-1
+CHAIN
SET @@global.completion_type = FALSE;
SELECT @@global.completion_type;
@@global.completion_type
-0
+NO_CHAIN
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@completion_type = 1;
SELECT @@completion_type = @@local.completion_type;
@@ -101,7 +117,7 @@ SELECT @@local.completion_type = @@session.completion_type;
SET completion_type = 1;
SELECT @@completion_type;
@@completion_type
-1
+CHAIN
SET local.completion_type = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'completion_type = 1' at line 1
SELECT local.completion_type;
@@ -115,8 +131,9 @@ ERROR 42S22: Unknown column 'completion_type' in 'field list'
SET @@global.completion_type = @start_global_value;
SELECT @@global.completion_type;
@@global.completion_type
-0
+NO_CHAIN
SET @@session.completion_type = @start_session_value;
SELECT @@session.completion_type;
@@session.completion_type
-0
+NO_CHAIN
+set sql_mode='';
diff --git a/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result b/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result
index 1ea9c37c2a1..996a5e93717 100644
--- a/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result
+++ b/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result
@@ -1,65 +1,70 @@
SET @start_value = @@global.concurrent_insert;
SELECT @start_value;
@start_value
-1
+AUTO
'#--------------------FN_DYNVARS_018_01------------------------#'
SET @@global.concurrent_insert = 0;
SET @@global.concurrent_insert = DEFAULT;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-1
+AUTO
'#---------------------FN_DYNVARS_018_02-------------------------#'
SET @@global.concurrent_insert = DEFAULT;
SELECT @@global.concurrent_insert = 1;
@@global.concurrent_insert = 1
-1
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'AUTO'
'#--------------------FN_DYNVARS_018_03------------------------#'
SET @@global.concurrent_insert = 0;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-0
+NEVER
SET @@global.concurrent_insert = 1;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-1
+AUTO
SET @@global.concurrent_insert = 2;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-2
+ALWAYS
+SET @@global.concurrent_insert = NEVER;
+SELECT @@global.concurrent_insert;
+@@global.concurrent_insert
+NEVER
+SET @@global.concurrent_insert = AUTO;
+SELECT @@global.concurrent_insert;
+@@global.concurrent_insert
+AUTO
+SET @@global.concurrent_insert = ALWAYS;
+SELECT @@global.concurrent_insert;
+@@global.concurrent_insert
+ALWAYS
'#--------------------FN_DYNVARS_018_04-------------------------#'
SET @@global.concurrent_insert = -1;
-Warnings:
-Warning 1292 Truncated incorrect concurrent_insert value: '-1'
-Select @@global.concurrent_insert;
-@@global.concurrent_insert
-0
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of '-1'
SET @@global.concurrent_insert = 100;
-Warnings:
-Warning 1292 Truncated incorrect concurrent_insert value: '100'
-Select @@global.concurrent_insert;
-@@global.concurrent_insert
-2
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of '100'
SET @@global.concurrent_insert = TRUEF;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'TRUEF'
SET @@global.concurrent_insert = TRUE_F;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'TRUE_F'
SET @@global.concurrent_insert = FALSE0;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'FALSE0'
SET @@global.concurrent_insert = OON;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'OON'
SET @@global.concurrent_insert = ONN;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'ONN'
SET @@global.concurrent_insert = OOFF;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'OOFF'
SET @@global.concurrent_insert = 0FF;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of '0FF'
SET @@global.concurrent_insert = ' ';
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of ' '
SET @@global.concurrent_insert = " ";
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of ' '
SET @@global.concurrent_insert = '';
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of ''
'#-------------------FN_DYNVARS_018_05----------------------------#'
SET @@session.concurrent_insert = 1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
@@ -73,18 +78,18 @@ WHERE VARIABLE_NAME='concurrent_insert';
1
'#---------------------FN_DYNVARS_018_07----------------------#'
SET @@global.concurrent_insert = OFF;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'OFF'
SET @@global.concurrent_insert = ON;
-ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
+ERROR 42000: Variable 'concurrent_insert' can't be set to the value of 'ON'
'#---------------------FN_DYNVARS_018_08----------------------#'
SET @@global.concurrent_insert = TRUE;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-1
+AUTO
SET @@global.concurrent_insert = FALSE;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-0
+NEVER
'#---------------------FN_DYNVARS_018_09----------------------#'
SET @@global.concurrent_insert = 1;
SELECT @@concurrent_insert = @@global.concurrent_insert;
@@ -95,7 +100,7 @@ SET concurrent_insert = 1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@concurrent_insert;
@@concurrent_insert
-1
+AUTO
SET global.concurrent_insert = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'concurrent_insert = 1' at line 1
SELECT global.concurrent_insert;
@@ -105,4 +110,4 @@ ERROR 42S22: Unknown column 'concurrent_insert' in 'field list'
SET @@global.concurrent_insert = @start_value;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
-1
+AUTO
diff --git a/mysql-test/suite/sys_vars/r/concurrent_insert_func.result b/mysql-test/suite/sys_vars/r/concurrent_insert_func.result
index 774775a8287..de4ddbb5a04 100644
--- a/mysql-test/suite/sys_vars/r/concurrent_insert_func.result
+++ b/mysql-test/suite/sys_vars/r/concurrent_insert_func.result
@@ -82,7 +82,7 @@ Record_6
Record_5
SELECT @@concurrent_insert;
@@concurrent_insert
-2
+ALWAYS
connection default;
## Unlocking table ##
UNLOCK TABLES;
diff --git a/mysql-test/suite/sys_vars/r/connect_timeout_basic.result b/mysql-test/suite/sys_vars/r/connect_timeout_basic.result
index cc84405cf86..7947332a68c 100644
--- a/mysql-test/suite/sys_vars/r/connect_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/connect_timeout_basic.result
@@ -45,7 +45,6 @@ Warning 1292 Truncated incorrect connect_timeout value: '42949672950'
SELECT @@global.connect_timeout;
@@global.connect_timeout
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.connect_timeout = 21221204.10;
ERROR 42000: Incorrect argument type to variable 'connect_timeout'
SET @@global.connect_timeout = ON;
diff --git a/mysql-test/suite/sys_vars/r/date_format_basic.result b/mysql-test/suite/sys_vars/r/date_format_basic.result
new file mode 100644
index 00000000000..a92d275dbba
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/date_format_basic.result
@@ -0,0 +1,21 @@
+select @@global.date_format;
+@@global.date_format
+%Y-%m-%d
+select @@session.date_format;
+ERROR HY000: Variable 'date_format' is a GLOBAL variable
+show global variables like 'date_format';
+Variable_name Value
+date_format %Y-%m-%d
+show session variables like 'date_format';
+Variable_name Value
+date_format %Y-%m-%d
+select * from information_schema.global_variables where variable_name='date_format';
+VARIABLE_NAME VARIABLE_VALUE
+DATE_FORMAT %Y-%m-%d
+select * from information_schema.session_variables where variable_name='date_format';
+VARIABLE_NAME VARIABLE_VALUE
+DATE_FORMAT %Y-%m-%d
+set global date_format="foo";
+ERROR HY000: Variable 'date_format' is a read only variable
+set session date_format="foo";
+ERROR HY000: Variable 'date_format' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/datetime_format_basic.result b/mysql-test/suite/sys_vars/r/datetime_format_basic.result
new file mode 100644
index 00000000000..ac80ee37590
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/datetime_format_basic.result
@@ -0,0 +1,21 @@
+select @@global.datetime_format;
+@@global.datetime_format
+%Y-%m-%d %H:%i:%s
+select @@session.datetime_format;
+ERROR HY000: Variable 'datetime_format' is a GLOBAL variable
+show global variables like 'datetime_format';
+Variable_name Value
+datetime_format %Y-%m-%d %H:%i:%s
+show session variables like 'datetime_format';
+Variable_name Value
+datetime_format %Y-%m-%d %H:%i:%s
+select * from information_schema.global_variables where variable_name='datetime_format';
+VARIABLE_NAME VARIABLE_VALUE
+DATETIME_FORMAT %Y-%m-%d %H:%i:%s
+select * from information_schema.session_variables where variable_name='datetime_format';
+VARIABLE_NAME VARIABLE_VALUE
+DATETIME_FORMAT %Y-%m-%d %H:%i:%s
+set global datetime_format="foo";
+ERROR HY000: Variable 'datetime_format' is a read only variable
+set session datetime_format="foo";
+ERROR HY000: Variable 'datetime_format' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/debug_basic.result b/mysql-test/suite/sys_vars/r/debug_basic.result
new file mode 100644
index 00000000000..5a77446d036
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/debug_basic.result
@@ -0,0 +1,25 @@
+set session debug="L";
+select @@global.debug="1";
+@@global.debug="1"
+0
+select @@session.debug;
+@@session.debug
+L
+show global variables like 'debug';
+Variable_name Value
+debug #
+show session variables like 'debug';
+Variable_name Value
+debug L
+select * from information_schema.global_variables where variable_name="debug";
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG #
+select * from information_schema.session_variables where variable_name="debug";
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG L
+set @@global.debug=1;
+ERROR 42000: Incorrect argument type to variable 'debug'
+set @@global.debug=1.1;
+ERROR 42000: Incorrect argument type to variable 'debug'
+set @@global.debug=1e1;
+ERROR 42000: Incorrect argument type to variable 'debug'
diff --git a/mysql-test/suite/sys_vars/r/debug_sync_basic.result b/mysql-test/suite/sys_vars/r/debug_sync_basic.result
new file mode 100644
index 00000000000..6ebb46dd662
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/debug_sync_basic.result
@@ -0,0 +1,21 @@
+select @@global.debug_sync;
+ERROR HY000: Variable 'debug_sync' is a SESSION variable
+select @@session.debug_sync;
+@@session.debug_sync
+ON - current signal: ''
+show global variables like "debug_sync";
+Variable_name Value
+show session variables like "debug_sync";
+Variable_name Value
+debug_sync ON - current signal: ''
+select * from information_schema.global_variables where variable_name="debug_sync";
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name="debug_sync";
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG_SYNC ON - current signal: ''
+set @@session.debug_sync=1;
+ERROR 42000: Incorrect argument type to variable 'debug_sync'
+set @@session.debug_sync=1.1;
+ERROR 42000: Incorrect argument type to variable 'debug_sync'
+set @@session.debug_sync=1e1;
+ERROR 42000: Incorrect argument type to variable 'debug_sync'
diff --git a/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result b/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result
new file mode 100644
index 00000000000..2bbb6fe6012
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/default_storage_engine_basic.result
@@ -0,0 +1,117 @@
+SET @start_global_value = @@global.default_storage_engine;
+SELECT @start_global_value;
+@start_global_value
+MyISAM
+SET @start_session_value = @@session.default_storage_engine;
+SELECT @start_session_value;
+@start_session_value
+MyISAM
+'#--------------------FN_DYNVARS_005_01-------------------------#'
+SET @@global.default_storage_engine = INNODB;
+SET @@global.default_storage_engine = DEFAULT;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+MyISAM
+SET @@session.default_storage_engine = INNODB;
+SET @@session.default_storage_engine = DEFAULT;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+MyISAM
+'#--------------------FN_DYNVARS_005_02-------------------------#'
+SET @@global.default_storage_engine = MYISAM;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+MyISAM
+SET @@global.default_storage_engine = MERGE;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+MRG_MYISAM
+SET @@global.default_storage_engine = MEMORY;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+MEMORY
+SET @@global.default_storage_engine = INNODB;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+InnoDB
+'#--------------------FN_DYNVARS_005_03-------------------------#'
+SET @@session.default_storage_engine = MYISAM;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+MyISAM
+SET @@session.default_storage_engine = MERGE;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+MRG_MYISAM
+SET @@session.default_storage_engine = MEMORY;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+MEMORY
+SET @@session.default_storage_engine = INNODB;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+InnoDB
+'#------------------FN_DYNVARS_005_04-----------------------#'
+SET @@global.default_storage_engine = 8199;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@global.default_storage_engine = NULL;
+ERROR 42000: Variable 'default_storage_engine' can't be set to the value of 'NULL'
+SET @@global.default_storage_engine = -1024;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@global.default_storage_engine = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@global.default_storage_engine = FILE;
+ERROR 42000: Unknown table engine 'FILE'
+SET @@session.default_storage_engine = 8199;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@session.default_storage_engine = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@session.default_storage_engine = RECORD;
+ERROR 42000: Unknown table engine 'RECORD'
+'#------------------FN_DYNVARS_005_05-----------------------#'
+SELECT @@global.default_storage_engine =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='default_storage_engine';
+@@global.default_storage_engine =
+VARIABLE_VALUE
+1
+'#------------------FN_DYNVARS_005_06-----------------------#'
+SELECT @@session.default_storage_engine =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='default_storage_engine';
+@@session.default_storage_engine =
+VARIABLE_VALUE
+1
+'#------------------FN_DYNVARS_005_07-----------------------#'
+SET @@global.default_storage_engine = TRUE;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET @@global.default_storage_engine = FALSE;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+'#---------------------FN_DYNVARS_001_8----------------------#'
+SET @@default_storage_engine = MYISAM;
+SELECT @@default_storage_engine = @@local.default_storage_engine;
+@@default_storage_engine = @@local.default_storage_engine
+1
+SELECT @@local.default_storage_engine = @@session.default_storage_engine;
+@@local.default_storage_engine = @@session.default_storage_engine
+1
+'#---------------------FN_DYNVARS_001_9----------------------#'
+SET default_storage_engine = MEMORY;
+SELECT @@default_storage_engine;
+@@default_storage_engine
+MEMORY
+SELECT local.default_storage_engine;
+ERROR 42S02: Unknown table 'local' in field list
+SELECT session.default_storage_engine;
+ERROR 42S02: Unknown table 'session' in field list
+SELECT default_storage_engine = @@session.default_storage_engine;
+ERROR 42S22: Unknown column 'default_storage_engine' in 'field list'
+SET @@default_storage_engine = @start_global_value;
+SET @@global.default_storage_engine = @start_global_value;
+SELECT @@global.default_storage_engine;
+@@global.default_storage_engine
+MyISAM
+SET @@session.default_storage_engine = @start_session_value;
+SELECT @@session.default_storage_engine;
+@@session.default_storage_engine
+MyISAM
diff --git a/mysql-test/suite/sys_vars/r/default_week_format_basic.result b/mysql-test/suite/sys_vars/r/default_week_format_basic.result
index aa5e0b264d3..8e3bc407ba3 100644
--- a/mysql-test/suite/sys_vars/r/default_week_format_basic.result
+++ b/mysql-test/suite/sys_vars/r/default_week_format_basic.result
@@ -113,7 +113,6 @@ Warning 1292 Truncated incorrect default_week_format value: '65550'
SELECT @@session.default_week_format;
@@session.default_week_format
7
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#------------------FN_DYNVARS_022_06-----------------------#'
SELECT @@global.default_week_format = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/delay_key_write_basic.result b/mysql-test/suite/sys_vars/r/delay_key_write_basic.result
index 100c62ac47e..2258d7af078 100644
--- a/mysql-test/suite/sys_vars/r/delay_key_write_basic.result
+++ b/mysql-test/suite/sys_vars/r/delay_key_write_basic.result
@@ -5,12 +5,9 @@ ON
'#--------------------FN_DYNVARS_023_01------------------------#'
SET @@global.delay_key_write = OFF;
SET @@global.delay_key_write = DEFAULT;
-ERROR 42000: Variable 'delay_key_write' doesn't have a default value
-'Bug # 34878: Documentation specifies a DEFAULT value of ON for variable but';
-'its not supported';
SELECT @@global.delay_key_write;
@@global.delay_key_write
-OFF
+ON
'#---------------------FN_DYNVARS_023_02-------------------------#'
SET @@global.delay_key_write = NULL;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'NULL'
@@ -41,10 +38,7 @@ ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'FALSE0'
SET @@global.delay_key_write = ONN;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'ONN'
SET @@global.delay_key_write = OF;
-SELECT @@global.delay_key_write;
-@@global.delay_key_write
-OFF
-'Bug# 34828: Variable is incorrectly accepting OF as a value'
+ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'OF'
SET @@global.delay_key_write = ' ';
ERROR 42000: Variable 'delay_key_write' can't be set to the value of ' '
SET @@global.delay_key_write = "";
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_32.result
index f55c966dc38..3da10bc8416 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_32.result
@@ -45,7 +45,6 @@ Warning 1292 Truncated incorrect delayed_insert_limit value: '42949672950'
SELECT @@global.delayed_insert_limit;
@@global.delayed_insert_limit
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_insert_limit = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_insert_limit'
SELECT @@global.delayed_insert_limit;
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
index 1f7d0a52e72..af73196d14f 100644
--- 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
@@ -43,7 +43,6 @@ SET @@global.delayed_insert_limit = 42949672950;
SELECT @@global.delayed_insert_limit;
@@global.delayed_insert_limit
42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_insert_limit = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_insert_limit'
SELECT @@global.delayed_insert_limit;
diff --git a/mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result b/mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result
index e8eab4da3cc..ceb89ad6698 100644
--- a/mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/delayed_insert_timeout_basic.result
@@ -45,7 +45,6 @@ Warning 1292 Truncated incorrect delayed_insert_timeout value: '42949672950'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_insert_timeout = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_insert_timeout'
SELECT @@global.delayed_insert_timeout;
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_32.result
index 3b356c6d866..f4448b08b1f 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_32.result
@@ -45,7 +45,6 @@ Warning 1292 Truncated incorrect delayed_queue_size value: '42949672950'
SELECT @@global.delayed_queue_size;
@@global.delayed_queue_size
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_queue_size = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_queue_size'
SELECT @@global.delayed_queue_size;
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
index ed866b7e0b4..8b1936e68c5 100644
--- 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
@@ -43,7 +43,6 @@ SET @@global.delayed_queue_size = 42949672950;
SELECT @@global.delayed_queue_size;
@@global.delayed_queue_size
42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_queue_size = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_queue_size'
SELECT @@global.delayed_queue_size;
diff --git a/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result b/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
index f78855fcaae..982cca47f5f 100644
--- a/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
+++ b/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
@@ -113,7 +113,6 @@ Warning 1292 Truncated incorrect div_precision_increment value: '65550'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.div_precision_increment = 65530.30;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@global.div_precision_increment;
diff --git a/mysql-test/suite/sys_vars/r/div_precision_increment_func.result b/mysql-test/suite/sys_vars/r/div_precision_increment_func.result
index eb1fc7ae3a7..ee8b7c5691d 100644
--- a/mysql-test/suite/sys_vars/r/div_precision_increment_func.result
+++ b/mysql-test/suite/sys_vars/r/div_precision_increment_func.result
@@ -5,7 +5,7 @@ CREATE TABLE t1
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
-salary LONG
+salary INT
);
'#--------------------FN_DYNVARS_027_01-------------------------#'
## Setting initial session value of variable to 3 ##
@@ -18,8 +18,7 @@ SELECT name, salary, ((salary * 2.5)/1000) AS INCOME from t1;
name salary INCOME
Record_1 100011 250.0275
Record_2 501 1.2525
-Record_3 210 0.525
-'Bug#35374: div_precision is not working with table column'
+Record_3 210 0.5250
## Verifying variable's behavior with direct division ##
SELECT 1/7;
1/7
@@ -32,7 +31,7 @@ CREATE TABLE t1
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
-salary LONG,
+salary INT,
income_tax FLOAT
);
## Creating new connection test_con1 ##
diff --git a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
index 93e3cd56c77..6a8052490c4 100644
--- a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
@@ -57,22 +57,19 @@ SELECT @@global.engine_condition_pushdown;
SET @@session.engine_condition_pushdown = -1;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '-1'
SET @@session.engine_condition_pushdown = 1.6;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '2'
+ERROR 42000: Incorrect argument type to variable 'engine_condition_pushdown'
SET @@session.engine_condition_pushdown = "T";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'T'
SET @@session.engine_condition_pushdown = "Y";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'Y'
SET @@session.engine_condition_pushdown = TR蹺;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TR蹺'
SET @@session.engine_condition_pushdown = 誑;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '脮N'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '誑'
SET @@session.engine_condition_pushdown = OF;
-SELECT @@session.engine_condition_pushdown;
-@@session.engine_condition_pushdown
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'OF'
SET @@session.engine_condition_pushdown = 覨F;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '覨F'
SET @@global.engine_condition_pushdown = -1;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '-1'
SET @@global.engine_condition_pushdown = 2;
@@ -82,16 +79,13 @@ ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '
SET @@global.engine_condition_pushdown = "Y";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'Y'
SET @@global.engine_condition_pushdown = TR蹺;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TR蹺'
SET @@global.engine_condition_pushdown = 誑;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '脮N'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '誑'
SET @@global.engine_condition_pushdown = OF;
-SELECT @@global.engine_condition_pushdown;
-@@global.engine_condition_pushdown
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'OF'
SET @@global.engine_condition_pushdown = 覨F;
-ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '覨F'
'#-------------------FN_DYNVARS_028_05----------------------------#'
SET @@global.engine_condition_pushdown = 0;
SET @@session.engine_condition_pushdown = 1;
diff --git a/mysql-test/suite/sys_vars/r/event_scheduler_basic.result b/mysql-test/suite/sys_vars/r/event_scheduler_basic.result
index 8042187d39d..835321530eb 100644
--- a/mysql-test/suite/sys_vars/r/event_scheduler_basic.result
+++ b/mysql-test/suite/sys_vars/r/event_scheduler_basic.result
@@ -4,8 +4,9 @@ SELECT @start_value;
OFF
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.event_scheduler = DEFAULT;
-ERROR 42000: Variable 'event_scheduler' doesn't have a default value
-'Bug# 34878: According to documentation the default value of variable is OFF';
+SELECT @@global.event_scheduler;
+@@global.event_scheduler
+OFF
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.event_scheduler = ON;
SELECT @@global.event_scheduler;
diff --git a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
index 1abab8e68b0..59b2662d1ea 100644
--- a/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
+++ b/mysql-test/suite/sys_vars/r/expire_logs_days_basic.result
@@ -66,7 +66,6 @@ Warning 1292 Truncated incorrect expire_logs_days value: '42949672950'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.expire_logs_days = ON;
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
SELECT @@global.expire_logs_days;
diff --git a/mysql-test/suite/sys_vars/r/flush_basic.result b/mysql-test/suite/sys_vars/r/flush_basic.result
index e0584d46351..9a080ee0313 100644
--- a/mysql-test/suite/sys_vars/r/flush_basic.result
+++ b/mysql-test/suite/sys_vars/r/flush_basic.result
@@ -5,11 +5,9 @@ SELECT @start_value;
'#--------------------FN_DYNVARS_030_01------------------------#'
SET @@global.flush = ON;
SET @@global.flush = DEFAULT;
-ERROR 42000: Variable 'flush' doesn't have a default value
-'Bug# 34878: FN_DYNVARS_002_01 - Default value is off according to Documentation of MySQL';
SELECT @@global.flush;
@@global.flush
-1
+0
'#---------------------FN_DYNVARS_030_02-------------------------#'
SET @@global.flush = @start_value;
SELECT @@global.flush;
diff --git a/mysql-test/suite/sys_vars/r/flush_time_basic.result b/mysql-test/suite/sys_vars/r/flush_time_basic.result
new file mode 100644
index 00000000000..8dac3bbdb1e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/flush_time_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.flush_time;
+select @@global.flush_time;
+@@global.flush_time
+0
+select @@session.flush_time;
+ERROR HY000: Variable 'flush_time' is a GLOBAL variable
+show global variables like 'flush_time';
+Variable_name Value
+flush_time 0
+show session variables like 'flush_time';
+Variable_name Value
+flush_time 0
+select * from information_schema.global_variables where variable_name='flush_time';
+VARIABLE_NAME VARIABLE_VALUE
+FLUSH_TIME 0
+select * from information_schema.session_variables where variable_name='flush_time';
+VARIABLE_NAME VARIABLE_VALUE
+FLUSH_TIME 0
+set global flush_time=1;
+select @@global.flush_time;
+@@global.flush_time
+1
+set session flush_time=1;
+ERROR HY000: Variable 'flush_time' is a GLOBAL variable and should be set with SET GLOBAL
+set global flush_time=1.1;
+ERROR 42000: Incorrect argument type to variable 'flush_time'
+set global flush_time=1e1;
+ERROR 42000: Incorrect argument type to variable 'flush_time'
+set global flush_time="foo";
+ERROR 42000: Incorrect argument type to variable 'flush_time'
+set global flush_time=0;
+select @@global.flush_time;
+@@global.flush_time
+0
+set global flush_time=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect flush_time value: '18446744073709551615'
+select @@global.flush_time;
+@@global.flush_time
+31536000
+SET @@global.flush_time = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result b/mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
index 8540467b9b2..834d693edb8 100644
--- a/mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
+++ b/mysql-test/suite/sys_vars/r/foreign_key_checks_basic.result
@@ -7,8 +7,7 @@ SET @@session.foreign_key_checks = 1;
SET @@session.foreign_key_checks = DEFAULT;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
-1
-'Bug# 34878: No DEFAULT value for variable. Also setting DEFAULT does not give error'
+0
'#---------------------FN_DYNVARS_032_02-------------------------#'
SET foreign_key_checks = 1;
SELECT @@foreign_key_checks;
@@ -41,25 +40,23 @@ ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'T'
SET @@session.foreign_key_checks = "Y";
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'Y'
SET @@session.foreign_key_checks = TR蹺;
-ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'TR蹺'
SET @@session.foreign_key_checks = 誑;
-ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '脮N'
+ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '誑'
SET @@session.foreign_key_checks = OF;
-SELECT @@session.foreign_key_checks;
-@@session.foreign_key_checks
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'OF'
SET @@session.foreign_key_checks = 覨F;
-ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '覨F'
SET @@session.foreign_key_checks = '';
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of ''
SET @@session.foreign_key_checks = NO;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_032_05----------------------------#'
SET @@global.foreign_key_checks = 0;
-ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.foreign_key_checks;
-ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable
+@@global.foreign_key_checks
+0
+SET @@global.foreign_key_checks = 1;
'#----------------------FN_DYNVARS_032_06------------------------#'
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='foreign_key_checks';
count(VARIABLE_VALUE)
@@ -72,12 +69,12 @@ IF(@@session.foreign_key_checks, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='foreign_key_checks';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_032_08-------------------------#'
SET @@session.foreign_key_checks = OFF;
SELECT @@session.foreign_key_checks;
diff --git a/mysql-test/suite/sys_vars/r/foreign_key_checks_func.result b/mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
index c2898293f83..9b1736541c1 100644
--- a/mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
+++ b/mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
@@ -36,9 +36,6 @@ INSERT INTO t2 values (20,4);
'try enabling foreign_key_checks again';
SET @@session.foreign_key_checks = 1;
UPDATE t2 SET b=4 where a=20;
-'Bug#35358: Updating an incorrect foreign key(inserted by disabling '
-'foreign_key_checks)to the same value does not raise error after '
-'enabling foreign_key_checks'
'Check when foreign_key_checks is enabled and FK constraint is re-created'
SET @@session.foreign_key_checks = 0;
TRUNCATE t2;
diff --git a/mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result b/mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result
index 94a052172bb..d889eb7bba7 100644
--- a/mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result
+++ b/mysql-test/suite/sys_vars/r/ft_boolean_syntax_basic.result
@@ -93,9 +93,6 @@ SELECT @global_start_value;
@global_start_value
+ -><()~*:""&|
SET @@global.ft_boolean_syntax = @global_start_value;
-ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
-'Bug# 34883: ft_boolean_syntax cant be assigned values from session temporary';
-'variables';
SET @@global.ft_boolean_syntax = DEFAULT;
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
diff --git a/mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result b/mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result
index 0096c553155..0e7d9e26325 100644
--- a/mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result
+++ b/mysql-test/suite/sys_vars/r/ft_boolean_syntax_func.result
@@ -76,14 +76,14 @@ AGAINST ('"faster than"' IN BOOLEAN MODE);
id title body
6 100 Tips for Myisam 1. Myisam is faster than innodb 2. Tricks and Tips for Myisam...
SELECT * FROM articles WHERE MATCH (title,body)
-AGAINST ('+run ~line' IN BOOLEAN MODE);
+AGAINST ('+tutorial ~line' IN BOOLEAN MODE);
id title body
-'Bug#35359: ~ is not working correctly. Its behaving like -'
+1 MySQL Tutorial DBMS stands for DataBase ...
+4 Optimizing MySQL In this tutorial we will show .... Run command line ...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('10*' IN BOOLEAN MODE);
id title body
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
-'Bug#35360: * is not working correctly. Not all rows are returned'
SELECT id,title,body, (MATCH (title,body)
AGAINST ('+MySQL +(>show <dbms)' IN BOOLEAN MODE)) AS relevance
FROM articles WHERE MATCH (title,body)
@@ -103,6 +103,5 @@ id title body
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
8 MySQL Security When configured properly, MySQL ...
9 Database Security Configuring MySQL for ...
-'Bug#35361: Different syntax does not produce result as default operators'
SET @@global.ft_boolean_syntax=DEFAULT;
DROP TABLE articles;
diff --git a/mysql-test/suite/sys_vars/r/ft_max_word_len_basic.result b/mysql-test/suite/sys_vars/r/ft_max_word_len_basic.result
new file mode 100644
index 00000000000..d35669aba44
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/ft_max_word_len_basic.result
@@ -0,0 +1,21 @@
+select @@global.ft_max_word_len;
+@@global.ft_max_word_len
+84
+select @@session.ft_max_word_len;
+ERROR HY000: Variable 'ft_max_word_len' is a GLOBAL variable
+show global variables like 'ft_max_word_len';
+Variable_name Value
+ft_max_word_len 84
+show session variables like 'ft_max_word_len';
+Variable_name Value
+ft_max_word_len 84
+select * from information_schema.global_variables where variable_name='ft_max_word_len';
+VARIABLE_NAME VARIABLE_VALUE
+FT_MAX_WORD_LEN 84
+select * from information_schema.session_variables where variable_name='ft_max_word_len';
+VARIABLE_NAME VARIABLE_VALUE
+FT_MAX_WORD_LEN 84
+set global ft_max_word_len=1;
+ERROR HY000: Variable 'ft_max_word_len' is a read only variable
+set session ft_max_word_len=1;
+ERROR HY000: Variable 'ft_max_word_len' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/ft_min_word_len_basic.result b/mysql-test/suite/sys_vars/r/ft_min_word_len_basic.result
new file mode 100644
index 00000000000..008955eaf01
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/ft_min_word_len_basic.result
@@ -0,0 +1,21 @@
+select @@global.ft_min_word_len;
+@@global.ft_min_word_len
+4
+select @@session.ft_min_word_len;
+ERROR HY000: Variable 'ft_min_word_len' is a GLOBAL variable
+show global variables like 'ft_min_word_len';
+Variable_name Value
+ft_min_word_len 4
+show session variables like 'ft_min_word_len';
+Variable_name Value
+ft_min_word_len 4
+select * from information_schema.global_variables where variable_name='ft_min_word_len';
+VARIABLE_NAME VARIABLE_VALUE
+FT_MIN_WORD_LEN 4
+select * from information_schema.session_variables where variable_name='ft_min_word_len';
+VARIABLE_NAME VARIABLE_VALUE
+FT_MIN_WORD_LEN 4
+set global ft_min_word_len=1;
+ERROR HY000: Variable 'ft_min_word_len' is a read only variable
+set session ft_min_word_len=1;
+ERROR HY000: Variable 'ft_min_word_len' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/ft_query_expansion_limit_basic.result b/mysql-test/suite/sys_vars/r/ft_query_expansion_limit_basic.result
new file mode 100644
index 00000000000..e4577fb5368
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/ft_query_expansion_limit_basic.result
@@ -0,0 +1,21 @@
+select @@global.ft_query_expansion_limit;
+@@global.ft_query_expansion_limit
+20
+select @@session.ft_query_expansion_limit;
+ERROR HY000: Variable 'ft_query_expansion_limit' is a GLOBAL variable
+show global variables like 'ft_query_expansion_limit';
+Variable_name Value
+ft_query_expansion_limit 20
+show session variables like 'ft_query_expansion_limit';
+Variable_name Value
+ft_query_expansion_limit 20
+select * from information_schema.global_variables where variable_name='ft_query_expansion_limit';
+VARIABLE_NAME VARIABLE_VALUE
+FT_QUERY_EXPANSION_LIMIT 20
+select * from information_schema.session_variables where variable_name='ft_query_expansion_limit';
+VARIABLE_NAME VARIABLE_VALUE
+FT_QUERY_EXPANSION_LIMIT 20
+set global ft_query_expansion_limit=1;
+ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable
+set session ft_query_expansion_limit=1;
+ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/ft_stopword_file_basic.result b/mysql-test/suite/sys_vars/r/ft_stopword_file_basic.result
new file mode 100644
index 00000000000..89792eaa03a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/ft_stopword_file_basic.result
@@ -0,0 +1,21 @@
+select @@global.ft_stopword_file;
+@@global.ft_stopword_file
+(built-in)
+select @@session.ft_stopword_file;
+ERROR HY000: Variable 'ft_stopword_file' is a GLOBAL variable
+show global variables like 'ft_stopword_file';
+Variable_name Value
+ft_stopword_file (built-in)
+show session variables like 'ft_stopword_file';
+Variable_name Value
+ft_stopword_file (built-in)
+select * from information_schema.global_variables where variable_name='ft_stopword_file';
+VARIABLE_NAME VARIABLE_VALUE
+FT_STOPWORD_FILE (built-in)
+select * from information_schema.session_variables where variable_name='ft_stopword_file';
+VARIABLE_NAME VARIABLE_VALUE
+FT_STOPWORD_FILE (built-in)
+set global ft_stopword_file=1;
+ERROR HY000: Variable 'ft_stopword_file' is a read only variable
+set session ft_stopword_file=1;
+ERROR HY000: Variable 'ft_stopword_file' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
index 48a8d90b55e..611e0f80d86 100644
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
@@ -4,9 +4,10 @@ SELECT @start_value;
test.log
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.general_log_file = DEFAULT;
-SELECT RIGHT(@@global.general_log_file,10) AS log_file;
-log_file
-mysqld.log
+SET @a=concat(left(@@hostname, instr(concat(@@hostname, '.'), '.')-1), '.log');
+SELECT RIGHT(@@global.general_log_file, length(@a)) = @a;
+RIGHT(@@global.general_log_file, length(@a)) = @a
+1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log_file = mytest.log;
SET @@global.general_log_file = 12;
diff --git a/mysql-test/suite/sys_vars/r/general_log_func.result b/mysql-test/suite/sys_vars/r/general_log_func.result
index 39ba90265d5..5a5b4bdc5ec 100644
--- a/mysql-test/suite/sys_vars/r/general_log_func.result
+++ b/mysql-test/suite/sys_vars/r/general_log_func.result
@@ -12,6 +12,10 @@ SET @@global.general_log = OFF;
SELECT @@general_log;
@@general_log
0
+flush logs;
+SET @@global.general_log = ON;
+flush logs;
+SET @@global.general_log = OFF;
## Inserting some Records & Verifying output in log ##
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
@@ -25,12 +29,11 @@ SELECT @@general_log;
## Inserting some Records & Verifying output in log ##
INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4');
-## There should be a difference ##
-SET @@global.max_allowed_packet= 1024*1024*1024;
+## old log is a proper prefix of the new log ##
SET @orig_file= load_file('MYSQLD_LOGFILE.orig');
SET @copy_file= load_file('MYSQLD_LOGFILE.copy');
-SELECT STRCMP(@orig_file, @copy_file);
-STRCMP(@orig_file, @copy_file)
-1
+SELECT @orig_file > @copy_file, left(@orig_file, length(@copy_file)) = @copy_file;
+@orig_file > @copy_file left(@orig_file, length(@copy_file)) = @copy_file
+1 1
## Dropping tables ##
DROP TABLE t1;
diff --git a/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result b/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result
index 4821ca91308..48126d33ee8 100644
--- a/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result
+++ b/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result
@@ -73,8 +73,8 @@ SET @@global.group_concat_max_len = 65536;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65536
-SET @@global.group_concat_max_len = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.group_concat_max_len = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'group_concat_max_len'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65536
@@ -95,13 +95,12 @@ Warning 1292 Truncated incorrect group_concat_max_len value: '-2'
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
4
-SET @@session.group_concat_max_len = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.group_concat_max_len = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'group_concat_max_len'
SET @@session.group_concat_max_len = 65550;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
65550
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.group_concat_max_len = test;
ERROR 42000: Incorrect argument type to variable 'group_concat_max_len'
SELECT @@session.group_concat_max_len;
diff --git a/mysql-test/suite/sys_vars/r/have_profiling_basic.result b/mysql-test/suite/sys_vars/r/have_profiling_basic.result
new file mode 100644
index 00000000000..72923134e83
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/have_profiling_basic.result
@@ -0,0 +1,21 @@
+select @@global.have_profiling="1";
+@@global.have_profiling="1"
+0
+select @@session.have_profiling;
+ERROR HY000: Variable 'have_profiling' is a GLOBAL variable
+show global variables like 'have_profiling';
+Variable_name Value
+have_profiling #
+show session variables like 'have_profiling';
+Variable_name Value
+have_profiling #
+select * from information_schema.global_variables where variable_name='have_profiling';
+VARIABLE_NAME VARIABLE_VALUE
+HAVE_PROFILING #
+select * from information_schema.session_variables where variable_name='have_profiling';
+VARIABLE_NAME VARIABLE_VALUE
+HAVE_PROFILING #
+set global have_profiling=1;
+ERROR HY000: Variable 'have_profiling' is a read only variable
+set session have_profiling=1;
+ERROR HY000: Variable 'have_profiling' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/identity_basic.result b/mysql-test/suite/sys_vars/r/identity_basic.result
index 60f3edcc030..063decf2eb1 100644
--- a/mysql-test/suite/sys_vars/r/identity_basic.result
+++ b/mysql-test/suite/sys_vars/r/identity_basic.result
@@ -32,9 +32,11 @@ SELECT @@session.identity;
65535
'#--------------------FN_DYNVARS_035_04-------------------------#'
SET @@session.identity = -1;
+Warnings:
+Warning 1292 Truncated incorrect identity value: '-1'
SELECT @@session.identity;
@@session.identity
--1
+0
SET @@session.identity = 100000000000;
SELECT @@session.identity;
@@session.identity
@@ -45,14 +47,15 @@ SELECT @@session.identity;
@@session.identity
100000000000
SET @@session.identity = -1024;
+Warnings:
+Warning 1292 Truncated incorrect identity value: '-1024'
SELECT @@session.identity;
@@session.identity
--1024
+0
SET @@session.identity = 42949672950;
SELECT @@session.identity;
@@session.identity
42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.identity = ON;
ERROR 42000: Incorrect argument type to variable 'identity'
SELECT @@session.identity;
diff --git a/mysql-test/suite/sys_vars/r/ignore_builtin_innodb_basic.result b/mysql-test/suite/sys_vars/r/ignore_builtin_innodb_basic.result
new file mode 100644
index 00000000000..85084c13115
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/ignore_builtin_innodb_basic.result
@@ -0,0 +1,21 @@
+select @@global.ignore_builtin_innodb;
+@@global.ignore_builtin_innodb
+0
+select @@session.ignore_builtin_innodb;
+ERROR HY000: Variable 'ignore_builtin_innodb' is a GLOBAL variable
+show global variables like 'ignore_builtin_innodb';
+Variable_name Value
+ignore_builtin_innodb OFF
+show session variables like 'ignore_builtin_innodb';
+Variable_name Value
+ignore_builtin_innodb OFF
+select * from information_schema.global_variables where variable_name='ignore_builtin_innodb';
+VARIABLE_NAME VARIABLE_VALUE
+IGNORE_BUILTIN_INNODB OFF
+select * from information_schema.session_variables where variable_name='ignore_builtin_innodb';
+VARIABLE_NAME VARIABLE_VALUE
+IGNORE_BUILTIN_INNODB OFF
+set global ignore_builtin_innodb=1;
+ERROR HY000: Variable 'ignore_builtin_innodb' is a read only variable
+set session ignore_builtin_innodb=1;
+ERROR HY000: Variable 'ignore_builtin_innodb' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/init_connect_basic.result b/mysql-test/suite/sys_vars/r/init_connect_basic.result
index 58f7a9d2ccd..333a230a4a1 100644
--- a/mysql-test/suite/sys_vars/r/init_connect_basic.result
+++ b/mysql-test/suite/sys_vars/r/init_connect_basic.result
Binary files differ
diff --git a/mysql-test/suite/sys_vars/r/init_file_basic.result b/mysql-test/suite/sys_vars/r/init_file_basic.result
new file mode 100644
index 00000000000..1e13b53d913
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/init_file_basic.result
@@ -0,0 +1,21 @@
+select @@global.init_file;
+@@global.init_file
+NULL
+select @@session.init_file;
+ERROR HY000: Variable 'init_file' is a GLOBAL variable
+show global variables like 'init_file';
+Variable_name Value
+init_file
+show session variables like 'init_file';
+Variable_name Value
+init_file
+select * from information_schema.global_variables where variable_name='init_file';
+VARIABLE_NAME VARIABLE_VALUE
+INIT_FILE
+select * from information_schema.session_variables where variable_name='init_file';
+VARIABLE_NAME VARIABLE_VALUE
+INIT_FILE
+set global init_file=1;
+ERROR HY000: Variable 'init_file' is a read only variable
+set session init_file=1;
+ERROR HY000: Variable 'init_file' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result b/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
index ea87526c42a..1f458a8e1fd 100644
--- a/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
@@ -2,22 +2,22 @@ SET @global_start_value = @@global.innodb_autoextend_increment ;
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_autoextend_increment = 0;
Warnings:
-Warning 1292 Truncated incorrect autoextend_increment value: '0'
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SET @@global.innodb_autoextend_increment = DEFAULT;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
-64
+8
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_autoextend_increment = 1;
ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_autoextend_increment ;
@@innodb_autoextend_increment
-64
+8
SELECT local.innodb_autoextend_increment ;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_autoextend_increment = 0;
Warnings:
-Warning 1292 Truncated incorrect autoextend_increment value: '0'
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1
@@ -33,23 +33,23 @@ SELECT @@global.innodb_autoextend_increment ;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_autoextend_increment = -1;
Warnings:
-Warning 1292 Truncated incorrect autoextend_increment value: '18446744073709551615'
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '-1'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
-1000
+1
SET @@global.innodb_autoextend_increment = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
-1000
+1
SET @@global.innodb_autoextend_increment = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
-1000
+1
SET @@global.innodb_autoextend_increment = 1001;
Warnings:
-Warning 1292 Truncated incorrect autoextend_increment value: '1001'
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '1001'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
@@ -85,7 +85,7 @@ SELECT @@global.innodb_autoextend_increment ;
1
SET @@global.innodb_autoextend_increment = FALSE;
Warnings:
-Warning 1292 Truncated incorrect autoextend_increment value: '0'
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
index 301016d4362..85a4b008ff0 100644
--- a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
@@ -25,37 +25,17 @@ SET @@global.innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
-SET @@global.innodb_commit_concurrency = 1;
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1
-SET @@global.innodb_commit_concurrency = 1000;
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_commit_concurrency = 1;
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
SET @@global.innodb_commit_concurrency = -1;
-Warnings:
-Warning 1292 Truncated incorrect commit_concurrency value: '18446744073709551615'
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1000
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '-1'
SET @@global.innodb_commit_concurrency = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1000
SET @@global.innodb_commit_concurrency = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1000
SET @@global.innodb_commit_concurrency = 1001;
-Warnings:
-Warning 1292 Truncated incorrect commit_concurrency value: '1001'
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1000
+ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1001'
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_commit_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -65,30 +45,21 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
-1000
+0
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
VARIABLE_VALUE
-1000
+0
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_commit_concurrency = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
-1000
+0
SET @@global.innodb_commit_concurrency = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
-1000
-'#---------------------FN_DYNVARS_046_07----------------------#'
-SET @@global.innodb_commit_concurrency = TRUE;
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
-1
-SET @@global.innodb_commit_concurrency = FALSE;
-SELECT @@global.innodb_commit_concurrency;
-@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = @global_start_value;
SELECT @@global.innodb_commit_concurrency;
diff --git a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_64.result b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result
index 40d307d8733..cd27de0cb0b 100644
--- a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result
@@ -5,7 +5,7 @@ SELECT @global_start_value;
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_concurrency_tickets = 0;
Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SET @@global.innodb_concurrency_tickets = DEFAULT;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
@@ -20,7 +20,7 @@ SELECT local.innodb_concurrency_tickets;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_concurrency_tickets = 0;
Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
1
@@ -39,19 +39,21 @@ SELECT @@global.innodb_concurrency_tickets;
4294967295
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_concurrency_tickets = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-18446744073709551615
+1
SET @@global.innodb_concurrency_tickets = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-18446744073709551615
+1
SET @@global.innodb_concurrency_tickets = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-18446744073709551615
+1
SET @@global.innodb_concurrency_tickets = 1001;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
@@ -88,7 +90,7 @@ SELECT @@global.innodb_concurrency_tickets;
1
SET @@global.innodb_concurrency_tickets = FALSE;
Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_32.result b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_32.result
deleted file mode 100644
index 1d1317d0d5e..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic_32.result
+++ /dev/null
@@ -1,100 +0,0 @@
-SET @global_start_value = @@global.innodb_concurrency_tickets;
-SELECT @global_start_value;
-@global_start_value
-500
-'#--------------------FN_DYNVARS_046_01------------------------#'
-SET @@global.innodb_concurrency_tickets = 0;
-Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
-SET @@global.innodb_concurrency_tickets = DEFAULT;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-500
-'#---------------------FN_DYNVARS_046_02-------------------------#'
-SET innodb_concurrency_tickets = 1;
-ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@innodb_concurrency_tickets;
-@@innodb_concurrency_tickets
-500
-SELECT local.innodb_concurrency_tickets;
-ERROR 42S02: Unknown table 'local' in field list
-SET global innodb_concurrency_tickets = 0;
-Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1
-'#--------------------FN_DYNVARS_046_03------------------------#'
-SET @@global.innodb_concurrency_tickets = 1;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1
-SET @@global.innodb_concurrency_tickets = 1000;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1000
-SET @@global.innodb_concurrency_tickets = 4294967295;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-4294967295
-'#--------------------FN_DYNVARS_046_04-------------------------#'
-SET @@global.innodb_concurrency_tickets = -1;
-Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '18446744073709551615'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-4294967295
-SET @@global.innodb_concurrency_tickets = "T";
-ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-4294967295
-SET @@global.innodb_concurrency_tickets = "Y";
-ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-4294967295
-SET @@global.innodb_concurrency_tickets = 1001;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
-SELECT @@global.innodb_concurrency_tickets =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_concurrency_tickets';
-@@global.innodb_concurrency_tickets =
-VARIABLE_VALUE
-1
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1001
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_concurrency_tickets';
-VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
-SET @@global.innodb_concurrency_tickets = OFF;
-ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1001
-SET @@global.innodb_concurrency_tickets = ON;
-ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
-SET @@global.innodb_concurrency_tickets = TRUE;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1
-SET @@global.innodb_concurrency_tickets = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect concurrency_tickets value: '0'
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-1
-SET @@global.innodb_concurrency_tickets = @global_start_value;
-SELECT @@global.innodb_concurrency_tickets;
-@@global.innodb_concurrency_tickets
-500
diff --git a/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result b/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
index 4b923f4bdd2..fe09a652700 100644
--- a/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
@@ -36,55 +36,55 @@ SELECT @@global.innodb_fast_shutdown;
'#--------------------FN_DYNVARS_042_04-------------------------#'
SET @@global.innodb_fast_shutdown = -1;
Warnings:
-Warning 1292 Truncated incorrect fast_shutdown value: '18446744073709551615'
+Warning 1292 Truncated incorrect innodb_fast_shutdown value: '-1'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = TRU;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = TRUE_F;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = FALS;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = OON;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = ONN;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = OOFF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = 0FF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = '1';
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = "0";
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
'#-------------------FN_DYNVARS_042_05----------------------------#'
SET @@session.innodb_fast_shutdown = 0;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
@@ -110,12 +110,12 @@ SET @@global.innodb_fast_shutdown = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
SET @@global.innodb_fast_shutdown = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
-2
+0
'#---------------------FN_DYNVARS_042_09----------------------#'
SET @@global.innodb_fast_shutdown = TRUE;
SELECT @@global.innodb_fast_shutdown;
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
index da9f5ad3994..eabafb26ccb 100644
--- a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
@@ -36,23 +36,23 @@ SELECT @@global.innodb_flush_log_at_trx_commit;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_flush_log_at_trx_commit = -1;
Warnings:
-Warning 1292 Truncated incorrect flush_log_at_trx_commit value: '18446744073709551615'
+Warning 1292 Truncated incorrect innodb_flush_log_at_trx_commit value: '-1'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
-2
+0
SET @@global.innodb_flush_log_at_trx_commit = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
-2
+0
SET @@global.innodb_flush_log_at_trx_commit = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
-2
+0
SET @@global.innodb_flush_log_at_trx_commit = 1001;
Warnings:
-Warning 1292 Truncated incorrect flush_log_at_trx_commit value: '1001'
+Warning 1292 Truncated incorrect innodb_flush_log_at_trx_commit value: '1001'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
index 8e48957258f..eff72613102 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
@@ -36,23 +36,23 @@ SELECT @@global.innodb_max_dirty_pages_pct;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_max_dirty_pages_pct = -1;
Warnings:
-Warning 1292 Truncated incorrect max_dirty_pages_pct value: '18446744073709551615'
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '-1'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-99
+0
SET @@global.innodb_max_dirty_pages_pct = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-99
+0
SET @@global.innodb_max_dirty_pages_pct = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-99
+0
SET @@global.innodb_max_dirty_pages_pct = 1001;
Warnings:
-Warning 1292 Truncated incorrect max_dirty_pages_pct value: '1001'
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '1001'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
99
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_64.result b/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result
index a6b669dde83..a01d2f2dd0c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result
@@ -35,19 +35,21 @@ SELECT @@global.innodb_max_purge_lag;
4294967295
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_max_purge_lag = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_purge_lag value: '-1'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-18446744073709551615
+0
SET @@global.innodb_max_purge_lag = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-18446744073709551615
+0
SET @@global.innodb_max_purge_lag = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-18446744073709551615
+0
SET @@global.innodb_max_purge_lag = 1001;
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_32.result b/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_32.result
deleted file mode 100644
index ed960f12ff1..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic_32.result
+++ /dev/null
@@ -1,94 +0,0 @@
-SET @global_start_value = @@global.innodb_max_purge_lag;
-SELECT @global_start_value;
-@global_start_value
-0
-'#--------------------FN_DYNVARS_046_01------------------------#'
-SET @@global.innodb_max_purge_lag = 0;
-SET @@global.innodb_max_purge_lag = DEFAULT;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-0
-'#---------------------FN_DYNVARS_046_02-------------------------#'
-SET innodb_max_purge_lag = 1;
-ERROR HY000: Variable 'innodb_max_purge_lag' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@innodb_max_purge_lag;
-@@innodb_max_purge_lag
-0
-SELECT local.innodb_max_purge_lag;
-ERROR 42S02: Unknown table 'local' in field list
-SET global innodb_max_purge_lag = 0;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-0
-'#--------------------FN_DYNVARS_046_03------------------------#'
-SET @@global.innodb_max_purge_lag = 0;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-0
-SET @@global.innodb_max_purge_lag = 1;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1
-SET @@global.innodb_max_purge_lag = 4294967295;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-4294967295
-'#--------------------FN_DYNVARS_046_04-------------------------#'
-SET @@global.innodb_max_purge_lag = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_purge_lag value: '18446744073709551615'
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-4294967295
-SET @@global.innodb_max_purge_lag = "T";
-ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-4294967295
-SET @@global.innodb_max_purge_lag = "Y";
-ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-4294967295
-SET @@global.innodb_max_purge_lag = 1001;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
-SELECT @@global.innodb_max_purge_lag =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_max_purge_lag';
-@@global.innodb_max_purge_lag =
-VARIABLE_VALUE
-1
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1001
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_max_purge_lag';
-VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
-SET @@global.innodb_max_purge_lag = OFF;
-ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1001
-SET @@global.innodb_max_purge_lag = ON;
-ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
-SET @@global.innodb_max_purge_lag = TRUE;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-1
-SET @@global.innodb_max_purge_lag = FALSE;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-0
-SET @@global.innodb_max_purge_lag = @global_start_value;
-SELECT @@global.innodb_max_purge_lag;
-@@global.innodb_max_purge_lag
-0
diff --git a/mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result b/mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result
index 96a48d7789f..537fd3e5db1 100644
--- a/mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result
@@ -55,45 +55,43 @@ SELECT @@global.innodb_support_xa;
1
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@session.innodb_support_xa = -0.6;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '-0.6'
+ERROR 42000: Incorrect argument type to variable 'innodb_support_xa'
SET @@session.innodb_support_xa = 1.6;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '1.6'
+ERROR 42000: Incorrect argument type to variable 'innodb_support_xa'
SET @@session.innodb_support_xa = "T";
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'T'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'T'
SET @@session.innodb_support_xa = "Y";
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'Y'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'Y'
SET @@session.innodb_support_xa = TR蹺;
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'TR蹺'
SET @@session.innodb_support_xa = 誑;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '脮N'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '誑'
SET @@session.innodb_support_xa = OF;
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
SET @@session.innodb_support_xa = 覨F;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '覨F'
SET @@global.innodb_support_xa = -1;
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = 2;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '2'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '2'
SET @@global.innodb_support_xa = "T";
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'T'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'T'
SET @@global.innodb_support_xa = "Y";
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'Y'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'Y'
SET @@global.innodb_support_xa = TR蹺;
-ERROR 42000: Variable 'support_xa' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'TR蹺'
SET @@global.innodb_support_xa = 誑;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '脮N'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '誑'
SET @@global.innodb_support_xa = OF;
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
0
-'Bug# 34828 : OF is taken as OFF and a value of 0 is set.'
SET @@global.innodb_support_xa = 覨F;
-ERROR 42000: Variable 'support_xa' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '覨F'
'#-------------------FN_DYNVARS_046_05----------------------------#'
SET @@global.innodb_support_xa = 0;
SET @@session.innodb_support_xa = 1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result
index d40e529485b..ba45d4f2ed0 100644
--- a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result
@@ -35,19 +35,21 @@ SELECT @@global.innodb_sync_spin_loops;
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_sync_spin_loops = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_sync_spin_loops value: '-1'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-18446744073709551615
+0
SET @@global.innodb_sync_spin_loops = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-18446744073709551615
+0
SET @@global.innodb_sync_spin_loops = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-18446744073709551615
+0
SET @@global.innodb_sync_spin_loops = 1001;
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result
deleted file mode 100644
index bde6040aa24..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result
+++ /dev/null
@@ -1,94 +0,0 @@
-SET @global_start_value = @@global.innodb_sync_spin_loops;
-SELECT @global_start_value;
-@global_start_value
-30
-'#--------------------FN_DYNVARS_046_01------------------------#'
-SET @@global.innodb_sync_spin_loops = 0;
-SET @@global.innodb_sync_spin_loops = DEFAULT;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-30
-'#---------------------FN_DYNVARS_046_02-------------------------#'
-SET innodb_sync_spin_loops = 1;
-ERROR HY000: Variable 'innodb_sync_spin_loops' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@innodb_sync_spin_loops;
-@@innodb_sync_spin_loops
-30
-SELECT local.innodb_sync_spin_loops;
-ERROR 42S02: Unknown table 'local' in field list
-SET global innodb_sync_spin_loops = 0;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-0
-'#--------------------FN_DYNVARS_046_03------------------------#'
-SET @@global.innodb_sync_spin_loops = 0;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-0
-SET @@global.innodb_sync_spin_loops = 1;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1
-SET @@global.innodb_sync_spin_loops = 1000;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1000
-'#--------------------FN_DYNVARS_046_04-------------------------#'
-SET @@global.innodb_sync_spin_loops = -1;
-Warnings:
-Warning 1292 Truncated incorrect sync_spin_loops value: '18446744073709551615'
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-4294967295
-SET @@global.innodb_sync_spin_loops = "T";
-ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-4294967295
-SET @@global.innodb_sync_spin_loops = "Y";
-ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-4294967295
-SET @@global.innodb_sync_spin_loops = 1001;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
-SELECT @@global.innodb_sync_spin_loops =
-VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_sync_spin_loops';
-@@global.innodb_sync_spin_loops =
-VARIABLE_VALUE
-1
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1001
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_sync_spin_loops';
-VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
-SET @@global.innodb_sync_spin_loops = OFF;
-ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1001
-SET @@global.innodb_sync_spin_loops = ON;
-ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
-SET @@global.innodb_sync_spin_loops = TRUE;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-1
-SET @@global.innodb_sync_spin_loops = FALSE;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-0
-SET @@global.innodb_sync_spin_loops = @global_start_value;
-SELECT @@global.innodb_sync_spin_loops;
-@@global.innodb_sync_spin_loops
-30
diff --git a/mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result b/mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result
index f2424a3ea27..e77424df871 100644
--- a/mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result
@@ -56,38 +56,36 @@ SELECT @@global.innodb_table_locks;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@session.innodb_table_locks = -6;
SET @@session.innodb_table_locks = 1.6;
-ERROR 42000: Variable 'table_locks' can't be set to the value of '1.6'
+ERROR 42000: Incorrect argument type to variable 'innodb_table_locks'
SET @@session.innodb_table_locks = "T";
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'T'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'T'
SET @@session.innodb_table_locks = "Y";
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'Y'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'Y'
SET @@session.innodb_table_locks = TR蹺;
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'TR蹺'
SET @@session.innodb_table_locks = 誑;
-ERROR 42000: Variable 'table_locks' can't be set to the value of '脮N'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '誑'
SET @@session.innodb_table_locks = OF;
SELECT @@session.innodb_table_locks;
@@session.innodb_table_locks
0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
SET @@session.innodb_table_locks = 覨F;
-ERROR 42000: Variable 'table_locks' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '覨F'
SET @@global.innodb_table_locks = -1;
SET @@global.innodb_table_locks = 2;
-ERROR 42000: Variable 'table_locks' can't be set to the value of '2'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '2'
SET @@global.innodb_table_locks = "T";
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'T'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'T'
SET @@global.innodb_table_locks = "Y";
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'Y'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'Y'
SET @@global.innodb_table_locks = TR蹺;
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'TR蹺'
SET @@global.innodb_table_locks = QN;
-ERROR 42000: Variable 'table_locks' can't be set to the value of 'QN'
+ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'QN'
SET @@global.innodb_table_locks = OF;
SELECT @@global.innodb_table_locks;
@@global.innodb_table_locks
0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
'#-------------------FN_DYNVARS_046_05----------------------------#'
SET @@global.innodb_table_locks = 0;
SET @@session.innodb_table_locks = 1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
index b27bbce5b3c..c7af96bb22a 100644
--- a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
@@ -36,23 +36,23 @@ SELECT @@global.innodb_thread_concurrency;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_thread_concurrency = -1;
Warnings:
-Warning 1292 Truncated incorrect thread_concurrency value: '18446744073709551615'
+Warning 1292 Truncated incorrect innodb_thread_concurrency value: '-1'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SET @@global.innodb_thread_concurrency = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SET @@global.innodb_thread_concurrency = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SET @@global.innodb_thread_concurrency = 1001;
Warnings:
-Warning 1292 Truncated incorrect thread_concurrency value: '1001'
+Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
1000
diff --git a/mysql-test/suite/sys_vars/r/insert_id_basic.result b/mysql-test/suite/sys_vars/r/insert_id_basic.result
index 47dd759ff44..191bdcc96df 100644
--- a/mysql-test/suite/sys_vars/r/insert_id_basic.result
+++ b/mysql-test/suite/sys_vars/r/insert_id_basic.result
@@ -32,9 +32,11 @@ SELECT @@session.insert_id;
65535
'#--------------------FN_DYNVARS_051_04-------------------------#'
SET @@session.insert_id = -1;
+Warnings:
+Warning 1292 Truncated incorrect insert_id value: '-1'
SELECT @@session.insert_id;
@@session.insert_id
--1
+0
SET @@session.insert_id = 100000000000;
SELECT @@session.insert_id;
@@session.insert_id
@@ -45,14 +47,15 @@ SELECT @@session.insert_id;
@@session.insert_id
100000000000
SET @@session.insert_id = -1024;
+Warnings:
+Warning 1292 Truncated incorrect insert_id value: '-1024'
SELECT @@session.insert_id;
@@session.insert_id
--1024
+0
SET @@session.insert_id = 42949672950;
SELECT @@session.insert_id;
@@session.insert_id
42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.insert_id = ON;
ERROR 42000: Incorrect argument type to variable 'insert_id'
SELECT @@session.insert_id;
diff --git a/mysql-test/suite/sys_vars/r/interactive_timeout_basic.result b/mysql-test/suite/sys_vars/r/interactive_timeout_basic.result
index 519fef8a6e5..79e90fc24fa 100644
--- a/mysql-test/suite/sys_vars/r/interactive_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/interactive_timeout_basic.result
@@ -71,8 +71,8 @@ Warning 1292 Truncated incorrect interactive_timeout value: '1000000000'
SELECT @@global.interactive_timeout;
@@global.interactive_timeout
31536000
-SET @@global.interactive_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.interactive_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'interactive_timeout'
SELECT @@global.interactive_timeout;
@@global.interactive_timeout
31536000
@@ -93,15 +93,14 @@ Warning 1292 Truncated incorrect interactive_timeout value: '-2'
SELECT @@session.interactive_timeout;
@@session.interactive_timeout
1
-SET @@session.interactive_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.interactive_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'interactive_timeout'
SET @@session.interactive_timeout = 100000000;
Warnings:
Warning 1292 Truncated incorrect interactive_timeout value: '100000000'
SELECT @@session.interactive_timeout;
@@session.interactive_timeout
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.interactive_timeout = test;
ERROR 42000: Incorrect argument type to variable 'interactive_timeout'
SELECT @@session.interactive_timeout;
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_32.result
index 2318c6d7055..af3dd553862 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_32.result
@@ -7,36 +7,21 @@ SELECT @start_session_value;
@start_session_value
131072
'#--------------------FN_DYNVARS_053_01-------------------------#'
-SET @@global.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
131072
-SET @@session.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
131072
-'#--------------------FN_DYNVARS_053_02-------------------------#'
-SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size = 131072;
-@@global.join_buffer_size = 131072
-1
-SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size = 131072;
-@@session.join_buffer_size = 131072
-1
'#--------------------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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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
@@ -46,15 +31,14 @@ Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
-4294963200
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+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=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
+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
@@ -64,78 +48,76 @@ Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
-4294963200
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
-SET @@global.join_buffer_size = 8199;
+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: '8199'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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
-4294963200
-SET @@global.join_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+4294967168
+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
-4294963200
+4294967168
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
-4294963200
+4294967168
SET @@session.join_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
-SET @@session.join_buffer_size = -2;
+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: '-2'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
-SET @@session.join_buffer_size = 8199;
+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: '8199'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
+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
-4294963200
-SET @@session.join_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+4294967168
+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
-4294963200
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+4294967168
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
-4294963200
+4294967168
'#------------------FN_DYNVARS_053_06-----------------------#'
SELECT @@global.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -152,16 +134,9 @@ WHERE VARIABLE_NAME='join_buffer_size';
SET @@global.join_buffer_size = TRUE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
SET @@global.join_buffer_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
-'Bug: Errors are not coming on assigning TRUE/FALSE to variable';
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.join_buffer_size = 10;
Warnings:
@@ -183,9 +158,9 @@ SELECT @@local.join_buffer_size = @@session.join_buffer_size;
SET join_buffer_size = 1;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SELECT @@join_buffer_size=8200 OR @@join_buffer_size= 8228;
-@@join_buffer_size=8200 OR @@join_buffer_size= 8228
-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;
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
index 4811d4732df..fda265910f9 100644
--- 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
@@ -7,127 +7,117 @@ SELECT @start_session_value;
@start_session_value
131072
'#--------------------FN_DYNVARS_053_01-------------------------#'
-SET @@global.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
131072
-SET @@session.join_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
131072
-'#--------------------FN_DYNVARS_053_02-------------------------#'
-SET @@global.join_buffer_size = DEFAULT;
-SELECT @@global.join_buffer_size = 131072;
-@@global.join_buffer_size = 131072
-1
-SET @@session.join_buffer_size = DEFAULT;
-SELECT @@session.join_buffer_size = 131072;
-@@session.join_buffer_size = 131072
-1
'#--------------------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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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
-4294963200
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+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=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
+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
-4294963200
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
-SET @@global.join_buffer_size = 8199;
+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: '8199'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
+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
-42949668864
-SET @@global.join_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
-42949668864
+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
-42949668864
+42949672832
SET @@session.join_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
-SET @@session.join_buffer_size = -2;
+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: '-2'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
-SET @@session.join_buffer_size = 8199;
+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: '8199'
-SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
-@@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228
-1
+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
-42949668864
-SET @@session.join_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
-42949668864
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
+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
-42949668864
+42949672832
'#------------------FN_DYNVARS_053_06-----------------------#'
SELECT @@global.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -144,16 +134,9 @@ WHERE VARIABLE_NAME='join_buffer_size';
SET @@global.join_buffer_size = TRUE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
SET @@global.join_buffer_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
-SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
-@@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228
-1
-'Bug: Errors are not coming on assigning TRUE/FALSE to variable';
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.join_buffer_size = 10;
Warnings:
@@ -175,9 +158,9 @@ SELECT @@local.join_buffer_size = @@session.join_buffer_size;
SET join_buffer_size = 1;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
-SELECT @@join_buffer_size=8200 OR @@join_buffer_size= 8228;
-@@join_buffer_size=8200 OR @@join_buffer_size= 8228
-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;
diff --git a/mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result b/mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result
index 696ac5cc279..b7deea88a9c 100644
--- a/mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result
+++ b/mysql-test/suite/sys_vars/r/keep_files_on_create_basic.result
@@ -94,7 +94,7 @@ ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of '-1024
SET @@global.keep_files_on_create = 65536;
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of '65536'
SET @@global.keep_files_on_create = 65530.34;
-ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'keep_files_on_create'
SET @@global.keep_files_on_create = test;
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of 'test'
SET @@session.keep_files_on_create = ONN;
@@ -102,16 +102,13 @@ ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of 'ONN'
SET @@session.keep_files_on_create = ONF;
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of 'ONF'
SET @@session.keep_files_on_create = OF;
-SELECT @@session.keep_files_on_create;
-@@session.keep_files_on_create
-0
-'Bug# 34828: FN_DYNVARS_054_05 - OF is also working as OFF and no error is coming';
+ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of 'OF'
SET @@session.keep_files_on_create = 'OFN';
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of 'OFN'
SET @@session.keep_files_on_create = -2;
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of '-2'
-SET @@session.keep_files_on_create = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.keep_files_on_create = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'keep_files_on_create'
SET @@session.keep_files_on_create = 65550;
ERROR 42000: Variable 'keep_files_on_create' can't be set to the value of '65550'
SET @@session.keep_files_on_create = test;
diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result
index eea782701bb..4612b5c7324 100644
--- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/key_buffer_size_basic.result
@@ -1,57 +1,44 @@
SET @start_value = @@global.key_buffer_size;
'#--------------------FN_DYNVARS_055_01------------------------#'
-SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT;
-ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
+SELECT @@global.key_buffer_size;
+@@global.key_buffer_size
+8388608
'#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size = @start_value;
@@global.key_buffer_size = @start_value
1
'#--------------------FN_DYNVARS_055_03------------------------#'
-SET @@global.key_buffer_size = 8 ;
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = 1800;
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
SET @@global.key_buffer_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '65535'
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
61440
'#--------------------FN_DYNVARS_055_04-------------------------#'
+SET @@global.key_buffer_size = -1;
+ERROR HY000: Cannot drop default keycache
+SET @@global.key_buffer_size = 4;
+ERROR HY000: Cannot drop default keycache
SET @@global.key_buffer_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
61440
-SET @@global.key_buffer_size = 4;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '4'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
+SELECT @@global.key_buffer_size;
+@@global.key_buffer_size
+61440
SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
+SELECT @@global.key_buffer_size;
+@@global.key_buffer_size
+61440
'#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
'#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -65,28 +52,16 @@ WHERE VARIABLE_NAME='key_buffer_size';
1
'#---------------------FN_DYNVARS_055_07----------------------#'
SET @@global.key_buffer_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '1'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
+ERROR HY000: Cannot drop default keycache
SET @@global.key_buffer_size = FALSE;
-Warnings:
-Warning 1438 Cannot drop default keycache
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
+ERROR HY000: Cannot drop default keycache
'#---------------------FN_DYNVARS_055_08----------------------#'
-SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size;
@@key_buffer_size = @@global.key_buffer_size
1
'#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
SET local.key_buffer_size = 10;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
SELECT local.key_buffer_size;
diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
deleted file mode 100644
index eea782701bb..00000000000
--- a/mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
+++ /dev/null
@@ -1,100 +0,0 @@
-SET @start_value = @@global.key_buffer_size;
-'#--------------------FN_DYNVARS_055_01------------------------#'
-SET @@global.key_buffer_size = 99;
-SET @@global.key_buffer_size = DEFAULT;
-ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-'#---------------------FN_DYNVARS_055_02-------------------------#'
-SET @@global.key_buffer_size = @start_value;
-SELECT @@global.key_buffer_size = @start_value;
-@@global.key_buffer_size = @start_value
-1
-'#--------------------FN_DYNVARS_055_03------------------------#'
-SET @@global.key_buffer_size = 8 ;
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = 1800;
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = 65535;
-SELECT @@global.key_buffer_size;
-@@global.key_buffer_size
-61440
-'#--------------------FN_DYNVARS_055_04-------------------------#'
-SET @@global.key_buffer_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
-SELECT @@global.key_buffer_size;
-@@global.key_buffer_size
-61440
-SET @@global.key_buffer_size = 4;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '4'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = ON;
-ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-'#-------------------FN_DYNVARS_055_05----------------------------#'
-SET @@session.key_buffer_size = 0;
-ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-'#----------------------FN_DYNVARS_055_06------------------------#'
-SELECT @@global.key_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='key_buffer_size';
-@@global.key_buffer_size = VARIABLE_VALUE
-1
-SELECT @@key_buffer_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='key_buffer_size';
-@@key_buffer_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_055_07----------------------#'
-SET @@global.key_buffer_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '1'
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET @@global.key_buffer_size = FALSE;
-Warnings:
-Warning 1438 Cannot drop default keycache
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-'#---------------------FN_DYNVARS_055_08----------------------#'
-SET @@global.key_buffer_size = 8 ;
-SELECT @@key_buffer_size = @@global.key_buffer_size;
-@@key_buffer_size = @@global.key_buffer_size
-1
-'#---------------------FN_DYNVARS_055_09----------------------#'
-SET key_buffer_size = 8 ;
-ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@global.key_buffer_size BETWEEN 8 AND 36;
-@@global.key_buffer_size BETWEEN 8 AND 36
-1
-SET local.key_buffer_size = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
-SELECT local.key_buffer_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.key_buffer_size = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size = 10' at line 1
-SELECT global.key_buffer_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT key_buffer_size = @@session.key_buffer_size;
-ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
-SET @@global.key_buffer_size = @start_value;
diff --git a/mysql-test/suite/sys_vars/r/key_buffer_size_func.result b/mysql-test/suite/sys_vars/r/key_buffer_size_func.result
index d5b79c260a0..a10be0ab832 100644
--- a/mysql-test/suite/sys_vars/r/key_buffer_size_func.result
+++ b/mysql-test/suite/sys_vars/r/key_buffer_size_func.result
@@ -38,7 +38,6 @@ Key_reads 0
show status like 'Key_reads';
Variable_name Value
Key_reads 0
-SET @@global.key_buffer_size = 36;
## Connecting with connection test_con1 ##
## Inserting some rows in table ##
INSERT INTO t1(rollno, name) VALUES(5, 'Record_11');
@@ -54,7 +53,7 @@ INSERT INTO t1(rollno, name) VALUES(8, 'Record_20');
## Key_reads must be zero (no disk access) ##
show status like 'Key_reads';
Variable_name Value
-Key_reads 10
+Key_reads 0
## Dropping table ##
DROP TABLE IF EXISTS t1;
## Disconnecting both the connections ##
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_32.result
index c79e7beb198..9df9f56bd1f 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_32.result
@@ -3,15 +3,10 @@ SELECT @start_value;
@start_value
300
'#--------------------FN_DYNVARS_056_01------------------------#'
-SET @@global.key_cache_age_threshold = 99;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '99'
SET @@global.key_cache_age_threshold = DEFAULT;
-ERROR 42000: Variable 'key_cache_age_threshold' doesn't have a default value
-'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
-100
+300
'#---------------------FN_DYNVARS_056_02-------------------------#'
SET @@global.key_cache_age_threshold = @start_value;
SELECT @@global.key_cache_age_threshold = 300;
@@ -23,6 +18,8 @@ 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
@@ -31,17 +28,18 @@ 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
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
'#--------------------FN_DYNVARS_056_04-------------------------#'
SET @@global.key_cache_age_threshold = -1;
Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '18446744073709551615'
+Warning 1292 Truncated incorrect key_cache_age_threshold value: '-1'
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
-4294967200
+100
SET @@global.key_cache_age_threshold = 42949672951;
Warnings:
Warning 1292 Truncated incorrect key_cache_age_threshold value: '42949672951'
@@ -55,17 +53,16 @@ SELECT @@global.key_cache_age_threshold;
4294967200
SET @@global.key_cache_age_threshold = -1024;
Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '18446744073709550592'
+Warning 1292 Truncated incorrect key_cache_age_threshold value: '-1024'
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
-4294967200
+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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.key_cache_age_threshold = ON;
ERROR 42000: Incorrect argument type to variable 'key_cache_age_threshold'
SELECT @@global.key_cache_age_threshold;
@@ -107,6 +104,8 @@ SELECT @@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
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
index 5e05dd7bacf..5e0222e8968 100644
--- 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
@@ -3,15 +3,10 @@ SELECT @start_value;
@start_value
300
'#--------------------FN_DYNVARS_056_01------------------------#'
-SET @@global.key_cache_age_threshold = 99;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_age_threshold value: '99'
SET @@global.key_cache_age_threshold = DEFAULT;
-ERROR 42000: Variable 'key_cache_age_threshold' doesn't have a default value
-'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
-100
+300
'#---------------------FN_DYNVARS_056_02-------------------------#'
SET @@global.key_cache_age_threshold = @start_value;
SELECT @@global.key_cache_age_threshold = 300;
@@ -23,6 +18,8 @@ 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
@@ -31,16 +28,21 @@ 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
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
'#--------------------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
-18446744073709551600
+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
42949672900
@@ -50,16 +52,17 @@ SELECT @@global.key_cache_age_threshold;
@@global.key_cache_age_threshold
42949672900
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
-18446744073709550500
+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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.key_cache_age_threshold = ON;
ERROR 42000: Incorrect argument type to variable 'key_cache_age_threshold'
SELECT @@global.key_cache_age_threshold;
@@ -101,6 +104,8 @@ SELECT @@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
diff --git a/mysql-test/suite/sys_vars/r/key_cache_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/key_cache_block_size_basic.result
index 46ce1f26b29..00ba39558af 100644
--- a/mysql-test/suite/sys_vars/r/key_cache_block_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/key_cache_block_size_basic.result
@@ -3,13 +3,10 @@ SELECT @start_value;
@start_value
1024
'#--------------------FN_DYNVARS_057_01------------------------#'
-SET @@global.key_cache_block_size = 600;
SET @@global.key_cache_block_size = DEFAULT;
-ERROR 42000: Variable 'key_cache_block_size' doesn't have a default value
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
-512
+1024
'#---------------------FN_DYNVARS_057_02-------------------------#'
SET @@global.key_cache_block_size = @start_value;
SELECT @@global.key_cache_block_size = 1024;
@@ -25,21 +22,24 @@ SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
16384
SET @@global.key_cache_block_size = 1800;
+Warnings:
+Warning 1292 Truncated incorrect key_cache_block_size value: '1800'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
1536
SET @@global.key_cache_block_size = 16383;
+Warnings:
+Warning 1292 Truncated incorrect key_cache_block_size value: '16383'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
15872
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
'#--------------------FN_DYNVARS_057_04-------------------------#'
SET @@global.key_cache_block_size = -1;
Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709551615'
+Warning 1292 Truncated incorrect key_cache_block_size value: '-1'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
-16384
+512
SET @@global.key_cache_block_size = 42949672951;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '42949672951'
@@ -53,10 +53,10 @@ SELECT @@global.key_cache_block_size;
16384
SET @@global.key_cache_block_size = -1024;
Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709550592'
+Warning 1292 Truncated incorrect key_cache_block_size value: '-1024'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
-16384
+512
SET @@global.key_cache_block_size = 256;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '256'
@@ -75,7 +75,6 @@ Warning 1292 Truncated incorrect key_cache_block_size value: '16385'
SELECT @@global.key_cache_block_size;
@@global.key_cache_block_size
16384
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.key_cache_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_cache_block_size'
SELECT @@global.key_cache_block_size;
diff --git a/mysql-test/suite/sys_vars/r/key_cache_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/key_cache_block_size_basic_32.result
deleted file mode 100644
index 46ce1f26b29..00000000000
--- a/mysql-test/suite/sys_vars/r/key_cache_block_size_basic_32.result
+++ /dev/null
@@ -1,142 +0,0 @@
-SET @start_value = @@global.key_cache_block_size;
-SELECT @start_value;
-@start_value
-1024
-'#--------------------FN_DYNVARS_057_01------------------------#'
-SET @@global.key_cache_block_size = 600;
-SET @@global.key_cache_block_size = DEFAULT;
-ERROR 42000: Variable 'key_cache_block_size' doesn't have a default value
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-512
-'#---------------------FN_DYNVARS_057_02-------------------------#'
-SET @@global.key_cache_block_size = @start_value;
-SELECT @@global.key_cache_block_size = 1024;
-@@global.key_cache_block_size = 1024
-1
-'#--------------------FN_DYNVARS_057_03------------------------#'
-SET @@global.key_cache_block_size = 1024;
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-1024
-SET @@global.key_cache_block_size = 16384;
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = 1800;
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-1536
-SET @@global.key_cache_block_size = 16383;
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-15872
-'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
-'#--------------------FN_DYNVARS_057_04-------------------------#'
-SET @@global.key_cache_block_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709551615'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = 42949672951;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '42949672951'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'key_cache_block_size'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '18446744073709550592'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = 256;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '256'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-512
-SET @@global.key_cache_block_size = 511;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '511'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-512
-SET @@global.key_cache_block_size = 16385;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '16385'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
-SET @@global.key_cache_block_size = ON;
-ERROR 42000: Incorrect argument type to variable 'key_cache_block_size'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-SET @@global.key_cache_block_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'key_cache_block_size'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-16384
-'#-------------------FN_DYNVARS_057_05----------------------------#'
-SET @@session.key_cache_block_size = 0;
-ERROR HY000: Variable 'key_cache_block_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.key_cache_block_size;
-ERROR HY000: Variable 'key_cache_block_size' is a GLOBAL variable
-'#----------------------FN_DYNVARS_057_06------------------------#'
-SELECT @@global.key_cache_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='key_cache_block_size';
-@@global.key_cache_block_size = VARIABLE_VALUE
-1
-SELECT @@key_cache_block_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='key_cache_block_size';
-@@key_cache_block_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_057_07----------------------#'
-SET @@global.key_cache_block_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '1'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-512
-SET @@global.key_cache_block_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_block_size value: '0'
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-512
-'#---------------------FN_DYNVARS_057_08----------------------#'
-SET @@global.key_cache_block_size = 1024;
-SELECT @@key_cache_block_size = @@global.key_cache_block_size;
-@@key_cache_block_size = @@global.key_cache_block_size
-1
-'#---------------------FN_DYNVARS_057_09----------------------#'
-SET key_cache_block_size = 8000;
-ERROR HY000: Variable 'key_cache_block_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@key_cache_block_size;
-@@key_cache_block_size
-1024
-SET local.key_cache_block_size = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_cache_block_size = 10' at line 1
-SELECT local.key_cache_block_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.key_cache_block_size = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_cache_block_size = 10' at line 1
-SELECT global.key_cache_block_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT key_cache_block_size = @@session.key_cache_block_size;
-ERROR 42S22: Unknown column 'key_cache_block_size' in 'field list'
-SET @@global.key_cache_block_size = @start_value;
-SELECT @@global.key_cache_block_size;
-@@global.key_cache_block_size
-1024
diff --git a/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_64.result b/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic.result
index cd0cdcbca05..641779ac819 100644
--- a/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic.result
@@ -3,13 +3,10 @@ SELECT @start_value;
@start_value
100
'#--------------------FN_DYNVARS_058_01------------------------#'
-SET @@global.key_cache_division_limit = 50;
SET @@global.key_cache_division_limit = DEFAULT;
-ERROR 42000: Variable 'key_cache_division_limit' doesn't have a default value
-'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
-50
+100
'#---------------------FN_DYNVARS_058_02-------------------------#'
SET @@global.key_cache_division_limit = @start_value;
SELECT @@global.key_cache_division_limit = 100;
@@ -35,10 +32,10 @@ SELECT @@global.key_cache_division_limit;
'#--------------------FN_DYNVARS_058_04-------------------------#'
SET @@global.key_cache_division_limit = -1;
Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709551615'
+Warning 1292 Truncated incorrect key_cache_division_limit value: '-1'
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
-100
+1
SET @@global.key_cache_division_limit = 101;
Warnings:
Warning 1292 Truncated incorrect key_cache_division_limit value: '101'
@@ -52,10 +49,10 @@ SELECT @@global.key_cache_division_limit;
100
SET @@global.key_cache_division_limit = -1024;
Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709550592'
+Warning 1292 Truncated incorrect key_cache_division_limit value: '-1024'
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
-100
+1
SET @@global.key_cache_division_limit = 0;
Warnings:
Warning 1292 Truncated incorrect key_cache_division_limit value: '0'
@@ -74,7 +71,6 @@ Warning 1292 Truncated incorrect key_cache_division_limit value: '65535'
SELECT @@global.key_cache_division_limit;
@@global.key_cache_division_limit
100
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.key_cache_division_limit = ON;
ERROR 42000: Incorrect argument type to variable 'key_cache_division_limit'
SELECT @@global.key_cache_division_limit;
diff --git a/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_32.result b/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_32.result
deleted file mode 100644
index cd0cdcbca05..00000000000
--- a/mysql-test/suite/sys_vars/r/key_cache_division_limit_basic_32.result
+++ /dev/null
@@ -1,139 +0,0 @@
-SET @start_value = @@global.key_cache_division_limit;
-SELECT @start_value;
-@start_value
-100
-'#--------------------FN_DYNVARS_058_01------------------------#'
-SET @@global.key_cache_division_limit = 50;
-SET @@global.key_cache_division_limit = DEFAULT;
-ERROR 42000: Variable 'key_cache_division_limit' doesn't have a default value
-'Bug# 34878: This variable has default value according to documentation';
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-50
-'#---------------------FN_DYNVARS_058_02-------------------------#'
-SET @@global.key_cache_division_limit = @start_value;
-SELECT @@global.key_cache_division_limit = 100;
-@@global.key_cache_division_limit = 100
-1
-'#--------------------FN_DYNVARS_058_03------------------------#'
-SET @@global.key_cache_division_limit = 1;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-1
-SET @@global.key_cache_division_limit = 50;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-50
-SET @@global.key_cache_division_limit = 99;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-99
-SET @@global.key_cache_division_limit = 2;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-2
-'#--------------------FN_DYNVARS_058_04-------------------------#'
-SET @@global.key_cache_division_limit = -1;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709551615'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = 101;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '101'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'key_cache_division_limit'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = -1024;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '18446744073709550592'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = 0;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '0'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-1
-SET @@global.key_cache_division_limit = 200;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '200'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = 65535;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '65535'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-'Bug # 34837: Errors are not coming on assigning invalid values to variable'
-SET @@global.key_cache_division_limit = ON;
-ERROR 42000: Incorrect argument type to variable 'key_cache_division_limit'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-SET @@global.key_cache_division_limit = 'test';
-ERROR 42000: Incorrect argument type to variable 'key_cache_division_limit'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
-'#-------------------FN_DYNVARS_058_05----------------------------#'
-SET @@session.key_cache_division_limit = 0;
-ERROR HY000: Variable 'key_cache_division_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.key_cache_division_limit;
-ERROR HY000: Variable 'key_cache_division_limit' is a GLOBAL variable
-'#----------------------FN_DYNVARS_058_06------------------------#'
-SELECT @@global.key_cache_division_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='key_cache_division_limit';
-@@global.key_cache_division_limit = VARIABLE_VALUE
-1
-SELECT @@key_cache_division_limit = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='key_cache_division_limit';
-@@key_cache_division_limit = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_058_07----------------------#'
-SET @@global.key_cache_division_limit = TRUE;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-1
-SET @@global.key_cache_division_limit = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect key_cache_division_limit value: '0'
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-1
-'#---------------------FN_DYNVARS_058_08----------------------#'
-SET @@global.key_cache_division_limit = 90;
-SELECT @@key_cache_division_limit = @@global.key_cache_division_limit;
-@@key_cache_division_limit = @@global.key_cache_division_limit
-1
-'#---------------------FN_DYNVARS_058_09----------------------#'
-SET key_cache_division_limit = 80;
-ERROR HY000: Variable 'key_cache_division_limit' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@key_cache_division_limit;
-@@key_cache_division_limit
-90
-SET local.key_cache_division_limit = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_cache_division_limit = 10' at line 1
-SELECT local.key_cache_division_limit;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.key_cache_division_limit = 10;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_cache_division_limit = 10' at line 1
-SELECT global.key_cache_division_limit;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT key_cache_division_limit = @@session.key_cache_division_limit;
-ERROR 42S22: Unknown column 'key_cache_division_limit' in 'field list'
-SET @@global.key_cache_division_limit = @start_value;
-SELECT @@global.key_cache_division_limit;
-@@global.key_cache_division_limit
-100
diff --git a/mysql-test/suite/sys_vars/r/large_files_support_basic.result b/mysql-test/suite/sys_vars/r/large_files_support_basic.result
new file mode 100644
index 00000000000..a33e3894ddc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/large_files_support_basic.result
@@ -0,0 +1,21 @@
+select @@global.large_files_support;
+@@global.large_files_support
+0
+select @@session.large_files_support;
+ERROR HY000: Variable 'large_files_support' is a GLOBAL variable
+show global variables like 'large_files_support';
+Variable_name Value
+large_files_support OFF
+show session variables like 'large_files_support';
+Variable_name Value
+large_files_support OFF
+select * from information_schema.global_variables where variable_name='large_files_support';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_FILES_SUPPORT OFF
+select * from information_schema.session_variables where variable_name='large_files_support';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_FILES_SUPPORT OFF
+set global large_files_support=1;
+ERROR HY000: Variable 'large_files_support' is a read only variable
+set session large_files_support=1;
+ERROR HY000: Variable 'large_files_support' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/large_page_size_basic.result b/mysql-test/suite/sys_vars/r/large_page_size_basic.result
new file mode 100644
index 00000000000..ac6b6acf6a0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/large_page_size_basic.result
@@ -0,0 +1,21 @@
+select @@global.large_page_size = 1;
+@@global.large_page_size = 1
+0
+select @@session.large_page_size;
+ERROR HY000: Variable 'large_page_size' is a GLOBAL variable
+show global variables like 'large_page_size';
+Variable_name Value
+large_page_size #
+show session variables like 'large_page_size';
+Variable_name Value
+large_page_size #
+select * from information_schema.global_variables where variable_name='large_page_size';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_PAGE_SIZE #
+select * from information_schema.session_variables where variable_name='large_page_size';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_PAGE_SIZE #
+set global large_page_size=1;
+ERROR HY000: Variable 'large_page_size' is a read only variable
+set session large_page_size=1;
+ERROR HY000: Variable 'large_page_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/large_pages_basic.result b/mysql-test/suite/sys_vars/r/large_pages_basic.result
new file mode 100644
index 00000000000..257828a210b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/large_pages_basic.result
@@ -0,0 +1,21 @@
+select @@global.large_pages;
+@@global.large_pages
+0
+select @@session.large_pages;
+ERROR HY000: Variable 'large_pages' is a GLOBAL variable
+show global variables like 'large_pages';
+Variable_name Value
+large_pages OFF
+show session variables like 'large_pages';
+Variable_name Value
+large_pages OFF
+select * from information_schema.global_variables where variable_name='large_pages';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_PAGES OFF
+select * from information_schema.session_variables where variable_name='large_pages';
+VARIABLE_NAME VARIABLE_VALUE
+LARGE_PAGES OFF
+set global large_pages=1;
+ERROR HY000: Variable 'large_pages' is a read only variable
+set session large_pages=1;
+ERROR HY000: Variable 'large_pages' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/last_insert_id_basic.result b/mysql-test/suite/sys_vars/r/last_insert_id_basic.result
new file mode 100644
index 00000000000..c29a313b9e7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/last_insert_id_basic.result
@@ -0,0 +1,27 @@
+select @@global.last_insert_id;
+ERROR HY000: Variable 'last_insert_id' is a SESSION variable
+select @@session.last_insert_id;
+@@session.last_insert_id
+0
+show global variables like 'last_insert_id';
+Variable_name Value
+show session variables like 'last_insert_id';
+Variable_name Value
+last_insert_id 0
+select * from information_schema.global_variables where variable_name='last_insert_id';
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='last_insert_id';
+VARIABLE_NAME VARIABLE_VALUE
+LAST_INSERT_ID 0
+set session last_insert_id=1;
+select @@session.last_insert_id;
+@@session.last_insert_id
+1
+set global last_insert_id=1;
+ERROR HY000: Variable 'last_insert_id' is a SESSION variable and can't be used with SET GLOBAL
+set session last_insert_id=1.1;
+ERROR 42000: Incorrect argument type to variable 'last_insert_id'
+set session last_insert_id=1e1;
+ERROR 42000: Incorrect argument type to variable 'last_insert_id'
+set session last_insert_id="foo";
+ERROR 42000: Incorrect argument type to variable 'last_insert_id'
diff --git a/mysql-test/suite/sys_vars/r/lc_messages_basic.result b/mysql-test/suite/sys_vars/r/lc_messages_basic.result
new file mode 100644
index 00000000000..e765dd53516
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/lc_messages_basic.result
@@ -0,0 +1,46 @@
+SET @start_global_value = @@global.lc_messages;
+SELECT @start_global_value;
+@start_global_value
+en_US
+select @@global.lc_messages;
+@@global.lc_messages
+en_US
+select @@session.lc_messages;
+@@session.lc_messages
+en_US
+show global variables like 'lc_messages';
+Variable_name Value
+lc_messages en_US
+show session variables like 'lc_messages';
+Variable_name Value
+lc_messages en_US
+select * from information_schema.global_variables where variable_name='lc_messages';
+VARIABLE_NAME VARIABLE_VALUE
+LC_MESSAGES en_US
+select * from information_schema.session_variables where variable_name='lc_messages';
+VARIABLE_NAME VARIABLE_VALUE
+LC_MESSAGES en_US
+set global lc_messages=1;
+select @@global.lc_messages;
+@@global.lc_messages
+en_GB
+set session lc_messages=2;
+select @@session.lc_messages;
+@@session.lc_messages
+ja_JP
+set global lc_messages="en_US";
+select @@global.lc_messages;
+@@global.lc_messages
+en_US
+set session lc_messages="en_GB";
+select @@session.lc_messages;
+@@session.lc_messages
+en_GB
+set global lc_messages=1.1;
+ERROR 42000: Incorrect argument type to variable 'lc_messages'
+set global lc_messages=1e1;
+ERROR 42000: Incorrect argument type to variable 'lc_messages'
+SET @@global.lc_messages = @start_global_value;
+SELECT @@global.lc_messages;
+@@global.lc_messages
+en_US
diff --git a/mysql-test/suite/sys_vars/r/lc_messages_dir_basic.result b/mysql-test/suite/sys_vars/r/lc_messages_dir_basic.result
new file mode 100644
index 00000000000..c197d94d4fc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/lc_messages_dir_basic.result
@@ -0,0 +1,21 @@
+select @@global.lc_messages_dir;
+@@global.lc_messages_dir
+MYSQL_SHAREDIR/
+select @@session.lc_messages_dir;
+ERROR HY000: Variable 'lc_messages_dir' is a GLOBAL variable
+show global variables like 'lc_messages_dir';
+Variable_name Value
+lc_messages_dir MYSQL_SHAREDIR/
+show session variables like 'lc_messages_dir';
+Variable_name Value
+lc_messages_dir MYSQL_SHAREDIR/
+select * from information_schema.global_variables where variable_name='lc_messages_dir';
+VARIABLE_NAME VARIABLE_VALUE
+LC_MESSAGES_DIR MYSQL_SHAREDIR/
+select * from information_schema.session_variables where variable_name='lc_messages_dir';
+VARIABLE_NAME VARIABLE_VALUE
+LC_MESSAGES_DIR MYSQL_SHAREDIR/
+set global lc_messages_dir=1;
+ERROR HY000: Variable 'lc_messages_dir' is a read only variable
+set session lc_messages_dir=1;
+ERROR HY000: Variable 'lc_messages_dir' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/lc_time_names_basic.result b/mysql-test/suite/sys_vars/r/lc_time_names_basic.result
index 36f3c45f0da..39e93a6f76c 100644
--- a/mysql-test/suite/sys_vars/r/lc_time_names_basic.result
+++ b/mysql-test/suite/sys_vars/r/lc_time_names_basic.result
@@ -459,13 +459,19 @@ SELECT @@session.lc_time_names;
@@session.lc_time_names
sq_AL
SET @@session.lc_time_names=sr_YU;
+Warnings:
+Warning 1287 'sr_YU' is deprecated; use 'sr_RS' instead
SELECT @@session.lc_time_names;
@@session.lc_time_names
-sr_YU
+sr_RS
SET @@session.lc_time_names=sv_FI;
SELECT @@session.lc_time_names;
@@session.lc_time_names
sv_FI
+SET @@session.lc_time_names=sr_RS;
+SELECT @@session.lc_time_names;
+@@session.lc_time_names
+sr_RS
SET @@session.lc_time_names=sv_SE;
SELECT @@session.lc_time_names;
@@session.lc_time_names
@@ -900,13 +906,19 @@ SELECT @@global.lc_time_names;
@@global.lc_time_names
sq_AL
SET @@global.lc_time_names=sr_YU;
+Warnings:
+Warning 1287 'sr_YU' is deprecated; use 'sr_RS' instead
SELECT @@global.lc_time_names;
@@global.lc_time_names
-sr_YU
+sr_RS
SET @@global.lc_time_names=sv_FI;
SELECT @@global.lc_time_names;
@@global.lc_time_names
sv_FI
+SET @@global.lc_time_names=sr_RS;
+SELECT @@global.lc_time_names;
+@@global.lc_time_names
+sr_RS
SET @@global.lc_time_names=sv_SE;
SELECT @@global.lc_time_names;
@@global.lc_time_names
@@ -1006,7 +1018,11 @@ SELECT @@lc_time_names;
@@lc_time_names
zh_HK
SET @@lc_time_names = 109;
-ERROR HY000: Unknown locale: '109'
+SELECT @@lc_time_names;
+@@lc_time_names
+el_GR
+SET @@lc_time_names = 110;
+ERROR HY000: Unknown locale: '110'
'#--------------------FN_DYNVARS_060_10-------------------------#'
SET @@lc_time_names = en_EN;
ERROR HY000: Unknown locale: 'en_EN'
diff --git a/mysql-test/suite/sys_vars/r/locked_in_memory_basic.result b/mysql-test/suite/sys_vars/r/locked_in_memory_basic.result
new file mode 100644
index 00000000000..38253790693
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/locked_in_memory_basic.result
@@ -0,0 +1,21 @@
+select @@global.locked_in_memory;
+@@global.locked_in_memory
+0
+select @@session.locked_in_memory;
+ERROR HY000: Variable 'locked_in_memory' is a GLOBAL variable
+show global variables like 'locked_in_memory';
+Variable_name Value
+locked_in_memory OFF
+show session variables like 'locked_in_memory';
+Variable_name Value
+locked_in_memory OFF
+select * from information_schema.global_variables where variable_name='locked_in_memory';
+VARIABLE_NAME VARIABLE_VALUE
+LOCKED_IN_MEMORY OFF
+select * from information_schema.session_variables where variable_name='locked_in_memory';
+VARIABLE_NAME VARIABLE_VALUE
+LOCKED_IN_MEMORY OFF
+set global locked_in_memory=1;
+ERROR HY000: Variable 'locked_in_memory' is a read only variable
+set session locked_in_memory=1;
+ERROR HY000: Variable 'locked_in_memory' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/log_basic.result b/mysql-test/suite/sys_vars/r/log_basic.result
index 18a12b72437..5574d49514d 100644
--- a/mysql-test/suite/sys_vars/r/log_basic.result
+++ b/mysql-test/suite/sys_vars/r/log_basic.result
@@ -6,10 +6,12 @@ INIT_VALUE
SELECT @@log AS INIT_VALUE;
INIT_VALUE
1
-SET @@global.general_log = ON;
-SET global general_log = 0;
-'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
-'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
+SET @@global.log = ON;
+Warnings:
+Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
+SET global log = 0;
+Warnings:
+Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
'#--------------------FN_DYNVARS_062_02-------------------------#'
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/log_bin_basic.result b/mysql-test/suite/sys_vars/r/log_bin_basic.result
new file mode 100644
index 00000000000..e14888300b3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_bin_basic.result
@@ -0,0 +1,21 @@
+select @@global.log_bin;
+@@global.log_bin
+0
+select @@session.log_bin;
+ERROR HY000: Variable 'log_bin' is a GLOBAL variable
+show global variables like 'log_bin';
+Variable_name Value
+log_bin OFF
+show session variables like 'log_bin';
+Variable_name Value
+log_bin OFF
+select * from information_schema.global_variables where variable_name='log_bin';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_BIN OFF
+select * from information_schema.session_variables where variable_name='log_bin';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_BIN OFF
+set global log_bin=1;
+ERROR HY000: Variable 'log_bin' is a read only variable
+set session log_bin=1;
+ERROR HY000: Variable 'log_bin' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result b/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result
index 72daac1edc1..7ed1b689f5a 100644
--- a/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result
+++ b/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_basic.result
@@ -2,10 +2,6 @@ SET @start_global_value = @@global.log_bin_trust_function_creators;
SELECT @start_global_value;
@start_global_value
1
-'Bug# 34876: TRUE value is coming as Default'
-SET @start_session_value = @@session.log_bin_trust_function_creators;
-ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable
-'Bug# 34881: According to documentation the scope of this variable is GLOBAL as well as SESSION too';
'#--------------------FN_DYNVARS_063_01-------------------------#'
SET @@global.log_bin_trust_function_creators = TRUE;
SET @@global.log_bin_trust_function_creators = DEFAULT;
@@ -55,7 +51,7 @@ ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the valu
SET @@global.log_bin_trust_function_creators = "OFFF";
ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of 'OFFF'
SET @@global.log_bin_trust_function_creators = OF;
-'Bug# 34828: OF is also working as OFF and no error is coming';
+ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of 'OF'
SET @@global.log_bin_trust_function_creators = TTRUE;
ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of 'TTRUE'
SET @@global.log_bin_trust_function_creators = FELSE;
@@ -65,7 +61,7 @@ ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the valu
SET @@global.log_bin_trust_function_creators = 65536;
ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of '65536'
SET @@global.log_bin_trust_function_creators = 65530.34;
-ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'log_bin_trust_function_creators'
SET @@global.log_bin_trust_function_creators = test;
ERROR 42000: Variable 'log_bin_trust_function_creators' can't be set to the value of 'test'
'#------------------FN_DYNVARS_063_06-----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result b/mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
deleted file mode 100644
index 66e253645b1..00000000000
--- a/mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
+++ /dev/null
@@ -1,121 +0,0 @@
-SET @start_global_value = @@global.log_bin_trust_routine_creators;
-SELECT @start_global_value;
-@start_global_value
-1
-'#--------------------FN_DYNVARS_064_01-------------------------#'
-SET @@global.log_bin_trust_routine_creators = TRUE;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SET @@global.log_bin_trust_routine_creators = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-0
-'#--------------------FN_DYNVARS_064_02-------------------------#'
-SET @@global.log_bin_trust_routine_creators = DEFAULT;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
-@@global.log_bin_trust_routine_creators = 'FALSE'
-1
-Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
-'#--------------------FN_DYNVARS_064_03-------------------------#'
-SET @@global.log_bin_trust_routine_creators = ON;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-1
-SET @@global.log_bin_trust_routine_creators = OFF;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-0
-SET @@global.log_bin_trust_routine_creators = 0;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-0
-SET @@global.log_bin_trust_routine_creators = 1;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-1
-SET @@global.log_bin_trust_routine_creators = TRUE;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-1
-SET @@global.log_bin_trust_routine_creators = FALSE;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-0
-'#-------------------FN_DYNVARS_064_04----------------------------#'
-SET @@session.log_bin_trust_routine_creators = 0;
-ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.log_bin_trust_routine_creators;
-ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
-'#------------------FN_DYNVARS_064_05-----------------------#'
-SET @@global.log_bin_trust_routine_creators = 'ONN';
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'ONN'
-SET @@global.log_bin_trust_routine_creators = "OFFF";
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'OFFF'
-SET @@global.log_bin_trust_routine_creators = OF;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-0
-'Bug# 34828: OF is also working as OFF and no error is coming';
-SET @@global.log_bin_trust_routine_creators = TTRUE;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'TTRUE'
-SET @@global.log_bin_trust_routine_creators = FELSE;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'FELSE'
-SET @@global.log_bin_trust_routine_creators = -1024;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '-1024'
-SET @@global.log_bin_trust_routine_creators = 65536;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '65536'
-SET @@global.log_bin_trust_routine_creators = 65530.34;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of '65530'
-SET @@global.log_bin_trust_routine_creators = test;
-ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'test'
-'#------------------FN_DYNVARS_064_06-----------------------#'
-SELECT @@global.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
-@@global.log_bin_trust_routine_creators = VARIABLE_VALUE
-1
-SELECT @@session.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
-ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
-'#---------------------FN_DYNVARS_064_07----------------------#'
-SET @@global.log_bin_trust_routine_creators = TRUE;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
-@@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators
-1
-'#---------------------FN_DYNVARS_064_08----------------------#'
-SET @@global.log_bin_trust_routine_creators = TRUE;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@log_bin_trust_routine_creators;
-@@log_bin_trust_routine_creators
-1
-SELECT local.log_bin_trust_routine_creators;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.log_bin_trust_routine_creators;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators;
-ERROR 42S22: Unknown column 'log_bin_trust_routine_creators' in 'field list'
-SET @@global.log_bin_trust_routine_creators = @start_global_value;
-Warnings:
-Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead
-SELECT @@global.log_bin_trust_routine_creators;
-@@global.log_bin_trust_routine_creators
-1
diff --git a/mysql-test/suite/sys_vars/r/log_error_basic.result b/mysql-test/suite/sys_vars/r/log_error_basic.result
new file mode 100644
index 00000000000..c18d43762bf
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_error_basic.result
@@ -0,0 +1,21 @@
+select @@global.log_error;
+@@global.log_error
+
+select @@session.log_error;
+ERROR HY000: Variable 'log_error' is a GLOBAL variable
+show global variables like 'log_error';
+Variable_name Value
+log_error
+show session variables like 'log_error';
+Variable_name Value
+log_error
+select * from information_schema.global_variables where variable_name='log_error';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_ERROR
+select * from information_schema.session_variables where variable_name='log_error';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_ERROR
+set global log_error=1;
+ERROR HY000: Variable 'log_error' is a read only variable
+set session log_error=1;
+ERROR HY000: Variable 'log_error' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/log_output_basic.result b/mysql-test/suite/sys_vars/r/log_output_basic.result
index 481d5862074..ab9e5837e63 100644
--- a/mysql-test/suite/sys_vars/r/log_output_basic.result
+++ b/mysql-test/suite/sys_vars/r/log_output_basic.result
@@ -1,26 +1,18 @@
SET @start_value = @@global.log_output;
SELECT @start_value;
@start_value
-FILE,TABLE
+FILE
'#--------------------FN_DYNVARS_065_01------------------------#'
SET @@global.log_output = FILE;
SET @@global.log_output = DEFAULT;
SELECT @@global.log_output;
@@global.log_output
FILE
-'Bug# 34876: Documentation specifies a DEFAULT value of TABLE whereas';
-'DEFAULT value is FILE. Also note that initial value is different';
-'from DEFAULT';
'#---------------------FN_DYNVARS_065_02-------------------------#'
SET @@global.log_output = NULL;
ERROR 42000: Variable 'log_output' can't be set to the value of 'NULL'
SET @@global.log_output = "";
ERROR 42000: Variable 'log_output' can't be set to the value of ''
-SELECT @@global.log_output;
-@@global.log_output
-FILE
-'Bug# 34838: Empty value is allowed where as it is not specified in';
-'documentation';
'#--------------------FN_DYNVARS_065_03------------------------#'
SET @@global.log_output = 'TABLE';
SELECT @@global.log_output;
@@ -66,10 +58,6 @@ SET @@global.log_output = ',TABLE';
SELECT @@global.log_output;
@@global.log_output
TABLE
-SET @@global.log_output = ',';
-SELECT @@global.log_output;
-@@global.log_output
-
SET @@global.log_output = 'TABLE,,FILE,,,';
SELECT @@global.log_output;
@@global.log_output
@@ -89,22 +77,6 @@ SET @@global.log_output = 'TABLE, FILE';
ERROR 42000: Variable 'log_output' can't be set to the value of ' FILE'
SET @@global.log_output = ' TABLE,FILE';
ERROR 42000: Variable 'log_output' can't be set to the value of ' TABLE'
-SET @@global.log_output = ', ';
-SELECT @@global.log_output;
-@@global.log_output
-
-SET @@global.log_output = ' ';
-SELECT @@global.log_output;
-@@global.log_output
-
-SET @@global.log_output = ' ';
-SELECT @@global.log_output;
-@@global.log_output
-
-'Bug: The behavior of space in value is not consistent.';
-'Some times it is trimmed and some times not.';
-'The space before and after value is not accepted where as space';
-'between comma is accepted.';
'#-------------------FN_DYNVARS_065_05----------------------------#'
SET @@log_output = 0;
ERROR HY000: Variable 'log_output' is a GLOBAL variable and should be set with SET GLOBAL
@@ -121,7 +93,7 @@ SET @@global.log_output = 0;
ERROR 42000: Variable 'log_output' can't be set to the value of '0'
SELECT @@global.log_output;
@@global.log_output
-
+FILE,TABLE
SET @@global.log_output = 1;
SELECT @@global.log_output;
@@global.log_output
@@ -172,4 +144,4 @@ TABLE
SET @@global.log_output = @start_value;
SELECT @@global.log_output;
@@global.log_output
-FILE,TABLE
+FILE
diff --git a/mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result b/mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result
index 7c69655f109..f577122bacf 100644
--- a/mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result
+++ b/mysql-test/suite/sys_vars/r/log_queries_not_using_indexes_basic.result
@@ -41,37 +41,11 @@ SELECT @@global.log_queries_not_using_indexes;
@@global.log_queries_not_using_indexes
0
SET GLOBAL log_queries_not_using_indexes= 0.00;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-0
-SET GLOBAL log_queries_not_using_indexes= -0.0;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-0
-SET GLOBAL log_queries_not_using_indexes= 001.00;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-1
-SET GLOBAL log_queries_not_using_indexes= +1.0;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-1
+ERROR 42000: Incorrect argument type to variable 'log_queries_not_using_indexes'
SET GLOBAL log_queries_not_using_indexes= +0;
SELECT @@global.log_queries_not_using_indexes;
@@global.log_queries_not_using_indexes
0
-SET GLOBAL log_queries_not_using_indexes= +0.000000;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-0
-SET GLOBAL log_queries_not_using_indexes= 0000.00000;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-0
-SET GLOBAL log_queries_not_using_indexes= .0;
-SELECT @@global.log_queries_not_using_indexes;
-@@global.log_queries_not_using_indexes
-0
SET @@global.log_queries_not_using_indexes= 'DEFAULT';
ERROR 42000: Variable 'log_queries_not_using_indexes' can't be set to the value of 'DEFAULT'
SET @@global.log_queries_not_using_indexes= 'true';
@@ -80,8 +54,6 @@ SET @@global.log_queries_not_using_indexes= BLABLA;
ERROR 42000: Variable 'log_queries_not_using_indexes' can't be set to the value of 'BLABLA'
SET @@global.log_queries_not_using_indexes= 25;
ERROR 42000: Variable 'log_queries_not_using_indexes' can't be set to the value of '25'
-SET @@global.log_queries_not_using_indexes= 12.34;
-ERROR 42000: Variable 'log_queries_not_using_indexes' can't be set to the value of '12'
SET GLOBAL log_queries_not_using_indexes= -1;
ERROR 42000: Variable 'log_queries_not_using_indexes' can't be set to the value of '-1'
SET @badvar= 'true';
@@ -102,6 +74,3 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SET @@SESSION log_queries_not_using_indexes= TRUE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'log_queries_not_using_indexes= TRUE' at line 1
SET @@global.log_queries_not_using_indexes= @start_value;
-SELECT IF(@@GLOBAL.log_queries_not_using_indexes, "ON", "OFF") = VARIABLE_VALUE
-IF(@@GLOBAL.log_queries_not_using_indexes, "ON", "OFF") = VARIABLE_VALUE
-1
diff --git a/mysql-test/suite/sys_vars/r/log_slave_updates_basic.result b/mysql-test/suite/sys_vars/r/log_slave_updates_basic.result
new file mode 100644
index 00000000000..85ee30ca999
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_slave_updates_basic.result
@@ -0,0 +1,21 @@
+select @@global.log_slave_updates;
+@@global.log_slave_updates
+0
+select @@session.log_slave_updates;
+ERROR HY000: Variable 'log_slave_updates' is a GLOBAL variable
+show global variables like 'log_slave_updates';
+Variable_name Value
+log_slave_updates OFF
+show session variables like 'log_slave_updates';
+Variable_name Value
+log_slave_updates OFF
+select * from information_schema.global_variables where variable_name='log_slave_updates';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLAVE_UPDATES OFF
+select * from information_schema.session_variables where variable_name='log_slave_updates';
+VARIABLE_NAME VARIABLE_VALUE
+LOG_SLAVE_UPDATES OFF
+set global log_slave_updates=1;
+ERROR HY000: Variable 'log_slave_updates' is a read only variable
+set session log_slave_updates=1;
+ERROR HY000: Variable 'log_slave_updates' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result b/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result
new file mode 100644
index 00000000000..ca530ebb41a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result
@@ -0,0 +1,112 @@
+SET @start_value = @@global.log_slow_queries;
+SELECT @start_value;
+@start_value
+1
+'#---------------------FN_DYNVARS_004_01-------------------------#'
+SET @@global.log_slow_queries = DEFAULT;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries = 0;
+@@global.log_slow_queries = 0
+1
+'#--------------------FN_DYNVARS_004_02------------------------#'
+SET @@global.log_slow_queries = ON;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+1
+SET @@global.log_slow_queries = OFF;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+0
+'#--------------------FN_DYNVARS_004_03-------------------------#'
+SET @@global.log_slow_queries = 2;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '2'
+SET @@global.log_slow_queries = -1;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '-1'
+SET @@global.log_slow_queries = TRUEF;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUEF'
+SET @@global.log_slow_queries = TRUE_F;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUE_F'
+SET @@global.log_slow_queries = FALSE0;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'FALSE0'
+SET @@global.log_slow_queries = OON;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OON'
+SET @@global.log_slow_queries = ONN;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'ONN'
+SET @@global.log_slow_queries = OOFF;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OOFF'
+SET @@global.log_slow_queries = 0FF;
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '0FF'
+SET @@global.log_slow_queries = ' ';
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
+SET @@global.log_slow_queries = " ";
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
+SET @@global.log_slow_queries = '';
+ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ''
+'#-------------------FN_DYNVARS_004_04----------------------------#'
+SET @@session.log_slow_queries = OFF;
+ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@session.log_slow_queries;
+ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable
+'#----------------------FN_DYNVARS_004_05------------------------#'
+SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='log_slow_queries';
+IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
+1
+'#---------------------FN_DYNVARS_004_06----------------------#'
+SET @@global.log_slow_queries = 0;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+0
+SET @@global.log_slow_queries = 1;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+1
+'#---------------------FN_DYNVARS_004_07----------------------#'
+SET @@global.log_slow_queries = TRUE;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+1
+SET @@global.log_slow_queries = FALSE;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+0
+'#---------------------FN_DYNVARS_004_08----------------------#'
+SET @@global.log_slow_queries = ON;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@log_slow_queries = @@global.log_slow_queries;
+@@log_slow_queries = @@global.log_slow_queries
+1
+'#---------------------FN_DYNVARS_004_09----------------------#'
+SET log_slow_queries = ON;
+ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
+SET local.log_slow_queries = OFF;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'log_slow_queries = OFF' at line 1
+SELECT local.log_slow_queries;
+ERROR 42S02: Unknown table 'local' in field list
+SET global.log_slow_queries = ON;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'log_slow_queries = ON' at line 1
+SELECT global.log_slow_queries;
+ERROR 42S02: Unknown table 'global' in field list
+SELECT log_slow_queries = @@session.log_slow_queries;
+ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
+SET @@global.log_slow_queries = @start_value;
+Warnings:
+Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
+SELECT @@global.log_slow_queries;
+@@global.log_slow_queries
+1
diff --git a/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result b/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
index 92b0f4e5e91..fee7f8966ca 100644
--- a/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/log_warnings_basic_32.result
@@ -81,8 +81,8 @@ Warning 1292 Truncated incorrect log_warnings value: '-1024'
SELECT @@global.log_warnings;
@@global.log_warnings
0
-SET @@global.log_warnings = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.log_warnings = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'log_warnings'
SELECT @@global.log_warnings;
@@global.log_warnings
0
@@ -103,9 +103,8 @@ Warning 1292 Truncated incorrect log_warnings value: '-2'
SELECT @@session.log_warnings;
@@session.log_warnings
0
-SET @@session.log_warnings = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+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;
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
index 6a94881dad0..838fdff269b 100644
--- a/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/log_warnings_basic_64.result
@@ -79,8 +79,8 @@ Warning 1292 Truncated incorrect log_warnings value: '-1024'
SELECT @@global.log_warnings;
@@global.log_warnings
0
-SET @@global.log_warnings = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.log_warnings = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'log_warnings'
SELECT @@global.log_warnings;
@@global.log_warnings
0
@@ -99,9 +99,8 @@ Warning 1292 Truncated incorrect log_warnings value: '-2'
SELECT @@session.log_warnings;
@@session.log_warnings
0
-SET @@session.log_warnings = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+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;
diff --git a/mysql-test/suite/sys_vars/r/long_query_time_basic.result b/mysql-test/suite/sys_vars/r/long_query_time_basic.result
index b44500dc1e2..9dfa621ae6f 100644
--- a/mysql-test/suite/sys_vars/r/long_query_time_basic.result
+++ b/mysql-test/suite/sys_vars/r/long_query_time_basic.result
@@ -70,39 +70,47 @@ SELECT @@session.long_query_time;
65550.000000
'#------------------FN_DYNVARS_068_05-----------------------#'
SET @@global.long_query_time = 100000000000;
+Warnings:
+Warning 1292 Truncated incorrect long_query_time value: '1e+11'
SELECT @@global.long_query_time;
@@global.long_query_time
31536000.000000
SET @@global.long_query_time = -1;
+Warnings:
+Warning 1292 Truncated incorrect long_query_time value: '-1'
SELECT @@global.long_query_time;
@@global.long_query_time
0.000000
-SET @@global.long_query_time = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.long_query_time = 65530.34;
SELECT @@global.long_query_time;
@@global.long_query_time
-0.000000
+65530.340000
SET @@global.long_query_time = test;
ERROR 42000: Incorrect argument type to variable 'long_query_time'
SELECT @@global.long_query_time;
@@global.long_query_time
-0.000000
+65530.340000
SET @@session.long_query_time = 100000000000;
+Warnings:
+Warning 1292 Truncated incorrect long_query_time value: '1e+11'
SELECT @@session.long_query_time;
@@session.long_query_time
31536000.000000
SET @@session.long_query_time = -2;
+Warnings:
+Warning 1292 Truncated incorrect long_query_time value: '-2'
SELECT @@session.long_query_time;
@@session.long_query_time
0.000000
-SET @@session.long_query_time = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+SET @@session.long_query_time = 65530.34;
+SELECT @@session.long_query_time;
+@@session.long_query_time
+65530.340000
SET @@session.long_query_time = test;
ERROR 42000: Incorrect argument type to variable 'long_query_time'
SELECT @@session.long_query_time;
@@session.long_query_time
-0.000000
+65530.340000
'#------------------FN_DYNVARS_068_06-----------------------#'
SELECT @@global.long_query_time = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/low_priority_updates_basic.result b/mysql-test/suite/sys_vars/r/low_priority_updates_basic.result
index d41e4cfc56f..633dc274dec 100644
--- a/mysql-test/suite/sys_vars/r/low_priority_updates_basic.result
+++ b/mysql-test/suite/sys_vars/r/low_priority_updates_basic.result
@@ -94,7 +94,7 @@ ERROR 42000: Variable 'low_priority_updates' can't be set to the value of '-1024
SET @@global.low_priority_updates = 65536;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of '65536'
SET @@global.low_priority_updates = 65530.34;
-ERROR 42000: Variable 'low_priority_updates' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'low_priority_updates'
SET @@global.low_priority_updates = test;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'test'
SET @@session.low_priority_updates = ONN;
@@ -102,19 +102,15 @@ ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'ONN'
SET @@session.low_priority_updates = ONF;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'ONF'
SET @@session.low_priority_updates = OF;
-SELECT @@session.low_priority_updates;
-@@session.low_priority_updates
-0
-'Bug# 34828: OF is also working as OFF and no error is coming';
+ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'OF'
SET @@session.low_priority_updates = 'OFN';
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'OFN'
SET @@session.low_priority_updates = -2;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of '-2'
-SET @@session.low_priority_updates = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.low_priority_updates = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'low_priority_updates'
SET @@session.low_priority_updates = 65550;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of '65550'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.low_priority_updates = test;
ERROR 42000: Variable 'low_priority_updates' can't be set to the value of 'test'
'#------------------FN_DYNVARS_069_06-----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result b/mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result
new file mode 100644
index 00000000000..0488ed30dc0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result
@@ -0,0 +1,21 @@
+select @@global.lower_case_file_system=2;
+@@global.lower_case_file_system=2
+0
+select @@session.lower_case_file_system;
+ERROR HY000: Variable 'lower_case_file_system' is a GLOBAL variable
+show global variables like 'lower_case_file_system';
+Variable_name Value
+lower_case_file_system #
+show session variables like 'lower_case_file_system';
+Variable_name Value
+lower_case_file_system #
+select * from information_schema.global_variables where variable_name='lower_case_file_system';
+VARIABLE_NAME VARIABLE_VALUE
+LOWER_CASE_FILE_SYSTEM #
+select * from information_schema.session_variables where variable_name='lower_case_file_system';
+VARIABLE_NAME VARIABLE_VALUE
+LOWER_CASE_FILE_SYSTEM #
+set global lower_case_file_system=1;
+ERROR HY000: Variable 'lower_case_file_system' is a read only variable
+set session lower_case_file_system=1;
+ERROR HY000: Variable 'lower_case_file_system' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result b/mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result
new file mode 100644
index 00000000000..d7dc6d69e30
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result
@@ -0,0 +1,21 @@
+select @@global.lower_case_table_names=20;
+@@global.lower_case_table_names=20
+0
+select @@session.lower_case_table_names;
+ERROR HY000: Variable 'lower_case_table_names' is a GLOBAL variable
+show global variables like 'lower_case_table_names';
+Variable_name Value
+lower_case_table_names #
+show session variables like 'lower_case_table_names';
+Variable_name Value
+lower_case_table_names #
+select * from information_schema.global_variables where variable_name='lower_case_table_names';
+VARIABLE_NAME VARIABLE_VALUE
+LOWER_CASE_TABLE_NAMES #
+select * from information_schema.session_variables where variable_name='lower_case_table_names';
+VARIABLE_NAME VARIABLE_VALUE
+LOWER_CASE_TABLE_NAMES #
+set global lower_case_table_names=1;
+ERROR HY000: Variable 'lower_case_table_names' is a read only variable
+set session lower_case_table_names=1;
+ERROR HY000: Variable 'lower_case_table_names' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
index ca5b87f19cb..32048a7cfb0 100644
--- a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result
@@ -14,7 +14,7 @@ SELECT @@global.max_allowed_packet;
SET @@session.max_allowed_packet = 20000;
ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
SET @@session.max_allowed_packet = DEFAULT;
-ERROR 42000: Variable 'max_allowed_packet' doesn't have a default value
+ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
SELECT @@session.max_allowed_packet;
@@session.max_allowed_packet
1048576
@@ -29,15 +29,18 @@ SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1024
SET @@global.max_allowed_packet = 1025;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '1025'
SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1024
-: 'Bug# 34841: "Invalid values are coming in variable on assigning valid value';
SET @@global.max_allowed_packet = 1073741824;
SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1073741824
SET @@global.max_allowed_packet = 1073741823;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '1073741823'
SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1073740800
@@ -92,8 +95,8 @@ Warning 1292 Truncated incorrect max_allowed_packet value: '10737418241'
SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1073741824
-SET @@global.max_allowed_packet = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_allowed_packet = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_allowed_packet'
SELECT @@global.max_allowed_packet;
@@global.max_allowed_packet
1073741824
@@ -117,14 +120,13 @@ ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL
SELECT @@session.max_allowed_packet;
@@session.max_allowed_packet
1048576
-SET @@session.max_allowed_packet = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_allowed_packet = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_allowed_packet'
SET @@session.max_allowed_packet = 10737418241;
ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
SELECT @@session.max_allowed_packet;
@@session.max_allowed_packet
1048576
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.max_allowed_packet = test;
ERROR 42000: Incorrect argument type to variable 'max_allowed_packet'
SELECT @@session.max_allowed_packet;
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_32.result b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result
index 1b3b65010b2..d760474affd 100644
--- a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result
@@ -1,41 +1,49 @@
SET @start_value = @@global.max_binlog_cache_size;
SELECT @start_value;
@start_value
-4294963200
+18446744073709547520
'#--------------------FN_DYNVARS_072_01------------------------#'
SET @@global.max_binlog_cache_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '5000'
SET @@global.max_binlog_cache_size = DEFAULT;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
-4294963200
+18446744073709547520
'#---------------------FN_DYNVARS_072_02-------------------------#'
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size = 4294967295;
@@global.max_binlog_cache_size = 4294967295
0
-'Bug# 34876: Incorrect Default Value is assigned to variable';
'#--------------------FN_DYNVARS_072_03------------------------#'
SET @@global.max_binlog_cache_size = 4096;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
SET @@global.max_binlog_cache_size = 4294967295;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '4294967295'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4294963200
SET @@global.max_binlog_cache_size = 4294967294;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '4294967294'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4294963200
SET @@global.max_binlog_cache_size = 4097;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '4097'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
SET @@global.max_binlog_cache_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '65535'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
61440
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_072_04-------------------------#'
SET @@global.max_binlog_cache_size = -1;
Warnings:
@@ -48,12 +56,12 @@ Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '100000000000'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
-4294963200
+99999997952
SET @@global.max_binlog_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
-4294963200
+99999997952
SET @@global.max_binlog_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1024'
@@ -67,18 +75,15 @@ SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
SET @@global.max_binlog_cache_size = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '4294967296'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
-4294963200
+4294967296
SET @@global.max_binlog_cache_size = 4095;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '4095'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4096
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_binlog_cache_size = ON;
ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
SELECT @@global.max_binlog_cache_size;
@@ -120,6 +125,8 @@ SELECT @@global.max_binlog_cache_size;
4096
'#---------------------FN_DYNVARS_072_08----------------------#'
SET @@global.max_binlog_cache_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '5000'
SELECT @@max_binlog_cache_size = @@global.max_binlog_cache_size;
@@max_binlog_cache_size = @@global.max_binlog_cache_size
1
@@ -142,4 +149,4 @@ ERROR 42S22: Unknown column 'max_binlog_cache_size' in 'field list'
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
-4294963200
+18446744073709547520
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
deleted file mode 100644
index 10a42f6ab0e..00000000000
--- a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic_64.result
+++ /dev/null
@@ -1,141 +0,0 @@
-SET @start_value = @@global.max_binlog_cache_size;
-SELECT @start_value;
-@start_value
-18446744073709547520
-'#--------------------FN_DYNVARS_072_01------------------------#'
-SET @@global.max_binlog_cache_size = 5000;
-SET @@global.max_binlog_cache_size = DEFAULT;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-18446744073709547520
-'#---------------------FN_DYNVARS_072_02-------------------------#'
-SET @@global.max_binlog_cache_size = @start_value;
-SELECT @@global.max_binlog_cache_size = 4294967295;
-@@global.max_binlog_cache_size = 4294967295
-0
-'Bug# 34876: Incorrect Default Value is assigned to variable';
-'#--------------------FN_DYNVARS_072_03------------------------#'
-SET @@global.max_binlog_cache_size = 4096;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 4294967295;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4294963200
-SET @@global.max_binlog_cache_size = 4294967294;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4294963200
-SET @@global.max_binlog_cache_size = 4097;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 65535;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-61440
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-'#--------------------FN_DYNVARS_072_04-------------------------#'
-SET @@global.max_binlog_cache_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 100000000000;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-99999997952
-SET @@global.max_binlog_cache_size = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-99999997952
-SET @@global.max_binlog_cache_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1024'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 1024;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '1024'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 4294967296;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4294967296
-SET @@global.max_binlog_cache_size = 4095;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '4095'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@global.max_binlog_cache_size = ON;
-ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-'#-------------------FN_DYNVARS_072_05----------------------------#'
-SET @@session.max_binlog_cache_size = 4096;
-ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.max_binlog_cache_size;
-ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable
-'#----------------------FN_DYNVARS_072_06------------------------#'
-SELECT @@global.max_binlog_cache_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_binlog_cache_size';
-@@global.max_binlog_cache_size = VARIABLE_VALUE
-1
-SELECT @@max_binlog_cache_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_binlog_cache_size';
-@@max_binlog_cache_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_072_07----------------------#'
-SET @@global.max_binlog_cache_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '1'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-SET @@global.max_binlog_cache_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_binlog_cache_size value: '0'
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-4096
-'#---------------------FN_DYNVARS_072_08----------------------#'
-SET @@global.max_binlog_cache_size = 5000;
-SELECT @@max_binlog_cache_size = @@global.max_binlog_cache_size;
-@@max_binlog_cache_size = @@global.max_binlog_cache_size
-1
-'#---------------------FN_DYNVARS_072_09----------------------#'
-SET max_binlog_cache_size = 6000;
-ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@max_binlog_cache_size;
-@@max_binlog_cache_size
-4096
-SET local.max_binlog_cache_size = 7000;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'max_binlog_cache_size = 7000' at line 1
-SELECT local.max_binlog_cache_size;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.max_binlog_cache_size = 8000;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'max_binlog_cache_size = 8000' at line 1
-SELECT global.max_binlog_cache_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT max_binlog_cache_size = @@session.max_binlog_cache_size;
-ERROR 42S22: Unknown column 'max_binlog_cache_size' in 'field list'
-SET @@global.max_binlog_cache_size = @start_value;
-SELECT @@global.max_binlog_cache_size;
-@@global.max_binlog_cache_size
-18446744073709547520
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_size_basic.result b/mysql-test/suite/sys_vars/r/max_binlog_size_basic.result
index 658289628b0..33f5495a011 100644
--- a/mysql-test/suite/sys_vars/r/max_binlog_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_binlog_size_basic.result
@@ -4,11 +4,12 @@ SELECT @start_value;
1073741824
'#--------------------FN_DYNVARS_072_01------------------------#'
SET @@global.max_binlog_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '5000'
SET @@global.max_binlog_size = DEFAULT;
SELECT @@global.max_binlog_size;
@@global.max_binlog_size
1073741824
-'Bug# 34878: This variable has invalid default value as compared to documentation';
'#---------------------FN_DYNVARS_072_02-------------------------#'
SET @@global.max_binlog_size = @start_value;
SELECT @@global.max_binlog_size = 1073741824;
@@ -24,18 +25,23 @@ SELECT @@global.max_binlog_size;
@@global.max_binlog_size
1073741824
SET @@global.max_binlog_size = 1073741823;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '1073741823'
SELECT @@global.max_binlog_size;
@@global.max_binlog_size
1073737728
SET @@global.max_binlog_size = 4097;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '4097'
SELECT @@global.max_binlog_size;
@@global.max_binlog_size
4096
SET @@global.max_binlog_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '65535'
SELECT @@global.max_binlog_size;
@@global.max_binlog_size
61440
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_072_04-------------------------#'
SET @@global.max_binlog_size = -1;
Warnings:
@@ -78,7 +84,6 @@ Warning 1292 Truncated incorrect max_binlog_size value: '4095'
SELECT @@global.max_binlog_size;
@@global.max_binlog_size
4096
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_binlog_size = ON;
ERROR 42000: Incorrect argument type to variable 'max_binlog_size'
SELECT @@global.max_binlog_size;
@@ -120,6 +125,8 @@ SELECT @@global.max_binlog_size;
4096
'#---------------------FN_DYNVARS_072_08----------------------#'
SET @@global.max_binlog_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '5000'
SELECT @@max_binlog_size = @@global.max_binlog_size;
@@max_binlog_size = @@global.max_binlog_size
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_32.result
index 42e64f1b418..19f6f12a50b 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_32.result
@@ -8,7 +8,6 @@ SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
10
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10;
@@ -35,7 +34,6 @@ SET @@global.max_connect_errors = 2;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
2
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_073_04-------------------------#'
SET @@global.max_connect_errors = -1;
Warnings:
@@ -72,7 +70,6 @@ Warning 1292 Truncated incorrect max_connect_errors value: '4294967296'
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_connect_errors = ON;
ERROR 42000: Incorrect argument type to variable 'max_connect_errors'
SELECT @@global.max_connect_errors;
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
index 762cfd14a3a..bbc117b65b6 100644
--- 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
@@ -8,7 +8,6 @@ SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
10
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10;
@@ -35,7 +34,6 @@ SET @@global.max_connect_errors = 2;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
2
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_073_04-------------------------#'
SET @@global.max_connect_errors = -1;
Warnings:
@@ -68,7 +66,6 @@ SET @@global.max_connect_errors = 4294967296;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
4294967296
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_connect_errors = ON;
ERROR 42000: Incorrect argument type to variable 'max_connect_errors'
SELECT @@global.max_connect_errors;
diff --git a/mysql-test/suite/sys_vars/r/max_connections_basic.result b/mysql-test/suite/sys_vars/r/max_connections_basic.result
index d917cd97b25..eac35f3bf2b 100644
--- a/mysql-test/suite/sys_vars/r/max_connections_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_connections_basic.result
@@ -8,7 +8,6 @@ SET @@global.max_connections = DEFAULT;
SELECT @@global.max_connections;
@@global.max_connections
151
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#---------------------FN_DYNVARS_074_02-------------------------#'
SET @@global.max_connections = @start_value;
SELECT @@global.max_connections = 151;
@@ -35,7 +34,6 @@ SET @@global.max_connections = 2;
SELECT @@global.max_connections;
@@global.max_connections
2
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_074_04-------------------------#'
SET @@global.max_connections = -1;
Warnings:
@@ -72,7 +70,6 @@ Warning 1292 Truncated incorrect max_connections value: '100001'
SELECT @@global.max_connections;
@@global.max_connections
100000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_connections = ON;
ERROR 42000: Incorrect argument type to variable 'max_connections'
SELECT @@global.max_connections;
diff --git a/mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result b/mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result
index 946c24e3082..a78ac90107f 100644
--- a/mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_delayed_threads_basic.result
@@ -14,7 +14,6 @@ SELECT @@global.max_delayed_threads;
20
SET @@session.max_delayed_threads = 1000;
ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '1000'
-'Bug# 34882: Valid values are not allowed to assign in this variable';
SET @@session.max_delayed_threads = DEFAULT;
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
@@ -37,7 +36,6 @@ SET @@global.max_delayed_threads = 1025;
SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
1025
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.max_delayed_threads = 0;
SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
@@ -93,8 +91,8 @@ Warning 1292 Truncated incorrect max_delayed_threads value: '16385'
SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
16384
-SET @@global.max_delayed_threads = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_delayed_threads = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_delayed_threads'
SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
16384
@@ -104,32 +102,36 @@ SELECT @@global.max_delayed_threads;
@@global.max_delayed_threads
16384
SET @@session.max_delayed_threads = 16385;
-ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '16385'
+Warnings:
+Warning 1292 Truncated incorrect max_delayed_threads value: '16385'
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
-16383
+16384
SET @@session.max_delayed_threads = -1;
-ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '-1'
+Warnings:
+Warning 1292 Truncated incorrect max_delayed_threads value: '-1'
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
-16383
+0
SET @@session.max_delayed_threads = -2;
-ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '-2'
+Warnings:
+Warning 1292 Truncated incorrect max_delayed_threads value: '-2'
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
-16383
-SET @@session.max_delayed_threads = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+0
+SET @@session.max_delayed_threads = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_delayed_threads'
SET @@session.max_delayed_threads = 10737418241;
-ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '10737418241'
+Warnings:
+Warning 1292 Truncated incorrect max_delayed_threads value: '10737418241'
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
-16383
+16384
SET @@session.max_delayed_threads = test;
ERROR 42000: Incorrect argument type to variable 'max_delayed_threads'
SELECT @@session.max_delayed_threads;
@@session.max_delayed_threads
-16383
+16384
'#------------------FN_DYNVARS_075_06-----------------------#'
SELECT @@global.max_delayed_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -170,7 +172,7 @@ SET max_delayed_threads = 1024;
ERROR 42000: Variable 'max_delayed_threads' can't be set to the value of '1024'
SELECT @@max_delayed_threads;
@@max_delayed_threads
-16383
+16384
SELECT local.max_delayed_threads;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.max_delayed_threads;
diff --git a/mysql-test/suite/sys_vars/r/max_error_count_basic.result b/mysql-test/suite/sys_vars/r/max_error_count_basic.result
index 7be8e0f37a3..980789b09be 100644
--- a/mysql-test/suite/sys_vars/r/max_error_count_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_error_count_basic.result
@@ -35,7 +35,6 @@ SET @@global.max_error_count = 0;
SELECT @@global.max_error_count;
@@global.max_error_count
0
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.max_error_count = 65535;
SELECT @@global.max_error_count;
@@global.max_error_count
@@ -86,8 +85,8 @@ Warning 1292 Truncated incorrect max_error_count value: '10737418241'
SELECT @@global.max_error_count;
@@global.max_error_count
65535
-SET @@global.max_error_count = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_error_count = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_error_count'
SELECT @@global.max_error_count;
@@global.max_error_count
65535
@@ -113,14 +112,13 @@ Warning 1292 Truncated incorrect max_error_count value: '-2'
SELECT @@session.max_error_count;
@@session.max_error_count
0
-SET @@session.max_error_count = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_error_count = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_error_count'
SET @@session.max_error_count = 10737418241;
Warnings:
SELECT @@session.max_error_count;
@@session.max_error_count
65535
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.max_error_count = test;
ERROR 42000: Incorrect argument type to variable 'max_error_count'
SELECT @@session.max_error_count;
diff --git a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_32.result b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result
index deedb9ae43c..2c6d86d49f3 100644
--- a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic.result
@@ -8,11 +8,15 @@ SELECT @start_session_value;
1048576
'#--------------------FN_DYNVARS_077_01-------------------------#'
SET @@global.max_heap_table_size = 1677721610;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '1677721610'
SET @@global.max_heap_table_size = DEFAULT;
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16777216
SET @@session.max_heap_table_size = 1677721610;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '1677721610'
SET @@session.max_heap_table_size = DEFAULT;
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
@@ -32,10 +36,14 @@ SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
SET @@global.max_heap_table_size = 16385;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '16385'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
SET @@global.max_heap_table_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '65535'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
64512
@@ -51,17 +59,20 @@ Warning 1292 Truncated incorrect max_heap_table_size value: '4294967295'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_077_04-------------------------#'
SET @@session.max_heap_table_size = 16384;
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
16384
SET @@session.max_heap_table_size = 16385;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '16385'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
16384
SET @@session.max_heap_table_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '65535'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
64512
@@ -77,7 +88,6 @@ Warning 1292 Truncated incorrect max_heap_table_size value: '4294967295'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------FN_DYNVARS_077_05-----------------------#'
SET @@global.max_heap_table_size = -1;
Warnings:
@@ -104,21 +114,19 @@ SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
16384
SET @@global.max_heap_table_size = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '4294967296'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
-4294966272
-SET @@global.max_heap_table_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+4294967296
+SET @@global.max_heap_table_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
-4294966272
+4294967296
SET @@global.max_heap_table_size = test;
ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
SELECT @@global.max_heap_table_size;
@@global.max_heap_table_size
-4294966272
+4294967296
SET @@session.max_heap_table_size = -1;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '-1'
@@ -132,25 +140,22 @@ SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
16384
SET @@session.max_heap_table_size = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '4294967296'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
-4294966272
-SET @@session.max_heap_table_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+4294967296
+SET @@session.max_heap_table_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
SET @@session.max_heap_table_size = 10737418241;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '10737418241'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
-4294966272
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+10737418240
SET @@session.max_heap_table_size = test;
ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
SELECT @@session.max_heap_table_size;
@@session.max_heap_table_size
-4294966272
+10737418240
'#------------------FN_DYNVARS_077_06-----------------------#'
SELECT @@global.max_heap_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -178,6 +183,8 @@ SELECT @@global.max_heap_table_size;
16384
'#---------------------FN_DYNVARS_077_09----------------------#'
SET @@global.max_heap_table_size = 163845;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '163845'
SELECT @@max_heap_table_size = @@global.max_heap_table_size;
@@max_heap_table_size = @@global.max_heap_table_size
0
@@ -191,6 +198,8 @@ SELECT @@local.max_heap_table_size = @@session.max_heap_table_size;
1
'#---------------------FN_DYNVARS_077_11----------------------#'
SET max_heap_table_size = 316777216;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '316777216'
SELECT @@max_heap_table_size;
@@max_heap_table_size
316776448
diff --git a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result b/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
deleted file mode 100644
index 6642b6024b5..00000000000
--- a/mysql-test/suite/sys_vars/r/max_heap_table_size_basic_64.result
+++ /dev/null
@@ -1,196 +0,0 @@
-SET @start_global_value = @@global.max_heap_table_size;
-SELECT @start_global_value;
-@start_global_value
-1048576
-SET @start_session_value = @@session.max_heap_table_size;
-SELECT @start_session_value;
-@start_session_value
-1048576
-'#--------------------FN_DYNVARS_077_01-------------------------#'
-SET @@global.max_heap_table_size = 1677721610;
-SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16777216
-SET @@session.max_heap_table_size = 1677721610;
-SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16777216
-'#--------------------FN_DYNVARS_077_02-------------------------#'
-SET @@global.max_heap_table_size = DEFAULT;
-SELECT @@global.max_heap_table_size = 16777216;
-@@global.max_heap_table_size = 16777216
-1
-SET @@session.max_heap_table_size = DEFAULT;
-SELECT @@session.max_heap_table_size = 16777216;
-@@session.max_heap_table_size = 16777216
-1
-'#--------------------FN_DYNVARS_077_03-------------------------#'
-SET @@global.max_heap_table_size = 16384;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = 16385;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = 65535;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-64512
-SET @@global.max_heap_table_size = 4294967294;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-4294966272
-SET @@global.max_heap_table_size = 4294967295;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-'#--------------------FN_DYNVARS_077_04-------------------------#'
-SET @@session.max_heap_table_size = 16384;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16384
-SET @@session.max_heap_table_size = 16385;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16384
-SET @@session.max_heap_table_size = 65535;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-64512
-SET @@session.max_heap_table_size = 4294967294;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-4294966272
-SET @@session.max_heap_table_size = 4294967295;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-'#------------------FN_DYNVARS_077_05-----------------------#'
-SET @@global.max_heap_table_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '-1'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '-1024'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = 1024;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '1024'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = 16383;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '16383'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = 4294967296;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-4294967296
-SET @@global.max_heap_table_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-4294967296
-SET @@global.max_heap_table_size = test;
-ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-4294967296
-SET @@session.max_heap_table_size = -1;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '-1'
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16384
-SET @@session.max_heap_table_size = 16383;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '16383'
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-16384
-SET @@session.max_heap_table_size = 4294967296;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-4294967296
-SET @@session.max_heap_table_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SET @@session.max_heap_table_size = 10737418241;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-10737418240
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@session.max_heap_table_size = test;
-ERROR 42000: Incorrect argument type to variable 'max_heap_table_size'
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-10737418240
-'#------------------FN_DYNVARS_077_06-----------------------#'
-SELECT @@global.max_heap_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_heap_table_size';
-@@global.max_heap_table_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_077_07-----------------------#'
-SELECT @@session.max_heap_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='max_heap_table_size';
-@@session.max_heap_table_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_077_08-----------------------#'
-SET @@global.max_heap_table_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '1'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-SET @@global.max_heap_table_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect max_heap_table_size value: '0'
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-16384
-'#---------------------FN_DYNVARS_077_09----------------------#'
-SET @@global.max_heap_table_size = 163845;
-SELECT @@max_heap_table_size = @@global.max_heap_table_size;
-@@max_heap_table_size = @@global.max_heap_table_size
-0
-'#---------------------FN_DYNVARS_077_10----------------------#'
-SET @@max_heap_table_size = 16777216;
-SELECT @@max_heap_table_size = @@local.max_heap_table_size;
-@@max_heap_table_size = @@local.max_heap_table_size
-1
-SELECT @@local.max_heap_table_size = @@session.max_heap_table_size;
-@@local.max_heap_table_size = @@session.max_heap_table_size
-1
-'#---------------------FN_DYNVARS_077_11----------------------#'
-SET max_heap_table_size = 316777216;
-SELECT @@max_heap_table_size;
-@@max_heap_table_size
-316776448
-SELECT local.max_heap_table_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.max_heap_table_size;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT max_heap_table_size = @@session.max_heap_table_size;
-ERROR 42S22: Unknown column 'max_heap_table_size' in 'field list'
-SET @@global.max_heap_table_size = @start_global_value;
-SELECT @@global.max_heap_table_size;
-@@global.max_heap_table_size
-1048576
-SET @@session.max_heap_table_size = @start_session_value;
-SELECT @@session.max_heap_table_size;
-@@session.max_heap_table_size
-1048576
diff --git a/mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result b/mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result
index 2f2f7f0c0fc..aa79a5a7b9d 100644
--- a/mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_insert_delayed_threads_basic.result
@@ -6,30 +6,28 @@ SET @start_session_value = @@session.max_insert_delayed_threads;
SELECT @start_session_value;
@start_session_value
20
-'#--------------------FN_DYNVARS_078_01-------------------------#'
+'#--------------------FN_DYNVARS_075_01-------------------------#'
SET @@global.max_insert_delayed_threads = 1000;
SET @@global.max_insert_delayed_threads = DEFAULT;
-ERROR 42000: Variable 'max_insert_delayed_threads' doesn't have a default value
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
-1000
+20
SET @@session.max_insert_delayed_threads = 1000;
+ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '1000'
SET @@session.max_insert_delayed_threads = DEFAULT;
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-1000
-'#--------------------FN_DYNVARS_078_02-------------------------#'
+20
+'#--------------------FN_DYNVARS_075_02-------------------------#'
SET @@global.max_insert_delayed_threads = DEFAULT;
-ERROR 42000: Variable 'max_insert_delayed_threads' doesn't have a default value
SELECT @@global.max_insert_delayed_threads = 20;
@@global.max_insert_delayed_threads = 20
-0
+1
SET @@session.max_insert_delayed_threads = DEFAULT;
SELECT @@session.max_insert_delayed_threads = 20;
@@session.max_insert_delayed_threads = 20
-0
-'Bug# 34876: This variable has invalid default value as compared to documentation';
-'#--------------------FN_DYNVARS_078_03-------------------------#'
+1
+'#--------------------FN_DYNVARS_075_03-------------------------#'
SET @@global.max_insert_delayed_threads = 1;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
@@ -38,7 +36,6 @@ SET @@global.max_insert_delayed_threads = 1025;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
1025
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.max_insert_delayed_threads = 0;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
@@ -51,17 +48,17 @@ SET @@global.max_insert_delayed_threads = 16383;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
16383
-'#--------------------FN_DYNVARS_078_04-------------------------#'
+'#--------------------FN_DYNVARS_075_04-------------------------#'
SET @@session.max_insert_delayed_threads = 1;
ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '1'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-1000
+20
SET @@session.max_insert_delayed_threads = 1025;
ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '1025'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-1000
+20
SET @@session.max_insert_delayed_threads = 0;
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
@@ -75,7 +72,7 @@ SET @@session.max_insert_delayed_threads = 16383;
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
16383
-'#------------------FN_DYNVARS_078_05-----------------------#'
+'#------------------FN_DYNVARS_075_05-----------------------#'
SET @@global.max_insert_delayed_threads = -1024;
Warnings:
Warning 1292 Truncated incorrect max_insert_delayed_threads value: '-1024'
@@ -94,8 +91,8 @@ Warning 1292 Truncated incorrect max_insert_delayed_threads value: '16385'
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
16384
-SET @@global.max_insert_delayed_threads = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_insert_delayed_threads = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_insert_delayed_threads'
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
16384
@@ -105,45 +102,49 @@ SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
16384
SET @@session.max_insert_delayed_threads = 16385;
-ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '16385'
+Warnings:
+Warning 1292 Truncated incorrect max_insert_delayed_threads value: '16385'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-16383
+16384
SET @@session.max_insert_delayed_threads = -1;
-ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '-1'
+Warnings:
+Warning 1292 Truncated incorrect max_insert_delayed_threads value: '-1'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-16383
+0
SET @@session.max_insert_delayed_threads = -2;
-ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '-2'
+Warnings:
+Warning 1292 Truncated incorrect max_insert_delayed_threads value: '-2'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-16383
-SET @@session.max_insert_delayed_threads = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+0
+SET @@session.max_insert_delayed_threads = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_insert_delayed_threads'
SET @@session.max_insert_delayed_threads = 10737418241;
-ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '10737418241'
+Warnings:
+Warning 1292 Truncated incorrect max_insert_delayed_threads value: '10737418241'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-16383
+16384
SET @@session.max_insert_delayed_threads = test;
ERROR 42000: Incorrect argument type to variable 'max_insert_delayed_threads'
SELECT @@session.max_insert_delayed_threads;
@@session.max_insert_delayed_threads
-16383
-'#------------------FN_DYNVARS_078_06-----------------------#'
+16384
+'#------------------FN_DYNVARS_075_06-----------------------#'
SELECT @@global.max_insert_delayed_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_insert_delayed_threads';
@@global.max_insert_delayed_threads = VARIABLE_VALUE
1
-'#------------------FN_DYNVARS_078_07-----------------------#'
+'#------------------FN_DYNVARS_075_07-----------------------#'
SELECT @@session.max_insert_delayed_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_insert_delayed_threads';
@@session.max_insert_delayed_threads = VARIABLE_VALUE
1
-'#------------------FN_DYNVARS_078_08-----------------------#'
+'#------------------FN_DYNVARS_075_08-----------------------#'
SET @@global.max_insert_delayed_threads = TRUE;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
@@ -152,12 +153,12 @@ SET @@global.max_insert_delayed_threads = FALSE;
SELECT @@global.max_insert_delayed_threads;
@@global.max_insert_delayed_threads
0
-'#---------------------FN_DYNVARS_078_09----------------------#'
+'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.max_insert_delayed_threads = 2048;
SELECT @@max_insert_delayed_threads = @@global.max_insert_delayed_threads;
@@max_insert_delayed_threads = @@global.max_insert_delayed_threads
0
-'#---------------------FN_DYNVARS_078_10----------------------#'
+'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@max_insert_delayed_threads = 100000;
ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '100000'
SELECT @@max_insert_delayed_threads = @@local.max_insert_delayed_threads;
@@ -166,12 +167,12 @@ SELECT @@max_insert_delayed_threads = @@local.max_insert_delayed_threads;
SELECT @@local.max_insert_delayed_threads = @@session.max_insert_delayed_threads;
@@local.max_insert_delayed_threads = @@session.max_insert_delayed_threads
1
-'#---------------------FN_DYNVARS_078_11----------------------#'
+'#---------------------FN_DYNVARS_001_11----------------------#'
SET max_insert_delayed_threads = 1024;
ERROR 42000: Variable 'max_insert_delayed_threads' can't be set to the value of '1024'
SELECT @@max_insert_delayed_threads;
@@max_insert_delayed_threads
-16383
+16384
SELECT local.max_insert_delayed_threads;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.max_insert_delayed_threads;
diff --git a/mysql-test/suite/sys_vars/r/max_join_size_basic.result b/mysql-test/suite/sys_vars/r/max_join_size_basic.result
new file mode 100644
index 00000000000..5cebefe9ea3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_join_size_basic.result
@@ -0,0 +1,51 @@
+SET @start_global_value = @@global.max_join_size;
+SELECT @start_global_value;
+@start_global_value
+18446744073709551615
+select @@global.max_join_size;
+@@global.max_join_size
+18446744073709551615
+select @@session.max_join_size;
+@@session.max_join_size
+18446744073709551615
+show global variables like 'max_join_size';
+Variable_name Value
+max_join_size 18446744073709551615
+show session variables like 'max_join_size';
+Variable_name Value
+max_join_size 18446744073709551615
+select * from information_schema.global_variables where variable_name='max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 18446744073709551615
+select * from information_schema.session_variables where variable_name='max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_JOIN_SIZE 18446744073709551615
+set global max_join_size=10;
+select @@global.max_join_size;
+@@global.max_join_size
+10
+set session max_join_size=20;
+select @@session.max_join_size;
+@@session.max_join_size
+20
+set global max_join_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'max_join_size'
+set global max_join_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'max_join_size'
+set global max_join_size="foo";
+ERROR 42000: Incorrect argument type to variable 'max_join_size'
+select @@sql_big_selects;
+@@sql_big_selects
+0
+set max_join_size=cast(-1 as unsigned int);
+select @@sql_big_selects;
+@@sql_big_selects
+1
+set max_join_size=100;
+select @@sql_big_selects;
+@@sql_big_selects
+0
+SET @@global.max_join_size = @start_global_value;
+SELECT @@global.max_join_size;
+@@global.max_join_size
+18446744073709551615
diff --git a/mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result b/mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result
index 8936946c774..21d6f66f0bc 100644
--- a/mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_length_for_sort_data_basic.result
@@ -93,8 +93,8 @@ Warning 1292 Truncated incorrect max_length_for_sort_data value: '0'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
-SET @@global.max_length_for_sort_data = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_length_for_sort_data = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
@@ -127,8 +127,8 @@ Warning 1292 Truncated incorrect max_length_for_sort_data value: '0'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
4
-SET @@session.max_length_for_sort_data = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_length_for_sort_data = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SET @@session.max_length_for_sort_data = 10737418241;
Warnings:
Warning 1292 Truncated incorrect max_length_for_sort_data value: '10737418241'
diff --git a/mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result b/mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result
index 9c28c287980..adfb9be367b 100644
--- a/mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_prepared_stmt_count_basic.result
@@ -70,7 +70,6 @@ Warning 1292 Truncated incorrect max_prepared_stmt_count value: '104857612'
SELECT @@global.max_prepared_stmt_count;
@@global.max_prepared_stmt_count
1048576
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_prepared_stmt_count = ON;
ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count'
SELECT @@global.max_prepared_stmt_count;
diff --git a/mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result b/mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result
index 168459cf7b6..73d957accc1 100644
--- a/mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result
@@ -4,6 +4,8 @@ SELECT @start_value;
0
'#--------------------FN_DYNVARS_082_01------------------------#'
SET @@global.max_relay_log_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '5000'
SET @@global.max_relay_log_size = DEFAULT;
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
@@ -13,13 +15,14 @@ SET @@global.max_relay_log_size = @start_value;
SELECT @@global.max_relay_log_size = 1024;
@@global.max_relay_log_size = 1024
0
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_082_03------------------------#'
SET @@global.max_relay_log_size = 0;
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
0
SET @@global.max_relay_log_size = 1;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '1'
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
0
@@ -28,14 +31,17 @@ SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
1073741824
SET @@global.max_relay_log_size = 1073741823;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '1073741823'
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
1073737728
SET @@global.max_relay_log_size = 65535;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '65535'
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
61440
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_082_04-------------------------#'
SET @@global.max_relay_log_size = -1;
Warnings:
@@ -72,7 +78,6 @@ Warning 1292 Truncated incorrect max_relay_log_size value: '10737418241'
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
1073741824
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.max_relay_log_size = ON;
ERROR 42000: Incorrect argument type to variable 'max_relay_log_size'
SELECT @@global.max_relay_log_size;
@@ -101,6 +106,8 @@ WHERE VARIABLE_NAME='max_relay_log_size';
1
'#---------------------FN_DYNVARS_082_07----------------------#'
SET @@global.max_relay_log_size = TRUE;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '1'
SELECT @@global.max_relay_log_size;
@@global.max_relay_log_size
0
@@ -110,6 +117,8 @@ SELECT @@global.max_relay_log_size;
0
'#---------------------FN_DYNVARS_082_08----------------------#'
SET @@global.max_relay_log_size = 5000;
+Warnings:
+Warning 1292 Truncated incorrect max_relay_log_size value: '5000'
SELECT @@max_relay_log_size = @@global.max_relay_log_size;
@@max_relay_log_size = @@global.max_relay_log_size
1
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_32.result
index 9a58ad44cff..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_32.result
@@ -87,8 +87,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -109,15 +109,14 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.max_seeks_for_key = test;
ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
SELECT @@session.max_seeks_for_key;
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
index 5b1e076c188..ef48f229abc 100644
--- 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
@@ -85,8 +85,8 @@ SET @@global.max_seeks_for_key = 4294967296;
SELECT @@global.max_seeks_for_key;
@@global.max_seeks_for_key
4294967296
-SET @@global.max_seeks_for_key = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4294967296
@@ -107,13 +107,12 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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;
SELECT @@session.max_seeks_for_key;
@@session.max_seeks_for_key
4294967296
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.max_seeks_for_key = test;
ERROR 42000: Incorrect argument type to variable 'max_seeks_for_key'
SELECT @@session.max_seeks_for_key;
diff --git a/mysql-test/suite/sys_vars/r/max_sort_length_basic.result b/mysql-test/suite/sys_vars/r/max_sort_length_basic.result
index f0a9ca83376..a8876b2c81e 100644
--- a/mysql-test/suite/sys_vars/r/max_sort_length_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_sort_length_basic.result
@@ -93,8 +93,8 @@ Warning 1292 Truncated incorrect max_sort_length value: '0'
SELECT @@global.max_sort_length;
@@global.max_sort_length
4
-SET @@global.max_sort_length = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_sort_length = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_sort_length'
SELECT @@global.max_sort_length;
@@global.max_sort_length
4
@@ -127,8 +127,8 @@ Warning 1292 Truncated incorrect max_sort_length value: '0'
SELECT @@session.max_sort_length;
@@session.max_sort_length
4
-SET @@session.max_sort_length = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_sort_length = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_sort_length'
SET @@session.max_sort_length = 10737418241;
Warnings:
Warning 1292 Truncated incorrect max_sort_length value: '10737418241'
diff --git a/mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result b/mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result
index e5f267253f4..b3d4917fd75 100644
--- a/mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_sp_recursion_depth_basic.result
@@ -97,8 +97,8 @@ Warning 1292 Truncated incorrect max_sp_recursion_depth value: '3000'
SELECT @@global.max_sp_recursion_depth;
@@global.max_sp_recursion_depth
255
-SET @@global.max_sp_recursion_depth = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.max_sp_recursion_depth = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_sp_recursion_depth'
SELECT @@global.max_sp_recursion_depth;
@@global.max_sp_recursion_depth
255
@@ -131,8 +131,8 @@ Warning 1292 Truncated incorrect max_sp_recursion_depth value: '-1'
SELECT @@session.max_sp_recursion_depth;
@@session.max_sp_recursion_depth
0
-SET @@session.max_sp_recursion_depth = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_sp_recursion_depth = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_sp_recursion_depth'
SET @@session.max_sp_recursion_depth = 10737418241;
Warnings:
Warning 1292 Truncated incorrect max_sp_recursion_depth value: '10737418241'
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_32.result
index 1346d24ca47..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_32.result
@@ -93,8 +93,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -127,8 +127,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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'
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
index 808e99b739d..32953d24b2b 100644
--- 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
@@ -89,8 +89,8 @@ SET @@global.max_tmp_tables = 429496729500;
SELECT @@global.max_tmp_tables;
@@global.max_tmp_tables
429496729500
-SET @@global.max_tmp_tables = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
429496729500
@@ -119,8 +119,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.max_tmp_tables = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_tmp_tables'
SET @@session.max_tmp_tables = 10737418241;
SELECT @@session.max_tmp_tables;
@@session.max_tmp_tables
diff --git a/mysql-test/suite/sys_vars/r/max_user_connections_basic.result b/mysql-test/suite/sys_vars/r/max_user_connections_basic.result
index 3250b2f03ea..cc43b631085 100644
--- a/mysql-test/suite/sys_vars/r/max_user_connections_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_user_connections_basic.result
@@ -13,23 +13,17 @@ SELECT @@global.max_user_connections;
@@global.max_user_connections
0
SET @@session.max_user_connections = 1000;
-ERROR HY000: Variable 'max_user_connections' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@session.max_user_connections = DEFAULT;
-ERROR 42000: Variable 'max_user_connections' doesn't have a default value
-SELECT @@session.max_user_connections;
-@@session.max_user_connections
-0
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+ERROR HY000: SESSION variable 'max_user_connections' is read-only. Use SET GLOBAL to assign the value
'#--------------------FN_DYNVARS_087_02-------------------------#'
SET @@global.max_user_connections = DEFAULT;
SELECT @@global.max_user_connections = 0;
@@global.max_user_connections = 0
1
SET @@session.max_user_connections = DEFAULT;
-ERROR 42000: Variable 'max_user_connections' doesn't have a default value
-SELECT @@session.max_user_connections = 0;
-@@session.max_user_connections = 0
-1
+ERROR HY000: SESSION variable 'max_user_connections' is read-only. Use SET GLOBAL to assign the value
+SELECT @@session.max_user_connections;
+@@session.max_user_connections
+0
'#--------------------FN_DYNVARS_087_03-------------------------#'
SET @@global.max_user_connections = 1;
SELECT @@global.max_user_connections;
@@ -53,31 +47,39 @@ SELECT @@global.max_user_connections;
4294967294
'#------------------FN_DYNVARS_087_05-----------------------#'
SET @@global.max_user_connections = -1024;
+Warnings:
+Warning 1292 Truncated incorrect max_user_connections value: '-1024'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-4294966272
+0
SET @@global.max_user_connections = 4294967296;
+Warnings:
+Warning 1292 Truncated incorrect max_user_connections value: '4294967296'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-0
+4294967295
SET @@global.max_user_connections = -1;
+Warnings:
+Warning 1292 Truncated incorrect max_user_connections value: '-1'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-4294967295
+0
SET @@global.max_user_connections = 429496729500;
+Warnings:
+Warning 1292 Truncated incorrect max_user_connections value: '429496729500'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-4294967196
-SET @@global.max_user_connections = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+4294967295
+SET @@global.max_user_connections = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'max_user_connections'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-4294967196
+4294967295
SET @@global.max_user_connections = test;
ERROR 42000: Incorrect argument type to variable 'max_user_connections'
SELECT @@global.max_user_connections;
@@global.max_user_connections
-4294967196
+4294967295
'#------------------FN_DYNVARS_087_06-----------------------#'
SELECT @@global.max_user_connections = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
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_32.result
index 24af37260b7..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_32.result
@@ -59,8 +59,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
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
index 934777e38d3..af675e40e19 100644
--- 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
@@ -55,8 +55,8 @@ SET @@global.max_write_lock_count = 429496729500;
SELECT @@global.max_write_lock_count;
@@global.max_write_lock_count
429496729500
-SET @@global.max_write_lock_count = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
429496729500
diff --git a/mysql-test/suite/sys_vars/r/maximum_basic.result b/mysql-test/suite/sys_vars/r/maximum_basic.result
new file mode 100644
index 00000000000..20b6bbc962e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/maximum_basic.result
@@ -0,0 +1,18 @@
+SET @@session.auto_increment_increment=40960;
+Warnings:
+Warning 1292 Truncated incorrect auto_increment_increment value: '40960'
+SELECT @@session.auto_increment_increment;
+@@session.auto_increment_increment
+8192
+SET @@session.tmp_table_size=40960;
+Warnings:
+Warning 1292 Truncated incorrect tmp_table_size value: '40960'
+SELECT @@session.tmp_table_size;
+@@session.tmp_table_size
+8192
+SET @@session.max_join_size=40960;
+Warnings:
+Warning 1292 Truncated incorrect max_join_size value: '40960'
+SELECT @@session.max_join_size;
+@@session.max_join_size
+8192
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_32.result
index c40640ffa3a..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_32.result
@@ -93,8 +93,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -115,15 +115,14 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.min_examined_row_limit = test;
ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
SELECT @@session.min_examined_row_limit;
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
index 5cf77ed6dc8..30ccfce0175 100644
--- 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
@@ -91,8 +91,8 @@ SET @@global.min_examined_row_limit = 429496729500;
SELECT @@global.min_examined_row_limit;
@@global.min_examined_row_limit
429496729500
-SET @@global.min_examined_row_limit = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
429496729500
@@ -111,13 +111,12 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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;
SELECT @@session.min_examined_row_limit;
@@session.min_examined_row_limit
4294967295021
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.min_examined_row_limit = test;
ERROR 42000: Incorrect argument type to variable 'min_examined_row_limit'
SELECT @@session.min_examined_row_limit;
diff --git a/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result b/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result
index 86f7788fcdf..be5731c83bd 100644
--- a/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_basic.result
@@ -70,8 +70,8 @@ Warning 1292 Truncated incorrect myisam_data_pointer_size value: '4294967296'
SELECT @@global.myisam_data_pointer_size;
@@global.myisam_data_pointer_size
7
-SET @@global.myisam_data_pointer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.myisam_data_pointer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
SELECT @@global.myisam_data_pointer_size;
@@global.myisam_data_pointer_size
7
@@ -80,7 +80,6 @@ ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
SELECT @@global.myisam_data_pointer_size;
@@global.myisam_data_pointer_size
7
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
'#------------------FN_DYNVARS_093_06-----------------------#'
SET @@global.myisam_data_pointer_size = 3;
SELECT @@global.myisam_data_pointer_size = VARIABLE_VALUE
diff --git a/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result b/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result
index 82d9a7dad66..58bb0d0b52b 100644
--- a/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result
+++ b/mysql-test/suite/sys_vars/r/myisam_data_pointer_size_func.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("The table 't1' is full");
'#--------------------FN_DYNVARS_093_01-------------------------#'
SET @start_value= @@global.myisam_data_pointer_size;
SET @@global.myisam_data_pointer_size = 2;
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_32.result
index b2a8603de92..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_32.result
@@ -4,11 +4,12 @@ SELECT @start_global_value;
2146435072
'#--------------------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
2146435072
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_094_02-------------------------#'
SET @@global.myisam_max_sort_file_size = DEFAULT;
SELECT @@global.myisam_max_sort_file_size = 2147483648;
@@ -20,10 +21,14 @@ 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
@@ -65,8 +70,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -77,9 +82,10 @@ SELECT @@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'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
'#------------------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';
@@ -93,6 +99,8 @@ 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
@@ -102,6 +110,8 @@ SELECT @@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
@@ -114,6 +124,8 @@ 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
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
index df2a49e4dd5..0cef4de3630 100644
--- 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
@@ -4,11 +4,12 @@ SELECT @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
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_094_02-------------------------#'
SET @@global.myisam_max_sort_file_size = DEFAULT;
SELECT @@global.myisam_max_sort_file_size = 2147483648;
@@ -20,10 +21,14 @@ 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
@@ -65,8 +70,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -77,9 +82,10 @@ SELECT @@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'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
'#------------------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';
@@ -93,6 +99,8 @@ 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
@@ -102,6 +110,8 @@ SELECT @@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
@@ -114,6 +124,8 @@ 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
diff --git a/mysql-test/suite/sys_vars/r/myisam_mmap_size_basic.result b/mysql-test/suite/sys_vars/r/myisam_mmap_size_basic.result
new file mode 100644
index 00000000000..8919c090e96
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/myisam_mmap_size_basic.result
@@ -0,0 +1,21 @@
+select @@global.myisam_mmap_size;
+@@global.myisam_mmap_size
+18446744073709551615
+select @@session.myisam_mmap_size;
+ERROR HY000: Variable 'myisam_mmap_size' is a GLOBAL variable
+show global variables like 'myisam_mmap_size';
+Variable_name Value
+myisam_mmap_size 18446744073709551615
+show session variables like 'myisam_mmap_size';
+Variable_name Value
+myisam_mmap_size 18446744073709551615
+select * from information_schema.global_variables where variable_name='myisam_mmap_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_MMAP_SIZE 18446744073709551615
+select * from information_schema.session_variables where variable_name='myisam_mmap_size';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_MMAP_SIZE 18446744073709551615
+set global myisam_mmap_size=1;
+ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
+set session myisam_mmap_size=1;
+ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result
new file mode 100644
index 00000000000..22384d3c6ef
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result
@@ -0,0 +1,21 @@
+select @@global.myisam_recover_options;
+@@global.myisam_recover_options
+OFF
+select @@session.myisam_recover_options;
+ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable
+show global variables like 'myisam_recover_options';
+Variable_name Value
+myisam_recover_options OFF
+show session variables like 'myisam_recover_options';
+Variable_name Value
+myisam_recover_options OFF
+select * from information_schema.global_variables where variable_name='myisam_recover_options';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_RECOVER_OPTIONS OFF
+select * from information_schema.session_variables where variable_name='myisam_recover_options';
+VARIABLE_NAME VARIABLE_VALUE
+MYISAM_RECOVER_OPTIONS OFF
+set global myisam_recover_options=1;
+ERROR HY000: Variable 'myisam_recover_options' is a read only variable
+set session myisam_recover_options=1;
+ERROR HY000: Variable 'myisam_recover_options' is a read only variable
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
index 64321814746..491f25a3d07 100644
--- 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
@@ -71,8 +71,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -108,8 +108,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
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_64.result
index 0a317d28b11..50589c4041c 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_64.result
@@ -69,8 +69,8 @@ SET @@global.myisam_repair_threads = 429496729533;
SELECT @@global.myisam_repair_threads ;
@@global.myisam_repair_threads
429496729533
-SET @@global.myisam_repair_threads = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -106,8 +106,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
diff --git a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
deleted file mode 100644
index 74d2fb3ec86..00000000000
--- a/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result
+++ /dev/null
@@ -1,184 +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;
-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;
-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;
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4
-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;
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4
-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
-4
-SET @@global.myisam_sort_buffer_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
-SELECT @@global.myisam_sort_buffer_size ;
-@@global.myisam_sort_buffer_size
-4
-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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SELECT @@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
-4
-SET @@session.myisam_sort_buffer_size = -2;
-Warnings:
-Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '0'
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4
-SET @@session.myisam_sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SELECT @@session.myisam_sort_buffer_size ;
-@@session.myisam_sort_buffer_size
-4
-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
-4
-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
-4
-'#------------------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
-4
-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
-4
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.myisam_sort_buffer_size = 10;
-SELECT @@myisam_sort_buffer_size = @@global.myisam_sort_buffer_size ;
-@@myisam_sort_buffer_size = @@global.myisam_sort_buffer_size
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@myisam_sort_buffer_size = 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
-4
-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/myisam_sort_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
index 2657d599df7..5cb52734d21 100644
--- 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
@@ -71,8 +71,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -108,8 +108,8 @@ Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-2'
SELECT @@session.myisam_sort_buffer_size ;
@@session.myisam_sort_buffer_size
4
-SET @@session.myisam_sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4
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_64.result
index be9e415d830..2069b32fdcd 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_64.result
@@ -69,8 +69,8 @@ SET @@global.myisam_sort_buffer_size = 429496729533;
SELECT @@global.myisam_sort_buffer_size ;
@@global.myisam_sort_buffer_size
429496729533
-SET @@global.myisam_sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -106,8 +106,8 @@ Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '-2'
SELECT @@session.myisam_sort_buffer_size ;
@@session.myisam_sort_buffer_size
4
-SET @@session.myisam_sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4
diff --git a/mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result b/mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result
index 3272ef6e538..f5f1c2d59cf 100644
--- a/mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result
+++ b/mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result
@@ -91,35 +91,7 @@ SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_ignored
SET @@global.myisam_stats_method = 0.4;
-SELECT @@global.myisam_stats_method;
-@@global.myisam_stats_method
-nulls_unequal
-SET @@global.myisam_stats_method = 1.0;
-SELECT @@global.myisam_stats_method;
-@@global.myisam_stats_method
-nulls_equal
-SET @@global.myisam_stats_method = 1.1;
-SELECT @@global.myisam_stats_method;
-@@global.myisam_stats_method
-nulls_equal
-SET @@global.myisam_stats_method = 1.5;
-SELECT @@global.myisam_stats_method;
-@@global.myisam_stats_method
-nulls_ignored
-SET @@global.myisam_stats_method = 2.49;
-SELECT @@global.myisam_stats_method;
-@@global.myisam_stats_method
-nulls_ignored
-SET @@session.myisam_stats_method = 0.5;
-SELECT @@session.myisam_stats_method;
-@@session.myisam_stats_method
-nulls_equal
-SET @@session.myisam_stats_method = 1.6;
-SELECT @@session.myisam_stats_method;
-@@session.myisam_stats_method
-nulls_ignored
-'Bug# 34877: Decimal values can be used within the range [0.0-2.5). Values';
-'are rounded to 0,1,2 as evident from outcome.';
+ERROR 42000: Incorrect argument type to variable 'myisam_stats_method'
SET @@global.myisam_stats_method = 3;
ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '3'
'#---------------------FN_DYNVARS_097_08----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/named_pipe_basic.result b/mysql-test/suite/sys_vars/r/named_pipe_basic.result
new file mode 100644
index 00000000000..472a4f4d0f6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/named_pipe_basic.result
@@ -0,0 +1,21 @@
+select @@global.named_pipe;
+@@global.named_pipe
+0
+select @@session.named_pipe;
+ERROR HY000: Variable 'named_pipe' is a GLOBAL variable
+show global variables like 'named_pipe';
+Variable_name Value
+named_pipe OFF
+show session variables like 'named_pipe';
+Variable_name Value
+named_pipe OFF
+select * from information_schema.global_variables where variable_name='named_pipe';
+VARIABLE_NAME VARIABLE_VALUE
+NAMED_PIPE OFF
+select * from information_schema.session_variables where variable_name='named_pipe';
+VARIABLE_NAME VARIABLE_VALUE
+NAMED_PIPE OFF
+set global named_pipe=1;
+ERROR HY000: Variable 'named_pipe' is a read only variable
+set session named_pipe=1;
+ERROR HY000: Variable 'named_pipe' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/net_buffer_length_basic.result b/mysql-test/suite/sys_vars/r/net_buffer_length_basic.result
index 07f933b5a4b..178ada08d65 100644
--- a/mysql-test/suite/sys_vars/r/net_buffer_length_basic.result
+++ b/mysql-test/suite/sys_vars/r/net_buffer_length_basic.result
@@ -2,6 +2,8 @@ SET @start_global_value = @@global.net_buffer_length;
SET @@global.net_buffer_length = DEFAULT;
'#--------------------FN_DYNVARS_109_01-------------------------#'
SET @@global.net_buffer_length = 10000;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '10000'
SET @@global.net_buffer_length = DEFAULT;
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
@@ -9,7 +11,7 @@ SELECT @@global.net_buffer_length;
SET @@session.net_buffer_length = 20000;
ERROR HY000: SESSION variable 'net_buffer_length' is read-only. Use SET GLOBAL to assign the value
SET @@session.net_buffer_length = DEFAULT;
-ERROR 42000: Variable 'net_buffer_length' doesn't have a default value
+ERROR HY000: SESSION variable 'net_buffer_length' is read-only. Use SET GLOBAL to assign the value
SELECT @@session.net_buffer_length;
@@session.net_buffer_length
16384
@@ -24,6 +26,8 @@ SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1024
SET @@global.net_buffer_length = 1025;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '1025'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1024
@@ -32,14 +36,17 @@ SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1048576
SET @@global.net_buffer_length = 1048575;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '1048575'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1047552
SET @@global.net_buffer_length = 65535;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '65535'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
64512
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_109_04-------------------------#'
'#------------------FN_DYNVARS_109_05-----------------------#'
SET @@global.net_buffer_length = 0;
@@ -72,8 +79,8 @@ Warning 1292 Truncated incorrect net_buffer_length value: '104857633'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1048576
-SET @@global.net_buffer_length = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.net_buffer_length = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_buffer_length'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1048576
@@ -82,7 +89,6 @@ ERROR 42000: Incorrect argument type to variable 'net_buffer_length'
SELECT @@global.net_buffer_length;
@@global.net_buffer_length
1048576
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.net_buffer_length = test;
ERROR 42000: Incorrect argument type to variable 'net_buffer_length'
SELECT @@session.net_buffer_length;
diff --git a/mysql-test/suite/sys_vars/r/net_read_timeout_basic.result b/mysql-test/suite/sys_vars/r/net_read_timeout_basic.result
index aeee25c6526..7d2826ffed1 100644
--- a/mysql-test/suite/sys_vars/r/net_read_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/net_read_timeout_basic.result
@@ -71,8 +71,8 @@ Warning 1292 Truncated incorrect net_read_timeout value: '655360354'
SELECT @@global.net_read_timeout;
@@global.net_read_timeout
31536000
-SET @@global.net_read_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.net_read_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_read_timeout'
SELECT @@global.net_read_timeout;
@@global.net_read_timeout
31536000
@@ -93,15 +93,14 @@ Warning 1292 Truncated incorrect net_read_timeout value: '-2'
SELECT @@session.net_read_timeout;
@@session.net_read_timeout
1
-SET @@session.net_read_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.net_read_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_read_timeout'
SET @@session.net_read_timeout = 6555015425;
Warnings:
Warning 1292 Truncated incorrect net_read_timeout value: '6555015425'
SELECT @@session.net_read_timeout;
@@session.net_read_timeout
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.net_read_timeout = test;
ERROR 42000: Incorrect argument type to variable 'net_read_timeout'
SELECT @@session.net_read_timeout;
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_32.result
index 7a8b99ac55c..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_32.result
@@ -93,8 +93,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -115,8 +115,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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'
@@ -129,7 +129,6 @@ Warning 1292 Truncated incorrect net_retry_count value: '4294967296'
SELECT @@session.net_retry_count;
@@session.net_retry_count
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.net_retry_count = test;
ERROR 42000: Incorrect argument type to variable 'net_retry_count'
SELECT @@session.net_retry_count;
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
index 67dae3d1291..28f0ca5be0f 100644
--- 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
@@ -89,8 +89,8 @@ SET @@global.net_retry_count = 429496729500;
SELECT @@global.net_retry_count;
@@global.net_retry_count
429496729500
-SET @@global.net_retry_count = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
429496729500
@@ -111,8 +111,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.net_retry_count = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_retry_count'
SET @@session.net_retry_count = 6555015425;
SELECT @@session.net_retry_count;
@@session.net_retry_count
@@ -121,7 +121,6 @@ SET @@session.net_retry_count = 4294967296;
SELECT @@session.net_retry_count;
@@session.net_retry_count
4294967296
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.net_retry_count = test;
ERROR 42000: Incorrect argument type to variable 'net_retry_count'
SELECT @@session.net_retry_count;
diff --git a/mysql-test/suite/sys_vars/r/net_write_timeout_basic.result b/mysql-test/suite/sys_vars/r/net_write_timeout_basic.result
index 8857b8c0e37..28ffad86ffc 100644
--- a/mysql-test/suite/sys_vars/r/net_write_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/net_write_timeout_basic.result
@@ -71,8 +71,8 @@ Warning 1292 Truncated incorrect net_write_timeout value: '655360354'
SELECT @@global.net_write_timeout;
@@global.net_write_timeout
31536000
-SET @@global.net_write_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.net_write_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_write_timeout'
SELECT @@global.net_write_timeout;
@@global.net_write_timeout
31536000
@@ -93,15 +93,14 @@ Warning 1292 Truncated incorrect net_write_timeout value: '-2'
SELECT @@session.net_write_timeout;
@@session.net_write_timeout
1
-SET @@session.net_write_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.net_write_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'net_write_timeout'
SET @@session.net_write_timeout = 6555015425;
Warnings:
Warning 1292 Truncated incorrect net_write_timeout value: '6555015425'
SELECT @@session.net_write_timeout;
@@session.net_write_timeout
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.net_write_timeout = test;
ERROR 42000: Incorrect argument type to variable 'net_write_timeout'
SELECT @@session.net_write_timeout;
diff --git a/mysql-test/suite/sys_vars/r/new_basic.result b/mysql-test/suite/sys_vars/r/new_basic.result
index 5854649e6b1..c1f11e20cca 100644
--- a/mysql-test/suite/sys_vars/r/new_basic.result
+++ b/mysql-test/suite/sys_vars/r/new_basic.result
@@ -94,7 +94,7 @@ ERROR 42000: Variable 'new' can't be set to the value of '-1024'
SET @@global.new = 65536;
ERROR 42000: Variable 'new' can't be set to the value of '65536'
SET @@global.new = 65530.34;
-ERROR 42000: Variable 'new' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'new'
SET @@global.new = test;
ERROR 42000: Variable 'new' can't be set to the value of 'test'
SET @@session.new = ONN;
@@ -102,16 +102,13 @@ ERROR 42000: Variable 'new' can't be set to the value of 'ONN'
SET @@session.new = ONF;
ERROR 42000: Variable 'new' can't be set to the value of 'ONF'
SET @@session.new = OF;
-SELECT @@session.new;
-@@session.new
-0
-'Bug# 34828: FN_DYNVARS_113_05 - OF is also working as OFF and no error is coming';
+ERROR 42000: Variable 'new' can't be set to the value of 'OF'
SET @@session.new = 'OFN';
ERROR 42000: Variable 'new' can't be set to the value of 'OFN'
SET @@session.new = -2;
ERROR 42000: Variable 'new' can't be set to the value of '-2'
-SET @@session.new = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.new = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'new'
SET @@session.new = 65550;
ERROR 42000: Variable 'new' can't be set to the value of '65550'
SET @@session.new = test;
diff --git a/mysql-test/suite/sys_vars/r/old_alter_table_basic.result b/mysql-test/suite/sys_vars/r/old_alter_table_basic.result
new file mode 100644
index 00000000000..0619235b8e0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/old_alter_table_basic.result
@@ -0,0 +1,40 @@
+SET @start_global_value = @@global.old_alter_table;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.old_alter_table;
+@@global.old_alter_table
+0
+select @@session.old_alter_table;
+@@session.old_alter_table
+0
+show global variables like 'old_alter_table';
+Variable_name Value
+old_alter_table OFF
+show session variables like 'old_alter_table';
+Variable_name Value
+old_alter_table OFF
+select * from information_schema.global_variables where variable_name='old_alter_table';
+VARIABLE_NAME VARIABLE_VALUE
+OLD_ALTER_TABLE OFF
+select * from information_schema.session_variables where variable_name='old_alter_table';
+VARIABLE_NAME VARIABLE_VALUE
+OLD_ALTER_TABLE OFF
+set global old_alter_table=1;
+select @@global.old_alter_table;
+@@global.old_alter_table
+1
+set session old_alter_table=ON;
+select @@session.old_alter_table;
+@@session.old_alter_table
+1
+set global old_alter_table=1.1;
+ERROR 42000: Incorrect argument type to variable 'old_alter_table'
+set global old_alter_table=1e1;
+ERROR 42000: Incorrect argument type to variable 'old_alter_table'
+set global old_alter_table="foo";
+ERROR 42000: Variable 'old_alter_table' can't be set to the value of 'foo'
+SET @@global.old_alter_table = @start_global_value;
+SELECT @@global.old_alter_table;
+@@global.old_alter_table
+0
diff --git a/mysql-test/suite/sys_vars/r/old_basic.result b/mysql-test/suite/sys_vars/r/old_basic.result
new file mode 100644
index 00000000000..03bf61257c1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/old_basic.result
@@ -0,0 +1,21 @@
+select @@global.old;
+@@global.old
+0
+select @@session.old;
+ERROR HY000: Variable 'old' is a GLOBAL variable
+show global variables like 'old';
+Variable_name Value
+old OFF
+show session variables like 'old';
+Variable_name Value
+old OFF
+select * from information_schema.global_variables where variable_name='old';
+VARIABLE_NAME VARIABLE_VALUE
+OLD OFF
+select * from information_schema.session_variables where variable_name='old';
+VARIABLE_NAME VARIABLE_VALUE
+OLD OFF
+set global old=1;
+ERROR HY000: Variable 'old' is a read only variable
+set session old=1;
+ERROR HY000: Variable 'old' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/old_passwords_basic.result b/mysql-test/suite/sys_vars/r/old_passwords_basic.result
index f8600167801..26d0e79071b 100644
--- a/mysql-test/suite/sys_vars/r/old_passwords_basic.result
+++ b/mysql-test/suite/sys_vars/r/old_passwords_basic.result
@@ -90,7 +90,7 @@ ERROR 42000: Variable 'old_passwords' can't be set to the value of '-1024'
SET @@global.old_passwords = 65536;
ERROR 42000: Variable 'old_passwords' can't be set to the value of '65536'
SET @@global.old_passwords = 65530.34;
-ERROR 42000: Variable 'old_passwords' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'old_passwords'
SET @@global.old_passwords = test;
ERROR 42000: Variable 'old_passwords' can't be set to the value of 'test'
SET @@session.old_passwords = ONN;
@@ -98,16 +98,13 @@ ERROR 42000: Variable 'old_passwords' can't be set to the value of 'ONN'
SET @@session.old_passwords = ONF;
ERROR 42000: Variable 'old_passwords' can't be set to the value of 'ONF'
SET @@session.old_passwords = OF;
-SELECT @@session.old_passwords;
-@@session.old_passwords
-0
-'Bug# 34828: OF is also working as OFF and no error is coming';
+ERROR 42000: Variable 'old_passwords' can't be set to the value of 'OF'
SET @@session.old_passwords = 'OFN';
ERROR 42000: Variable 'old_passwords' can't be set to the value of 'OFN'
SET @@session.old_passwords = -2;
ERROR 42000: Variable 'old_passwords' can't be set to the value of '-2'
-SET @@session.old_passwords = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.old_passwords = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'old_passwords'
SET @@session.old_passwords = 65550;
ERROR 42000: Variable 'old_passwords' can't be set to the value of '65550'
SET @@session.old_passwords = test;
diff --git a/mysql-test/suite/sys_vars/r/open_files_limit_basic.result b/mysql-test/suite/sys_vars/r/open_files_limit_basic.result
new file mode 100644
index 00000000000..b136fdf2e20
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/open_files_limit_basic.result
@@ -0,0 +1,21 @@
+select @@global.open_files_limit;
+@@global.open_files_limit
+1024
+select @@session.open_files_limit;
+ERROR HY000: Variable 'open_files_limit' is a GLOBAL variable
+show global variables like 'open_files_limit';
+Variable_name Value
+open_files_limit 1024
+show session variables like 'open_files_limit';
+Variable_name Value
+open_files_limit 1024
+select * from information_schema.global_variables where variable_name='open_files_limit';
+VARIABLE_NAME VARIABLE_VALUE
+OPEN_FILES_LIMIT 1024
+select * from information_schema.session_variables where variable_name='open_files_limit';
+VARIABLE_NAME VARIABLE_VALUE
+OPEN_FILES_LIMIT 1024
+set global open_files_limit=1;
+ERROR HY000: Variable 'open_files_limit' is a read only variable
+set session open_files_limit=1;
+ERROR HY000: Variable 'open_files_limit' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result b/mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result
index c126569ebcd..99843f0b93f 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_prune_level_basic.result
@@ -114,15 +114,14 @@ Warning 1292 Truncated incorrect optimizer_prune_level value: '-2'
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
0
-SET @@session.optimizer_prune_level = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.optimizer_prune_level = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = 65550;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '65550'
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
1
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.optimizer_prune_level = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
'#------------------FN_DYNVARS_115_06-----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result b/mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result
index 9c49ae7e73f..4d94fb02be7 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result
@@ -83,8 +83,8 @@ Warning 1292 Truncated incorrect optimizer_search_depth value: '65536'
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
-SET @@global.optimizer_search_depth = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.optimizer_search_depth = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'optimizer_search_depth'
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
@@ -105,15 +105,14 @@ Warning 1292 Truncated incorrect optimizer_search_depth value: '-2'
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
0
-SET @@session.optimizer_search_depth = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.optimizer_search_depth = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'optimizer_search_depth'
SET @@session.optimizer_search_depth = 65550;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '65550'
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
63
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.optimizer_search_depth = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_search_depth'
SELECT @@session.optimizer_search_depth;
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
new file mode 100644
index 00000000000..d1e03f769c8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -0,0 +1,54 @@
+SET @start_global_value = @@global.optimizer_switch;
+SELECT @start_global_value;
+@start_global_value
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+select @@global.optimizer_switch;
+@@global.optimizer_switch
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+select @@session.optimizer_switch;
+@@session.optimizer_switch
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+show global variables like 'optimizer_switch';
+Variable_name Value
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+show session variables like 'optimizer_switch';
+Variable_name Value
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+select * from information_schema.global_variables where variable_name='optimizer_switch';
+VARIABLE_NAME VARIABLE_VALUE
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+select * from information_schema.session_variables where variable_name='optimizer_switch';
+VARIABLE_NAME VARIABLE_VALUE
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+set global optimizer_switch=10;
+select @@global.optimizer_switch;
+@@global.optimizer_switch
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on
+set session optimizer_switch=5;
+select @@session.optimizer_switch;
+@@session.optimizer_switch
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off
+set global optimizer_switch="index_merge_sort_union=on";
+select @@global.optimizer_switch;
+@@global.optimizer_switch
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+set session optimizer_switch="index_merge=off";
+select @@session.optimizer_switch;
+@@session.optimizer_switch
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off
+set session optimizer_switch="default";
+select @@session.optimizer_switch;
+@@session.optimizer_switch
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
+set global optimizer_switch=1.1;
+ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
+set global optimizer_switch=1e1;
+ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
+set session optimizer_switch="index_merge";
+ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
+set session optimizer_switch="foobar";
+ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar'
+SET @@global.optimizer_switch = @start_global_value;
+SELECT @@global.optimizer_switch;
+@@global.optimizer_switch
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
diff --git a/mysql-test/suite/sys_vars/r/pid_file_basic.result b/mysql-test/suite/sys_vars/r/pid_file_basic.result
new file mode 100644
index 00000000000..dc3b6ca97c5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/pid_file_basic.result
@@ -0,0 +1,21 @@
+select @@global.pid_file;
+@@global.pid_file
+MYSQLTEST_VARDIR/run/mysqld.1.pid
+select @@session.pid_file;
+ERROR HY000: Variable 'pid_file' is a GLOBAL variable
+show global variables like 'pid_file';
+Variable_name Value
+pid_file MYSQLTEST_VARDIR/run/mysqld.1.pid
+show session variables like 'pid_file';
+Variable_name Value
+pid_file MYSQLTEST_VARDIR/run/mysqld.1.pid
+select * from information_schema.global_variables where variable_name='pid_file';
+VARIABLE_NAME VARIABLE_VALUE
+PID_FILE MYSQLTEST_VARDIR/run/mysqld.1.pid
+select * from information_schema.session_variables where variable_name='pid_file';
+VARIABLE_NAME VARIABLE_VALUE
+PID_FILE MYSQLTEST_VARDIR/run/mysqld.1.pid
+set global pid_file=1;
+ERROR HY000: Variable 'pid_file' is a read only variable
+set session pid_file=1;
+ERROR HY000: Variable 'pid_file' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
new file mode 100644
index 00000000000..f81cae24dda
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
@@ -0,0 +1,21 @@
+select @@global.plugin_dir;
+@@global.plugin_dir
+MYSQL_LIBDIR/plugin
+select @@session.plugin_dir;
+ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable
+show global variables like 'plugin_dir';
+Variable_name Value
+plugin_dir MYSQL_LIBDIR/plugin
+show session variables like 'plugin_dir';
+Variable_name Value
+plugin_dir MYSQL_LIBDIR/plugin
+select * from information_schema.global_variables where variable_name='plugin_dir';
+VARIABLE_NAME VARIABLE_VALUE
+PLUGIN_DIR MYSQL_LIBDIR/plugin
+select * from information_schema.session_variables where variable_name='plugin_dir';
+VARIABLE_NAME VARIABLE_VALUE
+PLUGIN_DIR MYSQL_LIBDIR/plugin
+set global plugin_dir=1;
+ERROR HY000: Variable 'plugin_dir' is a read only variable
+set session plugin_dir=1;
+ERROR HY000: Variable 'plugin_dir' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/port_basic.result b/mysql-test/suite/sys_vars/r/port_basic.result
new file mode 100644
index 00000000000..cca50395927
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/port_basic.result
@@ -0,0 +1,21 @@
+select @@global.port;
+@@global.port
+MASTER_MYPORT
+select @@session.port;
+ERROR HY000: Variable 'port' is a GLOBAL variable
+show global variables like 'port';
+Variable_name Value
+port MASTER_MYPORT
+show session variables like 'port';
+Variable_name Value
+port MASTER_MYPORT
+select * from information_schema.global_variables where variable_name='port';
+VARIABLE_NAME VARIABLE_VALUE
+PORT MASTER_MYPORT
+select * from information_schema.session_variables where variable_name='port';
+VARIABLE_NAME VARIABLE_VALUE
+PORT MASTER_MYPORT
+set global port=1;
+ERROR HY000: Variable 'port' is a read only variable
+set session port=1;
+ERROR HY000: Variable 'port' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result
index fd8bdd222d2..fef19db95c5 100644
--- a/mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/preload_buffer_size_basic.result
@@ -93,8 +93,8 @@ Warning 1292 Truncated incorrect preload_buffer_size value: '1073741825'
SELECT @@global.preload_buffer_size;
@@global.preload_buffer_size
1073741824
-SET @@global.preload_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.preload_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'preload_buffer_size'
SELECT @@global.preload_buffer_size;
@@global.preload_buffer_size
1073741824
@@ -115,8 +115,8 @@ Warning 1292 Truncated incorrect preload_buffer_size value: '-2'
SELECT @@session.preload_buffer_size;
@@session.preload_buffer_size
1024
-SET @@session.preload_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.preload_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'preload_buffer_size'
SET @@session.preload_buffer_size = 1023;
Warnings:
Warning 1292 Truncated incorrect preload_buffer_size value: '1023'
@@ -129,7 +129,6 @@ Warning 1292 Truncated incorrect preload_buffer_size value: '1073741825'
SELECT @@session.preload_buffer_size;
@@session.preload_buffer_size
1073741824
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.preload_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'preload_buffer_size'
SELECT @@session.preload_buffer_size;
diff --git a/mysql-test/suite/sys_vars/r/profiling_basic.result b/mysql-test/suite/sys_vars/r/profiling_basic.result
new file mode 100644
index 00000000000..26704b6b725
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/profiling_basic.result
@@ -0,0 +1,40 @@
+SET @start_global_value = @@global.profiling;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.profiling;
+@@global.profiling
+0
+select @@session.profiling;
+@@session.profiling
+0
+show global variables like 'profiling';
+Variable_name Value
+profiling OFF
+show session variables like 'profiling';
+Variable_name Value
+profiling OFF
+select * from information_schema.global_variables where variable_name='profiling';
+VARIABLE_NAME VARIABLE_VALUE
+PROFILING OFF
+select * from information_schema.session_variables where variable_name='profiling';
+VARIABLE_NAME VARIABLE_VALUE
+PROFILING OFF
+set global profiling=1;
+select @@global.profiling;
+@@global.profiling
+1
+set session profiling=ON;
+select @@session.profiling;
+@@session.profiling
+1
+set global profiling=1.1;
+ERROR 42000: Incorrect argument type to variable 'profiling'
+set global profiling=1e1;
+ERROR 42000: Incorrect argument type to variable 'profiling'
+set global profiling="foo";
+ERROR 42000: Variable 'profiling' can't be set to the value of 'foo'
+SET @@global.profiling = @start_global_value;
+SELECT @@global.profiling;
+@@global.profiling
+0
diff --git a/mysql-test/suite/sys_vars/r/profiling_history_size_basic.result b/mysql-test/suite/sys_vars/r/profiling_history_size_basic.result
new file mode 100644
index 00000000000..be92d075326
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/profiling_history_size_basic.result
@@ -0,0 +1,50 @@
+SET @start_global_value = @@global.profiling_history_size;
+SELECT @start_global_value;
+@start_global_value
+15
+select @@global.profiling_history_size;
+@@global.profiling_history_size
+15
+select @@session.profiling_history_size;
+@@session.profiling_history_size
+15
+show global variables like 'profiling_history_size';
+Variable_name Value
+profiling_history_size 15
+show session variables like 'profiling_history_size';
+Variable_name Value
+profiling_history_size 15
+select * from information_schema.global_variables where variable_name='profiling_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PROFILING_HISTORY_SIZE 15
+select * from information_schema.session_variables where variable_name='profiling_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PROFILING_HISTORY_SIZE 15
+set global profiling_history_size=10;
+select @@global.profiling_history_size;
+@@global.profiling_history_size
+10
+set session profiling_history_size=20;
+select @@session.profiling_history_size;
+@@session.profiling_history_size
+20
+set global profiling_history_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'profiling_history_size'
+set global profiling_history_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'profiling_history_size'
+set global profiling_history_size="foo";
+ERROR 42000: Incorrect argument type to variable 'profiling_history_size'
+set session profiling_history_size=0;
+select @@profiling_history_size;
+@@profiling_history_size
+0
+set session profiling_history_size=101;
+Warnings:
+Warning 1292 Truncated incorrect profiling_history_size value: '101'
+select @@profiling_history_size;
+@@profiling_history_size
+100
+SET @@global.profiling_history_size = @start_global_value;
+SELECT @@global.profiling_history_size;
+@@global.profiling_history_size
+15
diff --git a/mysql-test/suite/sys_vars/r/protocol_version_basic.result b/mysql-test/suite/sys_vars/r/protocol_version_basic.result
new file mode 100644
index 00000000000..d00d8615762
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/protocol_version_basic.result
@@ -0,0 +1,21 @@
+select @@global.protocol_version;
+@@global.protocol_version
+10
+select @@session.protocol_version;
+ERROR HY000: Variable 'protocol_version' is a GLOBAL variable
+show global variables like 'protocol_version';
+Variable_name Value
+protocol_version 10
+show session variables like 'protocol_version';
+Variable_name Value
+protocol_version 10
+select * from information_schema.global_variables where variable_name='protocol_version';
+VARIABLE_NAME VARIABLE_VALUE
+PROTOCOL_VERSION 10
+select * from information_schema.session_variables where variable_name='protocol_version';
+VARIABLE_NAME VARIABLE_VALUE
+PROTOCOL_VERSION 10
+set global protocol_version=1;
+ERROR HY000: Variable 'protocol_version' is a read only variable
+set session protocol_version=1;
+ERROR HY000: Variable 'protocol_version' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result b/mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result
new file mode 100644
index 00000000000..e6619e206f1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result
@@ -0,0 +1,27 @@
+select @@global.pseudo_thread_id;
+ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable
+select @@session.pseudo_thread_id=0;
+@@session.pseudo_thread_id=0
+0
+show global variables like 'pseudo_thread_id';
+Variable_name Value
+show session variables like 'pseudo_thread_id';
+Variable_name Value
+pseudo_thread_id #
+select * from information_schema.global_variables where variable_name='pseudo_thread_id';
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='pseudo_thread_id';
+VARIABLE_NAME VARIABLE_VALUE
+PSEUDO_THREAD_ID #
+set session pseudo_thread_id=1;
+select @@session.pseudo_thread_id;
+@@session.pseudo_thread_id
+1
+set global pseudo_thread_id=1;
+ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
+set session pseudo_thread_id=1.1;
+ERROR 42000: Incorrect argument type to variable 'pseudo_thread_id'
+set session pseudo_thread_id=1e1;
+ERROR 42000: Incorrect argument type to variable 'pseudo_thread_id'
+set session pseudo_thread_id="foo";
+ERROR 42000: Incorrect argument type to variable 'pseudo_thread_id'
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_32.result
index 2ea0831a36d..6189a55e86e 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_32.result
@@ -8,11 +8,15 @@ SELECT @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
@@ -32,6 +36,8 @@ 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
@@ -51,13 +57,14 @@ SET @@global.query_alloc_block_size = 65536;
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
65536
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------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
@@ -74,6 +81,8 @@ SELECT @@session.query_alloc_block_size;
@@session.query_alloc_block_size
4294966272
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
@@ -102,8 +111,8 @@ Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967296'
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
4294966272
-SET @@global.query_alloc_block_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4294966272
@@ -124,28 +133,20 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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 = 4294967296;
-Warnings:
-Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967296'
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-4294966272
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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
-4294966272
+1024
'#------------------FN_DYNVARS_130_06-----------------------#'
-'Bug# 34877: OutOFMemeory errors are coming if we dont assign these values to variable before comparision statement';
SET @@global.query_alloc_block_size = 1;
Warnings:
Warning 1292 Truncated incorrect query_alloc_block_size value: '1'
@@ -184,6 +185,8 @@ SELECT @@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
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
index 7c573bdb7cb..c77af13ecc9 100644
--- 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
@@ -8,11 +8,15 @@ SELECT @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
@@ -32,14 +36,20 @@ 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 = 4294967295;
+Warnings:
+Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967295'
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
4294966272
SET @@global.query_alloc_block_size = 4294967294;
+Warnings:
+Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967294'
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
4294966272
@@ -47,25 +57,32 @@ SET @@global.query_alloc_block_size = 65536;
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
65536
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------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 = 4294967295;
+Warnings:
+Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967295'
SELECT @@session.query_alloc_block_size;
@@session.query_alloc_block_size
4294966272
SET @@session.query_alloc_block_size = 4294967294;
+Warnings:
+Warning 1292 Truncated incorrect query_alloc_block_size value: '4294967294'
SELECT @@session.query_alloc_block_size;
@@session.query_alloc_block_size
4294966272
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
@@ -92,8 +109,8 @@ SET @@global.query_alloc_block_size = 4294967296;
SELECT @@global.query_alloc_block_size;
@@global.query_alloc_block_size
4294967296
-SET @@global.query_alloc_block_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4294967296
@@ -114,26 +131,20 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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 = 4294967296;
-SELECT @@session.query_alloc_block_size;
-@@session.query_alloc_block_size
-4294967296
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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
-4294967296
+1024
'#------------------FN_DYNVARS_130_06-----------------------#'
-'Bug# 34877: OutOFMemeory errors are coming if we dont assign these values to variable before comparision statement';
SET @@global.query_alloc_block_size = 1;
Warnings:
Warning 1292 Truncated incorrect query_alloc_block_size value: '1'
@@ -172,6 +183,8 @@ SELECT @@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
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_32.result
index 4fab29b8952..074075dd2f7 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_32.result
@@ -66,7 +66,6 @@ Warning 1292 Truncated incorrect query_cache_limit value: '42949672950'
SELECT @@global.query_cache_limit;
@@global.query_cache_limit
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.query_cache_limit = ON;
ERROR 42000: Incorrect argument type to variable 'query_cache_limit'
SELECT @@global.query_cache_limit;
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
index 7b3e759deb4..3125ee4a415 100644
--- 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
@@ -60,7 +60,6 @@ SET @@global.query_cache_limit = 42949672950;
SELECT @@global.query_cache_limit;
@@global.query_cache_limit
42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.query_cache_limit = ON;
ERROR 42000: Incorrect argument type to variable 'query_cache_limit'
SELECT @@global.query_cache_limit;
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
index b6e274d6ad2..c408a39fdc0 100644
--- 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
@@ -22,7 +22,6 @@ SET @@global.query_cache_min_res_unit = 1;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
-'Bug#34842: FN_DYNVARS_132_03 - Minimum value according to documentation is 0, and here it is 512';
SET @@global.query_cache_min_res_unit = 512;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
@@ -31,7 +30,6 @@ SET @@global.query_cache_min_res_unit = 513;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
520
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.query_cache_min_res_unit = 1048576;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
@@ -74,7 +72,6 @@ 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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
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_64.result
index fdbbc71f108..8028098c3c5 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_64.result
@@ -22,7 +22,6 @@ SET @@global.query_cache_min_res_unit = 1;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
512
-'Bug#34842: FN_DYNVARS_132_03 - Minimum value according to documentation is 0, and here it is 512';
SET @@global.query_cache_min_res_unit = 512;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
@@ -31,7 +30,6 @@ SET @@global.query_cache_min_res_unit = 513;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
520
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.query_cache_min_res_unit = 1048576;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
@@ -70,7 +68,6 @@ SET @@global.query_cache_min_res_unit = 42949672950;
SELECT @@global.query_cache_min_res_unit;
@@global.query_cache_min_res_unit
42949672952
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
diff --git a/mysql-test/suite/sys_vars/r/query_cache_type_basic.result b/mysql-test/suite/sys_vars/r/query_cache_type_basic.result
index 101853daa80..2a5af454b90 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_type_basic.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_type_basic.result
@@ -59,10 +59,7 @@ ERROR 42000: Variable 'query_cache_type' can't be set to the value of 'ONDEMAND'
SET @@global.query_cache_type = 'ON,OFF';
ERROR 42000: Variable 'query_cache_type' can't be set to the value of 'ON,OFF'
SET @@global.query_cache_type = 'OF';
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-OFF
-'Bug# 34828: OF is taken as OFF.'
+ERROR 42000: Variable 'query_cache_type' can't be set to the value of 'OF'
SET @@global.query_cache_type = YES;
ERROR 42000: Variable 'query_cache_type' can't be set to the value of 'YES'
SET @@global.query_cache_type = ' ';
@@ -93,35 +90,7 @@ SELECT @@global.query_cache_type;
@@global.query_cache_type
DEMAND
SET @@global.query_cache_type = 0.4;
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-OFF
-SET @@global.query_cache_type = 1.0;
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-ON
-SET @@global.query_cache_type = 1.1;
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-ON
-SET @@global.query_cache_type = 1.5;
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-DEMAND
-SET @@global.query_cache_type = 2.49;
-SELECT @@global.query_cache_type;
-@@global.query_cache_type
-DEMAND
-SET @@session.query_cache_type = 0.5;
-SELECT @@session.query_cache_type;
-@@session.query_cache_type
-ON
-SET @@session.query_cache_type = 1.6;
-SELECT @@session.query_cache_type;
-@@session.query_cache_type
-DEMAND
-'Bug: Decimal values can be used within the range [0.0-2.5). Values';
-'are rounded to 0,1,2 as evident from outcome.';
+ERROR 42000: Incorrect argument type to variable 'query_cache_type'
SET @@global.query_cache_type = 3;
ERROR 42000: Variable 'query_cache_type' can't be set to the value of '3'
'#---------------------FN_DYNVARS_134_08----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result b/mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result
index bfbebab7ed1..96f42bbbda3 100644
--- a/mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result
+++ b/mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result
@@ -57,22 +57,19 @@ SELECT @@global.query_cache_wlock_invalidate;
SET @@session.query_cache_wlock_invalidate = -1;
ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '-1'
SET @@session.query_cache_wlock_invalidate = 1.6;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '2'
+ERROR 42000: Incorrect argument type to variable 'query_cache_wlock_invalidate'
SET @@session.query_cache_wlock_invalidate = "T";
ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'T'
SET @@session.query_cache_wlock_invalidate = "Y";
ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'Y'
SET @@session.query_cache_wlock_invalidate = TR蹺;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'TR蹺'
SET @@session.query_cache_wlock_invalidate = 誑;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '脮N'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '誑'
SET @@session.query_cache_wlock_invalidate = OF;
-SELECT @@session.query_cache_wlock_invalidate;
-@@session.query_cache_wlock_invalidate
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'OF'
SET @@session.query_cache_wlock_invalidate = 覨F;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '覨F'
SET @@global.query_cache_wlock_invalidate = -1;
ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '-1'
SET @@global.query_cache_wlock_invalidate = 2;
@@ -82,16 +79,13 @@ ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value o
SET @@global.query_cache_wlock_invalidate = "Y";
ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'Y'
SET @@global.query_cache_wlock_invalidate = TR蹺;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'TR蹺'
SET @@global.query_cache_wlock_invalidate = 誑;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '脮N'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '誑'
SET @@global.query_cache_wlock_invalidate = OF;
-SELECT @@global.query_cache_wlock_invalidate;
-@@global.query_cache_wlock_invalidate
-0
-'Bug 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of 'OF'
SET @@global.query_cache_wlock_invalidate = 覨F;
-ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'query_cache_wlock_invalidate' can't be set to the value of '覨F'
'#-------------------FN_DYNVARS_135_05----------------------------#'
SET @@global.query_cache_wlock_invalidate = 0;
SET @@session.query_cache_wlock_invalidate = 1;
diff --git a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/query_prealloc_size_basic.result
index a16c56f95c5..1fd363ade16 100644
--- a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/query_prealloc_size_basic.result
@@ -36,6 +36,8 @@ SELECT @@global.query_prealloc_size ;
@@global.query_prealloc_size
8192
SET @@global.query_prealloc_size = 655354;
+Warnings:
+Warning 1292 Truncated incorrect query_prealloc_size value: '655354'
SELECT @@global.query_prealloc_size ;
@@global.query_prealloc_size
654336
@@ -45,6 +47,8 @@ SELECT @@session.query_prealloc_size ;
@@session.query_prealloc_size
8192
SET @@session.query_prealloc_size = 655345;
+Warnings:
+Warning 1292 Truncated incorrect query_prealloc_size value: '655345'
SELECT @@session.query_prealloc_size ;
@@session.query_prealloc_size
654336
@@ -55,8 +59,8 @@ Warning 1292 Truncated incorrect query_prealloc_size value: '0'
SELECT @@global.query_prealloc_size ;
@@global.query_prealloc_size
8192
-SET @@global.query_prealloc_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.query_prealloc_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
SELECT @@global.query_prealloc_size ;
@@global.query_prealloc_size
8192
@@ -86,8 +90,8 @@ Warning 1292 Truncated incorrect query_prealloc_size value: '0'
SELECT @@session.query_prealloc_size ;
@@session.query_prealloc_size
8192
-SET @@session.query_prealloc_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.query_prealloc_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
SELECT @@session.query_prealloc_size ;
@@session.query_prealloc_size
8192
diff --git a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_32.result b/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_32.result
deleted file mode 100644
index a16c56f95c5..00000000000
--- a/mysql-test/suite/sys_vars/r/query_prealloc_size_basic_32.result
+++ /dev/null
@@ -1,166 +0,0 @@
-SET @start_global_value = @@global.query_prealloc_size ;
-SELECT @start_global_value;
-@start_global_value
-8192
-SET @start_session_value = @@session.query_prealloc_size ;
-SELECT @start_session_value;
-@start_session_value
-8192
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.query_prealloc_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '100'
-SET @@global.query_prealloc_size = DEFAULT;
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '200'
-SET @@session.query_prealloc_size = DEFAULT;
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.query_prealloc_size = DEFAULT;
-SELECT @@global.query_prealloc_size = 8192;
-@@global.query_prealloc_size = 8192
-1
-SET @@session.query_prealloc_size = DEFAULT;
-SELECT @@session.query_prealloc_size = 8192;
-@@session.query_prealloc_size = 8192
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.query_prealloc_size = 8192;
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = 655354;
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-654336
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.query_prealloc_size = 8192;
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = 655345;
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-654336
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.query_prealloc_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '0'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = test;
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = "test";
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = 'test';
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = ON;
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '0'
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = test;
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = "test";
-ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.query_prealloc_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='query_prealloc_size ';
-@@global.query_prealloc_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.query_prealloc_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='query_prealloc_size ';
-@@session.query_prealloc_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_08-----------------------#'
-SET @@global.query_prealloc_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '1'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@global.query_prealloc_size = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '0'
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.query_prealloc_size = 10;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '10'
-SELECT @@query_prealloc_size = @@global.query_prealloc_size ;
-@@query_prealloc_size = @@global.query_prealloc_size
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@query_prealloc_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '100'
-SELECT @@query_prealloc_size = @@local.query_prealloc_size ;
-@@query_prealloc_size = @@local.query_prealloc_size
-1
-SELECT @@local.query_prealloc_size = @@session.query_prealloc_size ;
-@@local.query_prealloc_size = @@session.query_prealloc_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET query_prealloc_size = 1;
-Warnings:
-Warning 1292 Truncated incorrect query_prealloc_size value: '1'
-SELECT @@query_prealloc_size ;
-@@query_prealloc_size
-8192
-SELECT local.query_prealloc_size ;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.query_prealloc_size ;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT query_prealloc_size = @@session.query_prealloc_size ;
-ERROR 42S22: Unknown column 'query_prealloc_size' in 'field list'
-SET @@global.query_prealloc_size = @start_global_value;
-SELECT @@global.query_prealloc_size ;
-@@global.query_prealloc_size
-8192
-SET @@session.query_prealloc_size = @start_session_value;
-SELECT @@session.query_prealloc_size ;
-@@session.query_prealloc_size
-8192
diff --git a/mysql-test/suite/sys_vars/r/rand_seed1_basic.result b/mysql-test/suite/sys_vars/r/rand_seed1_basic.result
new file mode 100644
index 00000000000..7b92d533c9e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rand_seed1_basic.result
@@ -0,0 +1,27 @@
+select @@global.rand_seed1;
+ERROR HY000: Variable 'rand_seed1' is a SESSION variable
+select @@session.rand_seed1;
+@@session.rand_seed1
+0
+show global variables like 'rand_seed1';
+Variable_name Value
+show session variables like 'rand_seed1';
+Variable_name Value
+rand_seed1 0
+select * from information_schema.global_variables where variable_name='rand_seed1';
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='rand_seed1';
+VARIABLE_NAME VARIABLE_VALUE
+RAND_SEED1 0
+set session rand_seed1=1;
+select @@session.rand_seed1;
+@@session.rand_seed1
+0
+set global rand_seed1=1;
+ERROR HY000: Variable 'rand_seed1' is a SESSION variable and can't be used with SET GLOBAL
+set session rand_seed1=1.1;
+ERROR 42000: Incorrect argument type to variable 'rand_seed1'
+set session rand_seed1=1e1;
+ERROR 42000: Incorrect argument type to variable 'rand_seed1'
+set session rand_seed1="foo";
+ERROR 42000: Incorrect argument type to variable 'rand_seed1'
diff --git a/mysql-test/suite/sys_vars/r/rand_seed2_basic.result b/mysql-test/suite/sys_vars/r/rand_seed2_basic.result
new file mode 100644
index 00000000000..3d84aa3e37e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rand_seed2_basic.result
@@ -0,0 +1,27 @@
+select @@global.rand_seed2;
+ERROR HY000: Variable 'rand_seed2' is a SESSION variable
+select @@session.rand_seed2;
+@@session.rand_seed2
+0
+show global variables like 'rand_seed2';
+Variable_name Value
+show session variables like 'rand_seed2';
+Variable_name Value
+rand_seed2 0
+select * from information_schema.global_variables where variable_name='rand_seed2';
+VARIABLE_NAME VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='rand_seed2';
+VARIABLE_NAME VARIABLE_VALUE
+RAND_SEED2 0
+set session rand_seed2=1;
+select @@session.rand_seed2;
+@@session.rand_seed2
+0
+set global rand_seed2=1;
+ERROR HY000: Variable 'rand_seed2' is a SESSION variable and can't be used with SET GLOBAL
+set session rand_seed2=1.1;
+ERROR 42000: Incorrect argument type to variable 'rand_seed2'
+set session rand_seed2=1e1;
+ERROR 42000: Incorrect argument type to variable 'rand_seed2'
+set session rand_seed2="foo";
+ERROR 42000: Incorrect argument type to variable 'rand_seed2'
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_32.result
index 9e3b7851d8a..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_32.result
@@ -37,7 +37,6 @@ Warning 1292 Truncated incorrect range_alloc_block_size value: '2048'
SELECT @@global.range_alloc_block_size;
@@global.range_alloc_block_size
4096
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.range_alloc_block_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967295'
@@ -50,7 +49,6 @@ Warning 1292 Truncated incorrect range_alloc_block_size value: '4294967294'
SELECT @@global.range_alloc_block_size;
@@global.range_alloc_block_size
4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_137_04-------------------------#'
SET @@session.range_alloc_block_size = 2048;
Warnings:
@@ -89,8 +87,8 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -111,15 +109,14 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.range_alloc_block_size = test;
ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
SELECT @@session.range_alloc_block_size;
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
index 29bf939edac..ef91e91ca86 100644
--- 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
@@ -37,16 +37,18 @@ Warning 1292 Truncated incorrect range_alloc_block_size value: '2048'
SELECT @@global.range_alloc_block_size;
@@global.range_alloc_block_size
4096
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
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
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_137_04-------------------------#'
SET @@session.range_alloc_block_size = 2048;
Warnings:
@@ -55,10 +57,14 @@ 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
@@ -76,11 +82,13 @@ 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
42949671936
-SET @@global.range_alloc_block_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
42949671936
@@ -101,13 +109,12 @@ 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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;
SELECT @@session.range_alloc_block_size;
@@session.range_alloc_block_size
4294967296
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.range_alloc_block_size = test;
ERROR 42000: Incorrect argument type to variable 'range_alloc_block_size'
SELECT @@session.range_alloc_block_size;
diff --git a/mysql-test/suite/sys_vars/r/read_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/read_buffer_size_basic.result
index 6aee841c939..bb1ed110ae2 100644
--- a/mysql-test/suite/sys_vars/r/read_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/read_buffer_size_basic.result
@@ -34,20 +34,22 @@ SELECT @@session.read_buffer_size = 131072;
SET @@global.read_buffer_size = 8201;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8201'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
SET @@global.read_buffer_size = 8200;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8200'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
SET @@global.read_buffer_size = 2147479552;
SELECT @@global.read_buffer_size;
@@global.read_buffer_size
2147479552
SET @@global.read_buffer_size = 2147479551;
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '2147479551'
SELECT @@global.read_buffer_size;
@@global.read_buffer_size
2147475456
@@ -55,20 +57,22 @@ SELECT @@global.read_buffer_size;
SET @@session.read_buffer_size = 8200;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8200'
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
-@@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228
-1
+SELECT @@session.read_buffer_size;
+@@session.read_buffer_size
+8192
SET @@session.read_buffer_size = 8201;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8201'
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
-@@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228
-1
+SELECT @@session.read_buffer_size;
+@@session.read_buffer_size
+8192
SET @@session.read_buffer_size = 2147479552;
SELECT @@session.read_buffer_size;
@@session.read_buffer_size
2147479552
SET @@session.read_buffer_size = 2147479551;
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '2147479551'
SELECT @@session.read_buffer_size;
@@session.read_buffer_size
2147475456
@@ -76,23 +80,23 @@ SELECT @@session.read_buffer_size;
SET @@global.read_buffer_size = 8199;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8199'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
SET @@global.read_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '-1024'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
SET @@global.read_buffer_size = 2147479553;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '2147479553'
SELECT @@global.read_buffer_size;
@@global.read_buffer_size
2147479552
-SET @@global.read_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.read_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'read_buffer_size'
SELECT @@global.read_buffer_size;
@@global.read_buffer_size
2147479552
@@ -104,24 +108,23 @@ SELECT @@global.read_buffer_size;
SET @@session.read_buffer_size = 8199;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '8199'
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
-@@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228
-1
+SELECT @@session.read_buffer_size;
+@@session.read_buffer_size
+8192
SET @@session.read_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '-2'
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
-@@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228
-1
-SET @@session.read_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SELECT @@session.read_buffer_size;
+@@session.read_buffer_size
+8192
+SET @@session.read_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'read_buffer_size'
SET @@session.read_buffer_size = 2147479553;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '2147479553'
SELECT @@session.read_buffer_size;
@@session.read_buffer_size
2147479552
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.read_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'read_buffer_size'
SELECT @@session.read_buffer_size;
@@ -143,23 +146,26 @@ WHERE VARIABLE_NAME='read_buffer_size';
SET @@global.read_buffer_size = TRUE;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '1'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
SET @@global.read_buffer_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect read_buffer_size value: '0'
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-@@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
-1
-'Bug: FN_DYNVARS_138_08- Errors are not coming on assigning TRUE/FALSE to variable'
+SELECT @@global.read_buffer_size;
+@@global.read_buffer_size
+8192
'#---------------------FN_DYNVARS_138_09----------------------#'
SET @@global.read_buffer_size = 9000;
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '9000'
SELECT @@read_buffer_size = @@global.read_buffer_size;
@@read_buffer_size = @@global.read_buffer_size
0
'#---------------------FN_DYNVARS_138_10----------------------#'
SET @@read_buffer_size = 9000;
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '9000'
SELECT @@read_buffer_size = @@local.read_buffer_size;
@@read_buffer_size = @@local.read_buffer_size
1
@@ -168,9 +174,11 @@ SELECT @@local.read_buffer_size = @@session.read_buffer_size;
1
'#---------------------FN_DYNVARS_138_11----------------------#'
SET read_buffer_size = 9100;
-SELECT @@read_buffer_size= 8200 OR @@read_buffer_size= 8228 ;
-@@read_buffer_size= 8200 OR @@read_buffer_size= 8228
-1
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '9100'
+SELECT @@read_buffer_size;
+@@read_buffer_size
+8192
SELECT local.read_buffer_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.read_buffer_size;
diff --git a/mysql-test/suite/sys_vars/r/read_only_basic.result b/mysql-test/suite/sys_vars/r/read_only_basic.result
index 4ea316a41f1..0b344eeb932 100644
--- a/mysql-test/suite/sys_vars/r/read_only_basic.result
+++ b/mysql-test/suite/sys_vars/r/read_only_basic.result
@@ -55,7 +55,7 @@ SELECT @@global.read_only;
@@global.read_only
0
SET @@global.read_only = 10000.01;
-ERROR 42000: Variable 'read_only' can't be set to the value of '10000'
+ERROR 42000: Incorrect argument type to variable 'read_only'
SELECT @@global.read_only;
@@global.read_only
0
@@ -69,7 +69,6 @@ ERROR 42000: Variable 'read_only' can't be set to the value of '42949672950'
SELECT @@global.read_only;
@@global.read_only
0
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.read_only = 'test';
ERROR 42000: Variable 'read_only' can't be set to the value of 'test'
SELECT @@global.read_only;
diff --git a/mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result
index f2645e4d527..8ee67e71b79 100644
--- a/mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/read_rnd_buffer_size_basic.result
@@ -8,42 +8,24 @@ SELECT @start_session_value;
262144
'#--------------------FN_DYNVARS_140_01-------------------------#'
SET @@global.read_rnd_buffer_size = 1000;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '1000'
SET @@global.read_rnd_buffer_size = DEFAULT;
SELECT @@global.read_rnd_buffer_size;
@@global.read_rnd_buffer_size
262144
SET @@session.read_rnd_buffer_size = 2000;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '2000'
SET @@session.read_rnd_buffer_size = DEFAULT;
SELECT @@session.read_rnd_buffer_size;
@@session.read_rnd_buffer_size
262144
-'#--------------------FN_DYNVARS_140_02-------------------------#'
-SET @@global.read_rnd_buffer_size = DEFAULT;
-SELECT @@global.read_rnd_buffer_size = 262144;
-@@global.read_rnd_buffer_size = 262144
-1
-SET @@session.read_rnd_buffer_size = DEFAULT;
-SELECT @@session.read_rnd_buffer_size = 262144;
-@@session.read_rnd_buffer_size = 262144
-1
-'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_140_03-------------------------#'
SET @@global.read_rnd_buffer_size = 8201;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8201'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
-1
+SELECT @@global.read_rnd_buffer_size;
+@@global.read_rnd_buffer_size
+8201
SET @@global.read_rnd_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8200'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
-1
+SELECT @@global.read_rnd_buffer_size;
+@@global.read_rnd_buffer_size
+8200
SET @@global.read_rnd_buffer_size = 2147479552;
SELECT @@global.read_rnd_buffer_size;
@@global.read_rnd_buffer_size
@@ -51,21 +33,16 @@ SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = 2147479551;
SELECT @@global.read_rnd_buffer_size;
@@global.read_rnd_buffer_size
-2147475456
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
+2147479551
'#--------------------FN_DYNVARS_140_04-------------------------#'
SET @@session.read_rnd_buffer_size = 8200;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8200'
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
-@@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228
-1
+SELECT @@session.read_rnd_buffer_size;
+@@session.read_rnd_buffer_size
+8200
SET @@session.read_rnd_buffer_size = 8201;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8201'
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
-@@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228
-1
+SELECT @@session.read_rnd_buffer_size;
+@@session.read_rnd_buffer_size
+8201
SET @@session.read_rnd_buffer_size = 2147479552;
SELECT @@session.read_rnd_buffer_size;
@@session.read_rnd_buffer_size
@@ -73,62 +50,40 @@ SELECT @@session.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = 2147479551;
SELECT @@session.read_rnd_buffer_size;
@@session.read_rnd_buffer_size
-2147475456
+2147479551
'#------------------FN_DYNVARS_140_05-----------------------#'
SET @@global.read_rnd_buffer_size = 8199;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8199'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
-1
+SELECT @@global.read_rnd_buffer_size;
+@@global.read_rnd_buffer_size
+8199
SET @@global.read_rnd_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '-1024'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
-1
-SET @@global.read_rnd_buffer_size = 2147479553;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '2147479553'
SELECT @@global.read_rnd_buffer_size;
@@global.read_rnd_buffer_size
-2147479552
-SET @@global.read_rnd_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+1
+SET @@global.read_rnd_buffer_size = 2147479553;
SELECT @@global.read_rnd_buffer_size;
@@global.read_rnd_buffer_size
-2147479552
+2147479553
+SET @@global.read_rnd_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'read_rnd_buffer_size'
SET @@global.read_rnd_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'read_rnd_buffer_size'
-SELECT @@global.read_rnd_buffer_size;
-@@global.read_rnd_buffer_size
-2147479552
SET @@session.read_rnd_buffer_size = 8199;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '8199'
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
-@@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228
-1
+SELECT @@session.read_rnd_buffer_size;
+@@session.read_rnd_buffer_size
+8199
SET @@session.read_rnd_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '-2'
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
-@@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228
-1
-SET @@session.read_rnd_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SET @@session.read_rnd_buffer_size = 2147479553;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '2147479553'
SELECT @@session.read_rnd_buffer_size;
@@session.read_rnd_buffer_size
-2147479552
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+1
+SET @@session.read_rnd_buffer_size = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'read_rnd_buffer_size'
SET @@session.read_rnd_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'read_rnd_buffer_size'
-SELECT @@session.read_rnd_buffer_size;
-@@session.read_rnd_buffer_size
-2147479552
'#------------------FN_DYNVARS_140_06-----------------------#'
SELECT @@global.read_rnd_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='read_rnd_buffer_size';
@@global.read_rnd_buffer_size = VARIABLE_VALUE
@@ -141,16 +96,14 @@ VARIABLE_VALUE
1
'#------------------FN_DYNVARS_140_08-----------------------#'
SET @@global.read_rnd_buffer_size = TRUE;
-Warnings:
-Warning 1292 Truncated incorrect read_rnd_buffer_size value: '1'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
+SELECT @@global.read_rnd_buffer_size;
+@@global.read_rnd_buffer_size
1
SET @@global.read_rnd_buffer_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '0'
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-@@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228
+SELECT @@global.read_rnd_buffer_size;
+@@global.read_rnd_buffer_size
1
'#---------------------FN_DYNVARS_140_09----------------------#'
SET @@global.read_rnd_buffer_size = 9000;
@@ -167,9 +120,9 @@ SELECT @@local.read_rnd_buffer_size = @@session.read_rnd_buffer_size;
1
'#---------------------FN_DYNVARS_140_11----------------------#'
SET read_rnd_buffer_size = 9100;
-SELECT @@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228;
-@@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228
-1
+SELECT @@read_rnd_buffer_size;
+@@read_rnd_buffer_size
+9100
SELECT local.read_rnd_buffer_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.read_rnd_buffer_size;
diff --git a/mysql-test/suite/sys_vars/r/relay_log_basic.result b/mysql-test/suite/sys_vars/r/relay_log_basic.result
new file mode 100644
index 00000000000..1b93db7442f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_basic.result
@@ -0,0 +1,21 @@
+select @@global.relay_log;
+@@global.relay_log
+NULL
+select @@session.relay_log;
+ERROR HY000: Variable 'relay_log' is a GLOBAL variable
+show global variables like 'relay_log';
+Variable_name Value
+relay_log
+show session variables like 'relay_log';
+Variable_name Value
+relay_log
+select * from information_schema.global_variables where variable_name='relay_log';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG
+select * from information_schema.session_variables where variable_name='relay_log';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG
+set global relay_log=1;
+ERROR HY000: Variable 'relay_log' is a read only variable
+set session relay_log=1;
+ERROR HY000: Variable 'relay_log' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/relay_log_index_basic.result b/mysql-test/suite/sys_vars/r/relay_log_index_basic.result
new file mode 100644
index 00000000000..56a3a34957c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_index_basic.result
@@ -0,0 +1,21 @@
+select @@global.relay_log_index;
+@@global.relay_log_index
+NULL
+select @@session.relay_log_index;
+ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable
+show global variables like 'relay_log_index';
+Variable_name Value
+relay_log_index
+show session variables like 'relay_log_index';
+Variable_name Value
+relay_log_index
+select * from information_schema.global_variables where variable_name='relay_log_index';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_INDEX
+select * from information_schema.session_variables where variable_name='relay_log_index';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_INDEX
+set global relay_log_index=1;
+ERROR HY000: Variable 'relay_log_index' is a read only variable
+set session relay_log_index=1;
+ERROR HY000: Variable 'relay_log_index' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/relay_log_info_file_basic.result b/mysql-test/suite/sys_vars/r/relay_log_info_file_basic.result
new file mode 100644
index 00000000000..4c967b66882
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_info_file_basic.result
@@ -0,0 +1,21 @@
+select @@global.relay_log_info_file;
+@@global.relay_log_info_file
+relay-log.info
+select @@session.relay_log_info_file;
+ERROR HY000: Variable 'relay_log_info_file' is a GLOBAL variable
+show global variables like 'relay_log_info_file';
+Variable_name Value
+relay_log_info_file relay-log.info
+show session variables like 'relay_log_info_file';
+Variable_name Value
+relay_log_info_file relay-log.info
+select * from information_schema.global_variables where variable_name='relay_log_info_file';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_INFO_FILE relay-log.info
+select * from information_schema.session_variables where variable_name='relay_log_info_file';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_INFO_FILE relay-log.info
+set global relay_log_info_file=1;
+ERROR HY000: Variable 'relay_log_info_file' is a read only variable
+set session relay_log_info_file=1;
+ERROR HY000: Variable 'relay_log_info_file' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result b/mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result
new file mode 100644
index 00000000000..97b991ce65b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.relay_log_recovery;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.relay_log_recovery;
+@@global.relay_log_recovery
+0
+select @@session.relay_log_recovery;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable
+show global variables like 'relay_log_recovery';
+Variable_name Value
+relay_log_recovery OFF
+show session variables like 'relay_log_recovery';
+Variable_name Value
+relay_log_recovery OFF
+select * from information_schema.global_variables where variable_name='relay_log_recovery';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_RECOVERY OFF
+select * from information_schema.session_variables where variable_name='relay_log_recovery';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_RECOVERY OFF
+set global relay_log_recovery=1;
+select @@global.relay_log_recovery;
+@@global.relay_log_recovery
+1
+set global relay_log_recovery=OFF;
+select @@global.relay_log_recovery;
+@@global.relay_log_recovery
+0
+set session relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+set global relay_log_recovery=1.1;
+ERROR 42000: Incorrect argument type to variable 'relay_log_recovery'
+set global relay_log_recovery=1e1;
+ERROR 42000: Incorrect argument type to variable 'relay_log_recovery'
+set global relay_log_recovery="foo";
+ERROR 42000: Variable 'relay_log_recovery' can't be set to the value of 'foo'
+SET @@global.relay_log_recovery = @start_global_value;
+SELECT @@global.relay_log_recovery;
+@@global.relay_log_recovery
+0
diff --git a/mysql-test/suite/sys_vars/r/relay_log_space_limit_basic.result b/mysql-test/suite/sys_vars/r/relay_log_space_limit_basic.result
new file mode 100644
index 00000000000..f107352f448
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_space_limit_basic.result
@@ -0,0 +1,21 @@
+select @@global.relay_log_space_limit;
+@@global.relay_log_space_limit
+0
+select @@session.relay_log_space_limit;
+ERROR HY000: Variable 'relay_log_space_limit' is a GLOBAL variable
+show global variables like 'relay_log_space_limit';
+Variable_name Value
+relay_log_space_limit 0
+show session variables like 'relay_log_space_limit';
+Variable_name Value
+relay_log_space_limit 0
+select * from information_schema.global_variables where variable_name='relay_log_space_limit';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_SPACE_LIMIT 0
+select * from information_schema.session_variables where variable_name='relay_log_space_limit';
+VARIABLE_NAME VARIABLE_VALUE
+RELAY_LOG_SPACE_LIMIT 0
+set global relay_log_space_limit=1;
+ERROR HY000: Variable 'relay_log_space_limit' is a read only variable
+set session relay_log_space_limit=1;
+ERROR HY000: Variable 'relay_log_space_limit' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/report_host_basic.result b/mysql-test/suite/sys_vars/r/report_host_basic.result
new file mode 100644
index 00000000000..96775aeb65d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/report_host_basic.result
@@ -0,0 +1,21 @@
+select @@global.report_host;
+@@global.report_host
+NULL
+select @@session.report_host;
+ERROR HY000: Variable 'report_host' is a GLOBAL variable
+show global variables like 'report_host';
+Variable_name Value
+report_host
+show session variables like 'report_host';
+Variable_name Value
+report_host
+select * from information_schema.global_variables where variable_name='report_host';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_HOST
+select * from information_schema.session_variables where variable_name='report_host';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_HOST
+set global report_host=1;
+ERROR HY000: Variable 'report_host' is a read only variable
+set session report_host=1;
+ERROR HY000: Variable 'report_host' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/report_password_basic.result b/mysql-test/suite/sys_vars/r/report_password_basic.result
new file mode 100644
index 00000000000..290f1556b1c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/report_password_basic.result
@@ -0,0 +1,21 @@
+select @@global.report_password;
+@@global.report_password
+NULL
+select @@session.report_password;
+ERROR HY000: Variable 'report_password' is a GLOBAL variable
+show global variables like 'report_password';
+Variable_name Value
+report_password
+show session variables like 'report_password';
+Variable_name Value
+report_password
+select * from information_schema.global_variables where variable_name='report_password';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_PASSWORD
+select * from information_schema.session_variables where variable_name='report_password';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_PASSWORD
+set global report_password=1;
+ERROR HY000: Variable 'report_password' is a read only variable
+set session report_password=1;
+ERROR HY000: Variable 'report_password' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/report_port_basic.result b/mysql-test/suite/sys_vars/r/report_port_basic.result
new file mode 100644
index 00000000000..1a7849c1328
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/report_port_basic.result
@@ -0,0 +1,21 @@
+select @@global.report_port;
+@@global.report_port
+DEFAULT_MASTER_PORT
+select @@session.report_port;
+ERROR HY000: Variable 'report_port' is a GLOBAL variable
+show global variables like 'report_port';
+Variable_name Value
+report_port DEFAULT_MASTER_PORT
+show session variables like 'report_port';
+Variable_name Value
+report_port DEFAULT_MASTER_PORT
+select * from information_schema.global_variables where variable_name='report_port';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_PORT DEFAULT_MASTER_PORT
+select * from information_schema.session_variables where variable_name='report_port';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_PORT DEFAULT_MASTER_PORT
+set global report_port=1;
+ERROR HY000: Variable 'report_port' is a read only variable
+set session report_port=1;
+ERROR HY000: Variable 'report_port' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/report_user_basic.result b/mysql-test/suite/sys_vars/r/report_user_basic.result
new file mode 100644
index 00000000000..696c961974e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/report_user_basic.result
@@ -0,0 +1,21 @@
+select @@global.report_user;
+@@global.report_user
+NULL
+select @@session.report_user;
+ERROR HY000: Variable 'report_user' is a GLOBAL variable
+show global variables like 'report_user';
+Variable_name Value
+report_user
+show session variables like 'report_user';
+Variable_name Value
+report_user
+select * from information_schema.global_variables where variable_name='report_user';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_USER
+select * from information_schema.session_variables where variable_name='report_user';
+VARIABLE_NAME VARIABLE_VALUE
+REPORT_USER
+set global report_user=1;
+ERROR HY000: Variable 'report_user' is a read only variable
+set session report_user=1;
+ERROR HY000: Variable 'report_user' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
index bdb586e84c2..36b467696be 100644
--- a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
+++ b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result
@@ -7,15 +7,19 @@ start slave;
connection slave
SET @start_max_connections= @@global.max_connections;
SET @start_init_slave= @@global.init_slave;
-SET @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1';
+SET NAMES utf8;
+SET @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- 泻芯屑屑械薪褌邪褉懈泄';
DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
DESCRIBE t1;
Field Type Null Key Default Extra
-my_column varchar(59) YES NULL
+my_column varchar(74) YES NULL
+select length(my_column) from t1;
+length(my_column)
+85
DROP TABLE t1;
-SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1';
-@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'
+SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- 泻芯屑屑械薪褌邪褉懈泄';
+@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- 泻芯屑屑械薪褌邪褉懈泄'
1
Expect 1
SELECT @@global.max_connections= @start_max_connections;
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
index 3b7ecf9dc4a..f5b771c47cc 100644
--- 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
@@ -4,31 +4,43 @@ SELECT @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 MySQL 7.0.
SET @@global.rpl_recovery_rank = DEFAULT;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 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 MySQL 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 MySQL 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 MySQL 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 MySQL 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 MySQL 7.0.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '2199023255552'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
@@ -38,6 +50,7 @@ SELECT @@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 MySQL 7.0.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '4611686018427387904'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
@@ -52,30 +65,35 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
'#------------------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 MySQL 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 MySQL 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 MySQL 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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 MySQL 7.0.
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='rpl_recovery_rank';
@@ -89,15 +107,21 @@ 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 MySQL 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 MySQL 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 MySQL 7.0.
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
@@rpl_recovery_rank = @@global.rpl_recovery_rank
1
@@ -110,7 +134,11 @@ 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 MySQL 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 MySQL 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
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_64.result
index 9ec34c677e1..14a7cdd0046 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_64.result
@@ -4,28 +4,42 @@ SELECT @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 MySQL 7.0.
SET @@global.rpl_recovery_rank = DEFAULT;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 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 MySQL 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 MySQL 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 MySQL 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 MySQL 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
4294967296
SET @@global.rpl_recovery_rank = 2147483648*1024;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
2199023255552
@@ -33,6 +47,8 @@ SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
2199023255552
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
+Warnings:
+Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
4611686018427387904
@@ -46,30 +62,35 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
'#------------------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 MySQL 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 MySQL 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 MySQL 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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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 MySQL 7.0.
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='rpl_recovery_rank';
@@ -83,15 +104,21 @@ 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 MySQL 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 MySQL 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 MySQL 7.0.
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
@@rpl_recovery_rank = @@global.rpl_recovery_rank
1
@@ -104,7 +131,11 @@ 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 MySQL 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 MySQL 7.0.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
diff --git a/mysql-test/suite/sys_vars/r/secure_file_priv_basic.result b/mysql-test/suite/sys_vars/r/secure_file_priv_basic.result
new file mode 100644
index 00000000000..799b6468dd3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/secure_file_priv_basic.result
@@ -0,0 +1,21 @@
+select @@global.secure_file_priv;
+@@global.secure_file_priv
+MYSQLTEST_VARDIR/
+select @@session.secure_file_priv;
+ERROR HY000: Variable 'secure_file_priv' is a GLOBAL variable
+show global variables like 'secure_file_priv';
+Variable_name Value
+secure_file_priv MYSQLTEST_VARDIR/
+show session variables like 'secure_file_priv';
+Variable_name Value
+secure_file_priv MYSQLTEST_VARDIR/
+select * from information_schema.global_variables where variable_name='secure_file_priv';
+VARIABLE_NAME VARIABLE_VALUE
+SECURE_FILE_PRIV MYSQLTEST_VARDIR/
+select * from information_schema.session_variables where variable_name='secure_file_priv';
+VARIABLE_NAME VARIABLE_VALUE
+SECURE_FILE_PRIV MYSQLTEST_VARDIR/
+set global secure_file_priv=1;
+ERROR HY000: Variable 'secure_file_priv' is a read only variable
+set session secure_file_priv=1;
+ERROR HY000: Variable 'secure_file_priv' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/server_id_basic_64.result b/mysql-test/suite/sys_vars/r/server_id_basic.result
index 12d49248f54..4059ca9e6a5 100644
--- a/mysql-test/suite/sys_vars/r/server_id_basic_64.result
+++ b/mysql-test/suite/sys_vars/r/server_id_basic.result
@@ -69,15 +69,14 @@ Warning 1292 Truncated incorrect server_id value: '4294967298'
SELECT @@global.server_id;
@@global.server_id
4294967295
-SET @@global.server_id = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.server_id = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'server_id'
SET @@global.server_id = '125';
ERROR 42000: Incorrect argument type to variable 'server_id'
SET @@global.server_id = 7483649.56;
ERROR 42000: Incorrect argument type to variable 'server_id'
SET @@global.server_id = 1G;
ERROR 42000: Incorrect argument type to variable 'server_id'
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------FN_DYNVARS_144_06-----------------------#'
SET @@global.server_id = 3000;
SELECT @@global.server_id = VARIABLE_VALUE
diff --git a/mysql-test/suite/sys_vars/r/server_id_basic_32.result b/mysql-test/suite/sys_vars/r/server_id_basic_32.result
deleted file mode 100644
index 12d49248f54..00000000000
--- a/mysql-test/suite/sys_vars/r/server_id_basic_32.result
+++ /dev/null
@@ -1,121 +0,0 @@
-SET @@global.general_log= 0;
-SET @start_global_value = @@global.server_id;
-SELECT @start_global_value;
-@start_global_value
-1
-'#--------------------FN_DYNVARS_144_01-------------------------#'
-SET @@global.server_id = 500000;
-SET @@global.server_id = DEFAULT;
-SELECT @@global.server_id;
-@@global.server_id
-0
-'#--------------------FN_DYNVARS_144_02-------------------------#'
-SET @@global.server_id = DEFAULT;
-SELECT @@global.server_id = 0;
-@@global.server_id = 0
-1
-'#--------------------FN_DYNVARS_144_03-------------------------#'
-SET @@global.server_id = 0;
-SELECT @@global.server_id;
-@@global.server_id
-0
-SET @@global.server_id = 1;
-SELECT @@global.server_id;
-@@global.server_id
-1
-SET @@global.server_id = 15;
-SELECT @@global.server_id;
-@@global.server_id
-15
-SET @@global.server_id = 1024;
-SELECT @@global.server_id;
-@@global.server_id
-1024
-SET @@global.server_id = 123456789;
-SELECT @@global.server_id;
-@@global.server_id
-123456789
-SET @@global.server_id = 2147483648;
-SELECT @@global.server_id;
-@@global.server_id
-2147483648
-SET @@global.server_id = 2147483648*2-1;
-SELECT @@global.server_id;
-@@global.server_id
-4294967295
-'#--------------------FN_DYNVARS_144_04-------------------------#'
-SET @@server_id = 2;
-ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@session.server_id = 3;
-ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.server_id = 4;
-ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL
-'#------------------FN_DYNVARS_144_05-----------------------#'
-SET @@global.server_id = -1;
-Warnings:
-Warning 1292 Truncated incorrect server_id value: '-1'
-SELECT @@global.server_id;
-@@global.server_id
-0
-SET @@global.server_id = -2147483648;
-Warnings:
-Warning 1292 Truncated incorrect server_id value: '-2147483648'
-SELECT @@global.server_id;
-@@global.server_id
-0
-SET @@global.server_id = 2147483649*2;
-Warnings:
-Warning 1292 Truncated incorrect server_id value: '4294967298'
-SELECT @@global.server_id;
-@@global.server_id
-4294967295
-SET @@global.server_id = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
-SET @@global.server_id = '125';
-ERROR 42000: Incorrect argument type to variable 'server_id'
-SET @@global.server_id = 7483649.56;
-ERROR 42000: Incorrect argument type to variable 'server_id'
-SET @@global.server_id = 1G;
-ERROR 42000: Incorrect argument type to variable 'server_id'
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-'#------------------FN_DYNVARS_144_06-----------------------#'
-SET @@global.server_id = 3000;
-SELECT @@global.server_id = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='server_id';
-@@global.server_id = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_144_07-----------------------#'
-SELECT count(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='server_id';
-count(VARIABLE_VALUE)
-1
-'#------------------FN_DYNVARS_144_08-----------------------#'
-SET @@global.server_id = TRUE;
-SELECT @@global.server_id;
-@@global.server_id
-1
-SET @@global.server_id = FALSE;
-SELECT @@global.server_id;
-@@global.server_id
-0
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.server_id = 512;
-SELECT @@server_id = @@global.server_id;
-@@server_id = @@global.server_id
-1
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET server_id = 2048;
-ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT server_id;
-ERROR 42S22: Unknown column 'server_id' in 'field list'
-SELECT @@server_id;
-@@server_id
-512
-SET global server_id = 99;
-SET @@global.server_id = @start_global_value;
-SELECT @@global.server_id;
-@@global.server_id
-1
-SET @@global.general_log= 1;
diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result
new file mode 100644
index 00000000000..a94a906e121
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result
@@ -0,0 +1,21 @@
+select @@global.shared_memory_base_name;
+@@global.shared_memory_base_name
+MYSQLTEST_VARDIR/tmp/mysqld.1.sock
+select @@session.shared_memory_base_name;
+ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable
+show global variables like 'shared_memory_base_name';
+Variable_name Value
+shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock
+show session variables like 'shared_memory_base_name';
+Variable_name Value
+shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock
+select * from information_schema.global_variables where variable_name='shared_memory_base_name';
+VARIABLE_NAME VARIABLE_VALUE
+SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock
+select * from information_schema.session_variables where variable_name='shared_memory_base_name';
+VARIABLE_NAME VARIABLE_VALUE
+SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock
+set global shared_memory_base_name=1;
+ERROR HY000: Variable 'shared_memory_base_name' is a read only variable
+set session shared_memory_base_name=1;
+ERROR HY000: Variable 'shared_memory_base_name' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/shared_memory_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_basic.result
new file mode 100644
index 00000000000..ab671af610c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/shared_memory_basic.result
@@ -0,0 +1,21 @@
+select @@global.shared_memory;
+@@global.shared_memory
+0
+select @@session.shared_memory;
+ERROR HY000: Variable 'shared_memory' is a GLOBAL variable
+show global variables like 'shared_memory';
+Variable_name Value
+shared_memory OFF
+show session variables like 'shared_memory';
+Variable_name Value
+shared_memory OFF
+select * from information_schema.global_variables where variable_name='shared_memory';
+VARIABLE_NAME VARIABLE_VALUE
+SHARED_MEMORY OFF
+select * from information_schema.session_variables where variable_name='shared_memory';
+VARIABLE_NAME VARIABLE_VALUE
+SHARED_MEMORY OFF
+set global shared_memory=1;
+ERROR HY000: Variable 'shared_memory' is a read only variable
+set session shared_memory=1;
+ERROR HY000: Variable 'shared_memory' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/skip_external_locking_basic.result b/mysql-test/suite/sys_vars/r/skip_external_locking_basic.result
new file mode 100644
index 00000000000..fd6446bed4c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/skip_external_locking_basic.result
@@ -0,0 +1,21 @@
+select @@global.skip_external_locking;
+@@global.skip_external_locking
+1
+select @@session.skip_external_locking;
+ERROR HY000: Variable 'skip_external_locking' is a GLOBAL variable
+show global variables like 'skip_external_locking';
+Variable_name Value
+skip_external_locking ON
+show session variables like 'skip_external_locking';
+Variable_name Value
+skip_external_locking ON
+select * from information_schema.global_variables where variable_name='skip_external_locking';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_EXTERNAL_LOCKING ON
+select * from information_schema.session_variables where variable_name='skip_external_locking';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_EXTERNAL_LOCKING ON
+set global skip_external_locking=1;
+ERROR HY000: Variable 'skip_external_locking' is a read only variable
+set session skip_external_locking=1;
+ERROR HY000: Variable 'skip_external_locking' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/skip_networking_basic.result b/mysql-test/suite/sys_vars/r/skip_networking_basic.result
new file mode 100644
index 00000000000..f2d4d5bce6c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/skip_networking_basic.result
@@ -0,0 +1,21 @@
+select @@global.skip_networking;
+@@global.skip_networking
+0
+select @@session.skip_networking;
+ERROR HY000: Variable 'skip_networking' is a GLOBAL variable
+show global variables like 'skip_networking';
+Variable_name Value
+skip_networking OFF
+show session variables like 'skip_networking';
+Variable_name Value
+skip_networking OFF
+select * from information_schema.global_variables where variable_name='skip_networking';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_NETWORKING OFF
+select * from information_schema.session_variables where variable_name='skip_networking';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_NETWORKING OFF
+set global skip_networking=1;
+ERROR HY000: Variable 'skip_networking' is a read only variable
+set session skip_networking=1;
+ERROR HY000: Variable 'skip_networking' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/skip_show_database_basic.result b/mysql-test/suite/sys_vars/r/skip_show_database_basic.result
new file mode 100644
index 00000000000..d5aad0f1c17
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/skip_show_database_basic.result
@@ -0,0 +1,21 @@
+select @@global.skip_show_database;
+@@global.skip_show_database
+0
+select @@session.skip_show_database;
+ERROR HY000: Variable 'skip_show_database' is a GLOBAL variable
+show global variables like 'skip_show_database';
+Variable_name Value
+skip_show_database OFF
+show session variables like 'skip_show_database';
+Variable_name Value
+skip_show_database OFF
+select * from information_schema.global_variables where variable_name='skip_show_database';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_SHOW_DATABASE OFF
+select * from information_schema.session_variables where variable_name='skip_show_database';
+VARIABLE_NAME VARIABLE_VALUE
+SKIP_SHOW_DATABASE OFF
+set global skip_show_database=1;
+ERROR HY000: Variable 'skip_show_database' is a read only variable
+set session skip_show_database=1;
+ERROR HY000: Variable 'skip_show_database' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result b/mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result
index 36f0978d3af..a01fffac004 100644
--- a/mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result
+++ b/mysql-test/suite/sys_vars/r/slave_allow_batching_basic.result
@@ -1,6 +1,5 @@
SET @global_start_value = @@global.slave_allow_batching;
ERROR HY000: Unknown system variable 'slave_allow_batching'
-'Bug: This variable is not supported in mysql version 5.1.22'
'#--------------------FN_DYNVARS_145_01------------------------#'
'#---------------------FN_DYNVARS_145_02-------------------------#'
'#--------------------FN_DYNVARS_145_03------------------------#'
@@ -8,8 +7,5 @@ ERROR HY000: Unknown system variable 'slave_allow_batching'
'#-------------------FN_DYNVARS_145_05----------------------------#'
'#----------------------FN_DYNVARS_145_06------------------------#'
'#----------------------FN_DYNVARS_145_07------------------------#'
-SELECT IF(@@global.slave_allow_batching, "ON", "OFF") = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='slave_allow_batching';
-IF(@@global.slave_allow_batching, "ON", "OFF") = VARIABLE_VALUE
-1
'#---------------------FN_DYNVARS_145_08-------------------------#'
'#---------------------FN_DYNVARS_145_09----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/slave_load_tmpdir_basic.result b/mysql-test/suite/sys_vars/r/slave_load_tmpdir_basic.result
new file mode 100644
index 00000000000..ae30fbacb2b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_load_tmpdir_basic.result
@@ -0,0 +1,21 @@
+select @@global.slave_load_tmpdir;
+@@global.slave_load_tmpdir
+MYSQL_TMP_DIR/mysqld.1
+select @@session.slave_load_tmpdir;
+ERROR HY000: Variable 'slave_load_tmpdir' is a GLOBAL variable
+show global variables like 'slave_load_tmpdir';
+Variable_name Value
+slave_load_tmpdir MYSQL_TMP_DIR/mysqld.1
+show session variables like 'slave_load_tmpdir';
+Variable_name Value
+slave_load_tmpdir MYSQL_TMP_DIR/mysqld.1
+select * from information_schema.global_variables where variable_name='slave_load_tmpdir';
+VARIABLE_NAME VARIABLE_VALUE
+SLAVE_LOAD_TMPDIR MYSQL_TMP_DIR/mysqld.1
+select * from information_schema.session_variables where variable_name='slave_load_tmpdir';
+VARIABLE_NAME VARIABLE_VALUE
+SLAVE_LOAD_TMPDIR MYSQL_TMP_DIR/mysqld.1
+set global slave_load_tmpdir=1;
+ERROR HY000: Variable 'slave_load_tmpdir' is a read only variable
+set session slave_load_tmpdir=1;
+ERROR HY000: Variable 'slave_load_tmpdir' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result b/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result
index 728ce106625..1ef0b27b756 100644
--- a/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result
@@ -74,15 +74,14 @@ Warning 1292 Truncated incorrect slave_net_timeout value: '4294967298'
SELECT @@global.slave_net_timeout;
@@global.slave_net_timeout
31536000
-SET @@global.slave_net_timeout = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.slave_net_timeout = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'slave_net_timeout'
SET @@global.slave_net_timeout = 100s;
ERROR 42000: Incorrect argument type to variable 'slave_net_timeout'
SET @@global.slave_net_timeout = 7483649.56;
ERROR 42000: Incorrect argument type to variable 'slave_net_timeout'
SET @@global.slave_net_timeout = 0.6;
ERROR 42000: Incorrect argument type to variable 'slave_net_timeout'
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------FN_DYNVARS_146_06-----------------------#'
SET @@global.slave_net_timeout = 3000;
SELECT @@global.slave_net_timeout = VARIABLE_VALUE
diff --git a/mysql-test/suite/sys_vars/r/slave_skip_errors_basic.result b/mysql-test/suite/sys_vars/r/slave_skip_errors_basic.result
new file mode 100644
index 00000000000..b74c7d3847a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_skip_errors_basic.result
@@ -0,0 +1,21 @@
+select @@global.slave_skip_errors;
+@@global.slave_skip_errors
+OFF
+select @@session.slave_skip_errors;
+ERROR HY000: Variable 'slave_skip_errors' is a GLOBAL variable
+show global variables like 'slave_skip_errors';
+Variable_name Value
+slave_skip_errors OFF
+show session variables like 'slave_skip_errors';
+Variable_name Value
+slave_skip_errors OFF
+select * from information_schema.global_variables where variable_name='slave_skip_errors';
+VARIABLE_NAME VARIABLE_VALUE
+SLAVE_SKIP_ERRORS OFF
+select * from information_schema.session_variables where variable_name='slave_skip_errors';
+VARIABLE_NAME VARIABLE_VALUE
+SLAVE_SKIP_ERRORS OFF
+set global slave_skip_errors=1;
+ERROR HY000: Variable 'slave_skip_errors' is a read only variable
+set session slave_skip_errors=1;
+ERROR HY000: Variable 'slave_skip_errors' is a read only variable
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_32.result
index 1b6edb18f8d..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_32.result
@@ -68,9 +68,8 @@ Warning 1292 Truncated incorrect slave_transaction_retries value: '4611686022722
SELECT @@global.slave_transaction_retries;
@@global.slave_transaction_retries
4294967295
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-SET @@global.slave_transaction_retries = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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;
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
index 6e0bc659f9e..9bb422905b4 100644
--- 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
@@ -64,9 +64,8 @@ SET @@global.slave_transaction_retries = 2147483649*2147483649;
SELECT @@global.slave_transaction_retries;
@@global.slave_transaction_retries
4611686022722355201
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-SET @@global.slave_transaction_retries = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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;
diff --git a/mysql-test/suite/sys_vars/r/slow_launch_time_basic.result b/mysql-test/suite/sys_vars/r/slow_launch_time_basic.result
index da13af4f4e8..4c7539be677 100644
--- a/mysql-test/suite/sys_vars/r/slow_launch_time_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_launch_time_basic.result
@@ -70,7 +70,6 @@ Warning 1292 Truncated incorrect slow_launch_time value: '42949672950'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.slow_launch_time = ON;
ERROR 42000: Incorrect argument type to variable 'slow_launch_time'
SELECT @@global.slow_launch_time;
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
index 925f940a5c4..e3c48725998 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
@@ -1,9 +1,10 @@
SET @start_value = @@global.slow_query_log_file;
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.slow_query_log_file = DEFAULT;
-SELECT RIGHT(@@global.slow_query_log_file,15);
-RIGHT(@@global.slow_query_log_file,15)
-mysqld-slow.log
+SET @a=concat(left(@@hostname, instr(concat(@@hostname, '.'), '.')-1), '-slow.log');
+SELECT RIGHT(@@global.slow_query_log_file, length(@a)) = @a;
+RIGHT(@@global.slow_query_log_file, length(@a)) = @a
+1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log_file = mytest.log;
SET @@global.slow_query_log_file = 12;
diff --git a/mysql-test/suite/sys_vars/r/socket_basic.result b/mysql-test/suite/sys_vars/r/socket_basic.result
new file mode 100644
index 00000000000..51a09b9b762
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/socket_basic.result
@@ -0,0 +1,21 @@
+select @@global.socket;
+@@global.socket
+MYSQL_TMP_DIR/mysqld.1.sock
+select @@session.socket;
+ERROR HY000: Variable 'socket' is a GLOBAL variable
+show global variables like 'socket';
+Variable_name Value
+socket MYSQL_TMP_DIR/mysqld.1.sock
+show session variables like 'socket';
+Variable_name Value
+socket MYSQL_TMP_DIR/mysqld.1.sock
+select * from information_schema.global_variables where variable_name='socket';
+VARIABLE_NAME VARIABLE_VALUE
+SOCKET MYSQL_TMP_DIR/mysqld.1.sock
+select * from information_schema.session_variables where variable_name='socket';
+VARIABLE_NAME VARIABLE_VALUE
+SOCKET MYSQL_TMP_DIR/mysqld.1.sock
+set global socket=1;
+ERROR HY000: Variable 'socket' is a read only variable
+set session socket=1;
+ERROR HY000: Variable 'socket' is a read only variable
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_32.result
index 9d3eadcc26f..cddfa9f52c9 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_32.result
@@ -3,32 +3,32 @@ 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 BETWEEN 2097116 AND 2100000;
-@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 2097116 AND 2100000;
-@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 2097116 AND 2100000;
-@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+2097152
SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
-@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32776
SET @@global.sort_buffer_size = 32777;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+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
@@ -39,13 +39,13 @@ SELECT @@global.sort_buffer_size;
4294967294
'#--------------------FN_DYNVARS_151_04-------------------------#'
SET @@session.sort_buffer_size = 32776;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32776
SET @@session.sort_buffer_size = 32777;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+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
@@ -56,19 +56,19 @@ SELECT @@session.sort_buffer_size;
4294967294
'#------------------FN_DYNVARS_151_05-----------------------#'
SET @@global.sort_buffer_size = 32775;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32775
SET @@global.sort_buffer_size = -1024;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
SET @@global.sort_buffer_size = 4294967296;
SELECT @@global.sort_buffer_size;
@@global.sort_buffer_size
4294967295
-SET @@global.sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
4294967295
@@ -78,15 +78,15 @@ SELECT @@global.sort_buffer_size;
@@global.sort_buffer_size
4294967295
SET @@session.sort_buffer_size = 32775;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32775
SET @@session.sort_buffer_size = -2;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
-SET @@session.sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32768
+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
@@ -105,13 +105,13 @@ INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
1
'#------------------FN_DYNVARS_151_08-----------------------#'
SET @@global.sort_buffer_size = TRUE;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
SET @@global.sort_buffer_size = FALSE;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
'#---------------------FN_DYNVARS_151_09----------------------#'
SET @@global.sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
@@ -127,9 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
1
'#---------------------FN_DYNVARS_151_11----------------------#'
SET sort_buffer_size = 9100;
-SELECT @@sort_buffer_size BETWEEN 32776 AND 32999;
-@@sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@sort_buffer_size;
+@@sort_buffer_size
+32768
SELECT local.sort_buffer_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.sort_buffer_size;
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
index c993c8a0a88..4fd96c154c3 100644
--- 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
@@ -3,32 +3,32 @@ 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 BETWEEN 2097116 AND 2100000;
-@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 2097116 AND 2100000;
-@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 2097116 AND 2100000;
-@@global.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+2097152
SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000;
-@@session.sort_buffer_size BETWEEN 2097116 AND 2100000
-1
+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 BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32776
SET @@global.sort_buffer_size = 32777;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+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
@@ -39,13 +39,13 @@ SELECT @@global.sort_buffer_size;
4294967294
'#--------------------FN_DYNVARS_151_04-------------------------#'
SET @@session.sort_buffer_size = 32776;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32776
SET @@session.sort_buffer_size = 32777;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+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
@@ -56,19 +56,19 @@ SELECT @@session.sort_buffer_size;
4294967294
'#------------------FN_DYNVARS_151_05-----------------------#'
SET @@global.sort_buffer_size = 32775;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32775
SET @@global.sort_buffer_size = -1024;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
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: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+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
@@ -78,15 +78,15 @@ SELECT @@global.sort_buffer_size;
@@global.sort_buffer_size
4294967296
SET @@session.sort_buffer_size = 32775;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32775
SET @@session.sort_buffer_size = -2;
-SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999;
-@@session.sort_buffer_size BETWEEN 32776 AND 32999
-1
-SET @@session.sort_buffer_size = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SELECT @@session.sort_buffer_size;
+@@session.sort_buffer_size
+32768
+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
@@ -105,13 +105,13 @@ INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
1
'#------------------FN_DYNVARS_151_08-----------------------#'
SET @@global.sort_buffer_size = TRUE;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
SET @@global.sort_buffer_size = FALSE;
-SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999;
-@@global.sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@global.sort_buffer_size;
+@@global.sort_buffer_size
+32768
'#---------------------FN_DYNVARS_151_09----------------------#'
SET @@global.sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
@@ -127,9 +127,9 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
1
'#---------------------FN_DYNVARS_151_11----------------------#'
SET sort_buffer_size = 9100;
-SELECT @@sort_buffer_size BETWEEN 32776 AND 32999;
-@@sort_buffer_size BETWEEN 32776 AND 32999
-1
+SELECT @@sort_buffer_size;
+@@sort_buffer_size
+32768
SELECT local.sort_buffer_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.sort_buffer_size;
diff --git a/mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result b/mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result
index 0d8247ae1ef..ff614e9afcf 100644
--- a/mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_auto_is_null_basic.result
@@ -1,54 +1,32 @@
'#---------------------BS_STVARS_044_01----------------------#'
-SELECT COUNT(@@SESSION.sql_auto_is_null);
-COUNT(@@SESSION.sql_auto_is_null)
-1
-1 Expected
+SELECT @@session.sql_auto_is_null;
+@@session.sql_auto_is_null
+0
'#---------------------BS_STVARS_044_02----------------------#'
-SET @@SESSION.sql_auto_is_null=1;
-"BUG:It should give error on setting this variable as it is readonly variable"
-Expected error 'Read only variable'
-SELECT COUNT(@@SESSION.sql_auto_is_null);
-COUNT(@@SESSION.sql_auto_is_null)
+SET @@session.sql_auto_is_null=1;
+SELECT @@session.sql_auto_is_null;
+@@session.sql_auto_is_null
1
-1 Expected
'#---------------------BS_STVARS_044_03----------------------#'
-SELECT IF(@@SESSION.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
+SELECT IF(@@session.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_auto_is_null';
-IF(@@SESSION.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@SESSION.sql_auto_is_null);
-COUNT(@@SESSION.sql_auto_is_null)
+IF(@@session.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_auto_is_null';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_044_04----------------------#'
-SELECT @@sql_auto_is_null = @@SESSION.sql_auto_is_null;
-@@sql_auto_is_null = @@SESSION.sql_auto_is_null
-1
-1 Expected
+VARIABLE_VALUE
+ON
'#---------------------BS_STVARS_044_05----------------------#'
-SELECT COUNT(@@sql_auto_is_null);
-COUNT(@@sql_auto_is_null)
+SELECT @@sql_auto_is_null;
+@@sql_auto_is_null
1
-1 Expected
-SELECT COUNT(@@local.sql_auto_is_null);
-COUNT(@@local.sql_auto_is_null)
+SELECT @@local.sql_auto_is_null;
+@@local.sql_auto_is_null
1
-1 Expected
-SELECT COUNT(@@SESSION.sql_auto_is_null);
-COUNT(@@SESSION.sql_auto_is_null)
+SELECT @@session.sql_auto_is_null;
+@@session.sql_auto_is_null
1
-1 Expected
-SELECT COUNT(@@GLOBAL.sql_auto_is_null);
-ERROR HY000: Variable 'sql_auto_is_null' is a SESSION variable
-Expected error 'Variable is a SESSION variable'
-SELECT COUNT(sql_auto_is_null = @@GLOBAL.sql_auto_is_null);
-ERROR 42S22: Unknown column 'sql_auto_is_null' in 'field list'
-Expected error 'Readonly variable'
+SELECT @@global.sql_auto_is_null;
+@@global.sql_auto_is_null
+0
diff --git a/mysql-test/suite/sys_vars/r/sql_big_selects_basic.result b/mysql-test/suite/sys_vars/r/sql_big_selects_basic.result
index cf071b5b417..98f05bda488 100644
--- a/mysql-test/suite/sys_vars/r/sql_big_selects_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_big_selects_basic.result
@@ -7,7 +7,7 @@ SET @@session.sql_big_selects = 0;
SET @@session.sql_big_selects = DEFAULT;
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
-0
+1
'#---------------------FN_DYNVARS_153_02-------------------------#'
SET sql_big_selects = 1;
SELECT @@sql_big_selects;
@@ -40,25 +40,23 @@ ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'T'
SET @@session.sql_big_selects = "Y";
ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'Y'
SET @@session.sql_big_selects = TR蹺;
-ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'TR蹺'
SET @@session.sql_big_selects = 誑;
-ERROR 42000: Variable 'sql_big_selects' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_big_selects' can't be set to the value of '誑'
SET @@session.sql_big_selects = OF;
-SELECT @@session.sql_big_selects;
-@@session.sql_big_selects
-0
-'Bug # 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'OF'
SET @@session.sql_big_selects = 覨F;
-ERROR 42000: Variable 'sql_big_selects' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_big_selects' can't be set to the value of '覨F'
SET @@session.sql_big_selects = '';
ERROR 42000: Variable 'sql_big_selects' can't be set to the value of ''
SET @@session.sql_big_selects = NO;
ERROR 42000: Variable 'sql_big_selects' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_153_05----------------------------#'
-SET @@global.sql_big_selects = 0;
-ERROR HY000: Variable 'sql_big_selects' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_big_selects = 1-@@global.sql_big_selects;
SELECT @@global.sql_big_selects;
-ERROR HY000: Variable 'sql_big_selects' is a SESSION variable
+@@global.sql_big_selects
+0
+SET @@global.sql_big_selects = 1-@@global.sql_big_selects;
'#----------------------FN_DYNVARS_153_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -73,12 +71,12 @@ IF(@@session.sql_big_selects, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_big_selects';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_153_08-------------------------#'
SET @@session.sql_big_selects = OFF;
SELECT @@session.sql_big_selects;
diff --git a/mysql-test/suite/sys_vars/r/sql_big_selects_func.result b/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
index fc7e1f32e00..77a38e1b928 100644
--- a/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
@@ -4,6 +4,8 @@ SET @session_sql_big_selects = @@SESSION.sql_big_selects;
SET @session_max_join_size = @@SESSION.max_join_size;
SET @global_max_join_size = @@GLOBAL.max_join_size;
SET SQL_MAX_JOIN_SIZE=9;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20));
CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20));
INSERT INTO t1 VALUES('aa','bb');
diff --git a/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result b/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
index 46e93f7ff23..09553ae7d57 100644
--- a/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
@@ -12,7 +12,7 @@ SET @@session.sql_big_tables = 1;
SET @@session.sql_big_tables = DEFAULT;
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
-1
+0
'#---------------------FN_DYNVARS_154_02-------------------------#'
SET sql_big_tables = 1;
SELECT @@sql_big_tables;
@@ -45,25 +45,26 @@ ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'T'
SET @@session.sql_big_tables = "Y";
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'Y'
SET @@session.sql_big_tables = TR蹺;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'TR蹺'
SET @@session.sql_big_tables = 誑;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '誑'
SET @@session.sql_big_tables = OF;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'OF'
SET @@session.sql_big_tables = 覨F;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '覨F'
SET @@session.sql_big_tables = '';
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of ''
SET @@session.sql_big_tables = NO;
ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_154_05----------------------------#'
-SET @@global.sql_big_tables = 0;
-ERROR HY000: Variable 'sql_big_tables' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
SELECT @@global.sql_big_tables;
-ERROR HY000: Variable 'sql_big_tables' is a SESSION variable
+@@global.sql_big_tables
+1
+SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
+SELECT @@global.sql_big_tables;
+@@global.sql_big_tables
+0
'#----------------------FN_DYNVARS_154_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -78,12 +79,12 @@ IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_big_tables;
@@session.sql_big_tables
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_big_tables';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_154_08-------------------------#'
SET @@session.sql_big_tables = OFF;
SELECT @@session.sql_big_tables;
diff --git a/mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result b/mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result
index 146872afc1d..2dfdcb26898 100644
--- a/mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_buffer_result_basic.result
@@ -12,7 +12,7 @@ SET @@session.sql_buffer_result = 1;
SET @@session.sql_buffer_result = DEFAULT;
SELECT @@session.sql_buffer_result;
@@session.sql_buffer_result
-1
+0
'#---------------------FN_DYNVARS_155_02-------------------------#'
SET sql_buffer_result = 1;
SELECT @@sql_buffer_result;
@@ -43,35 +43,28 @@ ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of '2'
SET @@session.sql_buffer_result = "TRU";
ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'TRU'
SET @@session.sql_buffer_result = 0.4;
-SELECT @@session.sql_buffer_result;
-@@session.sql_buffer_result
-0
-SET @@session.sql_buffer_result = 1.4;
-SELECT @@session.sql_buffer_result;
-@@session.sql_buffer_result
-1
-'Bug: Decimal values are accepted and rounded to an integer before';
-'assingment.';
+ERROR 42000: Incorrect argument type to variable 'sql_buffer_result'
SET @@session.sql_buffer_result = TR蹺;
-ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'TR蹺'
SET @@session.sql_buffer_result = 誑;
-ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of '誑'
SET @@session.sql_buffer_result = OF;
-SELECT @@session.sql_buffer_result;
-@@session.sql_buffer_result
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'OF'
SET @@session.sql_buffer_result = 覨F;
-ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of '覨F'
SET @@session.sql_buffer_result = '';
ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of ''
SET @@session.sql_buffer_result = NO;
ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_155_05----------------------------#'
-SET @@global.sql_buffer_result = 0;
-ERROR HY000: Variable 'sql_buffer_result' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_buffer_result = 1-@@global.sql_buffer_result;
+SELECT @@global.sql_buffer_result;
+@@global.sql_buffer_result
+1
+SET @@global.sql_buffer_result = 1-@@global.sql_buffer_result;
SELECT @@global.sql_buffer_result;
-ERROR HY000: Variable 'sql_buffer_result' is a SESSION variable
+@@global.sql_buffer_result
+0
'#----------------------FN_DYNVARS_155_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -86,12 +79,12 @@ IF(@@session.sql_buffer_result, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_buffer_result;
@@session.sql_buffer_result
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_buffer_result';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_155_08-------------------------#'
SET @@session.sql_buffer_result = OFF;
SELECT @@session.sql_buffer_result;
diff --git a/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result b/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result
index 751b801047c..5e8fe4e02f7 100644
--- a/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_log_bin_basic.result
@@ -7,7 +7,7 @@ SET @@session.sql_log_bin = 0;
SET @@session.sql_log_bin = DEFAULT;
SELECT @@session.sql_log_bin;
@@session.sql_log_bin
-0
+1
SET @@session.sql_log_bin = 1;
SET @@session.sql_log_bin = DEFAULT;
SELECT @@session.sql_log_bin;
@@ -45,25 +45,23 @@ ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'T'
SET @@session.sql_log_bin = "Y";
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'Y'
SET @@session.sql_log_bin = TR蹺;
-ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'TR蹺'
SET @@session.sql_log_bin = 誑;
-ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '誑'
SET @@session.sql_log_bin = OF;
-SELECT @@session.sql_log_bin;
-@@session.sql_log_bin
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'OF'
SET @@session.sql_log_bin = 覨F;
-ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '覨F'
SET @@session.sql_log_bin = '';
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of ''
SET @@session.sql_log_bin = NO;
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_156_05----------------------------#'
SET @@global.sql_log_bin = 0;
-ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.sql_log_bin;
-ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
+@@global.sql_log_bin
+0
+SET @@global.sql_log_bin = 1;
'#----------------------FN_DYNVARS_156_06------------------------#'
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_log_bin';
count(VARIABLE_VALUE)
@@ -76,12 +74,12 @@ IF(@@session.sql_log_bin, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_log_bin;
@@session.sql_log_bin
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_log_bin';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_156_08-------------------------#'
SET @@session.sql_log_bin = OFF;
SELECT @@session.sql_log_bin;
diff --git a/mysql-test/suite/sys_vars/r/sql_log_off_basic.result b/mysql-test/suite/sys_vars/r/sql_log_off_basic.result
index 9f610991ce2..c2ffa17c5fe 100644
--- a/mysql-test/suite/sys_vars/r/sql_log_off_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_log_off_basic.result
@@ -12,7 +12,7 @@ SET @@session.sql_log_off = 1;
SET @@session.sql_log_off = DEFAULT;
SELECT @@session.sql_log_off;
@@session.sql_log_off
-1
+0
'#---------------------FN_DYNVARS_157_02-------------------------#'
SET sql_log_off = 1;
SELECT @@sql_log_off;
@@ -45,25 +45,26 @@ ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'T'
SET @@session.sql_log_off = "Y";
ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'Y'
SET @@session.sql_log_off = TR蹺;
-ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'TR蹺'
SET @@session.sql_log_off = 誑;
-ERROR 42000: Variable 'sql_log_off' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_log_off' can't be set to the value of '誑'
SET @@session.sql_log_off = OF;
-SELECT @@session.sql_log_off;
-@@session.sql_log_off
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'OF'
SET @@session.sql_log_off = 覨F;
-ERROR 42000: Variable 'sql_log_off' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_log_off' can't be set to the value of '覨F'
SET @@session.sql_log_off = '';
ERROR 42000: Variable 'sql_log_off' can't be set to the value of ''
SET @@session.sql_log_off = NO;
ERROR 42000: Variable 'sql_log_off' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_157_05----------------------------#'
-SET @@global.sql_log_off = 0;
-ERROR HY000: Variable 'sql_log_off' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_log_off = 1-@@global.sql_log_off;
SELECT @@global.sql_log_off;
-ERROR HY000: Variable 'sql_log_off' is a SESSION variable
+@@global.sql_log_off
+1
+SET @@global.sql_log_off = 1-@@global.sql_log_off;
+SELECT @@global.sql_log_off;
+@@global.sql_log_off
+0
'#----------------------FN_DYNVARS_157_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -78,12 +79,12 @@ IF(@@session.sql_log_off, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_log_off;
@@session.sql_log_off
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_log_off';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_157_08-------------------------#'
SET @@session.sql_log_off = OFF;
SELECT @@session.sql_log_off;
diff --git a/mysql-test/suite/sys_vars/r/sql_log_off_func.result b/mysql-test/suite/sys_vars/r/sql_log_off_func.result
index e51860534f1..51c37a16795 100644
--- a/mysql-test/suite/sys_vars/r/sql_log_off_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_log_off_func.result
@@ -19,7 +19,6 @@ UPDATE t1 SET a = 'aa1' WHERE a = 'aa1-updated';
Checking if log contains the executed statement
SELECT argument FROM mysql.general_log WHERE argument = 'UPDATE t1 SET a = \'aa1\' WHERE a = \'aa1-updated\'';
argument
-UPDATE t1 SET a = 'aa1' WHERE a = 'aa1-updated'
'#--------------------FN_DYNVARS_158_03--------------------------#'
** Connecting con_int1 using root **
** Connection con_int1 **
diff --git a/mysql-test/suite/sys_vars/r/sql_log_update_basic.result b/mysql-test/suite/sys_vars/r/sql_log_update_basic.result
new file mode 100644
index 00000000000..f48cf6870da
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sql_log_update_basic.result
@@ -0,0 +1,46 @@
+SET @start_global_value = @@global.sql_log_update;
+SELECT @start_global_value;
+@start_global_value
+1
+select @@global.sql_log_update;
+@@global.sql_log_update
+1
+select @@session.sql_log_update;
+@@session.sql_log_update
+1
+show global variables like 'sql_log_update';
+Variable_name Value
+sql_log_update ON
+show session variables like 'sql_log_update';
+Variable_name Value
+sql_log_update ON
+select * from information_schema.global_variables where variable_name='sql_log_update';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_LOG_UPDATE ON
+select * from information_schema.session_variables where variable_name='sql_log_update';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_LOG_UPDATE ON
+set global sql_log_update=1;
+Warnings:
+Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
+select @@global.sql_log_update;
+@@global.sql_log_update
+1
+set session sql_log_update=ON;
+Warnings:
+Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
+select @@session.sql_log_update;
+@@session.sql_log_update
+1
+set global sql_log_update=1.1;
+ERROR 42000: Incorrect argument type to variable 'sql_log_update'
+set global sql_log_update=1e1;
+ERROR 42000: Incorrect argument type to variable 'sql_log_update'
+set global sql_log_update="foo";
+ERROR 42000: Variable 'sql_log_update' can't be set to the value of 'foo'
+SET @@global.sql_log_update = @start_global_value;
+Warnings:
+Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
+SELECT @@global.sql_log_update;
+@@global.sql_log_update
+1
diff --git a/mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result b/mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result
index 7b834d70038..28bc53e5718 100644
--- a/mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_low_priority_updates_basic.result
@@ -14,8 +14,6 @@ SELECT @@session.sql_low_priority_updates;
0
SET @@global.sql_low_priority_updates = 1;
SET @@global.sql_low_priority_updates = DEFAULT;
-ERROR 42000: Variable 'sql_low_priority_updates' doesn't have a default value
-'Bug: DEFAULT value is only associated with session'
'#---------------------FN_DYNVARS_159_02-------------------------#'
SET sql_low_priority_updates = 1;
SELECT @@sql_low_priority_updates;
@@ -56,22 +54,19 @@ SELECT @@global.sql_low_priority_updates;
SET @@session.sql_low_priority_updates = -1;
ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '-1'
SET @@session.sql_low_priority_updates = 1.6;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '2'
+ERROR 42000: Incorrect argument type to variable 'sql_low_priority_updates'
SET @@session.sql_low_priority_updates = "T";
ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'T'
SET @@session.sql_low_priority_updates = "Y";
ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'Y'
SET @@session.sql_low_priority_updates = TR蹺;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'TR蹺'
SET @@session.sql_low_priority_updates = 誑;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '誑'
SET @@session.sql_low_priority_updates = OF;
-SELECT @@session.sql_low_priority_updates;
-@@session.sql_low_priority_updates
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'OF'
SET @@session.sql_low_priority_updates = 覨F;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '覨F'
SET @@global.sql_low_priority_updates = -1;
ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '-1'
SET @@global.sql_low_priority_updates = 2;
@@ -81,16 +76,13 @@ ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'T
SET @@global.sql_low_priority_updates = "Y";
ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'Y'
SET @@global.sql_low_priority_updates = TR蹺;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'TR蹺'
SET @@global.sql_low_priority_updates = 誑;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '誑'
SET @@global.sql_low_priority_updates = OF;
-SELECT @@global.sql_low_priority_updates;
-@@global.sql_low_priority_updates
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of 'OF'
SET @@global.sql_low_priority_updates = 覨F;
-ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_low_priority_updates' can't be set to the value of '覨F'
'#-------------------FN_DYNVARS_159_05----------------------------#'
SET @@global.sql_low_priority_updates = 0;
SET @@session.sql_low_priority_updates = 1;
diff --git a/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result b/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result
new file mode 100644
index 00000000000..8aaea049b94
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result
@@ -0,0 +1,61 @@
+SET @start_global_value = @@global.sql_max_join_size;
+SELECT @start_global_value;
+@start_global_value
+18446744073709551615
+select @@global.sql_max_join_size;
+@@global.sql_max_join_size
+18446744073709551615
+select @@session.sql_max_join_size;
+@@session.sql_max_join_size
+18446744073709551615
+show global variables like 'sql_max_join_size';
+Variable_name Value
+sql_max_join_size 18446744073709551615
+show session variables like 'sql_max_join_size';
+Variable_name Value
+sql_max_join_size 18446744073709551615
+select * from information_schema.global_variables where variable_name='sql_max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_MAX_JOIN_SIZE 18446744073709551615
+select * from information_schema.session_variables where variable_name='sql_max_join_size';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_MAX_JOIN_SIZE 18446744073709551615
+set global sql_max_join_size=10;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
+select @@global.sql_max_join_size;
+@@global.sql_max_join_size
+10
+set session sql_max_join_size=20;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
+select @@session.sql_max_join_size;
+@@session.sql_max_join_size
+20
+set global sql_max_join_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
+set global sql_max_join_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
+set global sql_max_join_size="foo";
+ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
+select @@sql_big_selects;
+@@sql_big_selects
+0
+set sql_max_join_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
+select @@sql_big_selects;
+@@sql_big_selects
+1
+set sql_max_join_size=100;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
+select @@sql_big_selects;
+@@sql_big_selects
+0
+SET @@global.sql_max_join_size = @start_global_value;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
+SELECT @@global.sql_max_join_size;
+@@global.sql_max_join_size
+18446744073709551615
diff --git a/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result b/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
index 0e406f6611e..0720f5dc965 100644
--- a/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
@@ -16,6 +16,8 @@ INSERT INTO t2 VALUES('aa3','bb');
INSERT INTO t2 VALUES('aa4','bb');
'#--------------------FN_DYNVARS_161_01-------------------------#'
SET SESSION sql_max_join_size=9;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
@@ -30,6 +32,8 @@ aa3 bb aa3 bb
aa4 bb aa4 bb
This should work
SET SESSION sql_max_join_size=DEFAULT;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
DELETE FROM t2 WHERE a = 'aa4';
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
a b a b
@@ -40,6 +44,8 @@ aa3 bb aa3 bb
This should work
'#----------------------------FN_DYNVARS_136_05-------------------------#'
SET GLOBAL sql_max_join_size = 4;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
** Connecting con_int1 using root **
** Connection con_int1 **
SELECT @@SESSION.sql_max_join_size;
@@ -47,6 +53,8 @@ SELECT @@SESSION.sql_max_join_size;
4
4 Expected
SET SESSION sql_max_join_size = 2;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
** Connecting con_int2 using root **
** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size;
@@ -54,6 +62,8 @@ SELECT @@SESSION.sql_max_join_size;
4
4 Expected
SET SESSION sql_max_join_size = 10;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size;
@@SESSION.sql_max_join_size
@@ -71,7 +81,11 @@ SELECT @@GLOBAL.sql_max_join_size;
** Connection default **
Disconnecting Connections con_int1, con_int2
SET @@SESSION.sql_max_join_size = @session_max_join_size;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
SET @@GLOBAL.sql_max_join_size = @global_max_join_size ;
+Warnings:
+Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
SET @@SESSION.sql_big_selects = @session_sql_big_selects;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
index 78a9f179824..19695fd3af6 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
@@ -17,8 +17,6 @@ SET @@session.sql_mode = DEFAULT;
SELECT @@session.sql_mode;
@@session.sql_mode
-'Bug# 34876: Default values for both session and global sql_mode is ""';
-'and not OFF.';
'#---------------------FN_DYNVARS_152_02-------------------------#'
SET @@global.sql_mode = NULL;
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL'
@@ -41,8 +39,6 @@ SELECT @@session.sql_mode;
@@session.sql_mode
'#--------------------FN_DYNVARS_152_03------------------------#'
-'Bug: Incomplete sql modes valid values at:';
-'http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html';
SET @@global.sql_mode = ANSI;
SELECT @@global.sql_mode;
@@global.sql_mode
@@ -54,7 +50,7 @@ STRICT_TRANS_TABLES
SET @@global.sql_mode = TRADITIONAL;
SELECT @@global.sql_mode;
@@global.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET @@global.sql_mode = ALLOW_INVALID_DATES;
SELECT @@global.sql_mode;
@@global.sql_mode
@@ -170,10 +166,9 @@ PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,POSTGRESQL,NO_KEY_OPTIONS,NO_TABLE_OPTI
SET @@global.sql_mode = TRADITIONAL;
SELECT @@global.sql_mode;
@@global.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET @@global.sql_mode = OFF;
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'OFF'
-'Bug: OFF is documented as an sql mode but infact it is not';
SET @@session.sql_mode = ANSI;
SELECT @@session.sql_mode;
@@session.sql_mode
@@ -185,7 +180,7 @@ STRICT_TRANS_TABLES
SET @@session.sql_mode = TRADITIONAL;
SELECT @@session.sql_mode;
@@session.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET @@session.sql_mode = ALLOW_INVALID_DATES;
SELECT @@session.sql_mode;
@@session.sql_mode
@@ -301,18 +296,14 @@ PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,POSTGRESQL,NO_KEY_OPTIONS,NO_TABLE_OPTI
SET @@session.sql_mode = TRADITIONAL;
SELECT @@session.sql_mode;
@@session.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET @@session.sql_mode = OFF;
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'OFF'
SET @@global.sql_mode = '?';
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '?'
SELECT @@global.sql_mode;
@@global.sql_mode
-?
-SET @@session.sql_mode = '?';
-SELECT @@session.sql_mode;
-@@session.sql_mode
-?
-'Bug# 34834: ? is acceptable as a valid sql mode.'
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
'#--------------------FN_DYNVARS_152_04-------------------------#'
SET @@global.sql_mode = -1;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '-1'
@@ -366,7 +357,7 @@ REAL_AS_FLOAT,PIPES_AS_CONCAT
SET @@global.sql_mode = 50000;
SELECT @@global.sql_mode;
@@global.sql_mode
-PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,NO_UNSIGNED_SUBTRACTION,POSTGRESQL,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
+PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,,,NO_UNSIGNED_SUBTRACTION,POSTGRESQL,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
SET @@global.sql_mode = 500000;
SELECT @@global.sql_mode;
@@global.sql_mode
@@ -374,39 +365,11 @@ REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,POSTGR
SET @@global.sql_mode = 4294967295;
SELECT @@global.sql_mode;
@@global.sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,,,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
SET @@global.sql_mode = 4294967296;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '4294967296'
SET @@global.sql_mode = 0.4;
-SELECT @@global.sql_mode;
-@@global.sql_mode
-
-SET @@global.sql_mode = 1.0;
-SELECT @@global.sql_mode;
-@@global.sql_mode
-REAL_AS_FLOAT
-SET @@global.sql_mode = 40000.1;
-SELECT @@global.sql_mode;
-@@global.sql_mode
-PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_UNSIGNED_SUBTRACTION,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
-SET @@global.sql_mode = 1.5;
-SELECT @@global.sql_mode;
-@@global.sql_mode
-PIPES_AS_CONCAT
-SET @@global.sql_mode = 124567.49;
-SELECT @@global.sql_mode;
-@@global.sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,NO_DIR_IN_CREATE,ORACLE,MSSQL,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE
-SET @@session.sql_mode = 50000000.5;
-SELECT @@session.sql_mode;
-@@session.sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_DIR_IN_CREATE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL40,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,ALLOW_INVALID_DATES,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE
-SET @@session.sql_mode = 4294967295.4;
-SELECT @@session.sql_mode;
-@@session.sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
-'Bug: Decimal values can be used within the range [0.0-4294967295.5).';
-'Values are rounded to numeric values as evident from outcome.';
+ERROR 42000: Incorrect argument type to variable 'sql_mode'
'#---------------------FN_DYNVARS_152_08----------------------#'
SET @@global.sql_mode = TRUE;
SELECT @@global.sql_mode;
@@ -434,15 +397,26 @@ SELECT @@global.sql_mode;
SET @@session.sql_mode = 'TRADITIONAL,ALLOW_INVALID_DATES,ANSI_QUOTES';
SELECT @@session.sql_mode;
@@session.sql_mode
-ANSI_QUOTES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+ANSI_QUOTES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET @@global.sql_mode = 'ONLY_FULL_GROUP_BY,PIPES_AS_CONCAT,REAL_AS_FLOAT,ORACLE,POSTGRESQL';
SELECT @@global.sql_mode;
@@global.sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,POSTGRESQL,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
-SET @@session.sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,HIGH_OR_PRECEDENCE,
-IGNORE_SPACE';
-ERROR 42000: Variable 'sql_mode' can't be set to the value of '
-IGNORE_SPACE'
+SET @@session.sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,FOOBAR,IGNORE_SPACE';
+ERROR 42000: Variable 'sql_mode' can't be set to the value of 'FOOBAR'
+SET @@sql_mode=',';
+SELECT @@sql_mode;
+@@sql_mode
+
+SET @@sql_mode=',,,,ANSI_QUOTES,,,';
+SELECT @@sql_mode;
+@@sql_mode
+ANSI_QUOTES
+SET @@sql_mode=',,,,FOOBAR,,,,,';
+ERROR 42000: Variable 'sql_mode' can't be set to the value of 'FOOBAR'
+SELECT @@sql_mode;
+@@sql_mode
+ANSI_QUOTES
SET @@global.sql_mode = @global_start_value;
SELECT @@global.sql_mode;
@@global.sql_mode
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_func.result b/mysql-test/suite/sys_vars/r/sql_mode_func.result
index dbf0db4e1ad..bb9ffc0717e 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_func.result
@@ -52,7 +52,7 @@ TRADITIONAL mode
SET SESSION sql_mode = TRADITIONAL;
SELECT @@SESSION.sql_mode;
@@SESSION.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
INSERT INTO t1 VALUES('t1a1','t1b1');
INSERT INTO t1 VALUES('t1a2','t1b2');
INSERT INTO t1 VALUES('t1a3','t1b3');
@@ -91,7 +91,7 @@ REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
** Connection con_int1 **
SELECT @@SESSION.sql_mode;
@@SESSION.sql_mode
-STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
'STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, TRADITIONAL' Expected
SELECT @@GLOBAL.sql_mode;
@@GLOBAL.sql_mode
diff --git a/mysql-test/suite/sys_vars/r/sql_notes_basic.result b/mysql-test/suite/sys_vars/r/sql_notes_basic.result
index d6ec1239f45..7a54f90f8b7 100644
--- a/mysql-test/suite/sys_vars/r/sql_notes_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_notes_basic.result
@@ -7,7 +7,7 @@ SET @@session.sql_notes = 0;
SET @@session.sql_notes = DEFAULT;
SELECT @@session.sql_notes;
@@session.sql_notes
-0
+1
SET @@session.sql_notes = 1;
SET @@session.sql_notes = DEFAULT;
SELECT @@session.sql_notes;
@@ -45,25 +45,26 @@ ERROR 42000: Variable 'sql_notes' can't be set to the value of 'T'
SET @@session.sql_notes = "Y";
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'Y'
SET @@session.sql_notes = TR蹺;
-ERROR 42000: Variable 'sql_notes' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_notes' can't be set to the value of 'TR蹺'
SET @@session.sql_notes = 誑;
-ERROR 42000: Variable 'sql_notes' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_notes' can't be set to the value of '誑'
SET @@session.sql_notes = OF;
-SELECT @@session.sql_notes;
-@@session.sql_notes
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_notes' can't be set to the value of 'OF'
SET @@session.sql_notes = 覨F;
-ERROR 42000: Variable 'sql_notes' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_notes' can't be set to the value of '覨F'
SET @@session.sql_notes = '';
ERROR 42000: Variable 'sql_notes' can't be set to the value of ''
SET @@session.sql_notes = NO;
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_161_05----------------------------#'
-SET @@global.sql_notes = 0;
-ERROR HY000: Variable 'sql_notes' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_notes = 1-@@global.sql_notes;
SELECT @@global.sql_notes;
-ERROR HY000: Variable 'sql_notes' is a SESSION variable
+@@global.sql_notes
+0
+SET @@global.sql_notes = 1-@@global.sql_notes;
+SELECT @@global.sql_notes;
+@@global.sql_notes
+1
'#----------------------FN_DYNVARS_161_06------------------------#'
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_notes';
count(VARIABLE_VALUE)
@@ -76,12 +77,12 @@ IF(@@session.sql_notes, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_notes;
@@session.sql_notes
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_notes';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_161_08-------------------------#'
SET @@session.sql_notes = OFF;
SELECT @@session.sql_notes;
diff --git a/mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result b/mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result
index ed9322618f0..8cf99233ef9 100644
--- a/mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_quote_show_create_basic.result
@@ -7,7 +7,7 @@ SET @@session.sql_quote_show_create = 0;
SET @@session.sql_quote_show_create = DEFAULT;
SELECT @@session.sql_quote_show_create;
@@session.sql_quote_show_create
-0
+1
SET @@session.sql_quote_show_create = 1;
SET @@session.sql_quote_show_create = DEFAULT;
SELECT @@session.sql_quote_show_create;
@@ -45,25 +45,26 @@ ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'T'
SET @@session.sql_quote_show_create = "Y";
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'Y'
SET @@session.sql_quote_show_create = TR蹺;
-ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR蹺'
SET @@session.sql_quote_show_create = 誑;
-ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of '誑'
SET @@session.sql_quote_show_create = OF;
-SELECT @@session.sql_quote_show_create;
-@@session.sql_quote_show_create
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'OF'
SET @@session.sql_quote_show_create = 覨F;
-ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of '覨F'
SET @@session.sql_quote_show_create = '';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of ''
SET @@session.sql_quote_show_create = NO;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_162_05----------------------------#'
-SET @@global.sql_quote_show_create = 0;
-ERROR HY000: Variable 'sql_quote_show_create' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_quote_show_create = 1-@@global.sql_quote_show_create;
SELECT @@global.sql_quote_show_create;
-ERROR HY000: Variable 'sql_quote_show_create' is a SESSION variable
+@@global.sql_quote_show_create
+0
+SET @@global.sql_quote_show_create = 1-@@global.sql_quote_show_create;
+SELECT @@global.sql_quote_show_create;
+@@global.sql_quote_show_create
+1
'#----------------------FN_DYNVARS_162_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -78,12 +79,12 @@ IF(@@session.sql_quote_show_create, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_quote_show_create;
@@session.sql_quote_show_create
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_quote_show_create';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_162_08-------------------------#'
SET @@session.sql_quote_show_create = OFF;
SELECT @@session.sql_quote_show_create;
diff --git a/mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result b/mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result
index 4daf78228f3..91bfcb2377e 100644
--- a/mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_safe_updates_basic.result
@@ -12,7 +12,7 @@ SET @@session.sql_safe_updates = 1;
SET @@session.sql_safe_updates = DEFAULT;
SELECT @@session.sql_safe_updates;
@@session.sql_safe_updates
-1
+0
'#---------------------FN_DYNVARS_163_02-------------------------#'
SET sql_safe_updates = 1;
SELECT @@sql_safe_updates;
@@ -45,25 +45,26 @@ ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'T'
SET @@session.sql_safe_updates = "Y";
ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'Y'
SET @@session.sql_safe_updates = TR蹺;
-ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'TR蹺'
SET @@session.sql_safe_updates = 誑;
-ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of '誑'
SET @@session.sql_safe_updates = OF;
-SELECT @@session.sql_safe_updates;
-@@session.sql_safe_updates
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'OF'
SET @@session.sql_safe_updates = 覨F;
-ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of '覨F'
SET @@session.sql_safe_updates = '';
ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of ''
SET @@session.sql_safe_updates = NO;
ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_163_05----------------------------#'
-SET @@global.sql_safe_updates = 0;
-ERROR HY000: Variable 'sql_safe_updates' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_safe_updates = 1-@@global.sql_safe_updates;
SELECT @@global.sql_safe_updates;
-ERROR HY000: Variable 'sql_safe_updates' is a SESSION variable
+@@global.sql_safe_updates
+1
+SET @@global.sql_safe_updates = 1-@@global.sql_safe_updates;
+SELECT @@global.sql_safe_updates;
+@@global.sql_safe_updates
+0
'#----------------------FN_DYNVARS_163_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -78,12 +79,12 @@ IF(@@session.sql_safe_updates, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_safe_updates;
@@session.sql_safe_updates
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_safe_updates';
VARIABLE_VALUE
-OFF
+ON
'#---------------------FN_DYNVARS_163_08-------------------------#'
SET @@session.sql_safe_updates = OFF;
SELECT @@session.sql_safe_updates;
diff --git a/mysql-test/suite/sys_vars/r/sql_select_limit_basic.result b/mysql-test/suite/sys_vars/r/sql_select_limit_basic.result
new file mode 100644
index 00000000000..c601fa148ce
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sql_select_limit_basic.result
@@ -0,0 +1,40 @@
+SET @start_global_value = @@global.sql_select_limit;
+SELECT @start_global_value;
+@start_global_value
+18446744073709551615
+select @@global.sql_select_limit;
+@@global.sql_select_limit
+18446744073709551615
+select @@session.sql_select_limit;
+@@session.sql_select_limit
+18446744073709551615
+show global variables like 'sql_select_limit';
+Variable_name Value
+sql_select_limit 18446744073709551615
+show session variables like 'sql_select_limit';
+Variable_name Value
+sql_select_limit 18446744073709551615
+select * from information_schema.global_variables where variable_name='sql_select_limit';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_SELECT_LIMIT 18446744073709551615
+select * from information_schema.session_variables where variable_name='sql_select_limit';
+VARIABLE_NAME VARIABLE_VALUE
+SQL_SELECT_LIMIT 18446744073709551615
+set global sql_select_limit=10;
+select @@global.sql_select_limit;
+@@global.sql_select_limit
+10
+set session sql_select_limit=20;
+select @@session.sql_select_limit;
+@@session.sql_select_limit
+20
+set global sql_select_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'sql_select_limit'
+set global sql_select_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'sql_select_limit'
+set global sql_select_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'sql_select_limit'
+SET @@global.sql_select_limit = @start_global_value;
+SELECT @@global.sql_select_limit;
+@@global.sql_select_limit
+18446744073709551615
diff --git a/mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result b/mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result
index 9ceef325483..2d709c486dd 100644
--- a/mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result
@@ -1,20 +1,22 @@
'#--------------------FN_DYNVARS_165_01-------------------------#'
SET @start_global_value = @@global.sql_slave_skip_counter;
-ERROR HY000: Variable 'sql_slave_skip_counter' can only be set, not read
SELECT @@global.sql_slave_skip_counter;
-ERROR HY000: Variable 'sql_slave_skip_counter' can only be set, not read
-'Info:This value is write only. Value can not be read'
+@@global.sql_slave_skip_counter
+0
'#--------------------FN_DYNVARS_165_02-------------------------#'
SET @@global.sql_slave_skip_counter = DEFAULT;
-ERROR 42000: Variable 'sql_slave_skip_counter' doesn't have a default value
'#--------------------FN_DYNVARS_165_03-------------------------#'
SET @@global.sql_slave_skip_counter = 0;
SET @@global.sql_slave_skip_counter = 5;
SET @@global.sql_slave_skip_counter = 1024;
SET @@global.sql_slave_skip_counter = 2147483648;
SET @@global.sql_slave_skip_counter = 2147483648*2;
+Warnings:
+Warning 1292 Truncated incorrect sql_slave_skip_counter value: '4294967296'
SET @@global.sql_slave_skip_counter = 2147483648*2-1;
SET @@global.sql_slave_skip_counter = 4294967295*4294967295;
+Warnings:
+Warning 1292 Truncated incorrect sql_slave_skip_counter value: '-8589934591'
'#--------------------FN_DYNVARS_165_03-------------------------#'
SET @@global.sql_slave_skip_counter = '5';
ERROR 42000: Incorrect argument type to variable 'sql_slave_skip_counter'
@@ -30,7 +32,7 @@ SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_slave_skip_counter';
VARIABLE_VALUE
-
+1024
'#--------------------FN_DYNVARS_165_03-------------------------#'
SET @@sql_slave_skip_counter = 10;
ERROR HY000: Variable 'sql_slave_skip_counter' is a GLOBAL variable and should be set with SET GLOBAL
@@ -38,3 +40,4 @@ SET @@session.sql_slave_skip_counter = 12;
ERROR HY000: Variable 'sql_slave_skip_counter' is a GLOBAL variable and should be set with SET GLOBAL
SET @@local.sql_slave_skip_counter = 13;
ERROR HY000: Variable 'sql_slave_skip_counter' is a GLOBAL variable and should be set with SET GLOBAL
+SET @@global.sql_slave_skip_counter = 0;
diff --git a/mysql-test/suite/sys_vars/r/sql_warnings_basic.result b/mysql-test/suite/sys_vars/r/sql_warnings_basic.result
index cf39ef851d4..762182336c3 100644
--- a/mysql-test/suite/sys_vars/r/sql_warnings_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_warnings_basic.result
@@ -12,7 +12,7 @@ SET @@session.sql_warnings = 1;
SET @@session.sql_warnings = DEFAULT;
SELECT @@session.sql_warnings;
@@session.sql_warnings
-1
+0
'#---------------------FN_DYNVARS_166_02-------------------------#'
SET sql_warnings = 1;
SELECT @@sql_warnings;
@@ -36,34 +36,33 @@ SELECT @@session.sql_warnings;
@@session.sql_warnings
1
'#--------------------FN_DYNVARS_166_04-------------------------#'
-SET @@session.sql_warnings = -0.6;
-ERROR 42000: Variable 'sql_warnings' can't be set to the value of '-1'
-SET @@session.sql_warnings = 1.9;
-ERROR 42000: Variable 'sql_warnings' can't be set to the value of '2'
+SET @@session.sql_warnings = 0.6;
+ERROR 42000: Incorrect argument type to variable 'sql_warnings'
SET @@session.sql_warnings = "T";
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'T'
SET @@session.sql_warnings = "Y";
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'Y'
SET @@session.sql_warnings = TR蹺;
-ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'TR脺E'
+ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'TR蹺'
SET @@session.sql_warnings = 誑;
-ERROR 42000: Variable 'sql_warnings' can't be set to the value of '脮N'
+ERROR 42000: Variable 'sql_warnings' can't be set to the value of '誑'
SET @@session.sql_warnings = OF;
-SELECT @@session.sql_warnings;
-@@session.sql_warnings
-0
-'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
+ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'OF'
SET @@session.sql_warnings = 覨F;
-ERROR 42000: Variable 'sql_warnings' can't be set to the value of '脫FF'
+ERROR 42000: Variable 'sql_warnings' can't be set to the value of '覨F'
SET @@session.sql_warnings = '';
ERROR 42000: Variable 'sql_warnings' can't be set to the value of ''
SET @@session.sql_warnings = NO;
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_166_05----------------------------#'
-SET @@global.sql_warnings = 0;
-ERROR HY000: Variable 'sql_warnings' is a SESSION variable and can't be used with SET GLOBAL
+SET @@global.sql_warnings = 1-@@global.sql_warnings;
SELECT @@global.sql_warnings;
-ERROR HY000: Variable 'sql_warnings' is a SESSION variable
+@@global.sql_warnings
+1
+SET @@global.sql_warnings = 1-@@global.sql_warnings;
+SELECT @@global.sql_warnings;
+@@global.sql_warnings
+0
'#----------------------FN_DYNVARS_166_06------------------------#'
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -78,13 +77,12 @@ IF(@@session.sql_warnings, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.sql_warnings;
@@session.sql_warnings
-0
+1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_warnings';
VARIABLE_VALUE
-OFF
-'Bug: value in information schema does not match'
+ON
'#---------------------FN_DYNVARS_166_08-------------------------#'
SET @@session.sql_warnings = OFF;
SELECT @@session.sql_warnings;
diff --git a/mysql-test/suite/sys_vars/r/storage_engine_basic.result b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
index 8d621ac5599..6af550c1f70 100644
--- a/mysql-test/suite/sys_vars/r/storage_engine_basic.result
+++ b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
@@ -7,9 +7,8 @@ SELECT @start_session_value;
@start_session_value
MyISAM
'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.storage_engine = MYISAM;
+SET @@global.storage_engine = INNODB;
SET @@global.storage_engine = DEFAULT;
-ERROR 42000: Variable 'storage_engine' doesn't have a default value
SELECT @@global.storage_engine;
@@global.storage_engine
MyISAM
@@ -55,16 +54,18 @@ InnoDB
'#------------------FN_DYNVARS_005_04-----------------------#'
SET @@global.storage_engine = 8199;
ERROR 42000: Incorrect argument type to variable 'storage_engine'
+SET @@global.storage_engine = NULL;
+ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
SET @@global.storage_engine = -1024;
ERROR 42000: Incorrect argument type to variable 'storage_engine'
-SET @@global.storage_engine = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@global.storage_engine = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'storage_engine'
SET @@global.storage_engine = FILE;
ERROR 42000: Unknown table engine 'FILE'
SET @@session.storage_engine = 8199;
ERROR 42000: Incorrect argument type to variable 'storage_engine'
-SET @@session.storage_engine = 65530.34.;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
+SET @@session.storage_engine = 65530.34;
+ERROR 42000: Incorrect argument type to variable 'storage_engine'
SET @@session.storage_engine = RECORD;
ERROR 42000: Unknown table engine 'RECORD'
'#------------------FN_DYNVARS_005_05-----------------------#'
@@ -105,6 +106,7 @@ SELECT session.storage_engine;
ERROR 42S02: Unknown table 'session' in field list
SELECT storage_engine = @@session.storage_engine;
ERROR 42S22: Unknown column 'storage_engine' in 'field list'
+SET @@storage_engine = @start_global_value;
SET @@global.storage_engine = @start_global_value;
SELECT @@global.storage_engine;
@@global.storage_engine
diff --git a/mysql-test/suite/sys_vars/r/sync_binlog_basic_32.result b/mysql-test/suite/sys_vars/r/sync_binlog_basic.result
index cae626ad63b..89f99fcbbee 100644
--- a/mysql-test/suite/sys_vars/r/sync_binlog_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/sync_binlog_basic.result
@@ -70,7 +70,6 @@ Warning 1292 Truncated incorrect sync_binlog value: '42949672950'
SELECT @@global.sync_binlog;
@@global.sync_binlog
4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.sync_binlog = ON;
ERROR 42000: Incorrect argument type to variable 'sync_binlog'
SELECT @@global.sync_binlog;
diff --git a/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result b/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result
deleted file mode 100644
index d3cc4e2a9c2..00000000000
--- a/mysql-test/suite/sys_vars/r/sync_binlog_basic_64.result
+++ /dev/null
@@ -1,109 +0,0 @@
-SET @start_value = @@global.sync_binlog;
-SELECT @start_value;
-@start_value
-0
-'#--------------------FN_DYNVARS_168_01------------------------#'
-SET @@global.sync_binlog = 99;
-SET @@global.sync_binlog = DEFAULT;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
-'#---------------------FN_DYNVARS_168_02-------------------------#'
-SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog = 0;
-@@global.sync_binlog = 0
-1
-'#--------------------FN_DYNVARS_168_03------------------------#'
-SET @@global.sync_binlog = 0;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
-SET @@global.sync_binlog = 1;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-1
-SET @@global.sync_binlog = 4294967295;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-4294967295
-SET @@global.sync_binlog = 4294967294;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-4294967294
-SET @@global.sync_binlog = 65536;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-65536
-'#--------------------FN_DYNVARS_168_04-------------------------#'
-SET @@global.sync_binlog = -1;
-Warnings:
-Warning 1292 Truncated incorrect sync_binlog value: '-1'
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
-SET @@global.sync_binlog = 4294967296;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-4294967296
-SET @@global.sync_binlog = 10240022115;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-10240022115
-SET @@global.sync_binlog = 10000.01;
-ERROR 42000: Incorrect argument type to variable 'sync_binlog'
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-10240022115
-SET @@global.sync_binlog = -1024;
-Warnings:
-Warning 1292 Truncated incorrect sync_binlog value: '-1024'
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
-SET @@global.sync_binlog = 42949672950;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-42949672950
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@global.sync_binlog = ON;
-ERROR 42000: Incorrect argument type to variable 'sync_binlog'
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-42949672950
-SET @@global.sync_binlog = 'test';
-ERROR 42000: Incorrect argument type to variable 'sync_binlog'
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-42949672950
-'#-------------------FN_DYNVARS_168_05----------------------------#'
-SET @@session.sync_binlog = 0;
-ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@sync_binlog;
-@@sync_binlog
-42949672950
-'#----------------------FN_DYNVARS_168_06------------------------#'
-SELECT @@global.sync_binlog = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='sync_binlog';
-@@global.sync_binlog = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_168_07----------------------#'
-SET sync_binlog = 1;
-ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@sync_binlog;
-@@sync_binlog
-42949672950
-SET local.sync_binlog = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sync_binlog = 1' at line 1
-SELECT local.sync_binlog;
-ERROR 42S02: Unknown table 'local' in field list
-SET global.sync_binlog = 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sync_binlog = 1' at line 1
-SELECT global.sync_binlog;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT sync_binlog = @@session.sync_binlog;
-ERROR 42S22: Unknown column 'sync_binlog' in 'field list'
-SET @@global.sync_binlog = @start_value;
-SELECT @@global.sync_binlog;
-@@global.sync_binlog
-0
diff --git a/mysql-test/suite/sys_vars/r/sync_master_info_basic.result b/mysql-test/suite/sys_vars/r/sync_master_info_basic.result
new file mode 100644
index 00000000000..47aafe21a59
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_master_info_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.sync_master_info;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.sync_master_info;
+@@global.sync_master_info
+0
+select @@session.sync_master_info;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable
+show global variables like 'sync_master_info';
+Variable_name Value
+sync_master_info 0
+show session variables like 'sync_master_info';
+Variable_name Value
+sync_master_info 0
+select * from information_schema.global_variables where variable_name='sync_master_info';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_MASTER_INFO 0
+select * from information_schema.session_variables where variable_name='sync_master_info';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_MASTER_INFO 0
+set global sync_master_info=1;
+select @@global.sync_master_info;
+@@global.sync_master_info
+1
+set session sync_master_info=1;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+set global sync_master_info=1.1;
+ERROR 42000: Incorrect argument type to variable 'sync_master_info'
+set global sync_master_info=1e1;
+ERROR 42000: Incorrect argument type to variable 'sync_master_info'
+set global sync_master_info="foo";
+ERROR 42000: Incorrect argument type to variable 'sync_master_info'
+set global sync_master_info=0;
+select @@global.sync_master_info;
+@@global.sync_master_info
+0
+set global sync_master_info=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect sync_master_info value: '18446744073709551615'
+select @@global.sync_master_info;
+@@global.sync_master_info
+4294967295
+SET @@global.sync_master_info = @start_global_value;
+SELECT @@global.sync_master_info;
+@@global.sync_master_info
+0
diff --git a/mysql-test/suite/sys_vars/r/sync_relay_log_basic.result b/mysql-test/suite/sys_vars/r/sync_relay_log_basic.result
new file mode 100644
index 00000000000..75eac82f11e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_relay_log_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.sync_relay_log;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.sync_relay_log;
+@@global.sync_relay_log
+0
+select @@session.sync_relay_log;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable
+show global variables like 'sync_relay_log';
+Variable_name Value
+sync_relay_log 0
+show session variables like 'sync_relay_log';
+Variable_name Value
+sync_relay_log 0
+select * from information_schema.global_variables where variable_name='sync_relay_log';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_RELAY_LOG 0
+select * from information_schema.session_variables where variable_name='sync_relay_log';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_RELAY_LOG 0
+set global sync_relay_log=1;
+select @@global.sync_relay_log;
+@@global.sync_relay_log
+1
+set session sync_relay_log=1;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+set global sync_relay_log=1.1;
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log'
+set global sync_relay_log=1e1;
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log'
+set global sync_relay_log="foo";
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log'
+set global sync_relay_log=0;
+select @@global.sync_relay_log;
+@@global.sync_relay_log
+0
+set global sync_relay_log=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect sync_relay_log value: '18446744073709551615'
+select @@global.sync_relay_log;
+@@global.sync_relay_log
+4294967295
+SET @@global.sync_relay_log = @start_global_value;
+SELECT @@global.sync_relay_log;
+@@global.sync_relay_log
+0
diff --git a/mysql-test/suite/sys_vars/r/sync_relay_log_info_basic.result b/mysql-test/suite/sys_vars/r/sync_relay_log_info_basic.result
new file mode 100644
index 00000000000..fe0efdc0737
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_relay_log_info_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.sync_relay_log_info;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.sync_relay_log_info;
+@@global.sync_relay_log_info
+0
+select @@session.sync_relay_log_info;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable
+show global variables like 'sync_relay_log_info';
+Variable_name Value
+sync_relay_log_info 0
+show session variables like 'sync_relay_log_info';
+Variable_name Value
+sync_relay_log_info 0
+select * from information_schema.global_variables where variable_name='sync_relay_log_info';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_RELAY_LOG_INFO 0
+select * from information_schema.session_variables where variable_name='sync_relay_log_info';
+VARIABLE_NAME VARIABLE_VALUE
+SYNC_RELAY_LOG_INFO 0
+set global sync_relay_log_info=1;
+select @@global.sync_relay_log_info;
+@@global.sync_relay_log_info
+1
+set session sync_relay_log_info=1;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+set global sync_relay_log_info=1.1;
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log_info'
+set global sync_relay_log_info=1e1;
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log_info'
+set global sync_relay_log_info="foo";
+ERROR 42000: Incorrect argument type to variable 'sync_relay_log_info'
+set global sync_relay_log_info=0;
+select @@global.sync_relay_log_info;
+@@global.sync_relay_log_info
+0
+set global sync_relay_log_info=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect sync_relay_log_info value: '18446744073709551615'
+select @@global.sync_relay_log_info;
+@@global.sync_relay_log_info
+4294967295
+SET @@global.sync_relay_log_info = @start_global_value;
+SELECT @@global.sync_relay_log_info;
+@@global.sync_relay_log_info
+0
diff --git a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
index 9e523f44d4b..0f5794aa329 100644
--- a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
@@ -61,7 +61,6 @@ Warning 1292 Truncated incorrect table_definition_cache value: '42949672950'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
524288
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.table_definition_cache = 21221204.10;
ERROR 42000: Incorrect argument type to variable 'table_definition_cache'
SET @@global.table_definition_cache = ON;
diff --git a/mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result
index a500581c228..68c36242cc1 100644
--- a/mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result
@@ -47,7 +47,6 @@ Warning 1292 Truncated incorrect table_lock_wait_timeout value: '-1024'
SET @@global.table_lock_wait_timeout= 0;
Warnings:
Warning 1292 Truncated incorrect table_lock_wait_timeout value: '0'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.table_lock_wait_timeout= 10000.01;
ERROR 42000: Incorrect argument type to variable 'table_lock_wait_timeout'
SET @@global.table_lock_wait_timeout= ON;
diff --git a/mysql-test/suite/sys_vars/r/table_open_cache_basic.result b/mysql-test/suite/sys_vars/r/table_open_cache_basic.result
index da9b8c0d1aa..0b0c3230e5e 100644
--- a/mysql-test/suite/sys_vars/r/table_open_cache_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_open_cache_basic.result
@@ -61,7 +61,6 @@ Warning 1292 Truncated incorrect table_open_cache value: '0'
SELECT @@global.table_open_cache ;
@@global.table_open_cache
1
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.table_open_cache = 10000.01;
ERROR 42000: Incorrect argument type to variable 'table_open_cache'
SET @@global.table_open_cache = ON;
diff --git a/mysql-test/suite/sys_vars/r/thread_cache_size_basic.result b/mysql-test/suite/sys_vars/r/thread_cache_size_basic.result
new file mode 100644
index 00000000000..1c802f1afdd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_cache_size_basic.result
@@ -0,0 +1,47 @@
+SET @start_global_value = @@global.thread_cache_size;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.thread_cache_size;
+@@global.thread_cache_size
+0
+select @@session.thread_cache_size;
+ERROR HY000: Variable 'thread_cache_size' is a GLOBAL variable
+show global variables like 'thread_cache_size';
+Variable_name Value
+thread_cache_size 0
+show session variables like 'thread_cache_size';
+Variable_name Value
+thread_cache_size 0
+select * from information_schema.global_variables where variable_name='thread_cache_size';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_CACHE_SIZE 0
+select * from information_schema.session_variables where variable_name='thread_cache_size';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_CACHE_SIZE 0
+set global thread_cache_size=1;
+select @@global.thread_cache_size;
+@@global.thread_cache_size
+1
+set session thread_cache_size=1;
+ERROR HY000: Variable 'thread_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global thread_cache_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'thread_cache_size'
+set global thread_cache_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'thread_cache_size'
+set global thread_cache_size="foo";
+ERROR 42000: Incorrect argument type to variable 'thread_cache_size'
+set global thread_cache_size=0;
+select @@global.thread_cache_size;
+@@global.thread_cache_size
+0
+set global thread_cache_size=cast(-1 as unsigned int);
+Warnings:
+Warning 1292 Truncated incorrect thread_cache_size value: '18446744073709551615'
+select @@global.thread_cache_size;
+@@global.thread_cache_size
+16384
+SET @@global.thread_cache_size = @start_global_value;
+SELECT @@global.thread_cache_size;
+@@global.thread_cache_size
+0
diff --git a/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result
new file mode 100644
index 00000000000..ea8c0168212
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result
@@ -0,0 +1,21 @@
+select @@global.thread_concurrency;
+@@global.thread_concurrency
+10
+select @@session.thread_concurrency;
+ERROR HY000: Variable 'thread_concurrency' is a GLOBAL variable
+show global variables like 'thread_concurrency';
+Variable_name Value
+thread_concurrency 10
+show session variables like 'thread_concurrency';
+Variable_name Value
+thread_concurrency 10
+select * from information_schema.global_variables where variable_name='thread_concurrency';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_CONCURRENCY 10
+select * from information_schema.session_variables where variable_name='thread_concurrency';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_CONCURRENCY 10
+set global thread_concurrency=1;
+ERROR HY000: Variable 'thread_concurrency' is a read only variable
+set session thread_concurrency=1;
+ERROR HY000: Variable 'thread_concurrency' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/thread_stack_basic.result b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
new file mode 100644
index 00000000000..c9c458a28a9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
@@ -0,0 +1,21 @@
+select @@global.thread_stack;
+@@global.thread_stack
+262144
+select @@session.thread_stack;
+ERROR HY000: Variable 'thread_stack' is a GLOBAL variable
+show global variables like 'thread_stack';
+Variable_name Value
+thread_stack 262144
+show session variables like 'thread_stack';
+Variable_name Value
+thread_stack 262144
+select * from information_schema.global_variables where variable_name='thread_stack';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_STACK 262144
+select * from information_schema.session_variables where variable_name='thread_stack';
+VARIABLE_NAME VARIABLE_VALUE
+THREAD_STACK 262144
+set global thread_stack=1;
+ERROR HY000: Variable 'thread_stack' is a read only variable
+set session thread_stack=1;
+ERROR HY000: Variable 'thread_stack' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/time_format_basic.result b/mysql-test/suite/sys_vars/r/time_format_basic.result
new file mode 100644
index 00000000000..fcc23608d39
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/time_format_basic.result
@@ -0,0 +1,21 @@
+select @@global.time_format;
+@@global.time_format
+%H:%i:%s
+select @@session.time_format;
+ERROR HY000: Variable 'time_format' is a GLOBAL variable
+show global variables like 'time_format';
+Variable_name Value
+time_format %H:%i:%s
+show session variables like 'time_format';
+Variable_name Value
+time_format %H:%i:%s
+select * from information_schema.global_variables where variable_name='time_format';
+VARIABLE_NAME VARIABLE_VALUE
+TIME_FORMAT %H:%i:%s
+select * from information_schema.session_variables where variable_name='time_format';
+VARIABLE_NAME VARIABLE_VALUE
+TIME_FORMAT %H:%i:%s
+set global time_format=1;
+ERROR HY000: Variable 'time_format' is a read only variable
+set session time_format=1;
+ERROR HY000: Variable 'time_format' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/timestamp_basic_32.result b/mysql-test/suite/sys_vars/r/timestamp_basic.result
index a8be2201e68..a73de543815 100644
--- a/mysql-test/suite/sys_vars/r/timestamp_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/timestamp_basic.result
@@ -1,25 +1,24 @@
SET @session_start_value = @@session.timestamp;
'#--------------------FN_DYNVARS_001_01------------------------#'
SET @@timestamp = DEFAULT;
-'timestamp does not have any DEFAULT value'
+SELECT @@timestamp = UNIX_TIMESTAMP();
+@@timestamp = UNIX_TIMESTAMP()
+1
'#---------------------FN_DYNVARS_001_02-------------------------#'
SET @@global.timestamp = "1000";
ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
'#--------------------FN_DYNVARS_001_03------------------------#'
SET @@timestamp = 0;
+SELECT @@timestamp = UNIX_TIMESTAMP();
+@@timestamp = UNIX_TIMESTAMP()
+1
'Setting 0 resets timestamp to session default timestamp'
-SET @@timestamp = 123456789123456;
-SELECT @@timestamp;
-@@timestamp
-2249167232
-SET @@timestamp = 60*60*60*60*365;
-SELECT @@timestamp;
-@@timestamp
-435432704
SET @@timestamp = -1000000000;
-SELECT @@timestamp;
-@@timestamp
-3294967296
+Warnings:
+Warning 1292 Truncated incorrect timestamp value: '-1000000000'
+SELECT @@timestamp = UNIX_TIMESTAMP();
+@@timestamp = UNIX_TIMESTAMP()
+1
SET @temp_ts = @@timestamp - @@timestamp;
SELECT @temp_ts;
@temp_ts
@@ -27,7 +26,6 @@ SELECT @temp_ts;
'#--------------------FN_DYNVARS_001_04-------------------------#'
SET @@timestamp = "100";
ERROR 42000: Incorrect argument type to variable 'timestamp'
-'Bug# 34836: Documentation says its a string variable but infact its numeric'
SET @@timestamp = " ";
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = 1.1;
diff --git a/mysql-test/suite/sys_vars/r/timestamp_basic_64.result b/mysql-test/suite/sys_vars/r/timestamp_basic_64.result
deleted file mode 100644
index 824a3ea5529..00000000000
--- a/mysql-test/suite/sys_vars/r/timestamp_basic_64.result
+++ /dev/null
@@ -1,68 +0,0 @@
-SET @session_start_value = @@session.timestamp;
-'#--------------------FN_DYNVARS_001_01------------------------#'
-SET @@timestamp = DEFAULT;
-'timestamp does not have any DEFAULT value'
-'#---------------------FN_DYNVARS_001_02-------------------------#'
-SET @@global.timestamp = "1000";
-ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
-'#--------------------FN_DYNVARS_001_03------------------------#'
-SET @@timestamp = 0;
-'Setting 0 resets timestamp to session default timestamp'
-SET @@timestamp = 123456789123456;
-SELECT @@timestamp;
-@@timestamp
-123456789123456
-SET @@timestamp = 60*60*60*60*365;
-SELECT @@timestamp;
-@@timestamp
-4730400000
-SET @@timestamp = -1000000000;
-SELECT @@timestamp;
-@@timestamp
-18446744072709551616
-SET @temp_ts = @@timestamp - @@timestamp;
-SELECT @temp_ts;
-@temp_ts
-0
-'#--------------------FN_DYNVARS_001_04-------------------------#'
-SET @@timestamp = "100";
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-'Bug# 34836: Documentation says its a string variable but infact its numeric'
-SET @@timestamp = " ";
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-SET @@timestamp = 1.1;
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-SET @@timestamp = 9999999999999999999999;
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-'#----------------------FN_DYNVARS_001_06------------------------#'
-'#---------------------FN_DYNVARS_001_08-------------------------#'
-SET @@timestamp = OFF;
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-SET @@timestamp = ON;
-ERROR 42000: Incorrect argument type to variable 'timestamp'
-SET @@timestamp = TRUE;
-SELECT @@timestamp;
-@@timestamp
-1
-SET @@timestamp = FALSE;
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@timestamp = 123456;
-SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
-@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
-1
-SET @@timestamp = 654321;
-SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
-@@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET timestamp = 1;
-SELECT @@timestamp;
-@@timestamp
-1
-SELECT local.timestamp;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.timestamp;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT timestamp = @@session.timestamp;
-ERROR 42S22: Unknown column 'timestamp' in 'field list'
-SET @@timestamp = @session_start_value;
diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
index 2ebeb8d61d8..06b624ad5c8 100644
--- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
@@ -100,8 +100,6 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '12345678901'
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
@@session.tmp_table_size IN (12345678901,4294967295)
1
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_32.result
index 8c6a788862d..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_32.result
@@ -36,6 +36,8 @@ 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
@@ -45,7 +47,6 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
@@ -58,10 +59,11 @@ 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
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.transaction_alloc_block_size = 0;
Warnings:
@@ -81,7 +83,6 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1234567892
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
@@ -114,7 +115,6 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1234567890
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
4294966272
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
@@ -167,6 +167,8 @@ SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_
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
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
index 749df56c60b..3c958439231 100644
--- 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
@@ -36,28 +36,34 @@ 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
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------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
-'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.transaction_alloc_block_size = 0;
Warnings:
@@ -72,10 +78,11 @@ 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
123456788480
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
@@ -103,10 +110,11 @@ 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
12345678848
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
@@ -142,6 +150,8 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size';
'#---------------------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
@@ -157,6 +167,8 @@ SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_
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
diff --git a/mysql-test/suite/sys_vars/r/tx_isolation_basic.result b/mysql-test/suite/sys_vars/r/tx_isolation_basic.result
index d487a6d92a8..b784d6bb180 100644
--- a/mysql-test/suite/sys_vars/r/tx_isolation_basic.result
+++ b/mysql-test/suite/sys_vars/r/tx_isolation_basic.result
@@ -9,16 +9,13 @@ REPEATABLE-READ
'#--------------------FN_DYNVARS_183_01------------------------#'
SET @@global.tx_isolation = 'READ-UNCOMMITTED';
SET @@global.tx_isolation = DEFAULT;
-ERROR 42000: Variable 'tx_isolation' doesn't have a default value
-'Bug# 34878: Documentation specifies a DEFAULT value of REPEATABLE-READ';
-'where as DEFAULT is not supported here.';
-SET @@session.tx_isolation = 'SERIALIZABLE';
+SELECT @@global.tx_isolation;
+@@global.tx_isolation
+REPEATABLE-READ
SET @@session.tx_isolation = DEFAULT;
SELECT @@session.tx_isolation;
@@session.tx_isolation
-READ-UNCOMMITTED
-'Bug# 34876: Documentation specifies a DEFAULT value of REPEATABLE-READ';
-'where as DEFAULT here as no effect.';
+REPEATABLE-READ
'#---------------------FN_DYNVARS_183_02-------------------------#'
SET @@global.tx_isolation = NULL;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NULL'
@@ -67,10 +64,7 @@ ERROR 42000: Variable 'tx_isolation' can't be set to the value of '-1'
SET @@global.tx_isolation = READUNCOMMITTED;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'READUNCOMMITTED'
SET @@global.tx_isolation = 'REPEATABLE';
-SELECT @@global.tx_isolation;
-@@global.tx_isolation
-REPEATABLE-READ
-'Bug# 34833: REPEATABLE is not documented as as valid tx_isolation level'
+ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'REPEATABLE'
SET @@global.tx_isolation = OFF;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'OFF'
SET @@global.tx_isolation = ON;
@@ -82,10 +76,7 @@ ERROR 42000: Variable 'tx_isolation' can't be set to the value of '-1'
SET @@tx_isolation = READUNCOMMITTED;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'READUNCOMMITTED'
SET @@tx_isolation = 'REPEATABLE';
-SELECT @@tx_isolation;
-@@tx_isolation
-REPEATABLE-READ
-'Bug# 34833: REPEATABLE is not documented as as valid tx_isolation level'
+ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'REPEATABLE'
SET @@tx_isolation = 'NONE';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NONE'
SET @@tx_isolation = 'ALL';
@@ -120,29 +111,7 @@ SELECT @@global.tx_isolation;
@@global.tx_isolation
SERIALIZABLE
SET @@global.tx_isolation = 0.4;
-SELECT @@global.tx_isolation;
-@@global.tx_isolation
-READ-UNCOMMITTED
-SET @@global.tx_isolation = 1.1;
-SELECT @@global.tx_isolation;
-@@global.tx_isolation
-READ-COMMITTED
-SET @@global.tx_isolation = 1.5;
-SELECT @@global.tx_isolation;
-@@global.tx_isolation
-REPEATABLE-READ
-SET @@global.tx_isolation = 2.9;
-SELECT @@global.tx_isolation;
-@@global.tx_isolation
-SERIALIZABLE
-SET @@session.tx_isolation = 3.49;
-SELECT @@session.tx_isolation;
-@@session.tx_isolation
-SERIALIZABLE
-SET @@session.tx_isolation = 3.6;
-ERROR 42000: Variable 'tx_isolation' can't be set to the value of '4'
-'Bug: Decimal values can be used within the range [0.0-3.5).';
-'Values are rounded to 0,1,2,3 as evident from outcome.';
+ERROR 42000: Incorrect argument type to variable 'tx_isolation'
'#---------------------FN_DYNVARS_183_08----------------------#'
SET @@global.tx_isolation = TRUE;
SELECT @@global.tx_isolation;
diff --git a/mysql-test/suite/sys_vars/r/unique_checks_basic.result b/mysql-test/suite/sys_vars/r/unique_checks_basic.result
index 50ca7317490..60cf2795309 100644
--- a/mysql-test/suite/sys_vars/r/unique_checks_basic.result
+++ b/mysql-test/suite/sys_vars/r/unique_checks_basic.result
@@ -7,12 +7,7 @@ SET @@session.unique_checks= 1;
SET @@session.unique_checks= DEFAULT;
SELECT @@session.unique_checks;
@@session.unique_checks
-1
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@session.unique_checks = DEFAULT;
-SELECT @@session.unique_checks =1;
-@@session.unique_checks =1
-1
+0
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.unique_checks =1;
SELECT @@session.unique_checks;
diff --git a/mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result b/mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result
index e2eebbd7a2c..fb31ae7f10a 100644
--- a/mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result
+++ b/mysql-test/suite/sys_vars/r/updatable_views_with_limit_basic.result
@@ -118,7 +118,7 @@ ERROR 42000: Variable 'updatable_views_with_limit' can't be set to the value of
SET @@global.updatable_views_with_limit = "FALSE";
ERROR 42000: Variable 'updatable_views_with_limit' can't be set to the value of 'FALSE'
SET @@global.updatable_views_with_limit = 65530.34;
-ERROR 42000: Variable 'updatable_views_with_limit' can't be set to the value of '65530'
+ERROR 42000: Incorrect argument type to variable 'updatable_views_with_limit'
SET @@global.updatable_views_with_limit ="Testing";
ERROR 42000: Variable 'updatable_views_with_limit' can't be set to the value of 'Testing'
SET @@session.updatable_views_with_limit = "ON";
diff --git a/mysql-test/suite/sys_vars/r/wait_timeout_basic_32.result b/mysql-test/suite/sys_vars/r/wait_timeout_basic.result
index c9bffc61b6f..6dc99dcd5e3 100644
--- a/mysql-test/suite/sys_vars/r/wait_timeout_basic_32.result
+++ b/mysql-test/suite/sys_vars/r/wait_timeout_basic.result
@@ -45,7 +45,6 @@ Warning 1292 Truncated incorrect wait_timeout value: '0'
SET @@global.wait_timeout = -1024;
Warnings:
Warning 1292 Truncated incorrect wait_timeout value: '-1024'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.wait_timeout = ON;
ERROR 42000: Incorrect argument type to variable 'wait_timeout'
SET @@global.wait_timeout = OFF;
diff --git a/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result b/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
deleted file mode 100644
index c9bffc61b6f..00000000000
--- a/mysql-test/suite/sys_vars/r/wait_timeout_basic_64.result
+++ /dev/null
@@ -1,129 +0,0 @@
-SET @start_global_value = @@global.wait_timeout;
-SET @start_session_value = @@session.wait_timeout;
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.wait_timeout = 100;
-SET @@global.wait_timeout = DEFAULT;
-SELECT @@global.wait_timeout;
-@@global.wait_timeout
-28800
-SET @@session.wait_timeout = 200;
-SET @@session.wait_timeout = DEFAULT;
-SELECT @@session.wait_timeout;
-@@session.wait_timeout
-28800
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SET @@global.wait_timeout = DEFAULT;
-SELECT @@global.wait_timeout = @default_wait_timeout;
-@@global.wait_timeout = @default_wait_timeout
-1
-SET @@session.wait_timeout = DEFAULT;
-SELECT @@session.wait_timeout = @default_wait_timeout;
-@@session.wait_timeout = @default_wait_timeout
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.wait_timeout= 1;
-SELECT @@global.wait_timeout;
-@@global.wait_timeout
-1
-SET @@global.wait_timeout = 60020;
-SELECT @@global.wait_timeout;
-@@global.wait_timeout
-60020
-SET @@global.wait_timeout = 31536000;
-SELECT @@global.wait_timeout = @max_wait_timeout;
-@@global.wait_timeout = @max_wait_timeout
-1
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.wait_timeout =6000;
-SELECT @@session.wait_timeout;
-@@session.wait_timeout
-6000
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.wait_timeout = 0;
-Warnings:
-Warning 1292 Truncated incorrect wait_timeout value: '0'
-SET @@global.wait_timeout = -1024;
-Warnings:
-Warning 1292 Truncated incorrect wait_timeout value: '-1024'
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@global.wait_timeout = ON;
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@global.wait_timeout = OFF;
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@global.wait_timeout = True;
-SELECT @@global.wait_timeout;
-@@global.wait_timeout
-1
-SET @@global.wait_timeout = False;
-Warnings:
-Warning 1292 Truncated incorrect wait_timeout value: '0'
-SELECT @@global.wait_timeout;
-@@global.wait_timeout
-1
-SET @@global.wait_timeout = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@global.wait_timeout ="Test";
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@session.wait_timeout = ON;
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@session.wait_timeout = OFF;
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@session.wait_timeout = True;
-SELECT @@session.wait_timeout;
-@@session.wait_timeout
-1
-SET @@session.wait_timeout = False;
-Warnings:
-Warning 1292 Truncated incorrect wait_timeout value: '0'
-SELECT @@session.wait_timeout;
-@@session.wait_timeout
-1
-SET @@session.wait_timeout = "Test";
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@session.wait_timeout = 'test';
-ERROR 42000: Incorrect argument type to variable 'wait_timeout'
-SET @@session.wait_timeout = 123456789031;
-Warnings:
-Warning 1292 Truncated incorrect wait_timeout value: '123456789031'
-SELECT @@session.wait_timeout = @max_wait_timeout;
-@@session.wait_timeout = @max_wait_timeout
-1
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.wait_timeout = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='wait_timeout';
-@@global.wait_timeout = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.wait_timeout = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='wait_timeout';
-@@session.wait_timeout = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.wait_timeout = 30000;
-SET @@global.wait_timeout = 40000;
-SELECT @@wait_timeout = @@global.wait_timeout;
-@@wait_timeout = @@global.wait_timeout
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@wait_timeout = 100;
-SELECT @@wait_timeout = @@local.wait_timeout;
-@@wait_timeout = @@local.wait_timeout
-1
-SELECT @@local.wait_timeout = @@session.wait_timeout;
-@@local.wait_timeout = @@session.wait_timeout
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET wait_timeout = 1027;
-SELECT @@wait_timeout;
-@@wait_timeout
-1027
-SELECT local.wait_timeout;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.wait_timeout;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT wait_timeout = @@session.wait_timeout;
-ERROR 42S22: Unknown column 'wait_timeout' in 'field list'
-SET @@global.wait_timeout = @start_global_value;
-SET @@session.wait_timeout = @start_session_value;
diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test
new file mode 100644
index 00000000000..c6c228d842f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/all_vars.test
@@ -0,0 +1,35 @@
+--source include/not_embedded.inc
+
+#
+# This test verifies that *all* system variables are tested
+# by the sys_vars suite. For every system variable
+# there must be a <variable_name>_basic.test file.
+#
+
+#
+# we can diff in perl or in sql, as it's my_SQL_test suite, do it in sql
+#
+
+perl;
+ use File::Basename;
+ my $dirname=dirname($ENV{MYSQLTEST_FILE});
+ my @all_tests=<$dirname/*_basic{,_32,_64}.test>;
+ open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/sys_vars.all_vars.txt") or die;
+ binmode F;
+ print F join "\n", sort map { s/_basic(_32|_64)?\.test$//; basename $_ } @all_tests;
+EOF
+
+create table t1 (test_name text);
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
+
+select variable_name as `There should be *no* variables listed below:`
+ from information_schema.global_variables
+ left join t1 on variable_name=test_name where
+ test_name is null
+ union
+select variable_name from information_schema.session_variables
+ left join t1 on variable_name=test_name where
+ test_name is null;
+
+drop table t1;
diff --git a/mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test b/mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test
index 4acfb8f503b..d76880b149e 100644
--- a/mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test
+++ b/mysql-test/suite/sys_vars/t/auto_increment_increment_basic.test
@@ -103,8 +103,8 @@ SET @@global.auto_increment_increment = -1024;
SELECT @@global.auto_increment_increment;
SET @@global.auto_increment_increment = 65536;
SELECT @@global.auto_increment_increment;
---Error ER_PARSE_ERROR
-SET @@global.auto_increment_increment = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.auto_increment_increment = 65530.34;
SELECT @@global.auto_increment_increment;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.auto_increment_increment = test;
@@ -114,11 +114,10 @@ SET @@session.auto_increment_increment = 0;
SELECT @@session.auto_increment_increment;
SET @@session.auto_increment_increment = -2;
SELECT @@session.auto_increment_increment;
---Error ER_PARSE_ERROR
-SET @@session.auto_increment_increment = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.auto_increment_increment = 65530.34;
SET @@session.auto_increment_increment = 65550;
SELECT @@session.auto_increment_increment;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.auto_increment_increment = test;
diff --git a/mysql-test/suite/sys_vars/t/auto_increment_increment_func.test b/mysql-test/suite/sys_vars/t/auto_increment_increment_func.test
index 7822775fb35..51c32669934 100644
--- a/mysql-test/suite/sys_vars/t/auto_increment_increment_func.test
+++ b/mysql-test/suite/sys_vars/t/auto_increment_increment_func.test
@@ -119,8 +119,6 @@ SELECT @@session.auto_increment_increment = 20;
SET @@session.auto_increment_increment = 5;
INSERT into t1(name) values('Record_10');
SELECT * from t1;
---echo 'Bug#35362: Here Record_10 id should be 120 instead of 115 because we'
---echo 'have set the value of variable to 5'
SET @@session.auto_increment_increment = 1;
SELECT @@auto_increment_increment;
@@ -176,9 +174,6 @@ INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
SELECT * from t1;
---echo 'Bug#35364: Variable is incrementing some random values on assigning -ve value'
-
-
############################################################
# Disconnecting all connection & dropping table #
############################################################
diff --git a/mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test b/mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test
index a98fd6467ad..76261645b30 100644
--- a/mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test
+++ b/mysql-test/suite/sys_vars/t/auto_increment_offset_basic.test
@@ -117,7 +117,6 @@ SET @@session.auto_increment_offset = -2;
SELECT @@session.auto_increment_offset;
SET @@session.auto_increment_offset = 65550;
SELECT @@session.auto_increment_offset;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.auto_increment_offset = ON;
diff --git a/mysql-test/suite/sys_vars/t/auto_increment_offset_func.test b/mysql-test/suite/sys_vars/t/auto_increment_offset_func.test
index 7e1668452cc..0ac96255acf 100644
--- a/mysql-test/suite/sys_vars/t/auto_increment_offset_func.test
+++ b/mysql-test/suite/sys_vars/t/auto_increment_offset_func.test
@@ -111,8 +111,6 @@ SELECT * from t1;
--echo ## Setting value of variable less than last insert id ##
SET @@session.auto_increment_offset = 5;
INSERT into t1(name) values('Record_9');
---echo 'Bug#35367: Random value of id is increasing on assigning value to';
---echo 'variable that is less than current offset';
INSERT into t1(name) values('Record_10');
INSERT into t1(name) values('Record_11');
INSERT into t1(name) values('Record_12');
@@ -133,9 +131,6 @@ SET @@auto_increment_increment = 10;
INSERT into t1(name) values('Record_13');
INSERT into t1(name) values('Record_14');
SELECT * from t1;
---echo 'Bug#35369: Some invalid value of id is increasing on assigning value to';
---echo 'variable that is greater than auto_increment_increment';
-
--echo '#--------------------FN_DYNVARS_002_06-------------------------#'
###############################################################################
@@ -165,8 +160,6 @@ SELECT @@auto_increment_offset = -10;
INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
SELECT * from t1;
---echo 'Bug#35370: Some invalid value of id is increasing on assigning negative';
---echo ' value in variable';
--echo ## Assigning value that is out of range of variable ##
SET @@auto_increment_offset = 65536;
diff --git a/mysql-test/suite/sys_vars/t/auto_commit_basic.test b/mysql-test/suite/sys_vars/t/autocommit_basic.test
index b899c273093..fa6654ae37c 100644
--- a/mysql-test/suite/sys_vars/t/auto_commit_basic.test
+++ b/mysql-test/suite/sys_vars/t/autocommit_basic.test
@@ -33,7 +33,7 @@
# Saving initial value of autocommit in a temporary variable #
########################################################################
-SET @start_value = @@autocommit;
+SET @start_value = @@global.autocommit;
SELECT @start_value;
@@ -45,7 +45,6 @@ SELECT @start_value;
SET @@autocommit = 0;
SET @@autocommit = DEFAULT;
SELECT @@autocommit;
-echo 'Bug: variable DEFAULT value not working and is not throwing error';
--echo '#---------------------FN_DYNVARS_003_02-------------------------#'
###############################################
@@ -102,10 +101,9 @@ SET @@autocommit = '';
# Test if accessing global autocommit gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
SET @@global.autocommit = 0;
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@global.autocommit;
+SET @@global.autocommit = 1;
--echo '#----------------------FN_DYNVARS_003_06------------------------#'
@@ -116,7 +114,6 @@ SELECT @@global.autocommit;
SELECT IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='autocommit';
---echo Bug # 34839: Values in variable and information_schema do not match for autocommit
--echo '#----------------------FN_DYNVARS_003_07------------------------#'
#########################################################################
@@ -182,8 +179,8 @@ SELECT autocommit = @@session.autocommit;
# Restore initial value #
##############################
-SET @@autocommit = @start_value;
-SELECT @@autocommit;
+SET @@global.autocommit = @start_value;
+SELECT @@global.autocommit;
########################################################################
# END OF autocommit TESTS #
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func-master.opt b/mysql-test/suite/sys_vars/t/autocommit_func-master.opt
deleted file mode 100644
index 627becdbfb5..00000000000
--- a/mysql-test/suite/sys_vars/t/autocommit_func-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb
diff --git a/mysql-test/suite/sys_vars/t/autocommit_func.test b/mysql-test/suite/sys_vars/t/autocommit_func.test
index 07e15ce40da..06193448588 100644
--- a/mysql-test/suite/sys_vars/t/autocommit_func.test
+++ b/mysql-test/suite/sys_vars/t/autocommit_func.test
@@ -145,7 +145,6 @@ SELECT * from t1;
--echo ## Connecting with connection # 01 and inserting few records ##
CONNECTION test_con1;
SELECT * from t1;
---echo 'Bug#35373: Records donot get committed in transaction on switching connections'
INSERT into t1(name) values('Record_6');
SELECT * from t1;
diff --git a/mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test b/mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test
index 005aec91acf..dfa733a0b9b 100644
--- a/mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test
+++ b/mysql-test/suite/sys_vars/t/automatic_sp_privileges_basic.test
@@ -116,7 +116,6 @@ SELECT @@session.automatic_sp_privileges;
SELECT IF(@@global.automatic_sp_privileges, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='automatic_sp_privileges';
-echo 'Bug# 34839: Values in variable and information_schema donot match';
--echo '#---------------------FN_DYNVARS_004_07----------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/back_log_basic.test b/mysql-test/suite/sys_vars/t/back_log_basic.test
new file mode 100644
index 00000000000..518ca2f0e5f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/back_log_basic.test
@@ -0,0 +1,19 @@
+#
+# show the global and session values;
+#
+select @@global.back_log;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.back_log;
+show global variables like 'back_log';
+show session variables like 'back_log';
+select * from information_schema.global_variables where variable_name='back_log';
+select * from information_schema.session_variables where variable_name='back_log';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global back_log=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session back_log=1;
+
diff --git a/mysql-test/suite/sys_vars/t/big_tables_basic.test b/mysql-test/suite/sys_vars/t/big_tables_basic.test
index 67215f2625d..89a7ee83bc8 100644
--- a/mysql-test/suite/sys_vars/t/big_tables_basic.test
+++ b/mysql-test/suite/sys_vars/t/big_tables_basic.test
@@ -45,7 +45,6 @@ SELECT @start_value;
SET @@big_tables = 1;
SET @@big_tables = DEFAULT;
SELECT @@big_tables;
---echo 'Bug# 34829: No default value for variable and setting default does not raise error';
--echo '#--------------------FN_DYNVARS_005_02------------------------#'
@@ -96,11 +95,9 @@ SET @@big_tables = '';
# Test if accessing global big_tables gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.big_tables = 0;
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.big_tables = 1-@@global.big_tables;
SELECT @@global.big_tables;
-
+SET @@global.big_tables = 1-@@global.big_tables;
--echo '#----------------------FN_DYNVARS_005_05------------------------#'
##############################################################################
@@ -110,7 +107,6 @@ SELECT @@global.big_tables;
SELECT IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='big_tables';
---echo Bug # 34839: Values in variable and information_schema do not match for autocommit
--echo '#---------------------FN_DYNVARS_005_06----------------------#'
diff --git a/mysql-test/suite/sys_vars/t/character_set_client_basic.test b/mysql-test/suite/sys_vars/t/character_set_client_basic.test
index 177a663c112..26912e89509 100644
--- a/mysql-test/suite/sys_vars/t/character_set_client_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_client_basic.test
@@ -164,14 +164,8 @@ SELECT @@character_set_client;
SET @@character_set_client = utf8;
SELECT @@character_set_client;
-#SET @@character_set_client = ucs2;
-#--Error ER_PARSE_ERROR
-#SELECT @@session.character_set_client;
---echo 'Bug: Assignment of ucs2 to session character-set does not raise error';
---echo 'but selecting variable after setting it does.';
---echo 'Even catching this does not allow any further character-set to be set.';
---echo 'Offending querry seems to be:';
---echo 'SET @@character_set_client = ucs2;'
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@character_set_client = ucs2;
SET @@character_set_client = cp866;
SELECT @@character_set_client;
@@ -256,9 +250,6 @@ SET @@global.character_set_client = 100;
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
---echo 'Bug # 34843: character sets are mapped in such a way that 100 and following';
---echo 'numbers gives error, and before 100 the 36 mapped wraps arround';
---echo 'several times.';
--echo '#--------------------FN_DYNVARS_010_10-------------------------#'
###############################################################################
diff --git a/mysql-test/suite/sys_vars/t/character_set_client_func.test b/mysql-test/suite/sys_vars/t/character_set_client_func.test
index 19994672fa4..90f5cdaae0f 100644
--- a/mysql-test/suite/sys_vars/t/character_set_client_func.test
+++ b/mysql-test/suite/sys_vars/t/character_set_client_func.test
@@ -38,8 +38,6 @@ SELECT @@global.character_set_client;
SELECT @@session.character_set_client;
disconnect con1;
---echo 'Bug# 35372: session character_set_client is not effected by global character_set_client'
-
--echo '#--------------------FN_DYNVARS_010_02-------------------------#'
#############################################################
# Begin the functionality Testing of character_set_client #
@@ -62,13 +60,13 @@ CREATE TABLE t1(a CHAR(3) character set utf8);
--echo 'For latin1 characterset';
SET @@session.character_set_client = latin1;
INSERT INTO t1 values('');
-SELECT a,CHAR_LENGTH(a) FROM t1;
+SELECT hex(a),CHAR_LENGTH(a) FROM t1;
DELETE FROM t1;
--echo 'For utf8 characterset';
SET @@session.character_set_client = utf8;
INSERT INTO t1 values('');
-SELECT a,CHAR_LENGTH(a) FROM t1;
+SELECT hex(a),CHAR_LENGTH(a) FROM t1;
DELETE FROM t1;
--disable_warnings
diff --git a/mysql-test/suite/sys_vars/t/character_set_connection_basic.test b/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
index 5e28d43ce3e..1a51843e0e8 100644
--- a/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_connection_basic.test
@@ -182,9 +182,6 @@ SET @@global.character_set_connection = 100;
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
---echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
---echo 'numbers gives error, and before 100 the 36 mapped wraps arround';
---echo 'several times.';
--echo '#--------------------FN_DYNVARS_011_10-------------------------#'
################################################################################
diff --git a/mysql-test/suite/sys_vars/t/character_set_database_basic.test b/mysql-test/suite/sys_vars/t/character_set_database_basic.test
index 08069c00ae0..07b4b31b25c 100644
--- a/mysql-test/suite/sys_vars/t/character_set_database_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_database_basic.test
@@ -182,8 +182,6 @@ SET @@global.character_set_database = 100;
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
---echo 'Bug # 34843: character sets are mapped in such a way that 100 and following';
---echo 'numbers gives error, and before 100 the 36 mapped wraps arround several times.';
--echo '#--------------------FN_DYNVARS_012_10-------------------------#'
##############################################################################
diff --git a/mysql-test/suite/sys_vars/t/character_set_database_func.test b/mysql-test/suite/sys_vars/t/character_set_database_func.test
index 78b1f1ab49b..d3da8660766 100644
--- a/mysql-test/suite/sys_vars/t/character_set_database_func.test
+++ b/mysql-test/suite/sys_vars/t/character_set_database_func.test
@@ -38,7 +38,6 @@ connect (con1,localhost,root,,,,);
connection con1;
SELECT @@global.character_set_database;
SELECT @@session.character_set_database;
---echo 'Bug#35356: session character_set_database differ from global character_set_database'
disconnect con1;
--echo '#--------------------FN_DYNVARS_008_02-------------------------#'
@@ -70,8 +69,6 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
DROP DATABASE db1;
---echo 'Bug#35357: character_set_database does not effects CREATE DATABASE without characater set'
-
#==============================================================================
--echo '--ascii character set specified--'
#==============================================================================
@@ -109,9 +106,6 @@ DROP TABLE IF EXISTS t1;
#==============================================================================
---echo 'Bug#27208: If no current database, character_set_database !=character_set_server'
-#==============================================================================
-
SET GLOBAL character_set_server=latin5;
connect (con2, localhost, root,,);
diff --git a/mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test b/mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test
index 3ba9c269a84..928d02ee46b 100644
--- a/mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test
@@ -165,8 +165,6 @@ SET @@character_set_filesystem = 100;
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
-echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
-echo 'numbers give error, and before 100 the 36 mapped wraps arround several times.';
--echo '#--------------------FN_DYNVARS_008_10-------------------------#'
################################################################################
diff --git a/mysql-test/suite/sys_vars/t/character_set_server_basic.test b/mysql-test/suite/sys_vars/t/character_set_server_basic.test
index 21eb3fb36dc..d692c1f633c 100644
--- a/mysql-test/suite/sys_vars/t/character_set_server_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_set_server_basic.test
@@ -72,6 +72,9 @@ SET global character_set_server=utf8;
--Error ER_BAD_FIELD_ERROR
SELECT global character_set_server;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@character_set_server = null;
+
--echo '#--------------------FN_DYNVARS_009_02-------------------------#'
###############################################################################
# Check the DEFAULT value of character_set_server for session and global #
@@ -178,12 +181,6 @@ SELECT @@global.character_set_server;
--Error ER_UNKNOWN_CHARACTER_SET
SET @@global.character_set_server = 100;
-SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
-SELECT @total_charset;
---echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
---echo 'numbers gives error, and before 100 the 36 mapped wraps arround ';
---echo 'several times.';
-
--echo '#--------------------FN_DYNVARS_009_10-------------------------#'
###############################################################################
# Change the value of character_set_server to an invalid value for session #
diff --git a/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test b/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
new file mode 100644
index 00000000000..30befb5b0f1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
@@ -0,0 +1,24 @@
+#
+# show the global and session values;
+#
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select @@global.character_sets_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.character_sets_dir;
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+show global variables like 'character_sets_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+show session variables like 'character_sets_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select * from information_schema.global_variables where variable_name='character_sets_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select * from information_schema.session_variables where variable_name='character_sets_dir';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global character_sets_dir="foo";
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session character_sets_dir="foo";
+
diff --git a/mysql-test/suite/sys_vars/t/collation_connection_basic.test b/mysql-test/suite/sys_vars/t/collation_connection_basic.test
index bf82ea321b7..92f1766fc9c 100644
--- a/mysql-test/suite/sys_vars/t/collation_connection_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_connection_basic.test
@@ -121,7 +121,7 @@ SET @@collation_connection = latin7_general_ci + latin7_general_cs;
# Change the value of collation_connection to a valid value for session #
###############################################################################
-let collation_variable = @@session.collation_connection;
+let $collation_variable = @@session.collation_connection;
--source suite/sys_vars/inc/collation_basic.inc
@@ -130,7 +130,7 @@ let collation_variable = @@session.collation_connection;
# Change the value of collation_connection to a valid value for global #
###############################################################################
-let collation_variable = @@global.collation_connection;
+let $collation_variable = @@global.collation_connection;
--source suite/sys_vars/inc/collation_basic.inc
diff --git a/mysql-test/suite/sys_vars/t/collation_database_basic.test b/mysql-test/suite/sys_vars/t/collation_database_basic.test
index 557f32b86a0..da06778bb68 100644
--- a/mysql-test/suite/sys_vars/t/collation_database_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_database_basic.test
@@ -78,6 +78,7 @@ SELECT global collation_database;
##############################################################################
SET @@collation_database = latin1_bin;
SET @@collation_database = DEFAULT;
+SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME=DATABASE();
SELECT @@collation_database AS DEFAULT_VALUE;
SET @@global.collation_database = latin1_bin;
@@ -120,7 +121,7 @@ SET @@collation_database = latin7_general_ci + latin7_general_cs;
# Change the value of collation_database to a valid value for session #
###########################################################################
-let collation_variable = @@session.collation_database;
+let $collation_variable = @@session.collation_database;
--source suite/sys_vars/inc/collation_basic.inc
@@ -129,7 +130,7 @@ let collation_variable = @@session.collation_database;
# Change the value of collation_database to a valid value for global #
###############################################################################
-let collation_variable = @@global.collation_database;
+let $collation_variable = @@global.collation_database;
--source suite/sys_vars/inc/collation_basic.inc
diff --git a/mysql-test/suite/sys_vars/t/collation_database_func.test b/mysql-test/suite/sys_vars/t/collation_database_func.test
index ba8fc5a3d5e..aa8716408f7 100644
--- a/mysql-test/suite/sys_vars/t/collation_database_func.test
+++ b/mysql-test/suite/sys_vars/t/collation_database_func.test
@@ -38,8 +38,6 @@ SELECT @@global.collation_database;
SELECT @@session.collation_database;
disconnect con1;
---echo 'Bug#35378: New session collation_database is not change by global collation_database'
-
--echo '#--------------------FN_DYNVARS_011_02-------------------------#'
#########################################################
# Begin the functionality Testing of collation_database #
@@ -69,7 +67,6 @@ SET @@session.collation_database = latin2_croatian_ci;
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
---echo 'Bug#35380: collation_database does not effects CREATE DATABASE without characater set'
CREATE TABLE t1(a CHAR(20));
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/sys_vars/t/collation_server_basic.test b/mysql-test/suite/sys_vars/t/collation_server_basic.test
index a8af13c13ae..0d01c7d3076 100644
--- a/mysql-test/suite/sys_vars/t/collation_server_basic.test
+++ b/mysql-test/suite/sys_vars/t/collation_server_basic.test
@@ -120,7 +120,7 @@ SET @@collation_server = latin7_general_ci + latin7_general_cs;
# Change the value of collation_server to a valid value for session #
##############################################################################
-let collation_variable = @@session.collation_server;
+let $collation_variable = @@session.collation_server;
--source suite/sys_vars/inc/collation_basic.inc
@@ -129,7 +129,7 @@ let collation_variable = @@session.collation_server;
# Change the value of collation_server to a valid value for global #
#############################################################################
-let collation_variable = @@global.collation_server;
+let $collation_variable = @@global.collation_server;
--source suite/sys_vars/inc/collation_basic.inc
diff --git a/mysql-test/suite/sys_vars/t/completion_type_basic.test b/mysql-test/suite/sys_vars/t/completion_type_basic.test
index 7ffc1aa593b..927654cd32a 100644
--- a/mysql-test/suite/sys_vars/t/completion_type_basic.test
+++ b/mysql-test/suite/sys_vars/t/completion_type_basic.test
@@ -53,18 +53,6 @@ SET @@session.completion_type = DEFAULT;
SELECT @@session.completion_type;
---echo '#--------------------FN_DYNVARS_017_02-------------------------#'
-###############################################################
-# Check the DEFAULT value of completion_type #
-###############################################################
-
-SET @@global.completion_type = @start_global_value;
-SELECT @@global.completion_type = 0;
-
-SET @@session.completion_type = @start_session_value;
-SELECT @@session.completion_type = 0;
-
-
--echo '#--------------------FN_DYNVARS_017_03-------------------------#'
#########################################################################
# Change the value of completion_type to a valid value for GLOBAL Scope #
@@ -77,6 +65,12 @@ SELECT @@global.completion_type;
SET @@global.completion_type = 2;
SELECT @@global.completion_type;
+SET @@global.completion_type = NO_CHAIN;
+SELECT @@global.completion_type;
+SET @@global.completion_type = CHAIN;
+SELECT @@global.completion_type;
+SET @@global.completion_type = 'RELEASE';
+SELECT @@global.completion_type;
--echo '#--------------------FN_DYNVARS_017_04-------------------------#'
##########################################################################
@@ -90,19 +84,25 @@ SELECT @@session.completion_type;
SET @@session.completion_type = 2;
SELECT @@session.completion_type;
+SET @@session.completion_type = 'NO_CHAIN';
+SELECT @@session.completion_type;
+SET @@session.completion_type = 'CHAIN';
+SELECT @@session.completion_type;
+SET @@session.completion_type = 'RELEASE';
+SELECT @@session.completion_type;
--echo '#------------------FN_DYNVARS_017_05-----------------------#'
###########################################################
# Change the value of completion_type to an invalid value #
###########################################################
-
+set sql_mode=TRADITIONAL;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.completion_type = 10;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.completion_type = -1024;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.completion_type = 2.4;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.completion_type = OFF;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.completion_type = 10;
@@ -110,7 +110,7 @@ SET @@session.completion_type = 10;
SET @@session.completion_type = -2;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.completion_type = 1.2;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.completion_type = ON;
@@ -177,6 +177,7 @@ SET @@global.completion_type = @start_global_value;
SELECT @@global.completion_type;
SET @@session.completion_type = @start_session_value;
SELECT @@session.completion_type;
+set sql_mode='';
############################################
# END OF completion_type TESTS #
diff --git a/mysql-test/suite/sys_vars/t/completion_type_func.test b/mysql-test/suite/sys_vars/t/completion_type_func.test
index 8e363ed2a7d..9495a8e118c 100644
--- a/mysql-test/suite/sys_vars/t/completion_type_func.test
+++ b/mysql-test/suite/sys_vars/t/completion_type_func.test
@@ -156,7 +156,7 @@ COMMIT;
--echo ## Inserting rows should give error here because connection should ##
--echo ## disconnect after using COMMIT ##
---Error 2006,2013,ER_SERVER_SHUTDOWN
+--Error 2006,2013,ER_QUERY_INTERRUPTED
INSERT INTO t1 VALUES(4,'Record_4');
--echo switch to connection test_con2
@@ -171,7 +171,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
ROLLBACK;
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
---Error 2006,2013,ER_SERVER_SHUTDOWN,
+--Error 2006,2013,ER_QUERY_INTERRUPTED
INSERT INTO t1 VALUES(4,'Record_4');
connection default;
diff --git a/mysql-test/suite/sys_vars/t/concurrent_insert_basic.test b/mysql-test/suite/sys_vars/t/concurrent_insert_basic.test
index bc401ef22a3..5be569e52d3 100644
--- a/mysql-test/suite/sys_vars/t/concurrent_insert_basic.test
+++ b/mysql-test/suite/sys_vars/t/concurrent_insert_basic.test
@@ -67,35 +67,41 @@ SELECT @@global.concurrent_insert;
SET @@global.concurrent_insert = 2;
SELECT @@global.concurrent_insert;
+SET @@global.concurrent_insert = NEVER;
+SELECT @@global.concurrent_insert;
+SET @@global.concurrent_insert = AUTO;
+SELECT @@global.concurrent_insert;
+SET @@global.concurrent_insert = ALWAYS;
+SELECT @@global.concurrent_insert;
+
--echo '#--------------------FN_DYNVARS_018_04-------------------------#'
###########################################################################
# Change the value of concurrent_insert to invalid value #
###########################################################################
+--error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = -1;
-Select @@global.concurrent_insert;
+--error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = 100;
-Select @@global.concurrent_insert;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = TRUEF;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = TRUE_F;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = FALSE0;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = OON;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = ONN;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = OOFF;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = 0FF;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = ' ';
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = " ";
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = '';
@@ -125,9 +131,9 @@ WHERE VARIABLE_NAME='concurrent_insert';
# Check if ON and OFF values can be used on variable #
###################################################################
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = OFF;
---Error ER_WRONG_TYPE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.concurrent_insert = ON;
diff --git a/mysql-test/suite/sys_vars/t/connect_timeout_basic.test b/mysql-test/suite/sys_vars/t/connect_timeout_basic.test
index 095c85f8295..d89734a00c2 100644
--- a/mysql-test/suite/sys_vars/t/connect_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/connect_timeout_basic.test
@@ -79,7 +79,6 @@ SET @@global.connect_timeout = -1024;
SELECT @@global.connect_timeout;
SET @@global.connect_timeout = 42949672950;
SELECT @@global.connect_timeout;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.connect_timeout = 21221204.10;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/t/date_format_basic.test b/mysql-test/suite/sys_vars/t/date_format_basic.test
new file mode 100644
index 00000000000..a69295b405d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/date_format_basic.test
@@ -0,0 +1,18 @@
+#
+# show the global and session values;
+#
+select @@global.date_format;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.date_format;
+show global variables like 'date_format';
+show session variables like 'date_format';
+select * from information_schema.global_variables where variable_name='date_format';
+select * from information_schema.session_variables where variable_name='date_format';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global date_format="foo";
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session date_format="foo";
diff --git a/mysql-test/suite/sys_vars/t/datetime_format_basic.test b/mysql-test/suite/sys_vars/t/datetime_format_basic.test
new file mode 100644
index 00000000000..553d3126328
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/datetime_format_basic.test
@@ -0,0 +1,18 @@
+#
+# show the global and session values;
+#
+select @@global.datetime_format;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.datetime_format;
+show global variables like 'datetime_format';
+show session variables like 'datetime_format';
+select * from information_schema.global_variables where variable_name='datetime_format';
+select * from information_schema.session_variables where variable_name='datetime_format';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global datetime_format="foo";
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session datetime_format="foo";
diff --git a/mysql-test/suite/sys_vars/t/debug_basic.test b/mysql-test/suite/sys_vars/t/debug_basic.test
new file mode 100644
index 00000000000..b54626c38ca
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/debug_basic.test
@@ -0,0 +1,22 @@
+--source include/have_debug.inc
+#
+# exists both as global and session
+#
+set session debug="L";
+
+select @@global.debug="1"; # just to show that global.debug exists
+select @@session.debug; # here we know the value and can display it
+--replace_column 2 #
+show global variables like 'debug';
+show session variables like 'debug';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name="debug";
+select * from information_schema.session_variables where variable_name="debug";
+
+--error ER_WRONG_TYPE_FOR_VAR
+set @@global.debug=1;
+--error ER_WRONG_TYPE_FOR_VAR
+set @@global.debug=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set @@global.debug=1e1;
+
diff --git a/mysql-test/suite/sys_vars/t/debug_sync_basic.test b/mysql-test/suite/sys_vars/t/debug_sync_basic.test
new file mode 100644
index 00000000000..c2c4df95c32
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/debug_sync_basic.test
@@ -0,0 +1,21 @@
+--source include/have_debug_sync.inc
+#
+# exists as session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.debug_sync;
+select @@session.debug_sync;
+
+show global variables like "debug_sync";
+show session variables like "debug_sync";
+
+select * from information_schema.global_variables where variable_name="debug_sync";
+select * from information_schema.session_variables where variable_name="debug_sync";
+
+--error ER_WRONG_TYPE_FOR_VAR
+set @@session.debug_sync=1;
+--error ER_WRONG_TYPE_FOR_VAR
+set @@session.debug_sync=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set @@session.debug_sync=1e1;
+
diff --git a/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test b/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
new file mode 100644
index 00000000000..17f2d2cc852
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
@@ -0,0 +1,183 @@
+############## mysql-test\t\storage_engine_basic.test ##################
+# #
+# #
+# Creation Date: 2008-02-14 #
+# Author: Salman Rawala #
+# #
+# Description: Test Cases of Dynamic System Variable #
+# default_storage_engine that check behavior of this #
+# variable with valid values, invalid values, accessing #
+# variable with scope that is allowed and with scope that #
+# is now allowed. #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html#option_mysqld_storage_engine #
+# #
+########################################################################
+
+--source include/have_innodb.inc
+--source include/load_sysvars.inc
+
+######################################################################
+# START OF default_storage_engine TESTS #
+######################################################################
+
+
+#############################################################
+# Save initial value #
+#############################################################
+
+SET @start_global_value = @@global.default_storage_engine;
+SELECT @start_global_value;
+SET @start_session_value = @@session.default_storage_engine;
+SELECT @start_session_value;
+
+
+--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
+######################################################################
+# Display the DEFAULT value of default_storage_engine #
+######################################################################
+
+SET @@global.default_storage_engine = INNODB;
+SET @@global.default_storage_engine = DEFAULT;
+SELECT @@global.default_storage_engine;
+
+SET @@session.default_storage_engine = INNODB;
+SET @@session.default_storage_engine = DEFAULT;
+SELECT @@session.default_storage_engine;
+
+
+--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
+########################################################################
+# Change the value of default_storage_engine to a valid value for GLOBAL Scope #
+########################################################################
+
+SET @@global.default_storage_engine = MYISAM;
+SELECT @@global.default_storage_engine;
+SET @@global.default_storage_engine = MERGE;
+SELECT @@global.default_storage_engine;
+SET @@global.default_storage_engine = MEMORY;
+SELECT @@global.default_storage_engine;
+SET @@global.default_storage_engine = INNODB;
+SELECT @@global.default_storage_engine;
+
+
+--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
+#########################################################################
+# Change the value of default_storage_engine to a valid value for SESSION Scope #
+#########################################################################
+
+SET @@session.default_storage_engine = MYISAM;
+SELECT @@session.default_storage_engine;
+SET @@session.default_storage_engine = MERGE;
+SELECT @@session.default_storage_engine;
+SET @@session.default_storage_engine = MEMORY;
+SELECT @@session.default_storage_engine;
+SET @@session.default_storage_engine = INNODB;
+SELECT @@session.default_storage_engine;
+
+
+--echo '#------------------FN_DYNVARS_005_04-----------------------#'
+##################################################################
+# Change the value of default_storage_engine to an invalid value #
+##################################################################
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.default_storage_engine = 8199;
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.default_storage_engine = NULL;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.default_storage_engine = -1024;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.default_storage_engine = 65530.34;
+
+--Error ER_UNKNOWN_STORAGE_ENGINE
+SET @@global.default_storage_engine = FILE;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.default_storage_engine = 8199;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.default_storage_engine = 65530.34;
+
+--Error ER_UNKNOWN_STORAGE_ENGINE
+SET @@session.default_storage_engine = RECORD;
+
+
+--echo '#------------------FN_DYNVARS_005_05-----------------------#'
+####################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+####################################################################
+
+
+SELECT @@global.default_storage_engine =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='default_storage_engine';
+
+--echo '#------------------FN_DYNVARS_005_06-----------------------#'
+####################################################################
+# Check if the value in SESSION Table matches value in variable #
+####################################################################
+
+SELECT @@session.default_storage_engine =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+ WHERE VARIABLE_NAME='default_storage_engine';
+
+
+--echo '#------------------FN_DYNVARS_005_07-----------------------#'
+####################################################################
+# Check if TRUE and FALSE values can be used on variable #
+####################################################################
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.default_storage_engine = TRUE;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.default_storage_engine = FALSE;
+
+
+--echo '#---------------------FN_DYNVARS_001_8----------------------#'
+###############################################################
+# Check if accessing variable with SESSION,LOCAL and without #
+# SCOPE points to same session variable #
+###############################################################
+
+SET @@default_storage_engine = MYISAM;
+SELECT @@default_storage_engine = @@local.default_storage_engine;
+SELECT @@local.default_storage_engine = @@session.default_storage_engine;
+
+
+--echo '#---------------------FN_DYNVARS_001_9----------------------#'
+#########################################################################
+# Check if default_storage_engine can be accessed with and without @@ sign #
+#########################################################################
+
+SET default_storage_engine = MEMORY;
+SELECT @@default_storage_engine;
+--Error ER_UNKNOWN_TABLE
+SELECT local.default_storage_engine;
+--Error ER_UNKNOWN_TABLE
+SELECT session.default_storage_engine;
+--Error ER_BAD_FIELD_ERROR
+SELECT default_storage_engine = @@session.default_storage_engine;
+
+# check the old obsolete name
+SET @@default_storage_engine = @start_global_value;
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.default_storage_engine = @start_global_value;
+SELECT @@global.default_storage_engine;
+SET @@session.default_storage_engine = @start_session_value;
+SELECT @@session.default_storage_engine;
+
+
+#############################################################
+# END OF default_storage_engine TESTS #
+#############################################################
+
diff --git a/mysql-test/suite/sys_vars/t/default_week_format_basic.test b/mysql-test/suite/sys_vars/t/default_week_format_basic.test
index d8b4a09541f..e609cdc53f5 100644
--- a/mysql-test/suite/sys_vars/t/default_week_format_basic.test
+++ b/mysql-test/suite/sys_vars/t/default_week_format_basic.test
@@ -118,7 +118,6 @@ SET @@session.default_week_format = -2;
SELECT @@session.default_week_format;
SET @@session.default_week_format = 65550;
SELECT @@session.default_week_format;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#------------------FN_DYNVARS_022_06-----------------------#'
###############################################################################
diff --git a/mysql-test/suite/sys_vars/t/delay_key_write_basic.test b/mysql-test/suite/sys_vars/t/delay_key_write_basic.test
index faa1cb3cc6e..25176879eb1 100644
--- a/mysql-test/suite/sys_vars/t/delay_key_write_basic.test
+++ b/mysql-test/suite/sys_vars/t/delay_key_write_basic.test
@@ -44,10 +44,7 @@ SELECT @start_value;
########################################################################
SET @@global.delay_key_write = OFF;
---Error ER_NO_DEFAULT
SET @@global.delay_key_write = DEFAULT;
---echo 'Bug # 34878: Documentation specifies a DEFAULT value of ON for variable but';
---echo 'its not supported';
SELECT @@global.delay_key_write;
@@ -92,10 +89,8 @@ SET @@global.delay_key_write = ERROR;
SET @@global.delay_key_write = FALSE0;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.delay_key_write = ONN;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.delay_key_write = OF;
-SELECT @@global.delay_key_write;
---echo 'Bug# 34828: Variable is incorrectly accepting OF as a value'
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.delay_key_write = ' ';
diff --git a/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test b/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test
index 61f7d801a1a..e46ebc1e598 100644
--- a/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test
+++ b/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test
@@ -1,11 +1,11 @@
################################################################################
# #
-# Variable Name: sql_low_priority_updates #
+# Variable Name: delayed_insert_limit #
# Scope: GLOBAL #
# Access Type: Dynamic #
-# Data Type: BOOLEAN #
-# Default Value: 1 TRUE #
-# Values: 1 TRUE, 0 FALSE #
+# Data Type: Numeric #
+# Default Value: 100 #
+# Range: 1 - 4294967295 #
# #
# #
# Creation Date: 2008-02-25 #
@@ -13,7 +13,7 @@
# Modified: HHunger 2009-02-26 Replaced 2 sleeps by wait conditions #
# Modified: mleich 2009-03-18 Partially reimplemented #
# #
-# Description: Test Cases of Dynamic System Variable "sql_low_priority_updates"#
+# Description: Test Cases of Dynamic System Variable "delayed_insert_limit" #
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
@@ -112,7 +112,6 @@ let $wait_condition=
SELECT variable_value > 0 FROM information_schema.global_status
WHERE variable_name like 'Not_flushed_delayed_rows';
--source include/wait_condition.inc
-let $my_select= SELECT COUNT(*) BETWEEN 21 AND 43 FROM t1;
let $my_select= SELECT COUNT(*) FROM t1;
send;
eval $my_select;
@@ -136,6 +135,13 @@ connection con0;
--echo Asynchronous "reap" result
--echo The next result suffers from
--echo '# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows'
+#
+# on UNLOCK TABLES both SELECT in the con0 and delayed insert thread in the
+# con1 were awaken. There's no FIFO for TL_WRITE_DELAYED and TL_READ,
+# so either the first delayed_insert_limit rows will be inserted
+# before select (which will see 21 row) or select will go first (and see 6 rows)
+#
+--replace_result 6 21
reap;
--echo ** Connection default **
diff --git a/mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test b/mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test
index 8bad6b2dfe6..2486ff5800f 100644
--- a/mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/delayed_insert_timeout_basic.test
@@ -79,8 +79,6 @@ SET @@global.delayed_insert_timeout = -1024;
SELECT @@global.delayed_insert_timeout;
SET @@global.delayed_insert_timeout = 42949672950;
SELECT @@global.delayed_insert_timeout;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_insert_timeout = 429496729.5;
diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def
new file mode 100644
index 00000000000..483eea9daeb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/disabled.def
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+query_cache_size_basic_32 : Bug#36747: Allocating a large query cache is not deterministic
+query_cache_size_basic_64 : Bug#36747: Allocating a large query cache is not deterministic
+transaction_prealloc_size_basic_32 : Bug#36747
+transaction_prealloc_size_basic_64 : Bug#36747
+#thread_cache_size_func : Bug#40575: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
+
diff --git a/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test b/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
index 40497e829df..65edf6dd76f 100644
--- a/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
+++ b/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
@@ -114,7 +114,6 @@ SET @@session.div_precision_increment = -2;
SELECT @@session.div_precision_increment;
SET @@session.div_precision_increment = 65550;
SELECT @@session.div_precision_increment;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.div_precision_increment = 65530.30;
diff --git a/mysql-test/suite/sys_vars/t/div_precision_increment_func.test b/mysql-test/suite/sys_vars/t/div_precision_increment_func.test
index aebca88abf9..1c2cbfc24e9 100644
--- a/mysql-test/suite/sys_vars/t/div_precision_increment_func.test
+++ b/mysql-test/suite/sys_vars/t/div_precision_increment_func.test
@@ -37,7 +37,7 @@ CREATE TABLE t1
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
-salary LONG
+salary INT
);
--echo '#--------------------FN_DYNVARS_027_01-------------------------#'
@@ -55,7 +55,6 @@ INSERT into t1(name, salary) values('Record_2', 501);
INSERT into t1(name, salary) values('Record_3', 210);
SELECT name, salary, ((salary * 2.5)/1000) AS INCOME from t1;
---echo 'Bug#35374: div_precision is not working with table column'
--echo ## Verifying variable's behavior with direct division ##
SELECT 1/7;
@@ -80,7 +79,7 @@ CREATE TABLE t1
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
-salary LONG,
+salary INT,
income_tax FLOAT
);
diff --git a/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test b/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test
index 58ac196d1c2..b153ac50e1e 100644
--- a/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test
@@ -101,7 +101,7 @@ SELECT @@global.engine_condition_pushdown;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = -1;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.engine_condition_pushdown = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = "T";
@@ -111,16 +111,12 @@ SET @@session.engine_condition_pushdown = "Y";
SET @@session.engine_condition_pushdown = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = OF;
-SELECT @@session.engine_condition_pushdown;
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = 覨F;
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.engine_condition_pushdown = -1;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -133,12 +129,8 @@ SET @@global.engine_condition_pushdown = "Y";
SET @@global.engine_condition_pushdown = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.engine_condition_pushdown = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.engine_condition_pushdown = OF;
-SELECT @@global.engine_condition_pushdown;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.engine_condition_pushdown = 覨F;
diff --git a/mysql-test/suite/sys_vars/t/event_scheduler_basic.test b/mysql-test/suite/sys_vars/t/event_scheduler_basic.test
index f7045651613..2e6aa3cba5c 100644
--- a/mysql-test/suite/sys_vars/t/event_scheduler_basic.test
+++ b/mysql-test/suite/sys_vars/t/event_scheduler_basic.test
@@ -43,10 +43,8 @@ SELECT @start_value;
# Verify default value of variable #
###############################################
---Error ER_NO_DEFAULT
SET @@global.event_scheduler = DEFAULT;
-#SELECT @@global.event_scheduler = OFF;
---echo 'Bug# 34878: According to documentation the default value of variable is OFF';
+SELECT @@global.event_scheduler;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
#######################################################################
diff --git a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
index 02448d1fd11..f19ab922c72 100644
--- a/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
+++ b/mysql-test/suite/sys_vars/t/expire_logs_days_basic.test
@@ -91,7 +91,6 @@ SET @@global.expire_logs_days = -1024;
SELECT @@global.expire_logs_days;
SET @@global.expire_logs_days = 42949672950;
SELECT @@global.expire_logs_days;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.expire_logs_days = ON;
diff --git a/mysql-test/suite/sys_vars/t/flush_basic.test b/mysql-test/suite/sys_vars/t/flush_basic.test
index 0b8fc0388ee..4eb821e9af1 100644
--- a/mysql-test/suite/sys_vars/t/flush_basic.test
+++ b/mysql-test/suite/sys_vars/t/flush_basic.test
@@ -43,9 +43,7 @@ SELECT @start_value;
#############################################################
SET @@global.flush = ON;
---Error ER_NO_DEFAULT
SET @@global.flush = DEFAULT;
---echo 'Bug# 34878: FN_DYNVARS_002_01 - Default value is off according to Documentation of MySQL';
SELECT @@global.flush;
diff --git a/mysql-test/suite/sys_vars/t/flush_time_basic.test b/mysql-test/suite/sys_vars/t/flush_time_basic.test
new file mode 100644
index 00000000000..9604769d460
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/flush_time_basic.test
@@ -0,0 +1,50 @@
+
+#
+# note, the default is 1800 on windows, 0 everywhere else
+#
+
+SET @start_global_value = @@global.flush_time;
+
+#
+# exists as global only
+#
+--replace_result 1800 0
+select @@global.flush_time;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.flush_time;
+--replace_result 1800 0
+show global variables like 'flush_time';
+--replace_result 1800 0
+show session variables like 'flush_time';
+--replace_result 1800 0
+select * from information_schema.global_variables where variable_name='flush_time';
+--replace_result 1800 0
+select * from information_schema.session_variables where variable_name='flush_time';
+
+#
+# show that it's writable
+#
+set global flush_time=1;
+select @@global.flush_time;
+--error ER_GLOBAL_VARIABLE
+set session flush_time=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global flush_time=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global flush_time=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global flush_time="foo";
+
+#
+# min/max values
+#
+set global flush_time=0;
+select @@global.flush_time;
+set global flush_time=cast(-1 as unsigned int);
+select @@global.flush_time;
+
+SET @@global.flush_time = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test b/mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test
index d7a01f2bf71..8a327ab699b 100644
--- a/mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test
+++ b/mysql-test/suite/sys_vars/t/foreign_key_checks_basic.test
@@ -46,7 +46,6 @@ SET @@session.foreign_key_checks = 1;
SET @@session.foreign_key_checks = DEFAULT;
SELECT @@session.foreign_key_checks;
---echo 'Bug# 34878: No DEFAULT value for variable. Also setting DEFAULT does not give error'
--echo '#---------------------FN_DYNVARS_032_02-------------------------#'
#############################################################################
@@ -94,12 +93,8 @@ SET @@session.foreign_key_checks = "Y";
SET @@session.foreign_key_checks = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.foreign_key_checks = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.foreign_key_checks = OF;
-SELECT @@session.foreign_key_checks;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.foreign_key_checks = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -113,11 +108,9 @@ SET @@session.foreign_key_checks = NO;
# Test if accessing global foreign_key_checks gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
SET @@global.foreign_key_checks = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@global.foreign_key_checks;
+SET @@global.foreign_key_checks = 1;
--echo '#----------------------FN_DYNVARS_032_06------------------------#'
#########################################################################
diff --git a/mysql-test/suite/sys_vars/t/foreign_key_checks_func.test b/mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
index 4d2c63bbce6..5786b9283be 100644
--- a/mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
+++ b/mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
@@ -93,9 +93,6 @@ INSERT INTO t2 values (20,4);
SET @@session.foreign_key_checks = 1;
UPDATE t2 SET b=4 where a=20;
---echo 'Bug#35358: Updating an incorrect foreign key(inserted by disabling '
---echo 'foreign_key_checks)to the same value does not raise error after '
---echo 'enabling foreign_key_checks'
#==============================================================================
--echo 'Check when foreign_key_checks is enabled and FK constraint is re-created'
diff --git a/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test b/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test
index 4117605c452..454b5d7477e 100644
--- a/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test
+++ b/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test
@@ -145,10 +145,7 @@ WHERE VARIABLE_NAME='ft_boolean_syntax') AS res;
#############################################################################
# Content of initial variable
SELECT @global_start_value;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@global.ft_boolean_syntax = @global_start_value;
---echo 'Bug# 34883: ft_boolean_syntax cant be assigned values from session temporary';
---echo 'variables';
####################################
# Restore Default value #
diff --git a/mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test b/mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test
index 4ea28b015cb..242d404d244 100644
--- a/mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test
+++ b/mysql-test/suite/sys_vars/t/ft_boolean_syntax_func.test
@@ -92,15 +92,11 @@ SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('"faster than"' IN BOOLEAN MODE);
SELECT * FROM articles WHERE MATCH (title,body)
-AGAINST ('+run ~line' IN BOOLEAN MODE);
-
---Echo 'Bug#35359: ~ is not working correctly. Its behaving like -'
+AGAINST ('+tutorial ~line' IN BOOLEAN MODE);
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('10*' IN BOOLEAN MODE);
---Echo 'Bug#35360: * is not working correctly. Not all rows are returned'
-
SELECT id,title,body, (MATCH (title,body)
AGAINST ('+MySQL +(>show <dbms)' IN BOOLEAN MODE)) AS relevance
FROM articles WHERE MATCH (title,body)
@@ -114,8 +110,6 @@ SET @@global.ft_boolean_syntax='~ /!@#$%^&*()-';
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('~mySQL /yourSQL' IN BOOLEAN MODE);
---echo 'Bug#35361: Different syntax does not produce result as default operators'
-
#restore default
SET @@global.ft_boolean_syntax=DEFAULT;
diff --git a/mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test b/mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test
new file mode 100644
index 00000000000..525a5bc29e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.ft_max_word_len;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.ft_max_word_len;
+show global variables like 'ft_max_word_len';
+show session variables like 'ft_max_word_len';
+select * from information_schema.global_variables where variable_name='ft_max_word_len';
+select * from information_schema.session_variables where variable_name='ft_max_word_len';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global ft_max_word_len=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session ft_max_word_len=1;
+
diff --git a/mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test b/mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test
new file mode 100644
index 00000000000..7819e9c00e7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.ft_min_word_len;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.ft_min_word_len;
+show global variables like 'ft_min_word_len';
+show session variables like 'ft_min_word_len';
+select * from information_schema.global_variables where variable_name='ft_min_word_len';
+select * from information_schema.session_variables where variable_name='ft_min_word_len';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global ft_min_word_len=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session ft_min_word_len=1;
+
diff --git a/mysql-test/suite/sys_vars/t/ft_query_expansion_limit_basic.test b/mysql-test/suite/sys_vars/t/ft_query_expansion_limit_basic.test
new file mode 100644
index 00000000000..988ee71ebdf
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/ft_query_expansion_limit_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.ft_query_expansion_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.ft_query_expansion_limit;
+show global variables like 'ft_query_expansion_limit';
+show session variables like 'ft_query_expansion_limit';
+select * from information_schema.global_variables where variable_name='ft_query_expansion_limit';
+select * from information_schema.session_variables where variable_name='ft_query_expansion_limit';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global ft_query_expansion_limit=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session ft_query_expansion_limit=1;
+
diff --git a/mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test b/mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test
new file mode 100644
index 00000000000..3d527ff8ec1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.ft_stopword_file;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.ft_stopword_file;
+show global variables like 'ft_stopword_file';
+show session variables like 'ft_stopword_file';
+select * from information_schema.global_variables where variable_name='ft_stopword_file';
+select * from information_schema.session_variables where variable_name='ft_stopword_file';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global ft_stopword_file=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session ft_stopword_file=1;
+
diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
index 014108f88d2..43d7414a0c2 100644
--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
@@ -45,7 +45,8 @@ SELECT @start_value;
###############################################
SET @@global.general_log_file = DEFAULT;
-SELECT RIGHT(@@global.general_log_file,10) AS log_file;
+SET @a=concat(left(@@hostname, instr(concat(@@hostname, '.'), '.')-1), '.log');
+SELECT RIGHT(@@global.general_log_file, length(@a)) = @a;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/general_log_func.test b/mysql-test/suite/sys_vars/t/general_log_func.test
index 24d535e88e5..55ed944c6b2 100644
--- a/mysql-test/suite/sys_vars/t/general_log_func.test
+++ b/mysql-test/suite/sys_vars/t/general_log_func.test
@@ -46,8 +46,18 @@ name VARCHAR(30)
SET @@global.general_log = OFF;
SELECT @@general_log;
-
let $MYSQLD_LOGFILE= `select @@global.general_log_file`;
+
+#
+# truncate the existing log - it could be larger than max_allowed_packet
+# and that would cause load_file() below to fail
+#
+--remove_file $MYSQLD_LOGFILE
+flush logs;
+SET @@global.general_log = ON;
+flush logs;
+SET @@global.general_log = OFF;
+
--copy_file $MYSQLD_LOGFILE $MYSQLD_LOGFILE.copy
--echo ## Inserting some Records & Verifying output in log ##
@@ -78,13 +88,12 @@ INSERT into t1(name) values('Record_4');
--copy_file $MYSQLD_LOGFILE $MYSQLD_LOGFILE.orig
--chmod 0777 $MYSQLD_LOGFILE.orig
---echo ## There should be a difference ##
-SET @@global.max_allowed_packet= 1024*1024*1024;
+--echo ## old log is a proper prefix of the new log ##
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig');
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval SET @copy_file= load_file('$MYSQLD_LOGFILE.copy');
-eval SELECT STRCMP(@orig_file, @copy_file);
+SELECT @orig_file > @copy_file, left(@orig_file, length(@copy_file)) = @copy_file;
--remove_file $MYSQLD_LOGFILE.copy
--remove_file $MYSQLD_LOGFILE.orig
diff --git a/mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test b/mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test
index 1bc707f4b5d..5a78b4b0571 100644
--- a/mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test
+++ b/mysql-test/suite/sys_vars/t/group_concat_max_len_basic.test
@@ -103,8 +103,8 @@ SET @@global.group_concat_max_len = -1024;
SELECT @@global.group_concat_max_len;
SET @@global.group_concat_max_len = 65536;
SELECT @@global.group_concat_max_len;
---Error ER_PARSE_ERROR
-SET @@global.group_concat_max_len = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.group_concat_max_len = 65530.34;
SELECT @@global.group_concat_max_len;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.group_concat_max_len = test;
@@ -114,11 +114,10 @@ SET @@session.group_concat_max_len = 0;
SELECT @@session.group_concat_max_len;
SET @@session.group_concat_max_len = -2;
SELECT @@session.group_concat_max_len;
---Error ER_PARSE_ERROR
-SET @@session.group_concat_max_len = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.group_concat_max_len = 65530.34;
SET @@session.group_concat_max_len = 65550;
SELECT @@session.group_concat_max_len;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.group_concat_max_len = test;
diff --git a/mysql-test/suite/sys_vars/t/have_profiling_basic.test b/mysql-test/suite/sys_vars/t/have_profiling_basic.test
new file mode 100644
index 00000000000..da0ca88d2e3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/have_profiling_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+select @@global.have_profiling="1";
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.have_profiling;
+--replace_column 2 #
+show global variables like 'have_profiling';
+--replace_column 2 #
+show session variables like 'have_profiling';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name='have_profiling';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='have_profiling';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global have_profiling=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session have_profiling=1;
+
diff --git a/mysql-test/suite/sys_vars/t/identity_basic.test b/mysql-test/suite/sys_vars/t/identity_basic.test
index fa5fc807414..2ddec32a621 100644
--- a/mysql-test/suite/sys_vars/t/identity_basic.test
+++ b/mysql-test/suite/sys_vars/t/identity_basic.test
@@ -89,7 +89,6 @@ SET @@session.identity = -1024;
SELECT @@session.identity;
SET @@session.identity = 42949672950;
SELECT @@session.identity;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.identity = ON;
diff --git a/mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test b/mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test
new file mode 100644
index 00000000000..7295c466974
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.ignore_builtin_innodb;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.ignore_builtin_innodb;
+show global variables like 'ignore_builtin_innodb';
+show session variables like 'ignore_builtin_innodb';
+select * from information_schema.global_variables where variable_name='ignore_builtin_innodb';
+select * from information_schema.session_variables where variable_name='ignore_builtin_innodb';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global ignore_builtin_innodb=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session ignore_builtin_innodb=1;
+
diff --git a/mysql-test/suite/sys_vars/t/init_connect_basic.test b/mysql-test/suite/sys_vars/t/init_connect_basic.test
index 8557dfbf4fc..b2f2cb92e40 100644
--- a/mysql-test/suite/sys_vars/t/init_connect_basic.test
+++ b/mysql-test/suite/sys_vars/t/init_connect_basic.test
@@ -94,6 +94,11 @@ SELECT @@global.init_connect;
SET @@global.init_connect="SET autocomit=0;REVOKE ALL ON INFORMATION_SCHEMA.*";
SELECT @@global.init_connect;
+SET @@global.init_connect='set @a="12\034"';
+SELECT @@global.init_connect;
+SELECT hex(@@global.init_connect);
+SHOW VARIABLES LIKE 'init_connect';
+
SET @@global.init_connect='SHOW VARIABLES';
SELECT @@global.init_connect;
diff --git a/mysql-test/suite/sys_vars/t/init_file_basic.test b/mysql-test/suite/sys_vars/t/init_file_basic.test
new file mode 100644
index 00000000000..0b59fcd7be5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/init_file_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.init_file;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.init_file;
+show global variables like 'init_file';
+show session variables like 'init_file';
+select * from information_schema.global_variables where variable_name='init_file';
+select * from information_schema.session_variables where variable_name='init_file';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global init_file=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session init_file=1;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
index 1ef69e34999..42d172934d1 100644
--- a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
@@ -74,29 +74,25 @@ SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
-SET @@global.innodb_commit_concurrency = 1;
-SELECT @@global.innodb_commit_concurrency;
-SET @@global.innodb_commit_concurrency = 1000;
-SELECT @@global.innodb_commit_concurrency;
-
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_commit_concurrency to invalid value #
###########################################################################
+#
+# InnoDB doesn't allow innodb_commit_concurrency to change from
+# zero to non-zero or vice versa
+#
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.innodb_commit_concurrency = 1;
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = -1;
-SELECT @@global.innodb_commit_concurrency;
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "T";
-SELECT @@global.innodb_commit_concurrency;
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "Y";
-SELECT @@global.innodb_commit_concurrency;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = 1001;
-SELECT @@global.innodb_commit_concurrency;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
@@ -123,17 +119,6 @@ SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = ON;
SELECT @@global.innodb_commit_concurrency;
---echo '#---------------------FN_DYNVARS_046_07----------------------#'
-###################################################################
-# Check if TRUE and FALSE values can be used on variable #
-###################################################################
-
-
-SET @@global.innodb_commit_concurrency = TRUE;
-SELECT @@global.innodb_commit_concurrency;
-SET @@global.innodb_commit_concurrency = FALSE;
-SELECT @@global.innodb_commit_concurrency;
-
##############################
# Restore initial value #
##############################
diff --git a/mysql-test/suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
index 67b0247d169..67b0247d169 100644
--- a/mysql-test/suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
+++ b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
diff --git a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_32.test b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_32.test
deleted file mode 100644
index 13e1b205a4d..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_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.inc
---source suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_64.test b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic_64.test
deleted file mode 100644
index fc26c903de5..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_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.inc
---source suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/innodb_max_purge_lag_basic.inc b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
index 9e6b8201e3d..9e6b8201e3d 100644
--- a/mysql-test/suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
+++ b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_32.test b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_32.test
deleted file mode 100644
index 8396755844e..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_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.inc
---source suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_64.test b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic_64.test
deleted file mode 100644
index 4744cee20d9..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_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.inc
---source suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
index 840fd240bde..65681c4a544 100644
--- a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
@@ -105,9 +105,9 @@ SELECT @@global.innodb_support_xa;
###########################################################################
# for session
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_support_xa = -0.6;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_support_xa = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = "T";
@@ -121,8 +121,6 @@ SET @@session.innodb_support_xa = 誑;
SET @@session.innodb_support_xa = OF;
SELECT @@session.innodb_support_xa;
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = 覨F;
@@ -146,8 +144,6 @@ SET @@global.innodb_support_xa = 誑;
SET @@global.innodb_support_xa = OF;
SELECT @@global.innodb_support_xa;
---echo 'Bug# 34828 : OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = 覨F;
diff --git a/mysql-test/suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
index 35460fe47f2..35460fe47f2 100644
--- a/mysql-test/suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
+++ b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_32.test b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_32.test
deleted file mode 100644
index 981b6c4e992..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_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.inc
---source suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_64.test b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic_64.test
deleted file mode 100644
index ab7c01c5b6d..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_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.inc
---source suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
index f7d06d18ada..7af8f700f39 100644
--- a/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
@@ -107,7 +107,7 @@ SELECT @@global.innodb_table_locks;
# for session
SET @@session.innodb_table_locks = -6;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_table_locks = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_table_locks = "T";
@@ -121,8 +121,6 @@ SET @@session.innodb_table_locks = 誑;
SET @@session.innodb_table_locks = OF;
SELECT @@session.innodb_table_locks;
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_table_locks = 覨F;
@@ -144,8 +142,6 @@ SET @@global.innodb_table_locks = QN;
SET @@global.innodb_table_locks = OF;
SELECT @@global.innodb_table_locks;
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_TYPE_FOR_VAR
#SET @@global.innodb_table_locks = 覨F;
diff --git a/mysql-test/suite/sys_vars/t/insert_id_basic.test b/mysql-test/suite/sys_vars/t/insert_id_basic.test
index cfae87095bc..c9d3e1f4e52 100644
--- a/mysql-test/suite/sys_vars/t/insert_id_basic.test
+++ b/mysql-test/suite/sys_vars/t/insert_id_basic.test
@@ -90,8 +90,6 @@ SET @@session.insert_id = -1024;
SELECT @@session.insert_id;
SET @@session.insert_id = 42949672950;
SELECT @@session.insert_id;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.insert_id = ON;
SELECT @@session.insert_id;
diff --git a/mysql-test/suite/sys_vars/t/interactive_timeout_basic.test b/mysql-test/suite/sys_vars/t/interactive_timeout_basic.test
index 0c1a6716348..5f7d0e157f8 100644
--- a/mysql-test/suite/sys_vars/t/interactive_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/interactive_timeout_basic.test
@@ -104,8 +104,8 @@ SET @@global.interactive_timeout = -1024;
SELECT @@global.interactive_timeout;
SET @@global.interactive_timeout = 1000000000;
SELECT @@global.interactive_timeout;
---Error ER_PARSE_ERROR
-SET @@global.interactive_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.interactive_timeout = 65530.34;
SELECT @@global.interactive_timeout;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.interactive_timeout = test;
@@ -115,11 +115,10 @@ SET @@session.interactive_timeout = 0;
SELECT @@session.interactive_timeout;
SET @@session.interactive_timeout = -2;
SELECT @@session.interactive_timeout;
---Error ER_PARSE_ERROR
-SET @@session.interactive_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.interactive_timeout = 65530.34;
SET @@session.interactive_timeout = 100000000;
SELECT @@session.interactive_timeout;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.interactive_timeout = test;
diff --git a/mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test b/mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test
index bc6ac8687f7..e6141af4bbe 100644
--- a/mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test
+++ b/mysql-test/suite/sys_vars/t/keep_files_on_create_basic.test
@@ -122,7 +122,7 @@ SET @@global.keep_files_on_create = FELSE;
SET @@global.keep_files_on_create = -1024;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.keep_files_on_create = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.keep_files_on_create = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.keep_files_on_create = test;
@@ -131,17 +131,14 @@ SET @@global.keep_files_on_create = test;
SET @@session.keep_files_on_create = ONN;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.keep_files_on_create = ONF;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.keep_files_on_create = OF;
-SELECT @@session.keep_files_on_create;
---echo 'Bug# 34828: FN_DYNVARS_054_05 - OF is also working as OFF and no error is coming';
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.keep_files_on_create = 'OFN';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.keep_files_on_create = -2;
---Error ER_PARSE_ERROR
-SET @@session.keep_files_on_create = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.keep_files_on_create = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.keep_files_on_create = 65550;
diff --git a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc b/mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
index e55673fd045..354c65490a4 100644
--- a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
@@ -28,12 +28,10 @@
--source include/load_sysvars.inc
-let $minimum_range= BETWEEN 8 AND 36;
########################################################################
# START OF key_buffer_size TESTS #
########################################################################
---disable_warnings
########################################################################
# Saving initial value of key_buffer_size in a temporary variable #
########################################################################
@@ -45,10 +43,8 @@ SET @start_value = @@global.key_buffer_size;
# Display the DEFAULT value of key_buffer_size #
########################################################################
-SET @@global.key_buffer_size = 99;
---Error ER_NO_DEFAULT
SET @@global.key_buffer_size = DEFAULT;
-eval SELECT @@global.key_buffer_size $minimum_range;
+SELECT @@global.key_buffer_size;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
###############################################
@@ -63,18 +59,6 @@ SELECT @@global.key_buffer_size = @start_value;
# Change the value of key_buffer_size to a valid value #
########################################################################
-SET @@global.key_buffer_size = 8 ;
-eval SELECT @@global.key_buffer_size $minimum_range;
---disable_warnings
-# The next subtest is set to comment because it will
-# be tried to allocate the buffer instantly which
-# might lead to a message about missing resources,
-# excessive runtime etc. especially if the main memory is less than 4GB.
-#SET @@global.key_buffer_size = 4294967295;
---enable_warnings
-#SELECT @@global.key_buffer_size;
-SET @@global.key_buffer_size = 1800;
-eval SELECT @@global.key_buffer_size $minimum_range;
SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size;
@@ -83,31 +67,20 @@ SELECT @@global.key_buffer_size;
# Change the value of key_buffer_size to invalid value #
###########################################################################
-# The next subtests are set to comment because they will
-# be tried to allocate the buffer instantly which
-# might lead to a message about missing resources,
-# excessive runtime etc. especially if the main memory is less than 4GB.
-# The negative values lead to very big numbers, e.g. -1 to
-# a size of 18446744073709551615 bytes with a 32bit binary.
-# See Bug #42103.
-#SET @@global.key_buffer_size = -1;
-#SELECT @@global.key_buffer_size;
-#SET @@global.key_buffer_size = 100000000000;
-#SELECT @@global.key_buffer_size;
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+SET @@global.key_buffer_size = -1;
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+SET @@global.key_buffer_size = 4;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 10000.01;
SELECT @@global.key_buffer_size;
-#SET @@global.key_buffer_size = -1024;
-#SELECT @@global.key_buffer_size;
-SET @@global.key_buffer_size = 4;
-eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = ON;
-eval SELECT @@global.key_buffer_size $minimum_range;
+SELECT @@global.key_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 'test';
-eval SELECT @@global.key_buffer_size $minimum_range;
+SELECT @@global.key_buffer_size;
--echo '#-------------------FN_DYNVARS_055_05----------------------------#'
###########################################################################
@@ -116,7 +89,6 @@ eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_GLOBAL_VARIABLE
SET @@session.key_buffer_size = 0;
-eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#----------------------FN_DYNVARS_055_06------------------------#'
##############################################################################
@@ -136,13 +108,10 @@ WHERE VARIABLE_NAME='key_buffer_size';
# Check if TRUE and FALSE values can be used on variable #
###################################################################
-# The following assignment are accepted, but should be rejected
-# like the value ON (see above).
-# See Bug #42104
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
SET @@global.key_buffer_size = TRUE;
-eval SELECT @@global.key_buffer_size $minimum_range;
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
SET @@global.key_buffer_size = FALSE;
-eval SELECT @@global.key_buffer_size $minimum_range;
--echo '#---------------------FN_DYNVARS_055_08----------------------#'
#####################################################################
@@ -150,11 +119,7 @@ eval SELECT @@global.key_buffer_size $minimum_range;
# points to same session variable #
#####################################################################
-# due to differences in contents of the warnings
---disable_warnings
-SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size;
---enable_warnings
--echo '#---------------------FN_DYNVARS_055_09----------------------#'
##########################################################################
@@ -163,7 +128,6 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
--Error ER_GLOBAL_VARIABLE
SET key_buffer_size = 8 ;
-eval SELECT @@global.key_buffer_size $minimum_range;
--Error ER_PARSE_ERROR
SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE
@@ -181,7 +145,6 @@ SELECT key_buffer_size = @@session.key_buffer_size;
SET @@global.key_buffer_size = @start_value;
---enable_warnings
#######################################################################
# END OF key_buffer_size TESTS #
#######################################################################
diff --git a/mysql-test/suite/sys_vars/t/key_buffer_size_basic_32.test b/mysql-test/suite/sys_vars/t/key_buffer_size_basic_32.test
deleted file mode 100644
index 086e51e185c..00000000000
--- a/mysql-test/suite/sys_vars/t/key_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.inc
---source suite/sys_vars/inc/key_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/key_buffer_size_basic_64.test b/mysql-test/suite/sys_vars/t/key_buffer_size_basic_64.test
deleted file mode 100644
index 5604c56480b..00000000000
--- a/mysql-test/suite/sys_vars/t/key_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.inc
---source suite/sys_vars/inc/key_buffer_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/key_buffer_size_func.test b/mysql-test/suite/sys_vars/t/key_buffer_size_func.test
index 8ee305a3ac1..df0ce62c69c 100644
--- a/mysql-test/suite/sys_vars/t/key_buffer_size_func.test
+++ b/mysql-test/suite/sys_vars/t/key_buffer_size_func.test
@@ -86,11 +86,6 @@ connection test_con2;
--echo ## Key_reads must be zero (no disk access) ##
show status like 'Key_reads';
-CONNECTION default;
---disable_warnings
-SET @@global.key_buffer_size = 36;
---enable_warnings
-
--echo ## Connecting with connection test_con1 ##
CONNECTION test_con1;
diff --git a/mysql-test/suite/sys_vars/inc/key_cache_block_size_basic.inc b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
index b12ea45b762..99a3c5dc327 100644
--- a/mysql-test/suite/sys_vars/inc/key_cache_block_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
@@ -43,10 +43,7 @@ SELECT @start_value;
# Display the DEFAULT value of key_cache_block_size #
################################################################################
-SET @@global.key_cache_block_size = 600;
---Error ER_NO_DEFAULT
SET @@global.key_cache_block_size = DEFAULT;
---echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
SELECT @@global.key_cache_block_size;
@@ -72,8 +69,6 @@ SET @@global.key_cache_block_size = 1800;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 16383;
SELECT @@global.key_cache_block_size;
---echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
-
--echo '#--------------------FN_DYNVARS_057_04-------------------------#'
###########################################################################
@@ -96,8 +91,6 @@ SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 16385;
SELECT @@global.key_cache_block_size;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_block_size = ON;
SELECT @@global.key_cache_block_size;
diff --git a/mysql-test/suite/sys_vars/t/key_cache_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic_32.test
deleted file mode 100644
index db0c0bd67a2..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_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.inc
---source suite/sys_vars/inc/key_cache_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/key_cache_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic_64.test
deleted file mode 100644
index 7403d762dc4..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_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.inc
---source suite/sys_vars/inc/key_cache_block_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/inc/key_cache_division_limit_basic.inc b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
index a2cc49a1f38..dd41e4d37a0 100644
--- a/mysql-test/suite/sys_vars/inc/key_cache_division_limit_basic.inc
+++ b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
@@ -43,10 +43,7 @@ SELECT @start_value;
# Display the DEFAULT value of key_cache_division_limit #
################################################################################
-SET @@global.key_cache_division_limit = 50;
---Error ER_NO_DEFAULT
SET @@global.key_cache_division_limit = DEFAULT;
---echo 'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_division_limit;
@@ -95,8 +92,6 @@ SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 65535;
SELECT @@global.key_cache_division_limit;
-echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_division_limit = ON;
SELECT @@global.key_cache_division_limit;
diff --git a/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_32.test b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_32.test
deleted file mode 100644
index fcc28438866..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_division_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.inc
---source suite/sys_vars/inc/key_cache_division_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_64.test b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic_64.test
deleted file mode 100644
index ac4dd1c96d3..00000000000
--- a/mysql-test/suite/sys_vars/t/key_cache_division_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.inc
---source suite/sys_vars/inc/key_cache_division_limit_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/large_files_support_basic.test b/mysql-test/suite/sys_vars/t/large_files_support_basic.test
new file mode 100644
index 00000000000..690b32fce66
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/large_files_support_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.large_files_support;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.large_files_support;
+show global variables like 'large_files_support';
+show session variables like 'large_files_support';
+select * from information_schema.global_variables where variable_name='large_files_support';
+select * from information_schema.session_variables where variable_name='large_files_support';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global large_files_support=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session large_files_support=1;
+
diff --git a/mysql-test/suite/sys_vars/t/large_page_size_basic.test b/mysql-test/suite/sys_vars/t/large_page_size_basic.test
new file mode 100644
index 00000000000..cff90336fa0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/large_page_size_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+select @@global.large_page_size = 1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.large_page_size;
+--replace_column 2 #
+show global variables like 'large_page_size';
+--replace_column 2 #
+show session variables like 'large_page_size';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name='large_page_size';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='large_page_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global large_page_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session large_page_size=1;
+
diff --git a/mysql-test/suite/sys_vars/t/large_pages_basic.test b/mysql-test/suite/sys_vars/t/large_pages_basic.test
new file mode 100644
index 00000000000..840b9176832
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/large_pages_basic.test
@@ -0,0 +1,19 @@
+#
+# show the global and session values;
+#
+select @@global.large_pages;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.large_pages;
+show global variables like 'large_pages';
+show session variables like 'large_pages';
+select * from information_schema.global_variables where variable_name='large_pages';
+select * from information_schema.session_variables where variable_name='large_pages';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global large_pages=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session large_pages=1;
+
diff --git a/mysql-test/suite/sys_vars/t/last_insert_id_basic.test b/mysql-test/suite/sys_vars/t/last_insert_id_basic.test
new file mode 100644
index 00000000000..a2e0116f11d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/last_insert_id_basic.test
@@ -0,0 +1,30 @@
+
+#
+# exists as a session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.last_insert_id;
+select @@session.last_insert_id;
+show global variables like 'last_insert_id';
+show session variables like 'last_insert_id';
+select * from information_schema.global_variables where variable_name='last_insert_id';
+select * from information_schema.session_variables where variable_name='last_insert_id';
+
+#
+# show that it's writable
+#
+set session last_insert_id=1;
+select @@session.last_insert_id;
+--error ER_LOCAL_VARIABLE
+set global last_insert_id=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session last_insert_id=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session last_insert_id=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session last_insert_id="foo";
+
diff --git a/mysql-test/suite/sys_vars/t/lc_messages_basic.test b/mysql-test/suite/sys_vars/t/lc_messages_basic.test
new file mode 100644
index 00000000000..f8a25738285
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/lc_messages_basic.test
@@ -0,0 +1,35 @@
+SET @start_global_value = @@global.lc_messages;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.lc_messages;
+select @@session.lc_messages;
+show global variables like 'lc_messages';
+show session variables like 'lc_messages';
+select * from information_schema.global_variables where variable_name='lc_messages';
+select * from information_schema.session_variables where variable_name='lc_messages';
+
+#
+# show that it's writable
+#
+set global lc_messages=1;
+select @@global.lc_messages;
+set session lc_messages=2;
+select @@session.lc_messages;
+set global lc_messages="en_US";
+select @@global.lc_messages;
+set session lc_messages="en_GB";
+select @@session.lc_messages;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global lc_messages=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global lc_messages=1e1;
+
+SET @@global.lc_messages = @start_global_value;
+SELECT @@global.lc_messages;
diff --git a/mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test b/mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test
new file mode 100644
index 00000000000..6d452a3655c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select @@global.lc_messages_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.lc_messages_dir;
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+show global variables like 'lc_messages_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+show session variables like 'lc_messages_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select * from information_schema.global_variables where variable_name='lc_messages_dir';
+--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
+select * from information_schema.session_variables where variable_name='lc_messages_dir';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global lc_messages_dir=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session lc_messages_dir=1;
diff --git a/mysql-test/suite/sys_vars/t/lc_time_names_basic.test b/mysql-test/suite/sys_vars/t/lc_time_names_basic.test
index d0aa0c56937..68ee00b6ee0 100644
--- a/mysql-test/suite/sys_vars/t/lc_time_names_basic.test
+++ b/mysql-test/suite/sys_vars/t/lc_time_names_basic.test
@@ -178,7 +178,7 @@ SELECT @@session.lc_time_names;
SET @@session.lc_time_names=de_LU;
SELECT @@session.lc_time_names;
---Error ER_UNKNOWN_ERROR
+--error ER_UNKNOWN_LOCALE
SET @@session.lc_time_names=EE;
--echo 'Bug: The locale for Estonian - Estonia is not supported. It is present';
--echo 'in manual';
@@ -322,6 +322,8 @@ SET @@session.lc_time_names=sr_YU;
SELECT @@session.lc_time_names;
SET @@session.lc_time_names=sv_FI;
SELECT @@session.lc_time_names;
+SET @@session.lc_time_names=sr_RS;
+SELECT @@session.lc_time_names;
SET @@session.lc_time_names=sv_SE;
SELECT @@session.lc_time_names;
SET @@session.lc_time_names=ta_IN;
@@ -407,7 +409,7 @@ SELECT @@global.lc_time_names;
SET @@global.lc_time_names=de_LU;
SELECT @@global.lc_time_names;
---Error ER_UNKNOWN_ERROR
+--error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names=EE;
--echo 'Bug: The locale for Estonian - Estonia is not supported. It is';
--echo 'present in manual';
@@ -553,6 +555,8 @@ SET @@global.lc_time_names=sr_YU;
SELECT @@global.lc_time_names;
SET @@global.lc_time_names=sv_FI;
SELECT @@global.lc_time_names;
+SET @@global.lc_time_names=sr_RS;
+SELECT @@global.lc_time_names;
SET @@global.lc_time_names=sv_SE;
SELECT @@global.lc_time_names;
SET @@global.lc_time_names=ta_IN;
@@ -616,27 +620,27 @@ SET @@lc_time_names = 107;
SELECT @@lc_time_names;
SET @@lc_time_names = 108;
SELECT @@lc_time_names;
-
---Error ER_UNKNOWN_ERROR
SET @@lc_time_names = 109;
-
+SELECT @@lc_time_names;
+--Error ER_UNKNOWN_LOCALE
+SET @@lc_time_names = 110;
--echo '#--------------------FN_DYNVARS_060_10-------------------------#'
#############################################################################
# Change the value of lc_time_names to an invalid value for session #
#############################################################################
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = en_EN;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = US_en;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@lc_time_names = 1.1;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = -1;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 'en US';
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 'enUS';
SET @@lc_time_names = true;
@@ -644,7 +648,7 @@ SELECT @@lc_time_names AS res_with_true;
SET @@lc_time_names = false;
SELECT @@lc_time_names AS res_with_false;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = ON;
@@ -653,17 +657,17 @@ SET @@lc_time_names = ON;
# Change the value of lc_time_names to an invalid value for global #
############################################################################
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names = en_EN;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names = US_en;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.lc_time_names = 1.1;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.lc_time_names = NULL;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names = 'enUS';
SET @@global.lc_time_names = true;
@@ -671,7 +675,7 @@ SELECT @@global.lc_time_names;
SET @@global.lc_time_names = false;
SELECT @@global.lc_time_names;
---Error ER_UNKNOWN_ERROR
+--Error ER_UNKNOWN_LOCALE
SET @@global.lc_time_names = ON;
--echo '#--------------------FN_DYNVARS_060_12-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/locked_in_memory_basic.test b/mysql-test/suite/sys_vars/t/locked_in_memory_basic.test
new file mode 100644
index 00000000000..97313b7f608
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/locked_in_memory_basic.test
@@ -0,0 +1,20 @@
+--source include/not_windows.inc
+#
+# only global
+#
+select @@global.locked_in_memory;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.locked_in_memory;
+show global variables like 'locked_in_memory';
+show session variables like 'locked_in_memory';
+select * from information_schema.global_variables where variable_name='locked_in_memory';
+select * from information_schema.session_variables where variable_name='locked_in_memory';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global locked_in_memory=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session locked_in_memory=1;
+
diff --git a/mysql-test/suite/sys_vars/t/log_basic.test b/mysql-test/suite/sys_vars/t/log_basic.test
index 98e99fa4e4f..74b344cff6d 100644
--- a/mysql-test/suite/sys_vars/t/log_basic.test
+++ b/mysql-test/suite/sys_vars/t/log_basic.test
@@ -41,13 +41,9 @@ SELECT @@global.log AS INIT_VALUE;
SELECT @@log AS INIT_VALUE;
-SET @@global.general_log = ON;
-
-SET global general_log = 0;
-
---echo 'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
---echo 'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
+SET @@global.log = ON;
+SET global log = 0;
--echo '#--------------------FN_DYNVARS_062_02-------------------------#'
################################################################################
diff --git a/mysql-test/suite/sys_vars/t/log_bin_basic.test b/mysql-test/suite/sys_vars/t/log_bin_basic.test
new file mode 100644
index 00000000000..0712b42a370
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_bin_basic.test
@@ -0,0 +1,19 @@
+#
+# only global
+#
+select @@global.log_bin;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.log_bin;
+show global variables like 'log_bin';
+show session variables like 'log_bin';
+select * from information_schema.global_variables where variable_name='log_bin';
+select * from information_schema.session_variables where variable_name='log_bin';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global log_bin=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session log_bin=1;
+
diff --git a/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test b/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test
index e7bdb433971..15ffad2742a 100644
--- a/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test
+++ b/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_basic.test
@@ -37,10 +37,6 @@
SET @start_global_value = @@global.log_bin_trust_function_creators;
SELECT @start_global_value;
---echo 'Bug# 34876: TRUE value is coming as Default'
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @start_session_value = @@session.log_bin_trust_function_creators;
---echo 'Bug# 34881: According to documentation the scope of this variable is GLOBAL as well as SESSION too';
--echo '#--------------------FN_DYNVARS_063_01-------------------------#'
########################################################################
@@ -99,10 +95,8 @@ SELECT @@session.log_bin_trust_function_creators;
SET @@global.log_bin_trust_function_creators = 'ONN';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_bin_trust_function_creators = "OFFF";
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_bin_trust_function_creators = OF;
-
---echo 'Bug# 34828: OF is also working as OFF and no error is coming';
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_bin_trust_function_creators = TTRUE;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -111,7 +105,7 @@ SET @@global.log_bin_trust_function_creators = FELSE;
SET @@global.log_bin_trust_function_creators = -1024;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_bin_trust_function_creators = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.log_bin_trust_function_creators = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_bin_trust_function_creators = test;
diff --git a/mysql-test/suite/sys_vars/t/log_bin_trust_routine_creators_basic.test b/mysql-test/suite/sys_vars/t/log_bin_trust_routine_creators_basic.test
deleted file mode 100644
index 1d44c77b1a7..00000000000
--- a/mysql-test/suite/sys_vars/t/log_bin_trust_routine_creators_basic.test
+++ /dev/null
@@ -1,164 +0,0 @@
-############## mysql-test\t\log_bin_trust_routine_creators_basic.test #########
-# #
-# Variable Name: log_bin_trust_routine_creators #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
-# Data Type: boolean #
-# Default Value: False #
-# Range: #
-# #
-# #
-# Creation Date: 2008-02-12 #
-# Author: Salman #
-# #
-# Description: Test Cases of Dynamic System Variable #
-# log_bin_trust_routine_creators that checks the #
-# behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# #
-# Reference: (Not given on website) #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-####################################################################
-# START OF log_bin_trust_routine_creators TESTS #
-####################################################################
-
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.log_bin_trust_routine_creators;
-SELECT @start_global_value;
-
-
---echo '#--------------------FN_DYNVARS_064_01-------------------------#'
-########################################################################
-# Display the DEFAULT value of log_bin_trust_routine_creators #
-########################################################################
-
-SET @@global.log_bin_trust_routine_creators = TRUE;
-SET @@global.log_bin_trust_routine_creators = DEFAULT;
-SELECT @@global.log_bin_trust_routine_creators;
-
-
---echo '#--------------------FN_DYNVARS_064_02-------------------------#'
-##############################################################################
-# Check the DEFAULT value of log_bin_trust_routine_creators #
-##############################################################################
-
-SET @@global.log_bin_trust_routine_creators = DEFAULT;
-SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
-
-
---echo '#--------------------FN_DYNVARS_064_03-------------------------#'
-##################################################################
-# Change the value of variable to a valid value for GLOBAL Scope #
-##################################################################
-
-SET @@global.log_bin_trust_routine_creators = ON;
-SELECT @@global.log_bin_trust_routine_creators;
-SET @@global.log_bin_trust_routine_creators = OFF;
-SELECT @@global.log_bin_trust_routine_creators;
-SET @@global.log_bin_trust_routine_creators = 0;
-SELECT @@global.log_bin_trust_routine_creators;
-SET @@global.log_bin_trust_routine_creators = 1;
-SELECT @@global.log_bin_trust_routine_creators;
-SET @@global.log_bin_trust_routine_creators = TRUE;
-SELECT @@global.log_bin_trust_routine_creators;
-SET @@global.log_bin_trust_routine_creators = FALSE;
-SELECT @@global.log_bin_trust_routine_creators;
-
-
---echo '#-------------------FN_DYNVARS_064_04----------------------------#'
-###########################################################################
-# Test if accessing session log_bin_trust_routine_creators gives error #
-###########################################################################
-
---Error ER_GLOBAL_VARIABLE
-SET @@session.log_bin_trust_routine_creators = 0;
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.log_bin_trust_routine_creators;
-
-
---echo '#------------------FN_DYNVARS_064_05-----------------------#'
-##########################################################################
-# Change the value of log_bin_trust_routine_creators to an invalid value #
-##########################################################################
-
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = 'ONN';
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = "OFFF";
-SET @@global.log_bin_trust_routine_creators = OF;
-SELECT @@global.log_bin_trust_routine_creators;
---echo 'Bug# 34828: OF is also working as OFF and no error is coming';
-
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = TTRUE;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = FELSE;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = -1024;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = 65530.34;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_bin_trust_routine_creators = test;
-
-
---echo '#------------------FN_DYNVARS_064_06-----------------------#'
-###############################################################################
-# Check if the value in GLOBAL & SESSION Tables matches value in variable #
-###############################################################################
-
-
-SELECT @@global.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
-
-
---echo '#---------------------FN_DYNVARS_064_07----------------------#'
-#################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-#################################################################################
-
-
-SET @@global.log_bin_trust_routine_creators = TRUE;
-SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
-
-
---echo '#---------------------FN_DYNVARS_064_08----------------------#'
-###################################################################
-# Check if variable can be accessed with and without @@ sign #
-###################################################################
-
-SET @@global.log_bin_trust_routine_creators = TRUE;
-SELECT @@log_bin_trust_routine_creators;
---Error ER_UNKNOWN_TABLE
-SELECT local.log_bin_trust_routine_creators;
---Error ER_UNKNOWN_TABLE
-SELECT session.log_bin_trust_routine_creators;
---Error ER_BAD_FIELD_ERROR
-SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators;
-
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.log_bin_trust_routine_creators = @start_global_value;
-SELECT @@global.log_bin_trust_routine_creators;
-
-
-###################################################################
-# END OF log_bin_trust_routine_creators TESTS #
-###################################################################
-
diff --git a/mysql-test/suite/sys_vars/t/log_error_basic.test b/mysql-test/suite/sys_vars/t/log_error_basic.test
new file mode 100644
index 00000000000..67bd33cb31b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_error_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.log_error;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.log_error;
+show global variables like 'log_error';
+show session variables like 'log_error';
+select * from information_schema.global_variables where variable_name='log_error';
+select * from information_schema.session_variables where variable_name='log_error';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global log_error=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session log_error=1;
diff --git a/mysql-test/suite/sys_vars/t/log_output_basic.test b/mysql-test/suite/sys_vars/t/log_output_basic.test
index 45998e85480..b45d30f16a3 100644
--- a/mysql-test/suite/sys_vars/t/log_output_basic.test
+++ b/mysql-test/suite/sys_vars/t/log_output_basic.test
@@ -46,10 +46,6 @@ SELECT @start_value;
SET @@global.log_output = FILE;
SET @@global.log_output = DEFAULT;
SELECT @@global.log_output;
---echo 'Bug# 34876: Documentation specifies a DEFAULT value of TABLE whereas';
---echo 'DEFAULT value is FILE. Also note that initial value is different';
---echo 'from DEFAULT';
-
--echo '#---------------------FN_DYNVARS_065_02-------------------------#'
##################################################
@@ -61,9 +57,6 @@ SET @@global.log_output = NULL;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = "";
-SELECT @@global.log_output;
---echo 'Bug# 34838: Empty value is allowed where as it is not specified in';
---echo 'documentation';
--echo '#--------------------FN_DYNVARS_065_03------------------------#'
########################################################################
@@ -103,9 +96,6 @@ SELECT @@global.log_output;
SET @@global.log_output = ',TABLE';
SELECT @@global.log_output;
-SET @@global.log_output = ',';
-SELECT @@global.log_output;
-
SET @@global.log_output = 'TABLE,,FILE,,,';
SELECT @@global.log_output;
@@ -117,34 +107,26 @@ SELECT @@global.log_output;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = -1;
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = TAB;
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = NIL;
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = 'FIL';
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = 'T';
# use of space in value
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = 'TABLE, FILE';
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = ' TABLE,FILE';
-SET @@global.log_output = ', ';
-SELECT @@global.log_output;
-SET @@global.log_output = ' ';
-SELECT @@global.log_output;
-SET @@global.log_output = ' ';
-SELECT @@global.log_output;
-
---echo 'Bug: The behavior of space in value is not consistent.';
---echo 'Some times it is trimmed and some times not.';
---echo 'The space before and after value is not accepted where as space';
---echo 'between comma is accepted.';
-
-
--echo '#-------------------FN_DYNVARS_065_05----------------------------#'
######################################################################
# Test if accessing session log_output gives error #
@@ -208,6 +190,7 @@ SET @@global.log_output = 8;
SET @@global.log_output = TRUE;
SELECT @@global.log_output;
+
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = FALSE;
SELECT @@global.log_output;
diff --git a/mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test b/mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test
index f7e6e8df640..a726bff08d7 100644
--- a/mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test
+++ b/mysql-test/suite/sys_vars/t/log_queries_not_using_indexes_basic.test
@@ -56,30 +56,12 @@ SELECT @@global.log_queries_not_using_indexes;
SET GLOBAL log_queries_not_using_indexes= -0;
SELECT @@global.log_queries_not_using_indexes;
+--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL log_queries_not_using_indexes= 0.00;
-SELECT @@global.log_queries_not_using_indexes;
-
-SET GLOBAL log_queries_not_using_indexes= -0.0;
-SELECT @@global.log_queries_not_using_indexes;
-
-SET GLOBAL log_queries_not_using_indexes= 001.00;
-SELECT @@global.log_queries_not_using_indexes;
-
-SET GLOBAL log_queries_not_using_indexes= +1.0;
-SELECT @@global.log_queries_not_using_indexes;
SET GLOBAL log_queries_not_using_indexes= +0;
SELECT @@global.log_queries_not_using_indexes;
-SET GLOBAL log_queries_not_using_indexes= +0.000000;
-SELECT @@global.log_queries_not_using_indexes;
-
-SET GLOBAL log_queries_not_using_indexes= 0000.00000;
-SELECT @@global.log_queries_not_using_indexes;
-
-SET GLOBAL log_queries_not_using_indexes= .0;
-SELECT @@global.log_queries_not_using_indexes;
-
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
@@ -97,9 +79,6 @@ SET @@global.log_queries_not_using_indexes= BLABLA;
SET @@global.log_queries_not_using_indexes= 25;
--error ER_WRONG_VALUE_FOR_VAR
-SET @@global.log_queries_not_using_indexes= 12.34;
-
---error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL log_queries_not_using_indexes= -1;
SET @badvar= 'true';
@@ -127,7 +106,5 @@ SET @@global log_queries_not_using_indexes= TRUE;
--error ER_PARSE_ERROR
SET @@SESSION log_queries_not_using_indexes= TRUE;
-
SET @@global.log_queries_not_using_indexes= @start_value;
-SELECT IF(@@GLOBAL.log_queries_not_using_indexes, "ON", "OFF") = VARIABLE_VALUE
diff --git a/mysql-test/suite/sys_vars/t/log_slave_updates_basic.test b/mysql-test/suite/sys_vars/t/log_slave_updates_basic.test
new file mode 100644
index 00000000000..93212e4f1ae
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_slave_updates_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.log_slave_updates;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.log_slave_updates;
+show global variables like 'log_slave_updates';
+show session variables like 'log_slave_updates';
+select * from information_schema.global_variables where variable_name='log_slave_updates';
+select * from information_schema.session_variables where variable_name='log_slave_updates';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global log_slave_updates=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session log_slave_updates=1;
diff --git a/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test b/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test
new file mode 100644
index 00000000000..95dda5b73c9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test
@@ -0,0 +1,170 @@
+##################### mysql-test\t\slow_query_log_basic.test ###################
+# #
+# Variable Name: log_slow_queries #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: BOOLEAN #
+# Default Value: OFF #
+# Valid Values: ON, OFF #
+# #
+# #
+# Creation Date: 2008-03-16 #
+# Author: Salman Rawala #
+# #
+# Description: Test Cases of Dynamic System Variable "log_slow_queries" #
+# that checks behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-options.html#option_mysqld_event-scheduler #
+# #
+################################################################################
+
+--source include/load_sysvars.inc
+
+###########################################################
+# START OF log_slow_queries TESTS #
+###########################################################
+
+
+######################################################################
+# Saving initial value of log_slow_queries in a temporary variable #
+######################################################################
+
+SET @start_value = @@global.log_slow_queries;
+SELECT @start_value;
+
+
+--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.log_slow_queries = DEFAULT;
+SELECT @@global.log_slow_queries = 0;
+
+
+--echo '#--------------------FN_DYNVARS_004_02------------------------#'
+######################################################################
+# Change the value of log_slow_queries to a valid value #
+######################################################################
+
+SET @@global.log_slow_queries = ON;
+SELECT @@global.log_slow_queries;
+SET @@global.log_slow_queries = OFF;
+SELECT @@global.log_slow_queries;
+
+--echo '#--------------------FN_DYNVARS_004_03-------------------------#'
+######################################################################
+# Change the value of log_slow_queries to invalid value #
+######################################################################
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = 2;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = -1;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = TRUEF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = TRUE_F;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = FALSE0;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = OON;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = ONN;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = OOFF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = 0FF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = ' ';
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = " ";
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.log_slow_queries = '';
+
+
+--echo '#-------------------FN_DYNVARS_004_04----------------------------#'
+##################################################################
+# Test if accessing session log_slow_queries gives error #
+##################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.log_slow_queries = OFF;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.log_slow_queries;
+
+
+--echo '#----------------------FN_DYNVARS_004_05------------------------#'
+##############################################################################
+# Check if the value in GLOBAL Tables matches values in variable #
+##############################################################################
+
+SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='log_slow_queries';
+
+
+--echo '#---------------------FN_DYNVARS_004_06----------------------#'
+################################################################
+# Check if 0 and 1 values can be used on variable #
+################################################################
+
+SET @@global.log_slow_queries = 0;
+SELECT @@global.log_slow_queries;
+SET @@global.log_slow_queries = 1;
+SELECT @@global.log_slow_queries;
+
+--echo '#---------------------FN_DYNVARS_004_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.log_slow_queries = TRUE;
+SELECT @@global.log_slow_queries;
+SET @@global.log_slow_queries = FALSE;
+SELECT @@global.log_slow_queries;
+
+--echo '#---------------------FN_DYNVARS_004_08----------------------#'
+##############################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points #
+# to same session variable #
+##############################################################################
+
+SET @@global.log_slow_queries = ON;
+SELECT @@log_slow_queries = @@global.log_slow_queries;
+
+--echo '#---------------------FN_DYNVARS_004_09----------------------#'
+######################################################################
+# Check if log_slow_queries can be accessed with and without @@ sign #
+######################################################################
+--Error ER_GLOBAL_VARIABLE
+SET log_slow_queries = ON;
+--Error ER_PARSE_ERROR
+SET local.log_slow_queries = OFF;
+--Error ER_UNKNOWN_TABLE
+SELECT local.log_slow_queries;
+--Error ER_PARSE_ERROR
+SET global.log_slow_queries = ON;
+--Error ER_UNKNOWN_TABLE
+SELECT global.log_slow_queries;
+--Error ER_BAD_FIELD_ERROR
+SELECT log_slow_queries = @@session.log_slow_queries;
+
+
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.log_slow_queries = @start_value;
+SELECT @@global.log_slow_queries;
+
+
+####################################################
+# END OF log_slow_queries TESTS #
+####################################################
diff --git a/mysql-test/suite/sys_vars/t/long_query_time_basic.test b/mysql-test/suite/sys_vars/t/long_query_time_basic.test
index c21e0a751c1..25b4a698008 100644
--- a/mysql-test/suite/sys_vars/t/long_query_time_basic.test
+++ b/mysql-test/suite/sys_vars/t/long_query_time_basic.test
@@ -105,24 +105,25 @@ SELECT @@session.long_query_time;
# Change the value of long_query_time to an invalid value #
########################################################
+# windows *is* different
+--replace_result +011 +11
SET @@global.long_query_time = 100000000000;
SELECT @@global.long_query_time;
SET @@global.long_query_time = -1;
SELECT @@global.long_query_time;
---Error ER_PARSE_ERROR
-SET @@global.long_query_time = 65530.34.;
+SET @@global.long_query_time = 65530.34;
SELECT @@global.long_query_time;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.long_query_time = test;
SELECT @@global.long_query_time;
+--replace_result +011 +11
SET @@session.long_query_time = 100000000000;
SELECT @@session.long_query_time;
SET @@session.long_query_time = -2;
SELECT @@session.long_query_time;
---Error ER_PARSE_ERROR
-SET @@session.long_query_time = 65530.34.;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+SET @@session.long_query_time = 65530.34;
+SELECT @@session.long_query_time;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.long_query_time = test;
diff --git a/mysql-test/suite/sys_vars/t/low_priority_updates_basic.test b/mysql-test/suite/sys_vars/t/low_priority_updates_basic.test
index 762fa726f1f..e00688ef974 100644
--- a/mysql-test/suite/sys_vars/t/low_priority_updates_basic.test
+++ b/mysql-test/suite/sys_vars/t/low_priority_updates_basic.test
@@ -122,7 +122,7 @@ SET @@global.low_priority_updates = FELSE;
SET @@global.low_priority_updates = -1024;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.low_priority_updates = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.low_priority_updates = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.low_priority_updates = test;
@@ -131,20 +131,16 @@ SET @@global.low_priority_updates = test;
SET @@session.low_priority_updates = ONN;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = ONF;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = OF;
-SELECT @@session.low_priority_updates;
---echo 'Bug# 34828: OF is also working as OFF and no error is coming';
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = 'OFN';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = -2;
---Error ER_PARSE_ERROR
-SET @@session.low_priority_updates = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.low_priority_updates = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = 65550;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.low_priority_updates = test;
diff --git a/mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test b/mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test
new file mode 100644
index 00000000000..6c15f188880
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+select @@global.lower_case_file_system=2;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.lower_case_file_system;
+--replace_column 2 #
+show global variables like 'lower_case_file_system';
+--replace_column 2 #
+show session variables like 'lower_case_file_system';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name='lower_case_file_system';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='lower_case_file_system';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global lower_case_file_system=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session lower_case_file_system=1;
+
diff --git a/mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test b/mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test
new file mode 100644
index 00000000000..8d6a3bb5ca6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+select @@global.lower_case_table_names=20;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.lower_case_table_names;
+--replace_column 2 #
+show global variables like 'lower_case_table_names';
+--replace_column 2 #
+show session variables like 'lower_case_table_names';
+--replace_column 2 #
+select * from information_schema.global_variables where variable_name='lower_case_table_names';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='lower_case_table_names';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global lower_case_table_names=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session lower_case_table_names=1;
+
diff --git a/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test b/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
index 8be0e5f670e..93303b78639 100644
--- a/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_allowed_packet_basic.test
@@ -56,7 +56,7 @@ SELECT @@global.max_allowed_packet;
--Error ER_VARIABLE_IS_READONLY
SET @@session.max_allowed_packet = 20000;
---Error ER_NO_DEFAULT
+--Error ER_VARIABLE_IS_READONLY
SET @@session.max_allowed_packet = DEFAULT;
SELECT @@session.max_allowed_packet;
@@ -79,7 +79,6 @@ SET @@global.max_allowed_packet = 1024;
SELECT @@global.max_allowed_packet;
SET @@global.max_allowed_packet = 1025;
SELECT @@global.max_allowed_packet;
---echo : 'Bug# 34841: "Invalid values are coming in variable on assigning valid value';
SET @@global.max_allowed_packet = 1073741824;
SELECT @@global.max_allowed_packet;
SET @@global.max_allowed_packet = 1073741823;
@@ -120,8 +119,8 @@ SET @@global.max_allowed_packet = 1023;
SELECT @@global.max_allowed_packet;
SET @@global.max_allowed_packet = 10737418241;
SELECT @@global.max_allowed_packet;
---Error ER_PARSE_ERROR
-SET @@global.max_allowed_packet = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_allowed_packet = 65530.34;
SELECT @@global.max_allowed_packet;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_allowed_packet = test;
@@ -136,12 +135,11 @@ SELECT @@session.max_allowed_packet;
--Error ER_VARIABLE_IS_READONLY
SET @@session.max_allowed_packet = -2;
SELECT @@session.max_allowed_packet;
---Error ER_PARSE_ERROR
-SET @@session.max_allowed_packet = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_allowed_packet = 65530.34;
--Error ER_VARIABLE_IS_READONLY
SET @@session.max_allowed_packet = 10737418241;
SELECT @@session.max_allowed_packet;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_allowed_packet = test;
diff --git a/mysql-test/suite/sys_vars/inc/max_binlog_cache_size_basic.inc b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic.test
index 9f3416d2e31..158c21a9489 100644
--- a/mysql-test/suite/sys_vars/inc/max_binlog_cache_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic.test
@@ -58,7 +58,6 @@ SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size = 4294967295;
---echo 'Bug# 34876: Incorrect Default Value is assigned to variable';
--echo '#--------------------FN_DYNVARS_072_03------------------------#'
########################################################################
@@ -75,7 +74,6 @@ SET @@global.max_binlog_cache_size = 4097;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 65535;
SELECT @@global.max_binlog_cache_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_072_04-------------------------#'
@@ -99,8 +97,6 @@ SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4095;
SELECT @@global.max_binlog_cache_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_binlog_cache_size = ON;
SELECT @@global.max_binlog_cache_size;
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_32.test b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_32.test
deleted file mode 100644
index 51386b1f994..00000000000
--- a/mysql-test/suite/sys_vars/t/max_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.inc
---source suite/sys_vars/inc/max_binlog_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_64.test b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic_64.test
deleted file mode 100644
index c7c757341fa..00000000000
--- a/mysql-test/suite/sys_vars/t/max_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.inc
---source suite/sys_vars/inc/max_binlog_cache_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_size_basic.test b/mysql-test/suite/sys_vars/t/max_binlog_size_basic.test
index 11d01b5c10f..4d2574a7890 100644
--- a/mysql-test/suite/sys_vars/t/max_binlog_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_binlog_size_basic.test
@@ -45,7 +45,6 @@ SELECT @start_value;
SET @@global.max_binlog_size = 5000;
SET @@global.max_binlog_size = DEFAULT;
SELECT @@global.max_binlog_size;
---echo 'Bug# 34878: This variable has invalid default value as compared to documentation';
--echo '#---------------------FN_DYNVARS_072_02-------------------------#'
###############################################
@@ -70,7 +69,6 @@ SET @@global.max_binlog_size = 4097;
SELECT @@global.max_binlog_size;
SET @@global.max_binlog_size = 65535;
SELECT @@global.max_binlog_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_072_04-------------------------#'
@@ -94,8 +92,6 @@ SELECT @@global.max_binlog_size;
SET @@global.max_binlog_size = 4095;
SELECT @@global.max_binlog_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_binlog_size = ON;
SELECT @@global.max_binlog_size;
diff --git a/mysql-test/suite/sys_vars/t/max_connections_basic.test b/mysql-test/suite/sys_vars/t/max_connections_basic.test
index ffc964db28f..346f7d8f460 100644
--- a/mysql-test/suite/sys_vars/t/max_connections_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_connections_basic.test
@@ -46,8 +46,6 @@ SELECT @start_value;
SET @@global.max_connections = 5000;
SET @@global.max_connections = DEFAULT;
SELECT @@global.max_connections;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
-
--echo '#---------------------FN_DYNVARS_074_02-------------------------#'
###############################################
@@ -73,7 +71,6 @@ SET @@global.max_connections = 1;
SELECT @@global.max_connections;
SET @@global.max_connections = 2;
SELECT @@global.max_connections;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_074_04-------------------------#'
@@ -95,8 +92,6 @@ SELECT @@global.max_connections;
SET @@global.max_connections = 100001;
SELECT @@global.max_connections;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_connections = ON;
SELECT @@global.max_connections;
diff --git a/mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test b/mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test
index dc908c8396b..43947500339 100644
--- a/mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_delayed_threads_basic.test
@@ -51,7 +51,6 @@ SELECT @@global.max_delayed_threads;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_delayed_threads = 1000;
---echo 'Bug# 34882: Valid values are not allowed to assign in this variable';
SET @@session.max_delayed_threads = DEFAULT;
SELECT @@session.max_delayed_threads;
@@ -77,7 +76,6 @@ SET @@global.max_delayed_threads = 1;
SELECT @@global.max_delayed_threads;
SET @@global.max_delayed_threads = 1025;
SELECT @@global.max_delayed_threads;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.max_delayed_threads = 0;
SELECT @@global.max_delayed_threads;
@@ -119,24 +117,20 @@ SET @@global.max_delayed_threads = -1;
SELECT @@global.max_delayed_threads;
SET @@global.max_delayed_threads = 16385;
SELECT @@global.max_delayed_threads;
---Error ER_PARSE_ERROR
-SET @@global.max_delayed_threads = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_delayed_threads = 65530.34;
SELECT @@global.max_delayed_threads;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_delayed_threads = test;
SELECT @@global.max_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_delayed_threads = 16385;
SELECT @@session.max_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_delayed_threads = -1;
SELECT @@session.max_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_delayed_threads = -2;
SELECT @@session.max_delayed_threads;
---Error ER_PARSE_ERROR
-SET @@session.max_delayed_threads = 65530.34.;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_delayed_threads = 65530.34;
SET @@session.max_delayed_threads = 10737418241;
SELECT @@session.max_delayed_threads;
diff --git a/mysql-test/suite/sys_vars/t/max_error_count_basic.test b/mysql-test/suite/sys_vars/t/max_error_count_basic.test
index 2b1e12843cf..987cc1592df 100644
--- a/mysql-test/suite/sys_vars/t/max_error_count_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_error_count_basic.test
@@ -75,7 +75,6 @@ SET @@global.max_error_count = 1;
SELECT @@global.max_error_count;
SET @@global.max_error_count = 0;
SELECT @@global.max_error_count;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
SET @@global.max_error_count = 65535;
SELECT @@global.max_error_count;
@@ -110,8 +109,8 @@ SET @@global.max_error_count = 65536;
SELECT @@global.max_error_count;
SET @@global.max_error_count = 10737418241;
SELECT @@global.max_error_count;
---Error ER_PARSE_ERROR
-SET @@global.max_error_count = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_error_count = 65530.34;
SELECT @@global.max_error_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_error_count = test;
@@ -123,11 +122,10 @@ SET @@session.max_error_count = 65536;
SELECT @@session.max_error_count;
SET @@session.max_error_count = -2;
SELECT @@session.max_error_count;
---Error ER_PARSE_ERROR
-SET @@session.max_error_count = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_error_count = 65530.34;
SET @@session.max_error_count = 10737418241;
SELECT @@session.max_error_count;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_error_count = test;
diff --git a/mysql-test/suite/sys_vars/inc/max_heap_table_size_basic.inc b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
index d07ae094cde..4b9c7cf3b8e 100644
--- a/mysql-test/suite/sys_vars/inc/max_heap_table_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
@@ -81,8 +81,6 @@ SET @@global.max_heap_table_size = 4294967294;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 4294967295;
SELECT @@global.max_heap_table_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
--echo '#--------------------FN_DYNVARS_077_04-------------------------#'
#############################################################################
@@ -99,8 +97,6 @@ SET @@session.max_heap_table_size = 4294967294;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 4294967295;
SELECT @@session.max_heap_table_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
--echo '#------------------FN_DYNVARS_077_05-----------------------#'
##############################################################
@@ -117,8 +113,8 @@ SET @@global.max_heap_table_size = 16383;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 4294967296;
SELECT @@global.max_heap_table_size;
---Error ER_PARSE_ERROR
-SET @@global.max_heap_table_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_heap_table_size = 65530.34;
SELECT @@global.max_heap_table_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_heap_table_size = test;
@@ -130,11 +126,10 @@ SET @@session.max_heap_table_size = 16383;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 4294967296;
SELECT @@session.max_heap_table_size;
---Error ER_PARSE_ERROR
-SET @@session.max_heap_table_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_heap_table_size = 65530.34;
SET @@session.max_heap_table_size = 10737418241;
SELECT @@session.max_heap_table_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_heap_table_size = test;
diff --git a/mysql-test/suite/sys_vars/t/max_heap_table_size_basic_32.test b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic_32.test
deleted file mode 100644
index 180c41a5ecf..00000000000
--- a/mysql-test/suite/sys_vars/t/max_heap_table_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.inc
---source suite/sys_vars/inc/max_heap_table_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_heap_table_size_basic_64.test b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic_64.test
deleted file mode 100644
index 89d234f5399..00000000000
--- a/mysql-test/suite/sys_vars/t/max_heap_table_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.inc
---source suite/sys_vars/inc/max_heap_table_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test b/mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test
index d165ddc11fe..3646743a9ae 100644
--- a/mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_insert_delayed_threads_basic.test
@@ -1,17 +1,17 @@
############## mysql-test\t\max_insert_delayed_threads_basic.test ###############
# #
-# Variable Name: max_insert_delayed_threads #
+# Variable Name: max_insert_delayed_threads #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
-# Data Type: numeric #
-# Default Value: - #
-# Range: - #
+# Data Type: numeric #
+# Default Value: 20 #
+# Range: 0-16384 #
# #
# #
# Creation Date: 2008-02-07 #
-# Author: Salman #
+# Author: Salman #
# #
-# Description: Test Cases of Dynamic System Variable max_insert_delayed_threads #
+# Description: Test Cases of Dynamic System Variable max_insert_delayed_threads #
# that checks the behavior of this variable in the following ways#
# * Default Value #
# * Valid & Invalid values #
@@ -26,7 +26,7 @@
--source include/load_sysvars.inc
##################################################################
-# START OF max_insert_delayed_threads TESTS #
+# START OF max_insert_delayed_threads TESTS #
##################################################################
@@ -40,47 +40,42 @@ SET @start_session_value = @@session.max_insert_delayed_threads;
SELECT @start_session_value;
---echo '#--------------------FN_DYNVARS_078_01-------------------------#'
+--echo '#--------------------FN_DYNVARS_075_01-------------------------#'
##################################################################
-# Display the DEFAULT value of max_insert_delayed_threads #
+# Display the DEFAULT value of max_insert_delayed_threads #
##################################################################
SET @@global.max_insert_delayed_threads = 1000;
---Error ER_NO_DEFAULT
SET @@global.max_insert_delayed_threads = DEFAULT;
SELECT @@global.max_insert_delayed_threads;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = 1000;
SET @@session.max_insert_delayed_threads = DEFAULT;
SELECT @@session.max_insert_delayed_threads;
---echo '#--------------------FN_DYNVARS_078_02-------------------------#'
+--echo '#--------------------FN_DYNVARS_075_02-------------------------#'
##################################################################
-# Check the DEFAULT value of max_insert_delayed_threads #
+# Check the DEFAULT value of max_insert_delayed_threads #
##################################################################
---Error ER_NO_DEFAULT
SET @@global.max_insert_delayed_threads = DEFAULT;
SELECT @@global.max_insert_delayed_threads = 20;
SET @@session.max_insert_delayed_threads = DEFAULT;
SELECT @@session.max_insert_delayed_threads = 20;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
---echo '#--------------------FN_DYNVARS_078_03-------------------------#'
-###############################################################$$$$$$$$#############
+--echo '#--------------------FN_DYNVARS_075_03-------------------------#'
+############################################################################
# Change the value of max_insert_delayed_threads to a valid value for GLOBAL Scope #
-###############################################################$$$$$$$$#############
+############################################################################
SET @@global.max_insert_delayed_threads = 1;
SELECT @@global.max_insert_delayed_threads;
SET @@global.max_insert_delayed_threads = 1025;
SELECT @@global.max_insert_delayed_threads;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
SET @@global.max_insert_delayed_threads = 0;
SELECT @@global.max_insert_delayed_threads;
SET @@global.max_insert_delayed_threads = 16384;
@@ -88,10 +83,10 @@ SELECT @@global.max_insert_delayed_threads;
SET @@global.max_insert_delayed_threads = 16383;
SELECT @@global.max_insert_delayed_threads;
---echo '#--------------------FN_DYNVARS_078_04-------------------------#'
-#####################################################################################
+--echo '#--------------------FN_DYNVARS_075_04-------------------------#'
+#############################################################################
# Change the value of max_insert_delayed_threads to a valid value for SESSION Scope #
-#####################################################################################
+#############################################################################
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = 1;
@@ -99,7 +94,7 @@ SELECT @@session.max_insert_delayed_threads;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = 1025;
SELECT @@session.max_insert_delayed_threads;
-
+
SET @@session.max_insert_delayed_threads = 0;
SELECT @@session.max_insert_delayed_threads;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -110,10 +105,10 @@ SET @@session.max_insert_delayed_threads = 16383;
SELECT @@session.max_insert_delayed_threads;
---echo '#------------------FN_DYNVARS_078_05-----------------------#'
-######################################################################
+--echo '#------------------FN_DYNVARS_075_05-----------------------#'
+##############################################################
# Change the value of max_insert_delayed_threads to an invalid value #
-######################################################################
+##############################################################
SET @@global.max_insert_delayed_threads = -1024;
SELECT @@global.max_insert_delayed_threads;
@@ -121,24 +116,20 @@ SET @@global.max_insert_delayed_threads = -1;
SELECT @@global.max_insert_delayed_threads;
SET @@global.max_insert_delayed_threads = 16385;
SELECT @@global.max_insert_delayed_threads;
---Error ER_PARSE_ERROR
-SET @@global.max_insert_delayed_threads = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_insert_delayed_threads = 65530.34;
SELECT @@global.max_insert_delayed_threads;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_insert_delayed_threads = test;
SELECT @@global.max_insert_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = 16385;
SELECT @@session.max_insert_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = -1;
SELECT @@session.max_insert_delayed_threads;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@session.max_insert_delayed_threads = -2;
SELECT @@session.max_insert_delayed_threads;
---Error ER_PARSE_ERROR
-SET @@session.max_insert_delayed_threads = 65530.34.;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_insert_delayed_threads = 65530.34;
SET @@session.max_insert_delayed_threads = 10737418241;
SELECT @@session.max_insert_delayed_threads;
@@ -148,7 +139,7 @@ SET @@session.max_insert_delayed_threads = test;
SELECT @@session.max_insert_delayed_threads;
---echo '#------------------FN_DYNVARS_078_06-----------------------#'
+--echo '#------------------FN_DYNVARS_075_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
@@ -158,7 +149,7 @@ SELECT @@global.max_insert_delayed_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_insert_delayed_threads';
---echo '#------------------FN_DYNVARS_078_07-----------------------#'
+--echo '#------------------FN_DYNVARS_075_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
@@ -168,7 +159,7 @@ FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_insert_delayed_threads';
---echo '#------------------FN_DYNVARS_078_08-----------------------#'
+--echo '#------------------FN_DYNVARS_075_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
@@ -179,7 +170,7 @@ SET @@global.max_insert_delayed_threads = FALSE;
SELECT @@global.max_insert_delayed_threads;
---echo '#---------------------FN_DYNVARS_078_09----------------------#'
+--echo '#---------------------FN_DYNVARS_001_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
@@ -188,7 +179,7 @@ SET @@global.max_insert_delayed_threads = 2048;
SELECT @@max_insert_delayed_threads = @@global.max_insert_delayed_threads;
---echo '#---------------------FN_DYNVARS_078_10----------------------#'
+--echo '#---------------------FN_DYNVARS_001_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
@@ -199,10 +190,10 @@ SELECT @@max_insert_delayed_threads = @@local.max_insert_delayed_threads;
SELECT @@local.max_insert_delayed_threads = @@session.max_insert_delayed_threads;
---echo '#---------------------FN_DYNVARS_078_11----------------------#'
-#####################################################################################
+--echo '#---------------------FN_DYNVARS_001_11----------------------#'
+#############################################################################
# Check if max_insert_delayed_threads can be accessed with and without @@ sign #
-#####################################################################################
+#############################################################################
--Error ER_WRONG_VALUE_FOR_VAR
SET max_insert_delayed_threads = 1024;
@@ -225,7 +216,7 @@ SET @@session.max_insert_delayed_threads = @start_session_value;
SELECT @@session.max_insert_delayed_threads;
-###############################################################
+#######################################################
# END OF max_insert_delayed_threads TESTS #
-###############################################################
+#######################################################
diff --git a/mysql-test/suite/sys_vars/t/max_join_size_basic.test b/mysql-test/suite/sys_vars/t/max_join_size_basic.test
new file mode 100644
index 00000000000..7566ab11520
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_join_size_basic.test
@@ -0,0 +1,42 @@
+SET @start_global_value = @@global.max_join_size;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.max_join_size;
+select @@session.max_join_size;
+show global variables like 'max_join_size';
+show session variables like 'max_join_size';
+select * from information_schema.global_variables where variable_name='max_join_size';
+select * from information_schema.session_variables where variable_name='max_join_size';
+
+#
+# show that it's writable
+#
+set global max_join_size=10;
+select @@global.max_join_size;
+set session max_join_size=20;
+select @@session.max_join_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global max_join_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global max_join_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global max_join_size="foo";
+
+#
+# affects OPTION_BIG_SELECTS
+#
+select @@sql_big_selects;
+set max_join_size=cast(-1 as unsigned int);
+select @@sql_big_selects;
+set max_join_size=100;
+select @@sql_big_selects;
+
+SET @@global.max_join_size = @start_global_value;
+SELECT @@global.max_join_size;
diff --git a/mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test b/mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test
index 682e14146d7..167c2052d11 100644
--- a/mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_length_for_sort_data_basic.test
@@ -118,8 +118,8 @@ SET @@global.max_length_for_sort_data = 8388609;
SELECT @@global.max_length_for_sort_data;
SET @@global.max_length_for_sort_data = 0;
SELECT @@global.max_length_for_sort_data;
---Error ER_PARSE_ERROR
-SET @@global.max_length_for_sort_data = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_length_for_sort_data = 65530.34;
SELECT @@global.max_length_for_sort_data;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_length_for_sort_data = test;
@@ -133,8 +133,8 @@ SET @@session.max_length_for_sort_data = 3;
SELECT @@session.max_length_for_sort_data;
SET @@session.max_length_for_sort_data = 0;
SELECT @@session.max_length_for_sort_data;
---Error ER_PARSE_ERROR
-SET @@session.max_length_for_sort_data = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_length_for_sort_data = 65530.34;
SET @@session.max_length_for_sort_data = 10737418241;
SELECT @@session.max_length_for_sort_data;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test b/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test
index 2206a388abb..5bf5d9c8834 100644
--- a/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_basic.test
@@ -97,8 +97,6 @@ SELECT @@global.max_prepared_stmt_count;
SET @@global.max_prepared_stmt_count = 104857612;
SELECT @@global.max_prepared_stmt_count;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_prepared_stmt_count = ON;
SELECT @@global.max_prepared_stmt_count;
diff --git a/mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test b/mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test
index b780aa2b444..e39778baca8 100644
--- a/mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test
@@ -56,8 +56,6 @@ SELECT @@global.max_relay_log_size;
SET @@global.max_relay_log_size = @start_value;
SELECT @@global.max_relay_log_size = 1024;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
-
--echo '#--------------------FN_DYNVARS_082_03------------------------#'
#####################################################################
@@ -74,7 +72,6 @@ SET @@global.max_relay_log_size = 1073741823;
SELECT @@global.max_relay_log_size;
SET @@global.max_relay_log_size = 65535;
SELECT @@global.max_relay_log_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_082_04-------------------------#'
########################################################################
@@ -95,8 +92,6 @@ SELECT @@global.max_relay_log_size;
SET @@global.max_relay_log_size = 10737418241;
SELECT @@global.max_relay_log_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_relay_log_size = ON;
SELECT @@global.max_relay_log_size;
diff --git a/mysql-test/suite/sys_vars/t/max_sort_length_basic.test b/mysql-test/suite/sys_vars/t/max_sort_length_basic.test
index 1198d7b1851..9c3b88d3c3c 100644
--- a/mysql-test/suite/sys_vars/t/max_sort_length_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_sort_length_basic.test
@@ -119,8 +119,8 @@ SET @@global.max_sort_length = 8388609;
SELECT @@global.max_sort_length;
SET @@global.max_sort_length = 0;
SELECT @@global.max_sort_length;
---Error ER_PARSE_ERROR
-SET @@global.max_sort_length = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_sort_length = 65530.34;
SELECT @@global.max_sort_length;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_sort_length = test;
@@ -134,8 +134,8 @@ SET @@session.max_sort_length = 3;
SELECT @@session.max_sort_length;
SET @@session.max_sort_length = 0;
SELECT @@session.max_sort_length;
---Error ER_PARSE_ERROR
-SET @@session.max_sort_length = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_sort_length = 65530.34;
SET @@session.max_sort_length = 10737418241;
SELECT @@session.max_sort_length;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test b/mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test
index 8089951c8a2..1d3d69548f8 100644
--- a/mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_sp_recursion_depth_basic.test
@@ -119,8 +119,8 @@ SET @@global.max_sp_recursion_depth = -1;
SELECT @@global.max_sp_recursion_depth;
SET @@global.max_sp_recursion_depth = 3000;
SELECT @@global.max_sp_recursion_depth;
---Error ER_PARSE_ERROR
-SET @@global.max_sp_recursion_depth = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_sp_recursion_depth = 65530.34;
SELECT @@global.max_sp_recursion_depth;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_sp_recursion_depth = test;
@@ -134,8 +134,8 @@ SET @@session.max_sp_recursion_depth = 500000;
SELECT @@session.max_sp_recursion_depth;
SET @@session.max_sp_recursion_depth = -001;
SELECT @@session.max_sp_recursion_depth;
---Error ER_PARSE_ERROR
-SET @@session.max_sp_recursion_depth = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_sp_recursion_depth = 65530.34;
SET @@session.max_sp_recursion_depth = 10737418241;
SELECT @@session.max_sp_recursion_depth;
--Error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/t/max_user_connections_basic.test b/mysql-test/suite/sys_vars/t/max_user_connections_basic.test
index eb231bd8076..1adcc012bc4 100644
--- a/mysql-test/suite/sys_vars/t/max_user_connections_basic.test
+++ b/mysql-test/suite/sys_vars/t/max_user_connections_basic.test
@@ -49,12 +49,8 @@ SET @@global.max_user_connections = 1000;
SET @@global.max_user_connections = DEFAULT;
SELECT @@global.max_user_connections;
---Error ER_GLOBAL_VARIABLE
+--Error ER_VARIABLE_IS_READONLY
SET @@session.max_user_connections = 1000;
---Error ER_NO_DEFAULT
-SET @@session.max_user_connections = DEFAULT;
-SELECT @@session.max_user_connections;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#--------------------FN_DYNVARS_087_02-------------------------#'
@@ -65,10 +61,9 @@ SELECT @@session.max_user_connections;
SET @@global.max_user_connections = DEFAULT;
SELECT @@global.max_user_connections = 0;
---Error ER_NO_DEFAULT
+--Error ER_VARIABLE_IS_READONLY
SET @@session.max_user_connections = DEFAULT;
-SELECT @@session.max_user_connections = 0;
-
+SELECT @@session.max_user_connections;
--echo '#--------------------FN_DYNVARS_087_03-------------------------#'
@@ -102,8 +97,8 @@ SET @@global.max_user_connections = -1;
SELECT @@global.max_user_connections;
SET @@global.max_user_connections = 429496729500;
SELECT @@global.max_user_connections;
---Error ER_PARSE_ERROR
-SET @@global.max_user_connections = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_user_connections = 65530.34;
SELECT @@global.max_user_connections;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_user_connections = test;
diff --git a/mysql-test/suite/sys_vars/t/maximum_basic-master.opt b/mysql-test/suite/sys_vars/t/maximum_basic-master.opt
new file mode 100644
index 00000000000..b6e5666f4fb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maximum_basic-master.opt
@@ -0,0 +1,3 @@
+--maximum-auto-increment-increment=8192
+--maximum-tmp-table-size=8192
+--maximum-max-join-size=8192
diff --git a/mysql-test/suite/sys_vars/t/maximum_basic.test b/mysql-test/suite/sys_vars/t/maximum_basic.test
new file mode 100644
index 00000000000..9961f65883a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/maximum_basic.test
@@ -0,0 +1,20 @@
+#
+# test for --maximum- my_getopt prefix
+#
+
+#
+# ulong
+#
+SET @@session.auto_increment_increment=40960;
+SELECT @@session.auto_increment_increment;
+#
+# ulonglong
+#
+SET @@session.tmp_table_size=40960;
+SELECT @@session.tmp_table_size;
+#
+# ha_rows
+#
+SET @@session.max_join_size=40960;
+SELECT @@session.max_join_size;
+
diff --git a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test
index d151c6000b8..bd1992500d3 100644
--- a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_basic.test
@@ -101,16 +101,13 @@ SET @@global.myisam_data_pointer_size = 1;
SELECT @@global.myisam_data_pointer_size;
SET @@global.myisam_data_pointer_size = 4294967296;
SELECT @@global.myisam_data_pointer_size;
---Error ER_PARSE_ERROR
-SET @@global.myisam_data_pointer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.myisam_data_pointer_size = 65530.34;
SELECT @@global.myisam_data_pointer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_data_pointer_size = two;
SELECT @@global.myisam_data_pointer_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-
--echo '#------------------FN_DYNVARS_093_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
diff --git a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test
index 37dd3a5a297..6f1a50cf64e 100644
--- a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test
+++ b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test
@@ -19,6 +19,8 @@
# #
################################################################################
+call mtr.add_suppression("The table 't1' is full");
+
--echo '#--------------------FN_DYNVARS_093_01-------------------------#'
###############################################################################
# Check if setting myisam_data_pointer_size is changed in every new connection#
diff --git a/mysql-test/suite/sys_vars/t/myisam_mmap_size_basic.test b/mysql-test/suite/sys_vars/t/myisam_mmap_size_basic.test
new file mode 100644
index 00000000000..ac887711514
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/myisam_mmap_size_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.myisam_mmap_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.myisam_mmap_size;
+show global variables like 'myisam_mmap_size';
+show session variables like 'myisam_mmap_size';
+select * from information_schema.global_variables where variable_name='myisam_mmap_size';
+select * from information_schema.session_variables where variable_name='myisam_mmap_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global myisam_mmap_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session myisam_mmap_size=1;
diff --git a/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.test b/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.test
new file mode 100644
index 00000000000..4d1b07844b6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/myisam_recover_options_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.myisam_recover_options;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.myisam_recover_options;
+show global variables like 'myisam_recover_options';
+show session variables like 'myisam_recover_options';
+select * from information_schema.global_variables where variable_name='myisam_recover_options';
+select * from information_schema.session_variables where variable_name='myisam_recover_options';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global myisam_recover_options=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session myisam_recover_options=1;
diff --git a/mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test b/mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test
index 0045842269b..f70431b5580 100644
--- a/mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/myisam_stats_method_basic.test
@@ -154,30 +154,8 @@ SELECT @@global.myisam_stats_method;
# use of decimal values
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_stats_method = 0.4;
-SELECT @@global.myisam_stats_method;
-
-SET @@global.myisam_stats_method = 1.0;
-SELECT @@global.myisam_stats_method;
-
-SET @@global.myisam_stats_method = 1.1;
-SELECT @@global.myisam_stats_method;
-
-SET @@global.myisam_stats_method = 1.5;
-SELECT @@global.myisam_stats_method;
-
-SET @@global.myisam_stats_method = 2.49;
-SELECT @@global.myisam_stats_method;
-
-SET @@session.myisam_stats_method = 0.5;
-SELECT @@session.myisam_stats_method;
-
-SET @@session.myisam_stats_method = 1.6;
-SELECT @@session.myisam_stats_method;
-
-
---echo 'Bug# 34877: Decimal values can be used within the range [0.0-2.5). Values';
---echo 'are rounded to 0,1,2 as evident from outcome.';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.myisam_stats_method = 3;
diff --git a/mysql-test/suite/sys_vars/t/named_pipe_basic.test b/mysql-test/suite/sys_vars/t/named_pipe_basic.test
new file mode 100644
index 00000000000..f3b83a71974
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/named_pipe_basic.test
@@ -0,0 +1,19 @@
+--source include/windows.inc
+#
+# only global
+#
+select @@global.named_pipe;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.named_pipe;
+show global variables like 'named_pipe';
+show session variables like 'named_pipe';
+select * from information_schema.global_variables where variable_name='named_pipe';
+select * from information_schema.session_variables where variable_name='named_pipe';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global named_pipe=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session named_pipe=1;
diff --git a/mysql-test/suite/sys_vars/t/net_buffer_length_basic.test b/mysql-test/suite/sys_vars/t/net_buffer_length_basic.test
index 6e1e0559c61..b8336910021 100644
--- a/mysql-test/suite/sys_vars/t/net_buffer_length_basic.test
+++ b/mysql-test/suite/sys_vars/t/net_buffer_length_basic.test
@@ -57,7 +57,7 @@ SELECT @@global.net_buffer_length;
--Error ER_VARIABLE_IS_READONLY
SET @@session.net_buffer_length = 20000;
---Error ER_NO_DEFAULT
+--Error ER_VARIABLE_IS_READONLY
SET @@session.net_buffer_length = DEFAULT;
SELECT @@session.net_buffer_length;
@@ -86,15 +86,13 @@ SET @@global.net_buffer_length = 1048575;
SELECT @@global.net_buffer_length;
SET @@global.net_buffer_length = 65535;
SELECT @@global.net_buffer_length;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
--echo '#--------------------FN_DYNVARS_109_04-------------------------#'
############################################################################
# Change the value of net_buffer_length to a valid value for SESSION Scope #
############################################################################
-# Bug#22891: SESSION net_buffer_length is now read-only; assignments skipped
+# SESSION net_buffer_length is now read-only; assignments skipped
--echo '#------------------FN_DYNVARS_109_05-----------------------#'
@@ -112,16 +110,14 @@ SET @@global.net_buffer_length = 1048577;
SELECT @@global.net_buffer_length;
SET @@global.net_buffer_length = 104857633;
SELECT @@global.net_buffer_length;
---Error ER_PARSE_ERROR
-SET @@global.net_buffer_length = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.net_buffer_length = 65530.34;
SELECT @@global.net_buffer_length;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.net_buffer_length = test;
SELECT @@global.net_buffer_length;
-# Bug#22891: SESSION net_buffer_length is now read-only; assignments skipped
-
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
+# SESSION net_buffer_length is now read-only; assignments skipped
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.net_buffer_length = test;
@@ -173,7 +169,7 @@ SELECT @@net_buffer_length = @@global.net_buffer_length;
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
-# Bug#22891: SESSION net_buffer_length is now read-only; assignments skipped
+# SESSION net_buffer_length is now read-only; assignments skipped
--echo '#---------------------FN_DYNVARS_109_11----------------------#'
@@ -181,7 +177,7 @@ SELECT @@net_buffer_length = @@global.net_buffer_length;
# Check if net_buffer_length can be accessed with and without @@ sign #
############################################################################
-# Bug#22891: SESSION net_buffer_length is now read-only; assignments skipped
+# SESSION net_buffer_length is now read-only; assignments skipped
SELECT @@net_buffer_length;
--Error ER_UNKNOWN_TABLE
SELECT local.net_buffer_length;
diff --git a/mysql-test/suite/sys_vars/t/net_read_timeout_basic.test b/mysql-test/suite/sys_vars/t/net_read_timeout_basic.test
index f0d32302e4f..0eb78e412e3 100644
--- a/mysql-test/suite/sys_vars/t/net_read_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/net_read_timeout_basic.test
@@ -104,8 +104,8 @@ SET @@global.net_read_timeout = -1024;
SELECT @@global.net_read_timeout;
SET @@global.net_read_timeout = 655360354;
SELECT @@global.net_read_timeout;
---Error ER_PARSE_ERROR
-SET @@global.net_read_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.net_read_timeout = 65530.34;
SELECT @@global.net_read_timeout;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.net_read_timeout = test;
@@ -115,11 +115,10 @@ SET @@session.net_read_timeout = 0;
SELECT @@session.net_read_timeout;
SET @@session.net_read_timeout = -2;
SELECT @@session.net_read_timeout;
---Error ER_PARSE_ERROR
-SET @@session.net_read_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.net_read_timeout = 65530.34;
SET @@session.net_read_timeout = 6555015425;
SELECT @@session.net_read_timeout;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.net_read_timeout = test;
diff --git a/mysql-test/suite/sys_vars/t/net_write_timeout_basic.test b/mysql-test/suite/sys_vars/t/net_write_timeout_basic.test
index 84c682561e3..bd8a8b0530d 100644
--- a/mysql-test/suite/sys_vars/t/net_write_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/net_write_timeout_basic.test
@@ -104,8 +104,8 @@ SET @@global.net_write_timeout = -1024;
SELECT @@global.net_write_timeout;
SET @@global.net_write_timeout = 655360354;
SELECT @@global.net_write_timeout;
---Error ER_PARSE_ERROR
-SET @@global.net_write_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.net_write_timeout = 65530.34;
SELECT @@global.net_write_timeout;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.net_write_timeout = test;
@@ -115,11 +115,10 @@ SET @@session.net_write_timeout = 0;
SELECT @@session.net_write_timeout;
SET @@session.net_write_timeout = -2;
SELECT @@session.net_write_timeout;
---Error ER_PARSE_ERROR
-SET @@session.net_write_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.net_write_timeout = 65530.34;
SET @@session.net_write_timeout = 6555015425;
SELECT @@session.net_write_timeout;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.net_write_timeout = test;
diff --git a/mysql-test/suite/sys_vars/t/new_basic.test b/mysql-test/suite/sys_vars/t/new_basic.test
index cf0ba08dfdb..017ba2eb264 100644
--- a/mysql-test/suite/sys_vars/t/new_basic.test
+++ b/mysql-test/suite/sys_vars/t/new_basic.test
@@ -121,7 +121,7 @@ SET @@global.new = FELSE;
SET @@global.new = -1024;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.new = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.new = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.new = test;
@@ -130,17 +130,14 @@ SET @@global.new = test;
SET @@session.new = ONN;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.new = ONF;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.new = OF;
-SELECT @@session.new;
---echo 'Bug# 34828: FN_DYNVARS_113_05 - OF is also working as OFF and no error is coming';
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.new = 'OFN';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.new = -2;
---Error ER_PARSE_ERROR
-SET @@session.new = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.new = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.new = 65550;
diff --git a/mysql-test/suite/sys_vars/t/old_alter_table_basic.test b/mysql-test/suite/sys_vars/t/old_alter_table_basic.test
new file mode 100644
index 00000000000..32d0f45ad25
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/old_alter_table_basic.test
@@ -0,0 +1,33 @@
+SET @start_global_value = @@global.old_alter_table;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.old_alter_table;
+select @@session.old_alter_table;
+show global variables like 'old_alter_table';
+show session variables like 'old_alter_table';
+select * from information_schema.global_variables where variable_name='old_alter_table';
+select * from information_schema.session_variables where variable_name='old_alter_table';
+
+#
+# show that it's writable
+#
+set global old_alter_table=1;
+select @@global.old_alter_table;
+set session old_alter_table=ON;
+select @@session.old_alter_table;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global old_alter_table=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global old_alter_table=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global old_alter_table="foo";
+
+SET @@global.old_alter_table = @start_global_value;
+SELECT @@global.old_alter_table;
diff --git a/mysql-test/suite/sys_vars/t/old_basic.test b/mysql-test/suite/sys_vars/t/old_basic.test
new file mode 100644
index 00000000000..2c123d17165
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/old_basic.test
@@ -0,0 +1,19 @@
+#
+# show the global and session values;
+#
+select @@global.old;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.old;
+show global variables like 'old';
+show session variables like 'old';
+select * from information_schema.global_variables where variable_name='old';
+select * from information_schema.session_variables where variable_name='old';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global old=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session old=1;
+
diff --git a/mysql-test/suite/sys_vars/t/old_passwords_basic.test b/mysql-test/suite/sys_vars/t/old_passwords_basic.test
index 34a9394a1e7..f4965ad7528 100644
--- a/mysql-test/suite/sys_vars/t/old_passwords_basic.test
+++ b/mysql-test/suite/sys_vars/t/old_passwords_basic.test
@@ -121,7 +121,7 @@ SET @@global.old_passwords = FELSE;
SET @@global.old_passwords = -1024;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.old_passwords = 65536;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.old_passwords = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.old_passwords = test;
@@ -130,17 +130,14 @@ SET @@global.old_passwords = test;
SET @@session.old_passwords = ONN;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.old_passwords = ONF;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.old_passwords = OF;
-SELECT @@session.old_passwords;
---echo 'Bug# 34828: OF is also working as OFF and no error is coming';
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.old_passwords = 'OFN';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.old_passwords = -2;
---Error ER_PARSE_ERROR
-SET @@session.old_passwords = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.old_passwords = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.old_passwords = 65550;
diff --git a/mysql-test/suite/sys_vars/t/open_files_limit_basic.test b/mysql-test/suite/sys_vars/t/open_files_limit_basic.test
new file mode 100644
index 00000000000..50c0b2d5b6e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/open_files_limit_basic.test
@@ -0,0 +1,24 @@
+#
+# show the global and session values;
+#
+--replace_result 3072 1024 16384 1024
+select @@global.open_files_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.open_files_limit;
+--replace_result 3072 1024 16384 1024
+show global variables like 'open_files_limit';
+--replace_result 3072 1024 16384 1024
+show session variables like 'open_files_limit';
+--replace_result 3072 1024 16384 1024
+select * from information_schema.global_variables where variable_name='open_files_limit';
+--replace_result 3072 1024 16384 1024
+select * from information_schema.session_variables where variable_name='open_files_limit';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global open_files_limit=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session open_files_limit=1;
+
diff --git a/mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test b/mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test
index 58c074d7d5e..1e3a8bc3d7f 100644
--- a/mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test
+++ b/mysql-test/suite/sys_vars/t/optimizer_prune_level_basic.test
@@ -146,12 +146,11 @@ SET @@session.optimizer_prune_level = OF;
SET @@session.optimizer_prune_level = 'OFN';
SET @@session.optimizer_prune_level = -2;
SELECT @@session.optimizer_prune_level;
---Error ER_PARSE_ERROR
-SET @@session.optimizer_prune_level = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.optimizer_prune_level = 65530.34;
SET @@session.optimizer_prune_level = 65550;
SELECT @@session.optimizer_prune_level;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.optimizer_prune_level = test;
diff --git a/mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test b/mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test
index 42548c59d40..eda7992bbd5 100644
--- a/mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test
+++ b/mysql-test/suite/sys_vars/t/optimizer_search_depth_basic.test
@@ -107,8 +107,8 @@ SET @@global.optimizer_search_depth = -1;
SELECT @@global.optimizer_search_depth;
SET @@global.optimizer_search_depth = 65536;
SELECT @@global.optimizer_search_depth;
---Error ER_PARSE_ERROR
-SET @@global.optimizer_search_depth = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.optimizer_search_depth = 65530.34;
SELECT @@global.optimizer_search_depth;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.optimizer_search_depth = test;
@@ -118,11 +118,10 @@ SET @@session.optimizer_search_depth = 64;
SELECT @@session.optimizer_search_depth;
SET @@session.optimizer_search_depth = -2;
SELECT @@session.optimizer_search_depth;
---Error ER_PARSE_ERROR
-SET @@session.optimizer_search_depth = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.optimizer_search_depth = 65530.34;
SET @@session.optimizer_search_depth = 65550;
SELECT @@session.optimizer_search_depth;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.optimizer_search_depth = test;
diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test b/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test
new file mode 100644
index 00000000000..32a77c90b34
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/optimizer_switch_basic.test
@@ -0,0 +1,41 @@
+SET @start_global_value = @@global.optimizer_switch;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.optimizer_switch;
+select @@session.optimizer_switch;
+show global variables like 'optimizer_switch';
+show session variables like 'optimizer_switch';
+select * from information_schema.global_variables where variable_name='optimizer_switch';
+select * from information_schema.session_variables where variable_name='optimizer_switch';
+
+#
+# show that it's writable
+#
+set global optimizer_switch=10;
+select @@global.optimizer_switch;
+set session optimizer_switch=5;
+select @@session.optimizer_switch;
+set global optimizer_switch="index_merge_sort_union=on";
+select @@global.optimizer_switch;
+set session optimizer_switch="index_merge=off";
+select @@session.optimizer_switch;
+set session optimizer_switch="default";
+select @@session.optimizer_switch;
+
+#
+# incorrect assignments
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global optimizer_switch=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global optimizer_switch=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set session optimizer_switch="index_merge";
+--error ER_WRONG_VALUE_FOR_VAR
+set session optimizer_switch="foobar";
+
+SET @@global.optimizer_switch = @start_global_value;
+SELECT @@global.optimizer_switch;
diff --git a/mysql-test/suite/sys_vars/t/pid_file_basic.test b/mysql-test/suite/sys_vars/t/pid_file_basic.test
new file mode 100644
index 00000000000..f4253593bc6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pid_file_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select @@global.pid_file;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.pid_file;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show global variables like 'pid_file';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show session variables like 'pid_file';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.global_variables where variable_name='pid_file';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.session_variables where variable_name='pid_file';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global pid_file=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session pid_file=1;
diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
new file mode 100644
index 00000000000..d714950c807
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
@@ -0,0 +1,29 @@
+#
+# only global
+#
+
+#
+# on windows it's <basedir>/lib/plugin
+# on unix it's <basedir>/lib/mysql/plugin
+#
+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+select @@global.plugin_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.plugin_dir;
+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+show global variables like 'plugin_dir';
+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+show session variables like 'plugin_dir';
+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+select * from information_schema.global_variables where variable_name='plugin_dir';
+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+select * from information_schema.session_variables where variable_name='plugin_dir';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global plugin_dir=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session plugin_dir=1;
+
diff --git a/mysql-test/suite/sys_vars/t/port_basic.test b/mysql-test/suite/sys_vars/t/port_basic.test
new file mode 100644
index 00000000000..e20ee119f5e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/port_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+select @@global.port;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.port;
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+show global variables like 'port';
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+show session variables like 'port';
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+select * from information_schema.global_variables where variable_name='port';
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+select * from information_schema.session_variables where variable_name='port';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global port=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session port=1;
diff --git a/mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test
index 48b1e32676a..8eba7bba079 100644
--- a/mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/preload_buffer_size_basic.test
@@ -112,8 +112,8 @@ SET @@global.preload_buffer_size = 1023;
SELECT @@global.preload_buffer_size;
SET @@global.preload_buffer_size = 1073741825;
SELECT @@global.preload_buffer_size;
---Error ER_PARSE_ERROR
-SET @@global.preload_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.preload_buffer_size = 65530.34;
SELECT @@global.preload_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.preload_buffer_size = test;
@@ -123,13 +123,12 @@ SET @@session.preload_buffer_size = 64;
SELECT @@session.preload_buffer_size;
SET @@session.preload_buffer_size = -2;
SELECT @@session.preload_buffer_size;
---Error ER_PARSE_ERROR
-SET @@session.preload_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.preload_buffer_size = 65530.34;
SET @@session.preload_buffer_size = 1023;
SELECT @@session.preload_buffer_size;
SET @@session.preload_buffer_size = 1073741825;
SELECT @@session.preload_buffer_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.preload_buffer_size = test;
diff --git a/mysql-test/suite/sys_vars/t/profiling_basic.test b/mysql-test/suite/sys_vars/t/profiling_basic.test
new file mode 100644
index 00000000000..aef56e50900
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/profiling_basic.test
@@ -0,0 +1,35 @@
+--source include/have_profiling.inc
+
+SET @start_global_value = @@global.profiling;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.profiling;
+select @@session.profiling;
+show global variables like 'profiling';
+show session variables like 'profiling';
+select * from information_schema.global_variables where variable_name='profiling';
+select * from information_schema.session_variables where variable_name='profiling';
+
+#
+# show that it's writable
+#
+set global profiling=1;
+select @@global.profiling;
+set session profiling=ON;
+select @@session.profiling;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global profiling=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global profiling=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global profiling="foo";
+
+SET @@global.profiling = @start_global_value;
+SELECT @@global.profiling;
diff --git a/mysql-test/suite/sys_vars/t/profiling_history_size_basic.test b/mysql-test/suite/sys_vars/t/profiling_history_size_basic.test
new file mode 100644
index 00000000000..01d3533be3d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/profiling_history_size_basic.test
@@ -0,0 +1,43 @@
+--source include/have_profiling.inc
+
+SET @start_global_value = @@global.profiling_history_size;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.profiling_history_size;
+select @@session.profiling_history_size;
+show global variables like 'profiling_history_size';
+show session variables like 'profiling_history_size';
+select * from information_schema.global_variables where variable_name='profiling_history_size';
+select * from information_schema.session_variables where variable_name='profiling_history_size';
+
+#
+# show that it's writable
+#
+set global profiling_history_size=10;
+select @@global.profiling_history_size;
+set session profiling_history_size=20;
+select @@session.profiling_history_size;
+
+#
+# incorrect assignments
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global profiling_history_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global profiling_history_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global profiling_history_size="foo";
+
+#
+# min/max
+#
+set session profiling_history_size=0;
+select @@profiling_history_size;
+set session profiling_history_size=101;
+select @@profiling_history_size;
+
+SET @@global.profiling_history_size = @start_global_value;
+SELECT @@global.profiling_history_size;
diff --git a/mysql-test/suite/sys_vars/t/protocol_version_basic.test b/mysql-test/suite/sys_vars/t/protocol_version_basic.test
new file mode 100644
index 00000000000..3446932b7e1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/protocol_version_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.protocol_version;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.protocol_version;
+show global variables like 'protocol_version';
+show session variables like 'protocol_version';
+select * from information_schema.global_variables where variable_name='protocol_version';
+select * from information_schema.session_variables where variable_name='protocol_version';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global protocol_version=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session protocol_version=1;
diff --git a/mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test b/mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test
new file mode 100644
index 00000000000..a948f2a8ff0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test
@@ -0,0 +1,32 @@
+
+#
+# exists as a session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.pseudo_thread_id;
+select @@session.pseudo_thread_id=0;
+show global variables like 'pseudo_thread_id';
+--replace_column 2 #
+show session variables like 'pseudo_thread_id';
+select * from information_schema.global_variables where variable_name='pseudo_thread_id';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name='pseudo_thread_id';
+
+#
+# show that it's writable
+#
+set session pseudo_thread_id=1;
+select @@session.pseudo_thread_id;
+--error ER_LOCAL_VARIABLE
+set global pseudo_thread_id=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session pseudo_thread_id=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session pseudo_thread_id=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session pseudo_thread_id="foo";
+
diff --git a/mysql-test/suite/sys_vars/t/query_cache_type_basic.test b/mysql-test/suite/sys_vars/t/query_cache_type_basic.test
index ba7e26a3065..5c395fde1e6 100644
--- a/mysql-test/suite/sys_vars/t/query_cache_type_basic.test
+++ b/mysql-test/suite/sys_vars/t/query_cache_type_basic.test
@@ -107,15 +107,10 @@ SET @@global.query_cache_type = -1;
SET @@global.query_cache_type = ONDEMAND;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_type = 'ON,OFF';
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_type = 'OF';
-SELECT @@global.query_cache_type;
-
---echo 'Bug# 34828: OF is taken as OFF.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_type = YES;
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_type = ' ';
@@ -156,30 +151,8 @@ SELECT @@global.query_cache_type;
# use of decimal values
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.query_cache_type = 0.4;
-SELECT @@global.query_cache_type;
-
-SET @@global.query_cache_type = 1.0;
-SELECT @@global.query_cache_type;
-
-SET @@global.query_cache_type = 1.1;
-SELECT @@global.query_cache_type;
-
-SET @@global.query_cache_type = 1.5;
-SELECT @@global.query_cache_type;
-
-SET @@global.query_cache_type = 2.49;
-SELECT @@global.query_cache_type;
-
-SET @@session.query_cache_type = 0.5;
-SELECT @@session.query_cache_type;
-
-SET @@session.query_cache_type = 1.6;
-SELECT @@session.query_cache_type;
-
-
---echo 'Bug: Decimal values can be used within the range [0.0-2.5). Values';
---echo 'are rounded to 0,1,2 as evident from outcome.';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_type = 3;
diff --git a/mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test b/mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test
index 5acb36961af..055c3629d15 100644
--- a/mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test
+++ b/mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test
@@ -105,7 +105,7 @@ SELECT @@global.query_cache_wlock_invalidate;
# for session
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = -1;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = "T";
@@ -115,12 +115,8 @@ SET @@session.query_cache_wlock_invalidate = "Y";
SET @@session.query_cache_wlock_invalidate = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = OF;
-SELECT @@session.query_cache_wlock_invalidate;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = 覨F;
@@ -138,12 +134,8 @@ SET @@global.query_cache_wlock_invalidate = "Y";
SET @@global.query_cache_wlock_invalidate = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_wlock_invalidate = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_wlock_invalidate = OF;
-SELECT @@global.query_cache_wlock_invalidate;
-
---echo 'Bug 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_wlock_invalidate = 覨F;
diff --git a/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test
index 64eb3c4b329..3914bff4ca9 100644
--- a/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc
+++ b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test
@@ -113,8 +113,8 @@ SELECT @@global.query_prealloc_size ;
#SELECT @@global.query_prealloc_size ;
---Error ER_PARSE_ERROR
-SET @@global.query_prealloc_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = 65530.34;
SELECT @@global.query_prealloc_size ;
--Error ER_WRONG_TYPE_FOR_VAR
@@ -140,9 +140,8 @@ SELECT @@session.query_prealloc_size ;
#SET @@session.query_prealloc_size = -2;
#SELECT @@session.query_prealloc_size ;
---Error ER_PARSE_ERROR
-
-SET @@session.query_prealloc_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.query_prealloc_size = 65530.34;
SELECT @@session.query_prealloc_size ;
diff --git a/mysql-test/suite/sys_vars/t/query_prealloc_size_basic_32.test b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic_32.test
deleted file mode 100644
index 34dafc71c9c..00000000000
--- a/mysql-test/suite/sys_vars/t/query_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.inc
---source suite/sys_vars/inc/query_prealloc_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/query_prealloc_size_basic_64.test b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic_64.test
deleted file mode 100644
index c1f04c0788c..00000000000
--- a/mysql-test/suite/sys_vars/t/query_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.inc
---source suite/sys_vars/inc/query_prealloc_size_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/rand_seed1_basic.test b/mysql-test/suite/sys_vars/t/rand_seed1_basic.test
new file mode 100644
index 00000000000..79c946a3d2f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rand_seed1_basic.test
@@ -0,0 +1,30 @@
+
+#
+# exists as a session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.rand_seed1;
+select @@session.rand_seed1;
+show global variables like 'rand_seed1';
+show session variables like 'rand_seed1';
+select * from information_schema.global_variables where variable_name='rand_seed1';
+select * from information_schema.session_variables where variable_name='rand_seed1';
+
+#
+# show that it's writable
+#
+set session rand_seed1=1;
+select @@session.rand_seed1;
+--error ER_LOCAL_VARIABLE
+set global rand_seed1=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed1=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed1=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed1="foo";
+
diff --git a/mysql-test/suite/sys_vars/t/rand_seed2_basic.test b/mysql-test/suite/sys_vars/t/rand_seed2_basic.test
new file mode 100644
index 00000000000..18e2a62557c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rand_seed2_basic.test
@@ -0,0 +1,30 @@
+
+#
+# exists as a session only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@global.rand_seed2;
+select @@session.rand_seed2;
+show global variables like 'rand_seed2';
+show session variables like 'rand_seed2';
+select * from information_schema.global_variables where variable_name='rand_seed2';
+select * from information_schema.session_variables where variable_name='rand_seed2';
+
+#
+# show that it's writable
+#
+set session rand_seed2=1;
+select @@session.rand_seed2;
+--error ER_LOCAL_VARIABLE
+set global rand_seed2=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed2=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed2=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set session rand_seed2="foo";
+
diff --git a/mysql-test/suite/sys_vars/t/read_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/read_buffer_size_basic.test
index 405bb9da6d8..8ce826bf327 100644
--- a/mysql-test/suite/sys_vars/t/read_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/read_buffer_size_basic.test
@@ -72,9 +72,9 @@ SELECT @@session.read_buffer_size = 131072;
################################################################################
SET @@global.read_buffer_size = 8201;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
+SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = 8200;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
+SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = 2147479552;
SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = 2147479551;
@@ -86,9 +86,9 @@ SELECT @@global.read_buffer_size;
###################################################################################
SET @@session.read_buffer_size = 8200;
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
+SELECT @@session.read_buffer_size;
SET @@session.read_buffer_size = 8201;
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
+SELECT @@session.read_buffer_size;
SET @@session.read_buffer_size = 2147479552;
SELECT @@session.read_buffer_size;
SET @@session.read_buffer_size = 2147479551;
@@ -101,27 +101,26 @@ SELECT @@session.read_buffer_size;
##################################################################
SET @@global.read_buffer_size = 8199;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
+SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = -1024;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
+SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = 2147479553;
SELECT @@global.read_buffer_size;
---Error ER_PARSE_ERROR
-SET @@global.read_buffer_size = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.read_buffer_size = 65530.34;
SELECT @@global.read_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.read_buffer_size = test;
SELECT @@global.read_buffer_size;
SET @@session.read_buffer_size = 8199;
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
+SELECT @@session.read_buffer_size;
SET @@session.read_buffer_size = -2;
-SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ;
---Error ER_PARSE_ERROR
-SET @@session.read_buffer_size = 65530.34.;
+SELECT @@session.read_buffer_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.read_buffer_size = 65530.34;
SET @@session.read_buffer_size = 2147479553;
SELECT @@session.read_buffer_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.read_buffer_size = test;
@@ -154,11 +153,9 @@ WHERE VARIABLE_NAME='read_buffer_size';
####################################################################
SET @@global.read_buffer_size = TRUE;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
+SELECT @@global.read_buffer_size;
SET @@global.read_buffer_size = FALSE;
-SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ;
-echo 'Bug: FN_DYNVARS_138_08- Errors are not coming on assigning TRUE/FALSE to variable';
-
+SELECT @@global.read_buffer_size;
--echo '#---------------------FN_DYNVARS_138_09----------------------#'
####################################################################################
@@ -185,7 +182,7 @@ SELECT @@local.read_buffer_size = @@session.read_buffer_size;
###################################################################################
SET read_buffer_size = 9100;
-SELECT @@read_buffer_size= 8200 OR @@read_buffer_size= 8228 ;
+SELECT @@read_buffer_size;
--Error ER_UNKNOWN_TABLE
SELECT local.read_buffer_size;
--Error ER_UNKNOWN_TABLE
diff --git a/mysql-test/suite/sys_vars/t/read_only_basic.test b/mysql-test/suite/sys_vars/t/read_only_basic.test
index 9d8078b8c68..0f77e983f92 100644
--- a/mysql-test/suite/sys_vars/t/read_only_basic.test
+++ b/mysql-test/suite/sys_vars/t/read_only_basic.test
@@ -90,7 +90,7 @@ SELECT @@global.read_only;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.read_only = 10240022115;
SELECT @@global.read_only;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.read_only = 10000.01;
SELECT @@global.read_only;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -99,7 +99,6 @@ SELECT @@global.read_only;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.read_only = 42949672950;
SELECT @@global.read_only;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.read_only = 'test';
diff --git a/mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test
index e3d2a4b89f7..f883a1bed3f 100644
--- a/mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/read_rnd_buffer_size_basic.test
@@ -54,35 +54,19 @@ SET @@session.read_rnd_buffer_size = 2000;
SET @@session.read_rnd_buffer_size = DEFAULT;
SELECT @@session.read_rnd_buffer_size;
-
---echo '#--------------------FN_DYNVARS_140_02-------------------------#'
-######################################################################
-# Check the DEFAULT value of read_rnd_buffer_size #
-######################################################################
-
-SET @@global.read_rnd_buffer_size = DEFAULT;
-SELECT @@global.read_rnd_buffer_size = 262144;
-
-SET @@session.read_rnd_buffer_size = DEFAULT;
-SELECT @@session.read_rnd_buffer_size = 262144;
---echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
-
-
--echo '#--------------------FN_DYNVARS_140_03-------------------------#'
################################################################################
# Change the value of read_rnd_buffer_size to a valid value for GLOBAL Scope #
################################################################################
SET @@global.read_rnd_buffer_size = 8201;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
+SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = 8200;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
+SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = 2147479552;
SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = 2147479551;
SELECT @@global.read_rnd_buffer_size;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
--echo '#--------------------FN_DYNVARS_140_04-------------------------#'
###################################################################################
@@ -90,9 +74,9 @@ SELECT @@global.read_rnd_buffer_size;
###################################################################################
SET @@session.read_rnd_buffer_size = 8200;
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
+SELECT @@session.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = 8201;
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
+SELECT @@session.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = 2147479552;
SELECT @@session.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = 2147479551;
@@ -105,32 +89,24 @@ SELECT @@session.read_rnd_buffer_size;
##################################################################
SET @@global.read_rnd_buffer_size = 8199;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
+SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = -1024;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
-SET @@global.read_rnd_buffer_size = 2147479553;
SELECT @@global.read_rnd_buffer_size;
---Error ER_PARSE_ERROR
-SET @@global.read_rnd_buffer_size = 65530.34.;
+SET @@global.read_rnd_buffer_size = 2147479553;
SELECT @@global.read_rnd_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.read_rnd_buffer_size = 65530.34;
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.read_rnd_buffer_size = test;
-SELECT @@global.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = 8199;
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
+SELECT @@session.read_rnd_buffer_size;
SET @@session.read_rnd_buffer_size = -2;
-SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228;
---Error ER_PARSE_ERROR
-SET @@session.read_rnd_buffer_size = 65530.34.;
-SET @@session.read_rnd_buffer_size = 2147479553;
SELECT @@session.read_rnd_buffer_size;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.read_rnd_buffer_size = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.read_rnd_buffer_size = test;
-SELECT @@session.read_rnd_buffer_size;
-
--echo '#------------------FN_DYNVARS_140_06-----------------------#'
####################################################################
@@ -155,9 +131,9 @@ VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='re
####################################################################
SET @@global.read_rnd_buffer_size = TRUE;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
+SELECT @@global.read_rnd_buffer_size;
SET @@global.read_rnd_buffer_size = FALSE;
-SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228;
+SELECT @@global.read_rnd_buffer_size;
--echo '#---------------------FN_DYNVARS_140_09----------------------#'
@@ -185,7 +161,7 @@ SELECT @@local.read_rnd_buffer_size = @@session.read_rnd_buffer_size;
###################################################################################
SET read_rnd_buffer_size = 9100;
-SELECT @@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228;
+SELECT @@read_rnd_buffer_size;
--Error ER_UNKNOWN_TABLE
SELECT local.read_rnd_buffer_size;
--Error ER_UNKNOWN_TABLE
diff --git a/mysql-test/suite/sys_vars/t/relay_log_basic.test b/mysql-test/suite/sys_vars/t/relay_log_basic.test
new file mode 100644
index 00000000000..1ea60577556
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.relay_log;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.relay_log;
+show global variables like 'relay_log';
+show session variables like 'relay_log';
+select * from information_schema.global_variables where variable_name='relay_log';
+select * from information_schema.session_variables where variable_name='relay_log';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global relay_log=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session relay_log=1;
diff --git a/mysql-test/suite/sys_vars/t/relay_log_index_basic.test b/mysql-test/suite/sys_vars/t/relay_log_index_basic.test
new file mode 100644
index 00000000000..fa69d978016
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_index_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.relay_log_index;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.relay_log_index;
+show global variables like 'relay_log_index';
+show session variables like 'relay_log_index';
+select * from information_schema.global_variables where variable_name='relay_log_index';
+select * from information_schema.session_variables where variable_name='relay_log_index';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global relay_log_index=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session relay_log_index=1;
diff --git a/mysql-test/suite/sys_vars/t/relay_log_info_file_basic.test b/mysql-test/suite/sys_vars/t/relay_log_info_file_basic.test
new file mode 100644
index 00000000000..4709b8e3e47
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_info_file_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.relay_log_info_file;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.relay_log_info_file;
+show global variables like 'relay_log_info_file';
+show session variables like 'relay_log_info_file';
+select * from information_schema.global_variables where variable_name='relay_log_info_file';
+select * from information_schema.session_variables where variable_name='relay_log_info_file';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global relay_log_info_file=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session relay_log_info_file=1;
diff --git a/mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test b/mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test
new file mode 100644
index 00000000000..57c28468bd1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test
@@ -0,0 +1,39 @@
+--source include/not_embedded.inc
+
+SET @start_global_value = @@global.relay_log_recovery;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.relay_log_recovery;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.relay_log_recovery;
+show global variables like 'relay_log_recovery';
+show session variables like 'relay_log_recovery';
+select * from information_schema.global_variables where variable_name='relay_log_recovery';
+select * from information_schema.session_variables where variable_name='relay_log_recovery';
+
+#
+# show that it's writable
+#
+set global relay_log_recovery=1;
+select @@global.relay_log_recovery;
+set global relay_log_recovery=OFF;
+select @@global.relay_log_recovery;
+--error ER_GLOBAL_VARIABLE
+set session relay_log_recovery=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global relay_log_recovery=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global relay_log_recovery=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global relay_log_recovery="foo";
+
+SET @@global.relay_log_recovery = @start_global_value;
+SELECT @@global.relay_log_recovery;
+
diff --git a/mysql-test/suite/sys_vars/t/relay_log_space_limit_basic.test b/mysql-test/suite/sys_vars/t/relay_log_space_limit_basic.test
new file mode 100644
index 00000000000..99c9fb37493
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_space_limit_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.relay_log_space_limit;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.relay_log_space_limit;
+show global variables like 'relay_log_space_limit';
+show session variables like 'relay_log_space_limit';
+select * from information_schema.global_variables where variable_name='relay_log_space_limit';
+select * from information_schema.session_variables where variable_name='relay_log_space_limit';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global relay_log_space_limit=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session relay_log_space_limit=1;
diff --git a/mysql-test/suite/sys_vars/t/report_host_basic.test b/mysql-test/suite/sys_vars/t/report_host_basic.test
new file mode 100644
index 00000000000..5565370f88c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/report_host_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.report_host;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.report_host;
+show global variables like 'report_host';
+show session variables like 'report_host';
+select * from information_schema.global_variables where variable_name='report_host';
+select * from information_schema.session_variables where variable_name='report_host';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global report_host=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session report_host=1;
diff --git a/mysql-test/suite/sys_vars/t/report_password_basic.test b/mysql-test/suite/sys_vars/t/report_password_basic.test
new file mode 100644
index 00000000000..ed564cfe2ad
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/report_password_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.report_password;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.report_password;
+show global variables like 'report_password';
+show session variables like 'report_password';
+select * from information_schema.global_variables where variable_name='report_password';
+select * from information_schema.session_variables where variable_name='report_password';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global report_password=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session report_password=1;
diff --git a/mysql-test/suite/sys_vars/t/report_port_basic.test b/mysql-test/suite/sys_vars/t/report_port_basic.test
new file mode 100644
index 00000000000..122c92c5446
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/report_port_basic.test
@@ -0,0 +1,24 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+select @@global.report_port;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.report_port;
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+show global variables like 'report_port';
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+show session variables like 'report_port';
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+select * from information_schema.global_variables where variable_name='report_port';
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+select * from information_schema.session_variables where variable_name='report_port';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global report_port=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session report_port=1;
diff --git a/mysql-test/suite/sys_vars/t/report_user_basic.test b/mysql-test/suite/sys_vars/t/report_user_basic.test
new file mode 100644
index 00000000000..192e6b772b8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/report_user_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.report_user;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.report_user;
+show global variables like 'report_user';
+show session variables like 'report_user';
+select * from information_schema.global_variables where variable_name='report_user';
+select * from information_schema.session_variables where variable_name='report_user';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global report_user=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session report_user=1;
diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
index f2c66eb3a0a..2a241b58807 100644
--- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
+++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test
@@ -39,8 +39,9 @@ SET @start_init_slave= @@global.init_slave;
# setting of a global value with an effect on the next start of the slave server
# check that @@global.init_slave could be set
+SET NAMES utf8;
let $my_init_slave=
- 'SET @@global.max_connections = @@global.max_connections + 1';
+ 'SET @@global.max_connections = @@global.max_connections + 1 -- 泻芯屑屑械薪褌邪褉懈泄';
eval SET @@global.init_slave = $my_init_slave;
# show the data type of the variable
@@ -49,6 +50,7 @@ DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
--enable_warnings
DESCRIBE t1;
+select length(my_column) from t1;
DROP TABLE t1;
#
# check that the new setting of @@global.init_slave becomes immediately visible
diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv_basic.test b/mysql-test/suite/sys_vars/t/secure_file_priv_basic.test
new file mode 100644
index 00000000000..fee18e441d1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/secure_file_priv_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select @@global.secure_file_priv;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.secure_file_priv;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show global variables like 'secure_file_priv';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show session variables like 'secure_file_priv';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.global_variables where variable_name='secure_file_priv';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.session_variables where variable_name='secure_file_priv';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global secure_file_priv=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session secure_file_priv=1;
diff --git a/mysql-test/suite/sys_vars/inc/server_id_basic.inc b/mysql-test/suite/sys_vars/t/server_id_basic.test
index 47afadb5016..9d41823053a 100644
--- a/mysql-test/suite/sys_vars/inc/server_id_basic.inc
+++ b/mysql-test/suite/sys_vars/t/server_id_basic.test
@@ -107,8 +107,8 @@ SELECT @@global.server_id;
SET @@global.server_id = 2147483649*2;
SELECT @@global.server_id;
---Error ER_PARSE_ERROR
-SET @@global.server_id = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.server_id = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.server_id = '125';
--Error ER_WRONG_TYPE_FOR_VAR
@@ -116,9 +116,6 @@ SET @@global.server_id = 7483649.56;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.server_id = 1G;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
-
--echo '#------------------FN_DYNVARS_144_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
diff --git a/mysql-test/suite/sys_vars/t/server_id_basic_32.test b/mysql-test/suite/sys_vars/t/server_id_basic_32.test
deleted file mode 100644
index e01b271e002..00000000000
--- a/mysql-test/suite/sys_vars/t/server_id_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.inc
---source suite/sys_vars/inc/server_id_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/server_id_basic_64.test b/mysql-test/suite/sys_vars/t/server_id_basic_64.test
deleted file mode 100644
index 4ef870aa977..00000000000
--- a/mysql-test/suite/sys_vars/t/server_id_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.inc
---source suite/sys_vars/inc/server_id_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
new file mode 100644
index 00000000000..591f3cec5e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
@@ -0,0 +1,24 @@
+--source include/windows.inc
+#
+# only global
+#
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select @@global.shared_memory_base_name;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.shared_memory_base_name;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show global variables like 'shared_memory_base_name';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show session variables like 'shared_memory_base_name';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.global_variables where variable_name='shared_memory_base_name';
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select * from information_schema.session_variables where variable_name='shared_memory_base_name';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global shared_memory_base_name=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session shared_memory_base_name=1;
diff --git a/mysql-test/suite/sys_vars/t/shared_memory_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_basic.test
new file mode 100644
index 00000000000..ff2c5fad81d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/shared_memory_basic.test
@@ -0,0 +1,19 @@
+--source include/windows.inc
+#
+# only global
+#
+select @@global.shared_memory;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.shared_memory;
+show global variables like 'shared_memory';
+show session variables like 'shared_memory';
+select * from information_schema.global_variables where variable_name='shared_memory';
+select * from information_schema.session_variables where variable_name='shared_memory';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global shared_memory=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session shared_memory=1;
diff --git a/mysql-test/suite/sys_vars/t/skip_external_locking_basic.test b/mysql-test/suite/sys_vars/t/skip_external_locking_basic.test
new file mode 100644
index 00000000000..67b58ab8ff4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/skip_external_locking_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.skip_external_locking;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.skip_external_locking;
+show global variables like 'skip_external_locking';
+show session variables like 'skip_external_locking';
+select * from information_schema.global_variables where variable_name='skip_external_locking';
+select * from information_schema.session_variables where variable_name='skip_external_locking';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global skip_external_locking=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session skip_external_locking=1;
diff --git a/mysql-test/suite/sys_vars/t/skip_networking_basic.test b/mysql-test/suite/sys_vars/t/skip_networking_basic.test
new file mode 100644
index 00000000000..09a775cc257
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/skip_networking_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.skip_networking;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.skip_networking;
+show global variables like 'skip_networking';
+show session variables like 'skip_networking';
+select * from information_schema.global_variables where variable_name='skip_networking';
+select * from information_schema.session_variables where variable_name='skip_networking';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global skip_networking=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session skip_networking=1;
diff --git a/mysql-test/suite/sys_vars/t/skip_show_database_basic.test b/mysql-test/suite/sys_vars/t/skip_show_database_basic.test
new file mode 100644
index 00000000000..9e0fddd120c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/skip_show_database_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.skip_show_database;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.skip_show_database;
+show global variables like 'skip_show_database';
+show session variables like 'skip_show_database';
+select * from information_schema.global_variables where variable_name='skip_show_database';
+select * from information_schema.session_variables where variable_name='skip_show_database';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global skip_show_database=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session skip_show_database=1;
diff --git a/mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test b/mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test
index 020fd9c84c2..e8b52259051 100644
--- a/mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test
+++ b/mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test
@@ -37,8 +37,6 @@
--Error ER_UNKNOWN_SYSTEM_VARIABLE
SET @global_start_value = @@global.slave_allow_batching;
---echo 'Bug: This variable is not supported in mysql version 5.1.22'
-
--echo '#--------------------FN_DYNVARS_145_01------------------------#'
########################################################################
# Display the DEFAULT value of slave_allow_batching #
diff --git a/mysql-test/suite/sys_vars/t/slave_exec_mode_basic.test b/mysql-test/suite/sys_vars/t/slave_exec_mode_basic.test
index 5c5b4e7da1b..503fb382602 100644
--- a/mysql-test/suite/sys_vars/t/slave_exec_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/slave_exec_mode_basic.test
@@ -23,6 +23,7 @@
# #
################################################################################
+--source include/not_embedded.inc
--source include/load_sysvars.inc
########################################################################
diff --git a/mysql-test/suite/sys_vars/t/slave_load_tmpdir_basic.test b/mysql-test/suite/sys_vars/t/slave_load_tmpdir_basic.test
new file mode 100644
index 00000000000..4121c881ee5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_load_tmpdir_basic.test
@@ -0,0 +1,24 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select @@global.slave_load_tmpdir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.slave_load_tmpdir;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+show global variables like 'slave_load_tmpdir';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+show session variables like 'slave_load_tmpdir';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select * from information_schema.global_variables where variable_name='slave_load_tmpdir';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select * from information_schema.session_variables where variable_name='slave_load_tmpdir';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global slave_load_tmpdir=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session slave_load_tmpdir=1;
diff --git a/mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test b/mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test
index 5662eec3957..f534bd2f28c 100644
--- a/mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/slave_net_timeout_basic.test
@@ -105,8 +105,8 @@ SELECT @@global.slave_net_timeout;
SET @@global.slave_net_timeout = 2147483649*2;
SELECT @@global.slave_net_timeout;
---Error ER_PARSE_ERROR
-SET @@global.slave_net_timeout = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.slave_net_timeout = 65530.34;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_net_timeout = 100s;
--Error ER_WRONG_TYPE_FOR_VAR
@@ -114,9 +114,6 @@ SET @@global.slave_net_timeout = 7483649.56;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slave_net_timeout = 0.6;
---echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
-
-
--echo '#------------------FN_DYNVARS_146_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
diff --git a/mysql-test/suite/sys_vars/t/slave_skip_errors_basic.test b/mysql-test/suite/sys_vars/t/slave_skip_errors_basic.test
new file mode 100644
index 00000000000..c5c8aba7e3a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_skip_errors_basic.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+#
+# only global
+#
+select @@global.slave_skip_errors;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.slave_skip_errors;
+show global variables like 'slave_skip_errors';
+show session variables like 'slave_skip_errors';
+select * from information_schema.global_variables where variable_name='slave_skip_errors';
+select * from information_schema.session_variables where variable_name='slave_skip_errors';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global slave_skip_errors=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session slave_skip_errors=1;
diff --git a/mysql-test/suite/sys_vars/t/slow_launch_time_basic.test b/mysql-test/suite/sys_vars/t/slow_launch_time_basic.test
index 6289a91abb3..bedcb6201b1 100644
--- a/mysql-test/suite/sys_vars/t/slow_launch_time_basic.test
+++ b/mysql-test/suite/sys_vars/t/slow_launch_time_basic.test
@@ -90,7 +90,6 @@ SET @@global.slow_launch_time = -1024;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 42949672950;
SELECT @@global.slow_launch_time;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_launch_time = ON;
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
index 9125b686cad..bac0d0c8198 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
@@ -43,7 +43,8 @@ SET @start_value = @@global.slow_query_log_file;
###############################################
SET @@global.slow_query_log_file = DEFAULT;
-SELECT RIGHT(@@global.slow_query_log_file,15);
+SET @a=concat(left(@@hostname, instr(concat(@@hostname, '.'), '.')-1), '-slow.log');
+SELECT RIGHT(@@global.slow_query_log_file, length(@a)) = @a;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/socket_basic.test b/mysql-test/suite/sys_vars/t/socket_basic.test
new file mode 100644
index 00000000000..f96a863a216
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/socket_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select @@global.socket;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.socket;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+show global variables like 'socket';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+show session variables like 'socket';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select * from information_schema.global_variables where variable_name='socket';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+select * from information_schema.session_variables where variable_name='socket';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global socket=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session socket=1;
diff --git a/mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test b/mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test
index da01a3b4459..07bf38773af 100644
--- a/mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_auto_is_null_basic.test
@@ -27,75 +27,36 @@
# Displaying default value #
####################################################################
-SELECT COUNT(@@SESSION.sql_auto_is_null);
---echo 1 Expected
+SELECT @@session.sql_auto_is_null;
--echo '#---------------------BS_STVARS_044_02----------------------#'
-#
-# Test case for Bug #35433
-#
####################################################################
# Check if Value can set #
####################################################################
-
-#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@SESSION.sql_auto_is_null=1;
---ECHO "BUG:It should give error on setting this variable as it is readonly variable"
---echo Expected error 'Read only variable'
-
-SELECT COUNT(@@SESSION.sql_auto_is_null);
---echo 1 Expected
-
-
-
+SET @@session.sql_auto_is_null=1;
+SELECT @@session.sql_auto_is_null;
--echo '#---------------------BS_STVARS_044_03----------------------#'
#################################################################
-# Check if the value in SESSION Table matches value in variable #
+# Check if the value in session Table matches value in variable #
#################################################################
-SELECT IF(@@SESSION.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
+SELECT IF(@@session.sql_auto_is_null, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_auto_is_null';
---echo 1 Expected
-
-SELECT COUNT(@@SESSION.sql_auto_is_null);
---echo 1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_auto_is_null';
---echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_044_04----------------------#'
-################################################################################
-# Check if accessing variable with and without SESSION point to same variable #
-################################################################################
-SELECT @@sql_auto_is_null = @@SESSION.sql_auto_is_null;
---echo 1 Expected
-
-
--echo '#---------------------BS_STVARS_044_05----------------------#'
################################################################################
# Check if sql_auto_is_null can be accessed with and without @@ sign #
################################################################################
-SELECT COUNT(@@sql_auto_is_null);
---echo 1 Expected
-SELECT COUNT(@@local.sql_auto_is_null);
---echo 1 Expected
-SELECT COUNT(@@SESSION.sql_auto_is_null);
---echo 1 Expected
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@GLOBAL.sql_auto_is_null);
---echo Expected error 'Variable is a SESSION variable'
-
---error ER_BAD_FIELD_ERROR
-SELECT COUNT(sql_auto_is_null = @@GLOBAL.sql_auto_is_null);
---echo Expected error 'Readonly variable'
+SELECT @@sql_auto_is_null;
+SELECT @@local.sql_auto_is_null;
+SELECT @@session.sql_auto_is_null;
+SELECT @@global.sql_auto_is_null;
diff --git a/mysql-test/suite/sys_vars/t/sql_big_selects_basic.test b/mysql-test/suite/sys_vars/t/sql_big_selects_basic.test
index dd9b585cc84..42331d766be 100644
--- a/mysql-test/suite/sys_vars/t/sql_big_selects_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_big_selects_basic.test
@@ -93,12 +93,8 @@ SET @@session.sql_big_selects = "Y";
SET @@session.sql_big_selects = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_selects = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_selects = OF;
-SELECT @@session.sql_big_selects;
-
---echo 'Bug # 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_selects = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -112,11 +108,9 @@ SET @@session.sql_big_selects = NO;
# Test if accessing global sql_big_selects gives error #
########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_big_selects = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_big_selects = 1-@@global.sql_big_selects;
SELECT @@global.sql_big_selects;
+SET @@global.sql_big_selects = 1-@@global.sql_big_selects;
--echo '#----------------------FN_DYNVARS_153_06------------------------#'
#########################################################################
diff --git a/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test b/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test
index 64ce47b044b..373ae06c850 100644
--- a/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test
@@ -96,12 +96,8 @@ SET @@session.sql_big_tables = "Y";
SET @@session.sql_big_tables = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_tables = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_tables = OF;
-SELECT @@session.sql_big_tables;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_tables = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -115,10 +111,9 @@ SET @@session.sql_big_tables = NO;
# Test if accessing global sql_big_tables gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_big_tables = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
+SELECT @@global.sql_big_tables;
+SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
SELECT @@global.sql_big_tables;
--echo '#----------------------FN_DYNVARS_154_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test b/mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test
index 04e65239ccb..f5f99efeb0a 100644
--- a/mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_buffer_result_basic.test
@@ -92,25 +92,15 @@ SET @@session.sql_buffer_result = 2;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = "TRU";
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.sql_buffer_result = 0.4;
-SELECT @@session.sql_buffer_result;
-
-SET @@session.sql_buffer_result = 1.4;
-SELECT @@session.sql_buffer_result;
-
---echo 'Bug: Decimal values are accepted and rounded to an integer before';
---echo 'assingment.';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = OF;
-SELECT @@session.sql_buffer_result;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -124,10 +114,9 @@ SET @@session.sql_buffer_result = NO;
# Test if accessing global sql_buffer_result gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_buffer_result = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_buffer_result = 1-@@global.sql_buffer_result;
+SELECT @@global.sql_buffer_result;
+SET @@global.sql_buffer_result = 1-@@global.sql_buffer_result;
SELECT @@global.sql_buffer_result;
--echo '#----------------------FN_DYNVARS_155_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test b/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test
index 9ac0474f982..153a0be0b8f 100644
--- a/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_log_bin_basic.test
@@ -97,12 +97,8 @@ SET @@session.sql_log_bin = "Y";
SET @@session.sql_log_bin = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_bin = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_bin = OF;
-SELECT @@session.sql_log_bin;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_bin = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -116,11 +112,9 @@ SET @@session.sql_log_bin = NO;
# Test if accessing global sql_log_bin gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
SET @@global.sql_log_bin = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@global.sql_log_bin;
+SET @@global.sql_log_bin = 1;
--echo '#----------------------FN_DYNVARS_156_06------------------------#'
#########################################################################
diff --git a/mysql-test/suite/sys_vars/t/sql_log_off_basic.test b/mysql-test/suite/sys_vars/t/sql_log_off_basic.test
index a208d30a39b..38549ac35d2 100644
--- a/mysql-test/suite/sys_vars/t/sql_log_off_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_log_off_basic.test
@@ -96,12 +96,8 @@ SET @@session.sql_log_off = "Y";
SET @@session.sql_log_off = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_off = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_off = OF;
-SELECT @@session.sql_log_off;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_off = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -115,10 +111,9 @@ SET @@session.sql_log_off = NO;
# Test if accessing global sql_log_off gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_log_off = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_log_off = 1-@@global.sql_log_off;
+SELECT @@global.sql_log_off;
+SET @@global.sql_log_off = 1-@@global.sql_log_off;
SELECT @@global.sql_log_off;
--echo '#----------------------FN_DYNVARS_157_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_log_update_basic.test b/mysql-test/suite/sys_vars/t/sql_log_update_basic.test
new file mode 100644
index 00000000000..c48840d4a81
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sql_log_update_basic.test
@@ -0,0 +1,35 @@
+--source include/have_profiling.inc
+
+SET @start_global_value = @@global.sql_log_update;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.sql_log_update;
+select @@session.sql_log_update;
+show global variables like 'sql_log_update';
+show session variables like 'sql_log_update';
+select * from information_schema.global_variables where variable_name='sql_log_update';
+select * from information_schema.session_variables where variable_name='sql_log_update';
+
+#
+# show that it's writable
+#
+set global sql_log_update=1;
+select @@global.sql_log_update;
+set session sql_log_update=ON;
+select @@session.sql_log_update;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_log_update=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_log_update=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global sql_log_update="foo";
+
+SET @@global.sql_log_update = @start_global_value;
+SELECT @@global.sql_log_update;
diff --git a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test b/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test
index 8d75349b851..5b21bd4c79a 100644
--- a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test
@@ -50,12 +50,8 @@ SET @@session.sql_low_priority_updates = DEFAULT;
SELECT @@session.sql_low_priority_updates;
SET @@global.sql_low_priority_updates = 1;
---Error ER_NO_DEFAULT
SET @@global.sql_low_priority_updates = DEFAULT;
---echo 'Bug: DEFAULT value is only associated with session'
-
-
--echo '#---------------------FN_DYNVARS_159_02-------------------------#'
####################################################################################
# Check if sql_low_priority_updates can be accessed with and without @@ sign #
@@ -106,7 +102,7 @@ SELECT @@global.sql_low_priority_updates;
# for session
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = -1;
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.sql_low_priority_updates = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = "T";
@@ -116,12 +112,8 @@ SET @@session.sql_low_priority_updates = "Y";
SET @@session.sql_low_priority_updates = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = OF;
-SELECT @@session.sql_low_priority_updates;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = 覨F;
@@ -139,12 +131,8 @@ SET @@global.sql_low_priority_updates = "Y";
SET @@global.sql_low_priority_updates = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_low_priority_updates = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_low_priority_updates = OF;
-SELECT @@global.sql_low_priority_updates;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_low_priority_updates = 覨F;
diff --git a/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test b/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test
new file mode 100644
index 00000000000..bafa11379aa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test
@@ -0,0 +1,42 @@
+SET @start_global_value = @@global.sql_max_join_size;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.sql_max_join_size;
+select @@session.sql_max_join_size;
+show global variables like 'sql_max_join_size';
+show session variables like 'sql_max_join_size';
+select * from information_schema.global_variables where variable_name='sql_max_join_size';
+select * from information_schema.session_variables where variable_name='sql_max_join_size';
+
+#
+# show that it's writable
+#
+set global sql_max_join_size=10;
+select @@global.sql_max_join_size;
+set session sql_max_join_size=20;
+select @@session.sql_max_join_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_max_join_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_max_join_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_max_join_size="foo";
+
+#
+# affects OPTION_BIG_SELECTS
+#
+select @@sql_big_selects;
+set sql_max_join_size=cast(-1 as unsigned int);
+select @@sql_big_selects;
+set sql_max_join_size=100;
+select @@sql_big_selects;
+
+SET @@global.sql_max_join_size = @start_global_value;
+SELECT @@global.sql_max_join_size;
diff --git a/mysql-test/suite/sys_vars/t/sql_mode_basic.test b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
index 24f1e8aefcb..83f938925d5 100644
--- a/mysql-test/suite/sys_vars/t/sql_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
@@ -57,9 +57,6 @@ SET @@session.sql_mode = ANSI;
SET @@session.sql_mode = DEFAULT;
SELECT @@session.sql_mode;
---echo 'Bug# 34876: Default values for both session and global sql_mode is ""';
---echo 'and not OFF.';
-
--echo '#---------------------FN_DYNVARS_152_02-------------------------#'
#########################################################
# Check if NULL or empty value is accepeted #
@@ -92,9 +89,6 @@ SELECT @@session.sql_mode;
# sql modes ref: http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html
---echo 'Bug: Incomplete sql modes valid values at:';
---echo 'http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html';
-
# check valid values for global
SET @@global.sql_mode = ANSI;
@@ -164,7 +158,6 @@ SELECT @@global.sql_mode;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_mode = OFF;
---echo 'Bug: OFF is documented as an sql mode but infact it is not';
#check valid values for session
SET @@session.sql_mode = ANSI;
@@ -235,15 +228,10 @@ SELECT @@session.sql_mode;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_mode = OFF;
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_mode = '?';
SELECT @@global.sql_mode;
-SET @@session.sql_mode = '?';
-SELECT @@session.sql_mode;
-
---echo 'Bug# 34834: ? is acceptable as a valid sql mode.'
-
-
--echo '#--------------------FN_DYNVARS_152_04-------------------------#'
###########################################################################
# Change the value of sql_mode to invalid value #
@@ -327,30 +315,8 @@ SET @@global.sql_mode = 4294967296;
# use of decimal values
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.sql_mode = 0.4;
-SELECT @@global.sql_mode;
-
-SET @@global.sql_mode = 1.0;
-SELECT @@global.sql_mode;
-
-SET @@global.sql_mode = 40000.1;
-SELECT @@global.sql_mode;
-
-SET @@global.sql_mode = 1.5;
-SELECT @@global.sql_mode;
-
-SET @@global.sql_mode = 124567.49;
-SELECT @@global.sql_mode;
-
-SET @@session.sql_mode = 50000000.5;
-SELECT @@session.sql_mode;
-
-SET @@session.sql_mode = 4294967295.4;
-SELECT @@session.sql_mode;
-
---echo 'Bug: Decimal values can be used within the range [0.0-4294967295.5).';
---echo 'Values are rounded to numeric values as evident from outcome.';
-
--echo '#---------------------FN_DYNVARS_152_08----------------------#'
###################################################################
@@ -394,8 +360,16 @@ SELECT @@global.sql_mode;
#try combining invalid mode with correct mode
--Error ER_WRONG_VALUE_FOR_VAR
-SET @@session.sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,HIGH_OR_PRECEDENCE,
-IGNORE_SPACE';
+SET @@session.sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,FOOBAR,IGNORE_SPACE';
+
+#zero-length values are ok
+SET @@sql_mode=',';
+SELECT @@sql_mode;
+SET @@sql_mode=',,,,ANSI_QUOTES,,,';
+SELECT @@sql_mode;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@sql_mode=',,,,FOOBAR,,,,,';
+SELECT @@sql_mode;
##############################
# Restore initial value #
diff --git a/mysql-test/suite/sys_vars/t/sql_notes_basic.test b/mysql-test/suite/sys_vars/t/sql_notes_basic.test
index 461e5d35e4f..9af5fa35ea2 100644
--- a/mysql-test/suite/sys_vars/t/sql_notes_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_notes_basic.test
@@ -98,12 +98,8 @@ SET @@session.sql_notes = "Y";
SET @@session.sql_notes = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_notes = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_notes = OF;
-SELECT @@session.sql_notes;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_notes = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -117,10 +113,9 @@ SET @@session.sql_notes = NO;
# Test if accessing global sql_notes gives error #
#########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_notes = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_notes = 1-@@global.sql_notes;
+SELECT @@global.sql_notes;
+SET @@global.sql_notes = 1-@@global.sql_notes;
SELECT @@global.sql_notes;
--echo '#----------------------FN_DYNVARS_161_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test b/mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test
index 5e0edef55e5..020b5f51e9f 100644
--- a/mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_quote_show_create_basic.test
@@ -97,12 +97,8 @@ SET @@session.sql_quote_show_create = "Y";
SET @@session.sql_quote_show_create = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_quote_show_create = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_quote_show_create = OF;
-SELECT @@session.sql_quote_show_create;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_quote_show_create = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -116,10 +112,9 @@ SET @@session.sql_quote_show_create = NO;
# Test if accessing global sql_quote_show_create gives error #
##########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_quote_show_create = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_quote_show_create = 1-@@global.sql_quote_show_create;
+SELECT @@global.sql_quote_show_create;
+SET @@global.sql_quote_show_create = 1-@@global.sql_quote_show_create;
SELECT @@global.sql_quote_show_create;
--echo '#----------------------FN_DYNVARS_162_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test b/mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test
index 4f2c57bdb81..66148b65aaf 100644
--- a/mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_safe_updates_basic.test
@@ -96,12 +96,8 @@ SET @@session.sql_safe_updates = "Y";
SET @@session.sql_safe_updates = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_safe_updates = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_safe_updates = OF;
-SELECT @@session.sql_safe_updates;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_safe_updates = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -115,10 +111,9 @@ SET @@session.sql_safe_updates = NO;
# Test if accessing global sql_safe_updates gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_safe_updates = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_safe_updates = 1-@@global.sql_safe_updates;
+SELECT @@global.sql_safe_updates;
+SET @@global.sql_safe_updates = 1-@@global.sql_safe_updates;
SELECT @@global.sql_safe_updates;
--echo '#----------------------FN_DYNVARS_163_06------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/sql_select_limit_basic.test b/mysql-test/suite/sys_vars/t/sql_select_limit_basic.test
new file mode 100644
index 00000000000..0b941d25f42
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sql_select_limit_basic.test
@@ -0,0 +1,33 @@
+SET @start_global_value = @@global.sql_select_limit;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.sql_select_limit;
+select @@session.sql_select_limit;
+show global variables like 'sql_select_limit';
+show session variables like 'sql_select_limit';
+select * from information_schema.global_variables where variable_name='sql_select_limit';
+select * from information_schema.session_variables where variable_name='sql_select_limit';
+
+#
+# show that it's writable
+#
+set global sql_select_limit=10;
+select @@global.sql_select_limit;
+set session sql_select_limit=20;
+select @@session.sql_select_limit;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_select_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_select_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sql_select_limit="foo";
+
+SET @@global.sql_select_limit = @start_global_value;
+SELECT @@global.sql_select_limit;
diff --git a/mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test b/mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test
index e7d9098aee9..86cb3824d07 100644
--- a/mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test
@@ -35,22 +35,16 @@
# Try accessing initial value #
#############################################################
---Error ER_VAR_CANT_BE_READ
SET @start_global_value = @@global.sql_slave_skip_counter;
---Error ER_VAR_CANT_BE_READ
SELECT @@global.sql_slave_skip_counter;
---echo 'Info:This value is write only. Value can not be read'
-
--echo '#--------------------FN_DYNVARS_165_02-------------------------#'
###################################################################
# Try setting DEFAULT value to variable #
###################################################################
---Error ER_NO_DEFAULT
SET @@global.sql_slave_skip_counter = DEFAULT;
-
--echo '#--------------------FN_DYNVARS_165_03-------------------------#'
###################################################################
# Try setting any valid value to variable #
@@ -64,7 +58,6 @@ SET @@global.sql_slave_skip_counter = 2147483648*2;
SET @@global.sql_slave_skip_counter = 2147483648*2-1;
SET @@global.sql_slave_skip_counter = 4294967295*4294967295;
-
--echo '#--------------------FN_DYNVARS_165_03-------------------------#'
###################################################################
# Checking invalid value for variable #
@@ -90,7 +83,6 @@ SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_slave_skip_counter';
-
--echo '#--------------------FN_DYNVARS_165_03-------------------------#'
###################################################################
# Checking if variable is accessible with session scope #
@@ -103,6 +95,7 @@ SET @@session.sql_slave_skip_counter = 12;
--Error ER_GLOBAL_VARIABLE
SET @@local.sql_slave_skip_counter = 13;
+SET @@global.sql_slave_skip_counter = 0;
########################################################
# END OF sql_slave_skip_counter TESTS #
########################################################
diff --git a/mysql-test/suite/sys_vars/t/sql_warnings_basic.test b/mysql-test/suite/sys_vars/t/sql_warnings_basic.test
index 99a9ad8dda2..ced58f96e15 100644
--- a/mysql-test/suite/sys_vars/t/sql_warnings_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_warnings_basic.test
@@ -87,10 +87,8 @@ SELECT @@session.sql_warnings;
# Change the value of sql_warnings to invalid value #
###########################################################################
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@session.sql_warnings = -0.6;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@session.sql_warnings = 1.9;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.sql_warnings = 0.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_warnings = "T";
--Error ER_WRONG_VALUE_FOR_VAR
@@ -99,12 +97,8 @@ SET @@session.sql_warnings = "Y";
SET @@session.sql_warnings = TR蹺;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_warnings = 誑;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_warnings = OF;
-SELECT @@session.sql_warnings;
-
---echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_warnings = 覨F;
--Error ER_WRONG_VALUE_FOR_VAR
@@ -118,10 +112,9 @@ SET @@session.sql_warnings = NO;
# Test if accessing global sql_warnings gives error #
###########################################################################
---Error ER_LOCAL_VARIABLE
-SET @@global.sql_warnings = 0;
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.sql_warnings = 1-@@global.sql_warnings;
+SELECT @@global.sql_warnings;
+SET @@global.sql_warnings = 1-@@global.sql_warnings;
SELECT @@global.sql_warnings;
@@ -147,7 +140,6 @@ SELECT @@session.sql_warnings;
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='sql_warnings';
---echo 'Bug: value in information schema does not match'
--echo '#---------------------FN_DYNVARS_166_08-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/storage_engine_basic.test b/mysql-test/suite/sys_vars/t/storage_engine_basic.test
index 689afcd1010..e62390cb384 100644
--- a/mysql-test/suite/sys_vars/t/storage_engine_basic.test
+++ b/mysql-test/suite/sys_vars/t/storage_engine_basic.test
@@ -38,9 +38,7 @@ SELECT @start_session_value;
# Display the DEFAULT value of storage_engine #
######################################################################
-SET @@global.storage_engine = MYISAM;
-
---Error ER_NO_DEFAULT
+SET @@global.storage_engine = INNODB;
SET @@global.storage_engine = DEFAULT;
SELECT @@global.storage_engine;
@@ -87,11 +85,14 @@ SELECT @@session.storage_engine;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.storage_engine = 8199;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.storage_engine = NULL;
+
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.storage_engine = -1024;
---Error ER_PARSE_ERROR
-SET @@global.storage_engine = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.storage_engine = 65530.34;
--Error ER_UNKNOWN_STORAGE_ENGINE
SET @@global.storage_engine = FILE;
@@ -99,8 +100,8 @@ SET @@global.storage_engine = FILE;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.storage_engine = 8199;
---Error ER_PARSE_ERROR
-SET @@session.storage_engine = 65530.34.;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.storage_engine = 65530.34;
--Error ER_UNKNOWN_STORAGE_ENGINE
SET @@session.storage_engine = RECORD;
@@ -163,6 +164,8 @@ SELECT session.storage_engine;
--Error ER_BAD_FIELD_ERROR
SELECT storage_engine = @@session.storage_engine;
+# check the old obsolete name
+SET @@storage_engine = @start_global_value;
####################################
# Restore initial value #
diff --git a/mysql-test/suite/sys_vars/inc/sync_binlog_basic.inc b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
index 04adab85ac8..71a35a30c58 100644
--- a/mysql-test/suite/sys_vars/inc/sync_binlog_basic.inc
+++ b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
@@ -93,7 +93,6 @@ SET @@global.sync_binlog = -1024;
SELECT @@global.sync_binlog;
SET @@global.sync_binlog = 42949672950;
SELECT @@global.sync_binlog;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.sync_binlog = ON;
diff --git a/mysql-test/suite/sys_vars/t/sync_binlog_basic_32.test b/mysql-test/suite/sys_vars/t/sync_binlog_basic_32.test
deleted file mode 100644
index 275b95cf775..00000000000
--- a/mysql-test/suite/sys_vars/t/sync_binlog_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.inc
---source suite/sys_vars/inc/sync_binlog_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/sync_binlog_basic_64.test b/mysql-test/suite/sys_vars/t/sync_binlog_basic_64.test
deleted file mode 100644
index e6f9bf668a0..00000000000
--- a/mysql-test/suite/sys_vars/t/sync_binlog_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.inc
---source suite/sys_vars/inc/sync_binlog_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/sync_master_info_basic.test b/mysql-test/suite/sys_vars/t/sync_master_info_basic.test
new file mode 100644
index 00000000000..a080aa4c880
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_master_info_basic.test
@@ -0,0 +1,43 @@
+
+SET @start_global_value = @@global.sync_master_info;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.sync_master_info;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.sync_master_info;
+show global variables like 'sync_master_info';
+show session variables like 'sync_master_info';
+select * from information_schema.global_variables where variable_name='sync_master_info';
+select * from information_schema.session_variables where variable_name='sync_master_info';
+
+#
+# show that it's writable
+#
+set global sync_master_info=1;
+select @@global.sync_master_info;
+--error ER_GLOBAL_VARIABLE
+set session sync_master_info=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_master_info=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_master_info=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_master_info="foo";
+
+#
+# min/max values
+#
+set global sync_master_info=0;
+select @@global.sync_master_info;
+set global sync_master_info=cast(-1 as unsigned int);
+select @@global.sync_master_info;
+
+SET @@global.sync_master_info = @start_global_value;
+SELECT @@global.sync_master_info;
diff --git a/mysql-test/suite/sys_vars/t/sync_relay_log_basic.test b/mysql-test/suite/sys_vars/t/sync_relay_log_basic.test
new file mode 100644
index 00000000000..112eaca7538
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_relay_log_basic.test
@@ -0,0 +1,44 @@
+--source include/not_embedded.inc
+
+SET @start_global_value = @@global.sync_relay_log;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.sync_relay_log;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.sync_relay_log;
+show global variables like 'sync_relay_log';
+show session variables like 'sync_relay_log';
+select * from information_schema.global_variables where variable_name='sync_relay_log';
+select * from information_schema.session_variables where variable_name='sync_relay_log';
+
+#
+# show that it's writable
+#
+set global sync_relay_log=1;
+select @@global.sync_relay_log;
+--error ER_GLOBAL_VARIABLE
+set session sync_relay_log=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log="foo";
+
+#
+# min/max values
+#
+set global sync_relay_log=0;
+select @@global.sync_relay_log;
+set global sync_relay_log=cast(-1 as unsigned int);
+select @@global.sync_relay_log;
+
+SET @@global.sync_relay_log = @start_global_value;
+SELECT @@global.sync_relay_log;
diff --git a/mysql-test/suite/sys_vars/t/sync_relay_log_info_basic.test b/mysql-test/suite/sys_vars/t/sync_relay_log_info_basic.test
new file mode 100644
index 00000000000..2ef4b3c0880
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_relay_log_info_basic.test
@@ -0,0 +1,44 @@
+--source include/not_embedded.inc
+
+SET @start_global_value = @@global.sync_relay_log_info;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.sync_relay_log_info;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.sync_relay_log_info;
+show global variables like 'sync_relay_log_info';
+show session variables like 'sync_relay_log_info';
+select * from information_schema.global_variables where variable_name='sync_relay_log_info';
+select * from information_schema.session_variables where variable_name='sync_relay_log_info';
+
+#
+# show that it's writable
+#
+set global sync_relay_log_info=1;
+select @@global.sync_relay_log_info;
+--error ER_GLOBAL_VARIABLE
+set session sync_relay_log_info=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log_info=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log_info=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global sync_relay_log_info="foo";
+
+#
+# min/max values
+#
+set global sync_relay_log_info=0;
+select @@global.sync_relay_log_info;
+set global sync_relay_log_info=cast(-1 as unsigned int);
+select @@global.sync_relay_log_info;
+
+SET @@global.sync_relay_log_info = @start_global_value;
+SELECT @@global.sync_relay_log_info;
diff --git a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
index 741079091bc..69f29108645 100644
--- a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
@@ -83,7 +83,6 @@ SET @@global.table_definition_cache = 524289;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = 42949672950;
SELECT @@global.table_definition_cache;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.table_definition_cache = 21221204.10;
diff --git a/mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test
index 43186c70874..f33e5660c5d 100644
--- a/mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test
@@ -87,7 +87,6 @@ SET @@global.table_lock_wait_timeout= 100000000000;
SET @@global.table_lock_wait_timeout= -1024;
SET @@global.table_lock_wait_timeout= 0;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.table_lock_wait_timeout= 10000.01;
diff --git a/mysql-test/suite/sys_vars/t/table_open_cache_basic.test b/mysql-test/suite/sys_vars/t/table_open_cache_basic.test
index c32463ca030..7d2549cd87f 100644
--- a/mysql-test/suite/sys_vars/t/table_open_cache_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_open_cache_basic.test
@@ -95,9 +95,6 @@ SELECT @@global.table_open_cache ;
SET @@global.table_open_cache = 0;
SELECT @@global.table_open_cache ;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.table_open_cache = 10000.01;
diff --git a/mysql-test/suite/sys_vars/t/thread_cache_size_basic.test b/mysql-test/suite/sys_vars/t/thread_cache_size_basic.test
new file mode 100644
index 00000000000..48a4c0797e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_cache_size_basic.test
@@ -0,0 +1,43 @@
+
+SET @start_global_value = @@global.thread_cache_size;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.thread_cache_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_cache_size;
+show global variables like 'thread_cache_size';
+show session variables like 'thread_cache_size';
+select * from information_schema.global_variables where variable_name='thread_cache_size';
+select * from information_schema.session_variables where variable_name='thread_cache_size';
+
+#
+# show that it's writable
+#
+set global thread_cache_size=1;
+select @@global.thread_cache_size;
+--error ER_GLOBAL_VARIABLE
+set session thread_cache_size=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_cache_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_cache_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global thread_cache_size="foo";
+
+#
+# min/max values
+#
+set global thread_cache_size=0;
+select @@global.thread_cache_size;
+set global thread_cache_size=cast(-1 as unsigned int);
+select @@global.thread_cache_size;
+
+SET @@global.thread_cache_size = @start_global_value;
+SELECT @@global.thread_cache_size;
diff --git a/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test b/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test
new file mode 100644
index 00000000000..d4acc961752
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test
@@ -0,0 +1,19 @@
+--source include/have_thread_concurrency.inc
+#
+# only global
+#
+select @@global.thread_concurrency;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_concurrency;
+show global variables like 'thread_concurrency';
+show session variables like 'thread_concurrency';
+select * from information_schema.global_variables where variable_name='thread_concurrency';
+select * from information_schema.session_variables where variable_name='thread_concurrency';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global thread_concurrency=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session thread_concurrency=1;
diff --git a/mysql-test/suite/sys_vars/t/thread_stack_basic.test b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
new file mode 100644
index 00000000000..2d4d144572d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
@@ -0,0 +1,23 @@
+#
+# only global
+#
+--replace_result 196608 262144
+select @@global.thread_stack;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.thread_stack;
+--replace_result 196608 262144
+show global variables like 'thread_stack';
+--replace_result 196608 262144
+show session variables like 'thread_stack';
+--replace_result 196608 262144
+select * from information_schema.global_variables where variable_name='thread_stack';
+--replace_result 196608 262144
+select * from information_schema.session_variables where variable_name='thread_stack';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global thread_stack=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session thread_stack=1;
diff --git a/mysql-test/suite/sys_vars/t/time_format_basic.test b/mysql-test/suite/sys_vars/t/time_format_basic.test
new file mode 100644
index 00000000000..ec737b8c621
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/time_format_basic.test
@@ -0,0 +1,18 @@
+#
+# only global
+#
+select @@global.time_format;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.time_format;
+show global variables like 'time_format';
+show session variables like 'time_format';
+select * from information_schema.global_variables where variable_name='time_format';
+select * from information_schema.session_variables where variable_name='time_format';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global time_format=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session time_format=1;
diff --git a/mysql-test/suite/sys_vars/inc/timestamp_basic.inc b/mysql-test/suite/sys_vars/t/timestamp_basic.test
index 9ef57c97043..a5baf304bf3 100644
--- a/mysql-test/suite/sys_vars/inc/timestamp_basic.inc
+++ b/mysql-test/suite/sys_vars/t/timestamp_basic.test
@@ -1,4 +1,4 @@
-################## mysql-test\t\timestamp_basic.test ##########################
+################## mysql-test/t/timestamp_basic.test ##########################
# #
# Variable Name: timestamp #
# Scope: SESSION #
@@ -43,9 +43,7 @@ SET @session_start_value = @@session.timestamp;
SET @@timestamp = DEFAULT;
-#SELECT @@timestamp;
-
---echo 'timestamp does not have any DEFAULT value'
+SELECT @@timestamp = UNIX_TIMESTAMP();
--echo '#---------------------FN_DYNVARS_001_02-------------------------#'
##############################################################
@@ -55,23 +53,18 @@ SET @@timestamp = DEFAULT;
--Error ER_LOCAL_VARIABLE
SET @@global.timestamp = "1000";
-
--echo '#--------------------FN_DYNVARS_001_03------------------------#'
########################################################################
# Change the value of timestamp to a valid value #
########################################################################
SET @@timestamp = 0;
-#SELECT @@timestamp;
+SELECT @@timestamp = UNIX_TIMESTAMP();
--echo 'Setting 0 resets timestamp to session default timestamp'
-SET @@timestamp = 123456789123456;
-SELECT @@timestamp;
-SET @@timestamp = 60*60*60*60*365;
-SELECT @@timestamp;
SET @@timestamp = -1000000000;
-SELECT @@timestamp;
+SELECT @@timestamp = UNIX_TIMESTAMP();
SET @temp_ts = @@timestamp - @@timestamp;
SELECT @temp_ts;
@@ -84,7 +77,6 @@ SELECT @temp_ts;
# for session scope
--Error ER_WRONG_TYPE_FOR_VAR
SET @@timestamp = "100";
---echo 'Bug# 34836: Documentation says its a string variable but infact its numeric'
--Error ER_WRONG_TYPE_FOR_VAR
SET @@timestamp = " ";
diff --git a/mysql-test/suite/sys_vars/t/timestamp_basic_32.test b/mysql-test/suite/sys_vars/t/timestamp_basic_32.test
deleted file mode 100644
index a2b6139aef9..00000000000
--- a/mysql-test/suite/sys_vars/t/timestamp_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.inc
---source suite/sys_vars/inc/timestamp_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/timestamp_basic_64.test b/mysql-test/suite/sys_vars/t/timestamp_basic_64.test
deleted file mode 100644
index fbc86316ed9..00000000000
--- a/mysql-test/suite/sys_vars/t/timestamp_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.inc
---source suite/sys_vars/inc/timestamp_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/tx_isolation_basic.test b/mysql-test/suite/sys_vars/t/tx_isolation_basic.test
index 136a9b4331e..0a15aa08b6b 100644
--- a/mysql-test/suite/sys_vars/t/tx_isolation_basic.test
+++ b/mysql-test/suite/sys_vars/t/tx_isolation_basic.test
@@ -46,16 +46,11 @@ SELECT @session_start_value;
####################################################################
SET @@global.tx_isolation = 'READ-UNCOMMITTED';
---Error ER_NO_DEFAULT
SET @@global.tx_isolation = DEFAULT;
---echo 'Bug# 34878: Documentation specifies a DEFAULT value of REPEATABLE-READ';
---echo 'where as DEFAULT is not supported here.';
+SELECT @@global.tx_isolation;
-SET @@session.tx_isolation = 'SERIALIZABLE';
SET @@session.tx_isolation = DEFAULT;
SELECT @@session.tx_isolation;
---echo 'Bug# 34876: Documentation specifies a DEFAULT value of REPEATABLE-READ';
---echo 'where as DEFAULT here as no effect.';
--echo '#---------------------FN_DYNVARS_183_02-------------------------#'
#########################################################
@@ -115,18 +110,12 @@ SELECT @@session.tx_isolation;
SET @@global.tx_isolation = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.tx_isolation = READUNCOMMITTED;
-
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.tx_isolation = 'REPEATABLE';
-SELECT @@global.tx_isolation;
---echo 'Bug# 34833: REPEATABLE is not documented as as valid tx_isolation level'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.tx_isolation = OFF;
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.tx_isolation = ON;
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.tx_isolation = 'NON-SERIALIZABLE';
@@ -136,11 +125,8 @@ SET @@global.tx_isolation = 'NON-SERIALIZABLE';
SET @@tx_isolation = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@tx_isolation = READUNCOMMITTED;
-
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@tx_isolation = 'REPEATABLE';
-SELECT @@tx_isolation;
---echo 'Bug# 34833: REPEATABLE is not documented as as valid tx_isolation level'
-
--Error ER_WRONG_VALUE_FOR_VAR
SET @@tx_isolation = 'NONE';
--Error ER_WRONG_VALUE_FOR_VAR
@@ -183,29 +169,8 @@ SELECT @@global.tx_isolation;
SET @@global.tx_isolation = 3;
SELECT @@global.tx_isolation;
-# use of decimal values
-
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.tx_isolation = 0.4;
-SELECT @@global.tx_isolation;
-
-SET @@global.tx_isolation = 1.1;
-SELECT @@global.tx_isolation;
-
-SET @@global.tx_isolation = 1.5;
-SELECT @@global.tx_isolation;
-
-SET @@global.tx_isolation = 2.9;
-SELECT @@global.tx_isolation;
-
-SET @@session.tx_isolation = 3.49;
-SELECT @@session.tx_isolation;
-
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@session.tx_isolation = 3.6;
-
---echo 'Bug: Decimal values can be used within the range [0.0-3.5).';
---echo 'Values are rounded to 0,1,2,3 as evident from outcome.';
-
--echo '#---------------------FN_DYNVARS_183_08----------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/unique_checks_basic.test b/mysql-test/suite/sys_vars/t/unique_checks_basic.test
index 364dfc07cd1..af2ab6e58bd 100644
--- a/mysql-test/suite/sys_vars/t/unique_checks_basic.test
+++ b/mysql-test/suite/sys_vars/t/unique_checks_basic.test
@@ -46,16 +46,6 @@ SET @@session.unique_checks= 1;
SET @@session.unique_checks= DEFAULT;
SELECT @@session.unique_checks;
---echo '#--------------------FN_DYNVARS_005_02-------------------------#'
-#############################################################
-# Check the DEFAULT value of unique_checks #
-#############################################################
-
-
-SET @@session.unique_checks = DEFAULT;
-SELECT @@session.unique_checks =1;
-
-
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
########################################################################
# Change the value of unique_checks to a valid value for SESSION Scope #
diff --git a/mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test b/mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test
index 61a45793d39..941eb1db61a 100644
--- a/mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test
+++ b/mysql-test/suite/sys_vars/t/updatable_views_with_limit_basic.test
@@ -166,7 +166,7 @@ SET @@global.updatable_views_with_limit = 2345;
SET @@global.updatable_views_with_limit = "FALSE";
---Error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.updatable_views_with_limit = 65530.34;
--Error ER_WRONG_VALUE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/inc/wait_timeout_basic.inc b/mysql-test/suite/sys_vars/t/wait_timeout_basic.test
index b6e19e235ba..e92a3294b86 100644
--- a/mysql-test/suite/sys_vars/inc/wait_timeout_basic.inc
+++ b/mysql-test/suite/sys_vars/t/wait_timeout_basic.test
@@ -104,8 +104,6 @@ SELECT @@session.wait_timeout;
SET @@global.wait_timeout = 0;
SET @@global.wait_timeout = -1024;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.wait_timeout = ON;
diff --git a/mysql-test/suite/sys_vars/t/wait_timeout_basic_32.test b/mysql-test/suite/sys_vars/t/wait_timeout_basic_32.test
deleted file mode 100644
index 613a5543b14..00000000000
--- a/mysql-test/suite/sys_vars/t/wait_timeout_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.inc
---source suite/sys_vars/inc/wait_timeout_basic.inc
-
diff --git a/mysql-test/suite/sys_vars/t/wait_timeout_basic_64.test b/mysql-test/suite/sys_vars/t/wait_timeout_basic_64.test
deleted file mode 100644
index d1138cbc105..00000000000
--- a/mysql-test/suite/sys_vars/t/wait_timeout_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.inc
---source suite/sys_vars/inc/wait_timeout_basic.inc
-
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index bd5f8c96518..a4a4bafcc5a 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1615,7 +1615,7 @@ DROP TABLE t1;
# BUG#46961 - archive engine loses rows during self joining select!
#
SET @save_join_buffer_size= @@join_buffer_size;
-SET @@join_buffer_size= 8228;
+SET @@join_buffer_size= 8192;
CREATE TABLE t1(a CHAR(255)) ENGINE=archive;
INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
diff --git a/mysql-test/t/bug46080-master.opt b/mysql-test/t/bug46080-master.opt
index f59740afe60..edcc54fa428 100644
--- a/mysql-test/t/bug46080-master.opt
+++ b/mysql-test/t/bug46080-master.opt
@@ -1 +1 @@
---skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=4000000
+--skip-grant-tables --skip-name-resolve --loose-safemalloc-mem-limit=4000000
diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test
index 8b4cee4d8b0..6daf12cf1c5 100644
--- a/mysql-test/t/bug46080.test
+++ b/mysql-test/t/bug46080.test
@@ -3,6 +3,8 @@
--echo # sort_buffer_size cannot allocate
--echo #
+--source include/have_debug.inc
+
call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
index 89f35116a2c..3ed798e8d36 100644
--- a/mysql-test/t/change_user.test
+++ b/mysql-test/t/change_user.test
@@ -20,7 +20,7 @@ SET @@session.max_join_size = default;
SELECT @@session.sql_big_selects;
# On some machines the following will result into a warning
--disable_warnings
-SET @@global.max_join_size = -1;
+SET @@global.max_join_size = 18446744073709551615;
--enable_warnings
SET @@session.max_join_size = default;
--echo change_user
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index e5dc7ffa53e..a83e18c44d9 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -17,82 +17,77 @@ WHERE variable_name IN ('date_format', 'datetime_format', 'time_format')
ORDER BY variable_name;
#
-# Test setting a lot of different formats to see which formats are accepted and
-# which aren't
-#
-
-SET time_format='%H%i%s';
-SET time_format='%H:%i:%s.%f';
-SET time_format='%h-%i-%s.%f%p';
-SET time_format='%h:%i:%s.%f %p';
-SET time_format='%h:%i:%s%p';
-
-SET date_format='%Y%m%d';
-SET date_format='%Y.%m.%d';
-SET date_format='%d.%m.%Y';
-SET date_format='%m-%d-%Y';
-
-set datetime_format= '%Y%m%d%H%i%s';
-set datetime_format= '%Y-%m-%d %H:%i:%s';
-set datetime_format= '%m-%d-%y %H:%i:%s.%f';
-set datetime_format= '%d-%m-%Y %h:%i:%s%p';
-set datetime_format= '%H:%i:%s %Y-%m-%d';
-set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
-set datetime_format= '%h:%i:%s %p %Y-%m-%d';
-set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
-
-SELECT variable_name, variable_value
-FROM information_schema.session_variables
-WHERE variable_name IN ('date_format', 'datetime_format', 'time_format')
-ORDER BY variable_name;
-
---error 1231
-SET time_format='%h:%i:%s';
---error 1231
-SET time_format='%H %i:%s';
---error 1231
-SET time_format='%H::%i:%s';
---error 1231
-SET time_format='%H:%i:%s%f';
---error 1231
-SET time_format='%H:%i.%f:%s';
---error 1231
-SET time_format='%H:%i:%s%p';
---error 1231
-SET time_format='%h:%i:%s.%f %p %Y-%m-%d';
---error 1231
-SET time_format='%H%i%s.%f';
---error 1231
-SET time_format='%H:%i-%s.%f';
---error 1231
-SET date_format='%d.%m.%d';
---error 1231
-SET datetime_format='%h.%m.%y %d.%i.%s';
---error 1231
-set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d';
-
-#
-# Test GLOBAL values
-
-set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d';
-SET SESSION datetime_format=default;
-select @@global.datetime_format, @@session.datetime_format;
-SET GLOBAL datetime_format=default;
-SET SESSION datetime_format=default;
-select @@global.datetime_format, @@session.datetime_format;
-
-SET GLOBAL date_format=default;
-SET GLOBAL time_format=default;
-SET GLOBAL datetime_format=default;
-SET time_format=default;
-SET date_format=default;
-SET datetime_format=default;
-
-#
# The following tests will work only when we at some point will enable
# dynamic changing of formats
#
+# SET time_format='%H%i%s';
+# SET time_format='%H:%i:%s.%f';
+# SET time_format='%h-%i-%s.%f%p';
+# SET time_format='%h:%i:%s.%f %p';
+# SET time_format='%h:%i:%s%p';
+#
+# SET date_format='%Y%m%d';
+# SET date_format='%Y.%m.%d';
+# SET date_format='%d.%m.%Y';
+# SET date_format='%m-%d-%Y';
+#
+# set datetime_format= '%Y%m%d%H%i%s';
+# set datetime_format= '%Y-%m-%d %H:%i:%s';
+# set datetime_format= '%m-%d-%y %H:%i:%s.%f';
+# set datetime_format= '%d-%m-%Y %h:%i:%s%p';
+# set datetime_format= '%H:%i:%s %Y-%m-%d';
+# set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
+# set datetime_format= '%h:%i:%s %p %Y-%m-%d';
+# set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
+#
+# SELECT variable_name, variable_value
+# FROM information_schema.session_variables
+# WHERE variable_name IN ('date_format', 'datetime_format', 'time_format')
+# ORDER BY variable_name;
+#
+# --error 1231
+# SET time_format='%h:%i:%s';
+# --error 1231
+# SET time_format='%H %i:%s';
+# --error 1231
+# SET time_format='%H::%i:%s';
+# --error 1231
+# SET time_format='%H:%i:%s%f';
+# --error 1231
+# SET time_format='%H:%i.%f:%s';
+# --error 1231
+# SET time_format='%H:%i:%s%p';
+# --error 1231
+# SET time_format='%h:%i:%s.%f %p %Y-%m-%d';
+# --error 1231
+# SET time_format='%H%i%s.%f';
+# --error 1231
+# SET time_format='%H:%i-%s.%f';
+# --error 1231
+# SET date_format='%d.%m.%d';
+# --error 1231
+# SET datetime_format='%h.%m.%y %d.%i.%s';
+# --error 1231
+# set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d';
+#
+# #
+# # Test GLOBAL values
+#
+# set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d';
+# SET SESSION datetime_format=default;
+# select @@global.datetime_format, @@session.datetime_format;
+# SET GLOBAL datetime_format=default;
+# SET SESSION datetime_format=default;
+# select @@global.datetime_format, @@session.datetime_format;
+#
+# SET GLOBAL date_format=default;
+# SET GLOBAL time_format=default;
+# SET GLOBAL datetime_format=default;
+# SET time_format=default;
+# SET date_format=default;
+# SET datetime_format=default;
+
# SET date_format='%d.%m.%Y';
# select CAST('01.01.2001' as DATE) as a;
# SET datetime_format='%d.%m.%Y %H.%i.%s';
diff --git a/mysql-test/t/ddl_i18n_koi8r.test b/mysql-test/t/ddl_i18n_koi8r.test
index fecef2f95d5..7ad46ae5f61 100644
--- a/mysql-test/t/ddl_i18n_koi8r.test
+++ b/mysql-test/t/ddl_i18n_koi8r.test
@@ -148,7 +148,7 @@ set names koi8r|
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.views.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $views_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $views_dump1
# - Clean mysqltest1;
@@ -408,22 +408,22 @@ set names koi8r|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 > $sp_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 > $sp_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.sp.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 > $sp_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 > $sp_dump2
# - Clean mysqltest1, mysqltest2;
@@ -685,22 +685,22 @@ use mysqltest1|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 > $triggers_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 > $triggers_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.triggers.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 > $triggers_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 > $triggers_dump2
# - Clean mysqltest1, mysqltest2;
@@ -946,22 +946,22 @@ set names koi8r|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 > $events_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 > $events_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_koi8r.events.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 > $events_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 > $events_dump2
# - Clean mysqltest1, mysqltest2;
diff --git a/mysql-test/t/ddl_i18n_utf8.test b/mysql-test/t/ddl_i18n_utf8.test
index 8788d0604f2..6ef418fc6e7 100644
--- a/mysql-test/t/ddl_i18n_utf8.test
+++ b/mysql-test/t/ddl_i18n_utf8.test
@@ -148,7 +148,7 @@ set names utf8|
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_utf8views.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $views_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $views_dump1
# - Clean mysqltest1;
@@ -408,22 +408,22 @@ set names utf8|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest1 > $sp_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest1 > $sp_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_utf8sp.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --routines --databases mysqltest2 > $sp_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --routines --databases mysqltest2 > $sp_dump2
# - Clean mysqltest1, mysqltest2;
@@ -685,22 +685,22 @@ use mysqltest1|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest1 > $triggers_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest1 > $triggers_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_utf8triggers.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --triggers --databases mysqltest2 > $triggers_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --triggers --databases mysqltest2 > $triggers_dump2
# - Clean mysqltest1, mysqltest2;
@@ -946,22 +946,22 @@ set names utf8|
--echo
--echo ---> Dump of mysqltest1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1
--echo
--echo ---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest1 > $events_dump1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest1 > $events_dump1
--echo
--echo ---> Dump of mysqltest2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2
--echo
--echo ---> Dumping mysqltest2 to ddl_i18n_utf8events.mysqltest2.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --compact --events --databases mysqltest2 > $events_dump2
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --compact --events --databases mysqltest2 > $events_dump2
# - Clean mysqltest1, mysqltest2;
diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test
index 44c514f1244..5e53eaf0a52 100644
--- a/mysql-test/t/errors.test
+++ b/mysql-test/t/errors.test
@@ -102,8 +102,11 @@ drop table t1;
drop table t2;
drop function f1;
drop function f2;
+
+#
+# testing the value encoding in the error messages
#
-# testing the value encoding in the error messages of set_var
+# should be TR\xC3\x9CE, TR蹺, TR蹺
#
SET NAMES utf8;
--error ER_WRONG_VALUE_FOR_VAR
@@ -125,9 +128,9 @@ SET sql_quote_show_create= _utf8 x'5452C39C45';
--error ER_WRONG_VALUE_FOR_VAR
SET sql_quote_show_create=_latin1 x'5452DC45';
--error ER_WRONG_VALUE_FOR_VAR
-SET sql_quote_show_create='TR.E';
+SET sql_quote_show_create='TR蹺';
--error ER_WRONG_VALUE_FOR_VAR
-SET sql_quote_show_create=TR.E;
+SET sql_quote_show_create=TR蹺;
SET NAMES binary;
--error ER_WRONG_VALUE_FOR_VAR
@@ -136,3 +139,4 @@ SET sql_quote_show_create= _binary x'5452C39C45';
SET sql_quote_show_create= _utf8 x'5452C39C45';
--error ER_WRONG_VALUE_FOR_VAR
SET sql_quote_show_create=_latin1 x'5452DC45';
+
diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test
index a50255e9f8b..08412d2f5b0 100644
--- a/mysql-test/t/events_2.test
+++ b/mysql-test/t/events_2.test
@@ -25,15 +25,6 @@ set names utf8;
create event 蟹邪写邪褔泻邪 on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
drop event 蟹邪写邪褔泻邪;
-# event_scheduler is a global var
---error ER_GLOBAL_VARIABLE
-set event_scheduler=off;
-# event_scheduler could be only either 1 or 2
---error ER_WRONG_VALUE_FOR_VAR
-set global event_scheduler=3;
---error ER_WRONG_VALUE_FOR_VAR
-set global event_scheduler=disabled;
-
--echo "DISABLE the scheduler. Testing that it does not work when the variable is 0"
set global event_scheduler=off;
select definer, name, db from mysql.event;
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index 81397b333f9..8d9959f1b0a 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/events_bugs.test
@@ -1199,14 +1199,14 @@ DROP USER mysqltest_u1@localhost;
drop procedure if exists p;
--enable_warnings
set @old_mode= @@sql_mode;
-set @@sql_mode= pow(2,32)-1;
+set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1;
-select @@sql_mode;
+select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode;
# Rename SQL modes that differ in name between the server and the table definition.
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
+select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
-select name from mysql.event where name = 'p' and sql_mode = @full_mode;
+select name from mysql.event where name = 'e1' and sql_mode = @full_mode;
drop event e1;
#
diff --git a/mysql-test/t/index_merge_myisam.test b/mysql-test/t/index_merge_myisam.test
index dccaecef20a..86195cc3cd9 100644
--- a/mysql-test/t/index_merge_myisam.test
+++ b/mysql-test/t/index_merge_myisam.test
@@ -36,7 +36,6 @@ select @@optimizer_switch;
set optimizer_switch='default,index_merge_sort_union=off';
select @@optimizer_switch;
---error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch=4;
--error ER_WRONG_VALUE_FOR_VAR
diff --git a/mysql-test/t/innodb_bug42101-nonzero.test b/mysql-test/t/innodb_bug42101-nonzero.test
index 685fdf20489..2e4cf1f46dd 100644
--- a/mysql-test/t/innodb_bug42101-nonzero.test
+++ b/mysql-test/t/innodb_bug42101-nonzero.test
@@ -5,7 +5,7 @@
-- source include/have_innodb.inc
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=1;
@@ -14,7 +14,7 @@ set global innodb_commit_concurrency=42;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=DEFAULT;
select @@innodb_commit_concurrency;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=1;
diff --git a/mysql-test/t/innodb_bug42101.test b/mysql-test/t/innodb_bug42101.test
index b6536490d48..f0b88e034a0 100644
--- a/mysql-test/t/innodb_bug42101.test
+++ b/mysql-test/t/innodb_bug42101.test
@@ -7,10 +7,10 @@
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
---error ER_WRONG_ARGUMENTS
+--error ER_WRONG_VALUE_FOR_VAR
set global innodb_commit_concurrency=42;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=0;
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index 4c14dc96aaa..a404e9bf15a 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -149,10 +149,13 @@ show status like 'key_blocks_used';
--replace_result 1812 KEY_BLOCKS_UNUSED 1793 KEY_BLOCKS_UNUSED 1674 KEY_BLOCKS_UNUSED 1818 KEY_BLOCKS_UNUSED 1824 KEY_BLOCKS_UNUSED
show status like 'key_blocks_unused';
-
-# Cleanup
-# We don't reset keycache2 as we want to ensure that mysqld will reset it
+create table t1 (a int primary key);
+cache index t1 in keycache2;
+insert t1 values (1),(2),(3),(4),(5),(6),(7),(8);
+# delete keycache2, t1 is reassigned to default
set global keycache2.key_buffer_size=0;
+select * from t1;
+drop table t1;
# Test to set up a too small size for a key cache (bug #2064)
set global keycache3.key_buffer_size=100;
@@ -216,6 +219,7 @@ set global key_cache_block_size= @my_key_cache_block_size;
# Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
# (One cannot drop the default key cache.)
#
+--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
set @@global.key_buffer_size=0;
select @@global.key_buffer_size;
diff --git a/mysql-test/t/mysql-bug45236-master.opt b/mysql-test/t/mysql-bug45236-master.opt
new file mode 100644
index 00000000000..fc1887bca47
--- /dev/null
+++ b/mysql-test/t/mysql-bug45236-master.opt
@@ -0,0 +1 @@
+--loose-skip-safemalloc
diff --git a/mysql-test/t/mysql_locale_posix.test b/mysql-test/t/mysql_locale_posix.test
index 7d306dfc6c4..c047b7b1ae9 100644
--- a/mysql-test/t/mysql_locale_posix.test
+++ b/mysql-test/t/mysql_locale_posix.test
@@ -128,10 +128,10 @@ DROP DATABASE IF EXISTS `贸`;
#
--echo
--echo iso88592
---exec LC_ALL=cs_CZ.iso88592 $MYSQL --character-sets-dir=$CHARSETSDIR --default-character-set=auto test -e "SELECT @@character_set_client"
---exec LC_ALL=cs_CZ.iso88592 $MYSQLADMIN --character-sets-dir=$CHARSETSDIR -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create 贸
---exec LC_ALL=cs_CZ.iso88592 $MYSQL_SHOW --character-sets-dir=$CHARSETSDIR --default-character-set=auto 贸
---exec LC_ALL=cs_CZ.iso88592 $MYSQL_CHECK --character-sets-dir=$CHARSETSDIR--default-character-set=auto "贸"
+--exec LC_ALL=cs_CZ.iso88592 $MYSQL --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto test -e "SELECT @@character_set_client"
+--exec LC_ALL=cs_CZ.iso88592 $MYSQLADMIN --character-sets-dir=$MYSQL_SHAREDIR/charsets -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create 贸
+--exec LC_ALL=cs_CZ.iso88592 $MYSQL_SHOW --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto 贸
+--exec LC_ALL=cs_CZ.iso88592 $MYSQL_CHECK --character-sets-dir=$MYSQL_SHAREDIR/charsets--default-character-set=auto "贸"
# {"iso88597", "greek", my_cs_exact},
@@ -163,10 +163,10 @@ DROP DATABASE IF EXISTS `贸`;
--echo
--echo koi8r
---exec LC_ALL=ru_RU.koi8r $MYSQL --character-sets-dir=$CHARSETSDIR --default-character-set=auto test -e "SELECT @@character_set_client"
---exec LC_ALL=ru_RU.koi8r $MYSQLADMIN --character-sets-dir=$CHARSETSDIR -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create 贸
---exec LC_ALL=ru_RU.koi8r $MYSQL_SHOW --character-sets-dir=$CHARSETSDIR --default-character-set=auto 贸
---exec LC_ALL=ru_RU.koi8r $MYSQL_CHECK --character-sets-dir=$CHARSETSDIR --default-character-set=auto "贸"
+--exec LC_ALL=ru_RU.koi8r $MYSQL --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto test -e "SELECT @@character_set_client"
+--exec LC_ALL=ru_RU.koi8r $MYSQLADMIN --character-sets-dir=$MYSQL_SHAREDIR/charsets -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT --default-character-set=auto create 贸
+--exec LC_ALL=ru_RU.koi8r $MYSQL_SHOW --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto 贸
+--exec LC_ALL=ru_RU.koi8r $MYSQL_CHECK --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=auto "贸"
# {"Shift_JIS", "sjis", my_cs_exact},
diff --git a/mysql-test/t/mysqld--help-notwin.test b/mysql-test/t/mysqld--help-notwin.test
new file mode 100644
index 00000000000..6db5dd830a6
--- /dev/null
+++ b/mysql-test/t/mysqld--help-notwin.test
@@ -0,0 +1,8 @@
+#
+# mysqld --help
+#
+--source include/not_embedded.inc
+--source include/not_windows.inc
+
+--source include/mysqld--help.inc
+
diff --git a/mysql-test/t/mysqld--help-win.test b/mysql-test/t/mysqld--help-win.test
new file mode 100644
index 00000000000..416beb1d34c
--- /dev/null
+++ b/mysql-test/t/mysqld--help-win.test
@@ -0,0 +1,8 @@
+#
+# mysqld --help
+#
+--source include/not_embedded.inc
+--source include/windows.inc
+
+--source include/mysqld--help.inc
+
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 07ab9cecd28..1b9a3fde8e4 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -168,7 +168,7 @@ drop database mysqldump_test_db;
CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 '闹苓');
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments test t1
--echo #
--echo # Bug#8063 make test mysqldump [ fail ]
@@ -178,10 +178,10 @@ INSERT INTO t1 VALUES (_latin1 '闹苓');
--echo # checking that "mysqldump" is compiled with "latin1"
--echo #
-#--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
+#--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
DROP TABLE t1;
--echo #
@@ -1673,14 +1673,14 @@ drop database db42635;
SET NAMES utf8;
CREATE TABLE `stra脽e` ( f1 INT );
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=latin1 --compatible=mysql323 test
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test
DROP TABLE `stra脽e`;
CREATE TABLE `讻讚砖讙讻讞讱诇讚讙讻讞砖讱讚讙讞讻讱诇讚讙讻` ( f1 INT );
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=utf8 --compatible=mysql323 test
--error 2
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=latin1 --compatible=mysql323 test
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --skip-comments --default-character-set=latin1 --compatible=mysql323 test
DROP TABLE `讻讚砖讙讻讞讱诇讚讙讻讞砖讱讚讙讞讻讱诇讚讙讻`;
SET NAMES latin1;
@@ -1837,7 +1837,7 @@ set names latin1;
--echo
--echo # Dump mysqldump_test_db to bug30027.sql.
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30027.sql
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=latin1 --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30027.sql
--echo
--echo # Drop mysqldump_test_db.
@@ -1923,7 +1923,7 @@ WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1';
--echo
--echo ---> Dumping mysqldump_test_db to bug30217.sql
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql
--echo
@@ -2079,7 +2079,7 @@ INSERT INTO t1 VALUES (1, 'ABC-袗袘袙', 'DEF-脗脙脛'), (2, NULL, NULL);
--echo # default '--default-charset' (binary):
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
@@ -2092,7 +2092,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
--echo # utf8:
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
@@ -2105,7 +2105,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
--echo # latin1 (data corruption is expected):
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
@@ -2118,7 +2118,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
--echo # koi8r (data corruption is expected):
---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--exec $MYSQL_DUMP --character-sets-dir=$MYSQL_SHAREDIR/charsets --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1
--echo ##################################################
--cat_file $file
--echo ##################################################
diff --git a/mysql-test/t/partition_key_cache.test b/mysql-test/t/partition_key_cache.test
index f6ea974ba96..4beb9506b05 100644
--- a/mysql-test/t/partition_key_cache.test
+++ b/mysql-test/t/partition_key_cache.test
@@ -9,7 +9,7 @@ DROP TABLE IF EXISTS t1, t2, v, x;
--echo # Verifing that reads/writes use the key cache correctly
SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size;
--echo # Minimize default key cache (almost disabled).
-SET @@global.default.key_buffer_size = 1;
+SET @@global.default.key_buffer_size = 4096;
CREATE TABLE t1 (
a INT,
b INT,
diff --git a/mysql-test/t/profiling.test b/mysql-test/t/profiling.test
index afbce04b966..1e1aada7c15 100644
--- a/mysql-test/t/profiling.test
+++ b/mysql-test/t/profiling.test
@@ -9,10 +9,6 @@ show profile all;
show session variables like 'profil%';
select @@profiling;
-# setting global variable is an error
---error ER_LOCAL_VARIABLE
-set global profiling = ON;
-
# But size is okay
set @start_value= @@global.profiling_history_size;
set global profiling_history_size=100;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index d6e73cbc88d..993f231759b 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -940,9 +940,9 @@ set global query_cache_size=0;
create table t1 (a int);
insert into t1 values (1),(2),(3);
set GLOBAL query_cache_type=1;
-set GLOBAL query_cache_limit=10000;
+set GLOBAL query_cache_limit=10240;
set GLOBAL query_cache_min_res_unit=0;
-set GLOBAL query_cache_size= 100000;
+set GLOBAL query_cache_size= 102400;
# default_week_format
reset query cache;
@@ -1010,7 +1010,7 @@ set GLOBAL query_cache_size= default;
# Bug#28897 UUID() returns non-unique values when query cache is enabled
#
-set GLOBAL query_cache_size=1000000;
+set GLOBAL query_cache_size=1024000;
create table t1 (a char);
insert into t1 values ('c');
@@ -1179,7 +1179,7 @@ SET GLOBAL query_cache_size= default;
--echo #
--echo # Bug#25132 disabled query cache: Qcache_free_blocks = 1
--echo #
-set global query_cache_size=100000;
+set global query_cache_size=102400;
set global query_cache_size=0;
set global query_cache_type=0;
show status like 'Qcache_free_blocks';
diff --git a/mysql-test/t/select_safe.test b/mysql-test/t/select_safe.test
index 481779e76d7..cca736d4c1d 100644
--- a/mysql-test/t/select_safe.test
+++ b/mysql-test/t/select_safe.test
@@ -6,7 +6,7 @@
drop table if exists t1;
--enable_warnings
-SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, SQL_MAX_JOIN_SIZE=9;
+SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9;
create table t1 (a int auto_increment primary key, b char(20));
insert into t1 values(1,"test");
SELECT SQL_BUFFER_RESULT * from t1;
@@ -85,6 +85,6 @@ set local max_join_size=1;
select * from (select 1 union select 2 union select 3) x;
drop table t1;
-SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
+SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
# End of 4.1 tests
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 9d80650da2f..4f98b8b5128 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -903,7 +903,7 @@ CREATE TABLE t1(讼滔嗡1 INT);
--echo
--echo ---> Dumping mysqltest1 to outfile1
---exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$CHARSETSDIR --databases mysqltest1 > $outfile1
+--exec $MYSQL_DUMP --default-character-set=latin1 --character-sets-dir=$MYSQL_SHAREDIR/charsets --databases mysqltest1 > $outfile1
# - Clean mysqltest1;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index e314e2419be..db4d57649d8 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3748,7 +3748,7 @@ begin
end|
set @qcs1 = @@query_cache_size|
-set global query_cache_size = 100000|
+set global query_cache_size = 102400|
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
@@ -8204,14 +8204,13 @@ DROP FUNCTION f1;
drop procedure if exists p;
--enable_warnings
set @old_mode= @@sql_mode;
-set @@sql_mode= pow(2,32)-1;
+set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
select @@sql_mode into @full_mode;
create procedure p() begin end;
call p();
-select @@sql_mode;
set @@sql_mode= @old_mode;
# Rename SQL modes that differ in name between the server and the table definition.
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
+select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
select name from mysql.proc where name = 'p' and sql_mode = @full_mode;
drop procedure p;
diff --git a/mysql-test/t/user_limits.test b/mysql-test/t/user_limits.test
index 41af032b97e..1bf3f9a3103 100644
--- a/mysql-test/t/user_limits.test
+++ b/mysql-test/t/user_limits.test
@@ -132,7 +132,7 @@ drop user mysqltest_1@localhost;
select @@session.max_user_connections, @@global.max_user_connections;
# Local max_user_connections variable can't be set directly
# since this limit is per-account
---error ER_GLOBAL_VARIABLE
+--error ER_VARIABLE_IS_READONLY
set session max_user_connections= 2;
# But it is ok to set global max_user_connections
set global max_user_connections= 2;
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index c0740458a88..19c70c76139 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -122,8 +122,6 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
#
--error 1064
set session @honk=99;
---error 1382
-set one_shot @honk=99;
#
# Bug #10724 @@local not preserved in column name of select
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 2252577926c..d4b88fc6f9c 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -33,7 +33,7 @@ set @my_query_cache_type =@@global.query_cache_type;
set @my_rpl_recovery_rank =@@global.rpl_recovery_rank;
set @my_server_id =@@global.server_id;
set @my_slow_launch_time =@@global.slow_launch_time;
-set @my_storage_engine =@@global.storage_engine;
+set @my_storage_engine =@@global.default_storage_engine;
set @my_thread_cache_size =@@global.thread_cache_size;
set @my_max_allowed_packet =@@global.max_allowed_packet;
set @my_join_buffer_size =@@global.join_buffer_size;
@@ -132,12 +132,12 @@ set global timed_mutexes=0;
show variables like 'timed_mutexes';
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
-set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
-show local variables like 'storage_engine';
-select * from information_schema.session_variables where variable_name like 'storage_engine';
-show global variables like 'storage_engine';
-select * from information_schema.global_variables where variable_name like 'storage_engine';
-set GLOBAL query_cache_size=100000;
+set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE";
+show local variables like 'default_storage_engine';
+select * from information_schema.session_variables where variable_name like 'default_storage_engine';
+show global variables like 'default_storage_engine';
+select * from information_schema.global_variables where variable_name like 'default_storage_engine';
+set GLOBAL query_cache_size=102400;
set GLOBAL myisam_max_sort_file_size=2000000;
show global variables like 'myisam_max_sort_file_size';
@@ -213,7 +213,6 @@ set @@query_alloc_block_size=1024*17+2;
set @@query_prealloc_size=1024*18-1023;
set @@transaction_alloc_block_size=1024*20-1;
set @@transaction_prealloc_size=1024*21-1;
-select @@query_alloc_block_size;
--echo ==+ Check manipulated values ==+
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
@@ -250,14 +249,12 @@ set unknown_variable=1;
--error ER_WRONG_TYPE_FOR_VAR
set max_join_size="hello";
--error ER_UNKNOWN_STORAGE_ENGINE
-set storage_engine=UNKNOWN_TABLE_TYPE;
+set default_storage_engine=UNKNOWN_TABLE_TYPE;
--error ER_WRONG_VALUE_FOR_VAR
-set storage_engine=MERGE, big_tables=2;
-show local variables like 'storage_engine';
+set default_storage_engine=MERGE, big_tables=2;
+show local variables like 'default_storage_engine';
--error ER_GLOBAL_VARIABLE
set SESSION query_cache_size=10000;
---error ER_NO_DEFAULT
-set GLOBAL storage_engine=DEFAULT;
--error ER_UNKNOWN_CHARACTER_SET
set character_set_client=UNKNOWN_CHARACTER_SET;
--error ER_UNKNOWN_COLLATION
@@ -266,18 +263,12 @@ set collation_connection=UNKNOWN_COLLATION;
set character_set_client=NULL;
--error ER_WRONG_VALUE_FOR_VAR
set collation_connection=NULL;
---error ER_LOCAL_VARIABLE
-set global autocommit=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@global.timestamp;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set @@version='';
--error ER_GLOBAL_VARIABLE
set @@concurrent_insert=1;
---error ER_LOCAL_VARIABLE
-set @@global.sql_auto_is_null=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@global.sql_auto_is_null;
--error ER_GLOBAL_VARIABLE
set myisam_max_sort_file_size=100;
--error ER_WRONG_VALUE_FOR_VAR
@@ -357,8 +348,6 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_update=1;
set sql_low_priority_updates=1;
-set sql_max_join_size=200;
-select @@sql_max_join_size,@@max_join_size;
set sql_quote_show_create=1;
set sql_safe_updates=1;
set sql_select_limit=1;
@@ -366,7 +355,7 @@ set sql_select_limit=1;
set sql_select_limit=default;
set sql_warnings=1;
set global table_open_cache=100;
-set storage_engine=myisam;
+set default_storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=100;
@@ -832,7 +821,7 @@ set global query_cache_type =@my_query_cache_type;
set global rpl_recovery_rank =@my_rpl_recovery_rank;
set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time;
-set global storage_engine =@my_storage_engine;
+set global default_storage_engine =@my_storage_engine;
set global thread_cache_size =@my_thread_cache_size;
set global max_allowed_packet =@my_max_allowed_packet;
set global join_buffer_size =@my_join_buffer_size;
@@ -1187,7 +1176,7 @@ SET GLOBAL auto_increment_offset=0;
#
--enable_metadata
-select @@storage_engine;
+select @@default_storage_engine;
--disable_metadata
#