summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars/t')
-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.test147
-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.test147
-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.test142
-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.test151
-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.test178
-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.test179
-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.test183
-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.test217
-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.test240
-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.test187
-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.test156
-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.test155
-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.test216
-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
228 files changed, 4902 insertions, 1274 deletions
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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.engine_condition_pushdown = ÕN;
-
+--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 = ÓFF;
-
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.engine_condition_pushdown = ÕN;
-
+--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 = ÓFF;
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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.foreign_key_checks = ÕN;
-
+--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 = ÓFF;
--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/t/innodb_concurrency_tickets_basic.test b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
new file mode 100644
index 00000000000..67b0247d169
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
@@ -0,0 +1,147 @@
+################# mysql-test\t\innodb_concurrency_tickets_basic.test ##########
+# #
+# Variable Name: innodb_concurrency_tickets #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 500 #
+# Range: 1-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description:Test Cases of Dynamic System Variable innodb_concurrency_tickets #
+# that checks the behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_concurrency_tickets TESTS #
+########################################################################
+
+
+################################################################################
+# Saving initial value of innodb_concurrency_tickets in a temporary variable #
+################################################################################
+
+SET @global_start_value = @@global.innodb_concurrency_tickets;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_concurrency_tickets #
+########################################################################
+
+SET @@global.innodb_concurrency_tickets = 0;
+SET @@global.innodb_concurrency_tickets = DEFAULT;
+SELECT @@global.innodb_concurrency_tickets;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+################################################################################
+# Check if innodb_concurrency_tickets can be accessed with and without @@ sign #
+################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_concurrency_tickets = 1;
+SELECT @@innodb_concurrency_tickets;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_concurrency_tickets;
+
+
+SET global innodb_concurrency_tickets = 0;
+SELECT @@global.innodb_concurrency_tickets;
+
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+##########################################################################
+# change the value of innodb_concurrency_tickets to a valid value #
+##########################################################################
+
+
+SET @@global.innodb_concurrency_tickets = 1;
+SELECT @@global.innodb_concurrency_tickets;
+
+SET @@global.innodb_concurrency_tickets = 1000;
+SELECT @@global.innodb_concurrency_tickets;
+
+SET @@global.innodb_concurrency_tickets = 4294967295;
+SELECT @@global.innodb_concurrency_tickets;
+
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_concurrency_tickets to invalid value #
+###########################################################################
+
+SET @@global.innodb_concurrency_tickets = -1;
+SELECT @@global.innodb_concurrency_tickets;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = "T";
+SELECT @@global.innodb_concurrency_tickets;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = "Y";
+SELECT @@global.innodb_concurrency_tickets;
+
+SET @@global.innodb_concurrency_tickets = 1001;
+SELECT @@global.innodb_concurrency_tickets;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_concurrency_tickets =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_concurrency_tickets';
+SELECT @@global.innodb_concurrency_tickets;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_concurrency_tickets';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = OFF;
+SELECT @@global.innodb_concurrency_tickets;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = ON;
+SELECT @@global.innodb_concurrency_tickets;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.innodb_concurrency_tickets = TRUE;
+SELECT @@global.innodb_concurrency_tickets;
+SET @@global.innodb_concurrency_tickets = FALSE;
+SELECT @@global.innodb_concurrency_tickets;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_concurrency_tickets = @global_start_value;
+SELECT @@global.innodb_concurrency_tickets;
+
+###############################################################
+# END OF innodb_concurrency_tickets TESTS #
+###############################################################
+
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/t/innodb_max_purge_lag_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
new file mode 100644
index 00000000000..9e6b8201e3d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
@@ -0,0 +1,147 @@
+################# mysql-test\t\innodb_max_purge_lag_basic.test ################
+# #
+# Variable Name: innodb_max_purge_lag #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 0 #
+# Range: 0-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description:Test Cases of Dynamic System Variable innodb_max_purge_lag #
+# that checks the behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_max_purge_lag TESTS #
+########################################################################
+
+################################################################################
+# Saving initial value of innodb_max_purge_lag in a temporary variable #
+################################################################################
+
+SET @global_start_value = @@global.innodb_max_purge_lag;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_max_purge_lag #
+########################################################################
+
+SET @@global.innodb_max_purge_lag = 0;
+SET @@global.innodb_max_purge_lag = DEFAULT;
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+############################################################################
+# Check if innodb_max_purge_lag can be accessed with and without @@ sign #
+############################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_max_purge_lag = 1;
+SELECT @@innodb_max_purge_lag;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_max_purge_lag;
+
+SET global innodb_max_purge_lag = 0;
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+##########################################################################
+# change the value of innodb_max_purge_lag to a valid value #
+##########################################################################
+
+
+SET @@global.innodb_max_purge_lag = 0;
+SELECT @@global.innodb_max_purge_lag;
+
+SET @@global.innodb_max_purge_lag = 1;
+SELECT @@global.innodb_max_purge_lag;
+SET @@global.innodb_max_purge_lag = 4294967295;
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_max_purge_lag to invalid value #
+###########################################################################
+
+SET @@global.innodb_max_purge_lag = -1;
+SELECT @@global.innodb_max_purge_lag;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = "T";
+SELECT @@global.innodb_max_purge_lag;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = "Y";
+SELECT @@global.innodb_max_purge_lag;
+
+
+SET @@global.innodb_max_purge_lag = 1001;
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_max_purge_lag =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_max_purge_lag';
+SELECT @@global.innodb_max_purge_lag;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_max_purge_lag';
+
+
+
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = OFF;
+SELECT @@global.innodb_max_purge_lag;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = ON;
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+
+SET @@global.innodb_max_purge_lag = TRUE;
+SELECT @@global.innodb_max_purge_lag;
+SET @@global.innodb_max_purge_lag = FALSE;
+SELECT @@global.innodb_max_purge_lag;
+
+##############################
+# Restore initial value #
+##############################
+
+
+SET @@global.innodb_max_purge_lag = @global_start_value;
+SELECT @@global.innodb_max_purge_lag;
+
+###############################################################
+# END OF innodb_max_purge_lag TESTS #
+###############################################################
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 = ÕN;
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 = ÓFF;
@@ -146,8 +144,6 @@ SET @@global.innodb_support_xa = ÕN;
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 = ÓFF;
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
new file mode 100644
index 00000000000..35460fe47f2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
@@ -0,0 +1,142 @@
+################# mysql-test\t\innodb_sync_spin_loops_basic.test ##############
+# #
+# Variable Name: innodb_sync_spin_loops #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 20 #
+# Range: 0-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description:Test Cases of Dynamic System Variable innodb_sync_spin_loops #
+# that checks the behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_sync_spin_loops TESTS #
+########################################################################
+
+
+############################################################################
+# Saving initial value of innodb_sync_spin_loops in a temporary variable #
+############################################################################
+
+SET @global_start_value = @@global.innodb_sync_spin_loops;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_sync_spin_loops #
+########################################################################
+
+SET @@global.innodb_sync_spin_loops = 0;
+SET @@global.innodb_sync_spin_loops = DEFAULT;
+SELECT @@global.innodb_sync_spin_loops;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+##############################################################################
+# Check if innodb_sync_spin_loops can be accessed with and without @@ sign #
+##############################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_sync_spin_loops = 1;
+SELECT @@innodb_sync_spin_loops;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_sync_spin_loops;
+
+SET global innodb_sync_spin_loops = 0;
+SELECT @@global.innodb_sync_spin_loops;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+##########################################################################
+# change the value of innodb_sync_spin_loops to a valid value #
+##########################################################################
+
+SET @@global.innodb_sync_spin_loops = 0;
+SELECT @@global.innodb_sync_spin_loops;
+
+SET @@global.innodb_sync_spin_loops = 1;
+SELECT @@global.innodb_sync_spin_loops;
+SET @@global.innodb_sync_spin_loops = 1000;
+SELECT @@global.innodb_sync_spin_loops;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_sync_spin_loops to invalid value #
+###########################################################################
+
+SET @@global.innodb_sync_spin_loops = -1;
+SELECT @@global.innodb_sync_spin_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = "T";
+SELECT @@global.innodb_sync_spin_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = "Y";
+SELECT @@global.innodb_sync_spin_loops;
+
+SET @@global.innodb_sync_spin_loops = 1001;
+SELECT @@global.innodb_sync_spin_loops;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_sync_spin_loops =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_sync_spin_loops';
+SELECT @@global.innodb_sync_spin_loops;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_sync_spin_loops';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = OFF;
+SELECT @@global.innodb_sync_spin_loops;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = ON;
+SELECT @@global.innodb_sync_spin_loops;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+
+SET @@global.innodb_sync_spin_loops = TRUE;
+SELECT @@global.innodb_sync_spin_loops;
+SET @@global.innodb_sync_spin_loops = FALSE;
+SELECT @@global.innodb_sync_spin_loops;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_sync_spin_loops = @global_start_value;
+SELECT @@global.innodb_sync_spin_loops;
+
+###############################################################
+# END OF innodb_sync_spin_loops TESTS #
+###############################################################
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 = ÕN;
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 = ÓFF;
@@ -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 = ÓFF;
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/t/key_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
new file mode 100644
index 00000000000..354c65490a4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
@@ -0,0 +1,151 @@
+############## mysql-test\t\key_buffer_size_basic.test ########################
+# #
+# Variable Name: key_buffer_size #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: 131072 #
+# Range:8-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable key_buffer_size #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# Modified: Horst Hunger 2008-11-27 #
+# Due to OS depending values the check has been changed #
+# from concrete values to ranges. #
+# #
+# Reference: #
+# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF key_buffer_size TESTS #
+########################################################################
+
+########################################################################
+# Saving initial value of key_buffer_size in a temporary variable #
+########################################################################
+
+SET @start_value = @@global.key_buffer_size;
+
+--echo '#--------------------FN_DYNVARS_055_01------------------------#'
+########################################################################
+# Display the DEFAULT value of key_buffer_size #
+########################################################################
+
+SET @@global.key_buffer_size = DEFAULT;
+SELECT @@global.key_buffer_size;
+
+--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.key_buffer_size = @start_value;
+SELECT @@global.key_buffer_size = @start_value;
+
+--echo '#--------------------FN_DYNVARS_055_03------------------------#'
+########################################################################
+# Change the value of key_buffer_size to a valid value #
+########################################################################
+
+SET @@global.key_buffer_size = 65535;
+SELECT @@global.key_buffer_size;
+
+--echo '#--------------------FN_DYNVARS_055_04-------------------------#'
+###########################################################################
+# Change the value of key_buffer_size to invalid value #
+###########################################################################
+
+--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;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_buffer_size = ON;
+SELECT @@global.key_buffer_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_buffer_size = 'test';
+SELECT @@global.key_buffer_size;
+
+--echo '#-------------------FN_DYNVARS_055_05----------------------------#'
+###########################################################################
+# Test if accessing session key_buffer_size gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.key_buffer_size = 0;
+
+--echo '#----------------------FN_DYNVARS_055_06------------------------#'
+##############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches values in variable #
+##############################################################################
+
+SELECT @@global.key_buffer_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='key_buffer_size';
+
+SELECT @@key_buffer_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='key_buffer_size';
+
+--echo '#---------------------FN_DYNVARS_055_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+SET @@global.key_buffer_size = TRUE;
+--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+SET @@global.key_buffer_size = FALSE;
+
+--echo '#---------------------FN_DYNVARS_055_08----------------------#'
+#####################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE #
+# points to same session variable #
+#####################################################################
+
+SELECT @@key_buffer_size = @@global.key_buffer_size;
+
+--echo '#---------------------FN_DYNVARS_055_09----------------------#'
+##########################################################################
+# Check if key_buffer_size can be accessed with and without @@ sign #
+##########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET key_buffer_size = 8 ;
+--Error ER_PARSE_ERROR
+SET local.key_buffer_size = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT local.key_buffer_size;
+--Error ER_PARSE_ERROR
+SET global.key_buffer_size = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT global.key_buffer_size;
+--Error ER_BAD_FIELD_ERROR
+SELECT key_buffer_size = @@session.key_buffer_size;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.key_buffer_size = @start_value;
+
+#######################################################################
+# 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/t/key_cache_block_size_basic.test b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
new file mode 100644
index 00000000000..99a3c5dc327
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
@@ -0,0 +1,178 @@
+############## mysql-test\t\key_cache_block_size_basic.test ###############
+# #
+# Variable Name: key_cache_block_size #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: numeric 1024 #
+# Default Value: #
+# Range: 512-16384 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable key_cache_block_size #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+#####################################################################
+# START OF key_cache_block_size TESTS #
+#####################################################################
+
+
+##########################################################################
+# Saving initial value of key_cache_block_size in a temporary variable #
+##########################################################################
+
+SET @start_value = @@global.key_cache_block_size;
+SELECT @start_value;
+
+
+--echo '#--------------------FN_DYNVARS_057_01------------------------#'
+################################################################################
+# Display the DEFAULT value of key_cache_block_size #
+################################################################################
+
+SET @@global.key_cache_block_size = DEFAULT;
+SELECT @@global.key_cache_block_size;
+
+
+--echo '#---------------------FN_DYNVARS_057_02-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.key_cache_block_size = @start_value;
+SELECT @@global.key_cache_block_size = 1024;
+
+
+--echo '#--------------------FN_DYNVARS_057_03------------------------#'
+###############################################################################
+# Change the value of key_cache_block_size to a valid value #
+###############################################################################
+
+SET @@global.key_cache_block_size = 1024;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = 16384;
+SELECT @@global.key_cache_block_size;
+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 '#--------------------FN_DYNVARS_057_04-------------------------#'
+###########################################################################
+# Change the value of key_cache_block_size to invalid value #
+###########################################################################
+
+SET @@global.key_cache_block_size = -1;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = 42949672951;
+SELECT @@global.key_cache_block_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_block_size = 10000.01;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = -1024;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = 256;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = 511;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = 16385;
+SELECT @@global.key_cache_block_size;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_block_size = ON;
+SELECT @@global.key_cache_block_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_block_size = 'test';
+SELECT @@global.key_cache_block_size;
+
+
+--echo '#-------------------FN_DYNVARS_057_05----------------------------#'
+###########################################################################
+# Test if accessing session key_cache_block_size gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.key_cache_block_size = 0;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.key_cache_block_size;
+
+
+--echo '#----------------------FN_DYNVARS_057_06------------------------#'
+##############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches values in variable #
+##############################################################################
+
+SELECT @@global.key_cache_block_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='key_cache_block_size';
+
+SELECT @@key_cache_block_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='key_cache_block_size';
+
+
+--echo '#---------------------FN_DYNVARS_057_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.key_cache_block_size = TRUE;
+SELECT @@global.key_cache_block_size;
+SET @@global.key_cache_block_size = FALSE;
+SELECT @@global.key_cache_block_size;
+
+
+--echo '#---------------------FN_DYNVARS_057_08----------------------#'
+########################################################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
+########################################################################################################
+
+SET @@global.key_cache_block_size = 1024;
+SELECT @@key_cache_block_size = @@global.key_cache_block_size;
+
+
+--echo '#---------------------FN_DYNVARS_057_09----------------------#'
+###############################################################################
+# Check if key_cache_block_size can be accessed with and without @@ sign #
+###############################################################################;
+
+--Error ER_GLOBAL_VARIABLE
+SET key_cache_block_size = 8000;
+SELECT @@key_cache_block_size;
+--Error ER_PARSE_ERROR
+SET local.key_cache_block_size = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT local.key_cache_block_size;
+--Error ER_PARSE_ERROR
+SET global.key_cache_block_size = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT global.key_cache_block_size;
+--Error ER_BAD_FIELD_ERROR
+SELECT key_cache_block_size = @@session.key_cache_block_size;
+
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.key_cache_block_size = @start_value;
+SELECT @@global.key_cache_block_size;
+
+
+#####################################################################
+# END OF key_cache_block_size TESTS #
+#####################################################################
+
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/t/key_cache_division_limit_basic.test b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
new file mode 100644
index 00000000000..dd41e4d37a0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
@@ -0,0 +1,179 @@
+############## mysql-test\t\key_cache_division_limit_basic.test ###############
+# #
+# Variable Name: key_cache_division_limit #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: 100 #
+# Range: 1-100 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable key_cache_division_limit #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+#####################################################################
+# START OF key_cache_division_limit TESTS #
+#####################################################################
+
+
+##############################################################################
+# Saving initial value of key_cache_division_limit in a temporary variable #
+##############################################################################
+
+SET @start_value = @@global.key_cache_division_limit;
+SELECT @start_value;
+
+
+--echo '#--------------------FN_DYNVARS_058_01------------------------#'
+################################################################################
+# Display the DEFAULT value of key_cache_division_limit #
+################################################################################
+
+SET @@global.key_cache_division_limit = DEFAULT;
+SELECT @@global.key_cache_division_limit;
+
+
+--echo '#---------------------FN_DYNVARS_058_02-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.key_cache_division_limit = @start_value;
+SELECT @@global.key_cache_division_limit = 100;
+
+
+--echo '#--------------------FN_DYNVARS_058_03------------------------#'
+###############################################################################
+# Change the value of key_cache_division_limit to a valid value #
+###############################################################################
+
+SET @@global.key_cache_division_limit = 1;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 50;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 99;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 2;
+SELECT @@global.key_cache_division_limit;
+
+
+--echo '#--------------------FN_DYNVARS_058_04-------------------------#'
+###########################################################################
+# Change the value of key_cache_division_limit to invalid value #
+###########################################################################
+
+SET @@global.key_cache_division_limit = -1;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 101;
+SELECT @@global.key_cache_division_limit;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_division_limit = 10000.01;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = -1024;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 0;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 200;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = 65535;
+SELECT @@global.key_cache_division_limit;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_division_limit = ON;
+SELECT @@global.key_cache_division_limit;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.key_cache_division_limit = 'test';
+SELECT @@global.key_cache_division_limit;
+
+
+--echo '#-------------------FN_DYNVARS_058_05----------------------------#'
+###########################################################################
+# Test if accessing session key_cache_division_limit gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.key_cache_division_limit = 0;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.key_cache_division_limit;
+
+
+--echo '#----------------------FN_DYNVARS_058_06------------------------#'
+##############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches values in variable #
+##############################################################################
+
+SELECT @@global.key_cache_division_limit = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='key_cache_division_limit';
+
+SELECT @@key_cache_division_limit = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='key_cache_division_limit';
+
+
+--echo '#---------------------FN_DYNVARS_058_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.key_cache_division_limit = TRUE;
+SELECT @@global.key_cache_division_limit;
+SET @@global.key_cache_division_limit = FALSE;
+SELECT @@global.key_cache_division_limit;
+
+
+--echo '#---------------------FN_DYNVARS_058_08----------------------#'
+########################################################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
+########################################################################################################
+
+SET @@global.key_cache_division_limit = 90;
+SELECT @@key_cache_division_limit = @@global.key_cache_division_limit;
+
+
+--echo '#---------------------FN_DYNVARS_058_09----------------------#'
+###############################################################################
+# Check if key_cache_division_limit can be accessed with and without @@ sign #
+###############################################################################;
+
+--Error ER_GLOBAL_VARIABLE
+SET key_cache_division_limit = 80;
+SELECT @@key_cache_division_limit;
+--Error ER_PARSE_ERROR
+SET local.key_cache_division_limit = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT local.key_cache_division_limit;
+--Error ER_PARSE_ERROR
+SET global.key_cache_division_limit = 10;
+--Error ER_UNKNOWN_TABLE
+SELECT global.key_cache_division_limit;
+--Error ER_BAD_FIELD_ERROR
+SELECT key_cache_division_limit = @@session.key_cache_division_limit;
+
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.key_cache_division_limit = @start_value;
+SELECT @@global.key_cache_division_limit;
+
+
+#####################################################################
+# END OF key_cache_division_limit TESTS #
+#####################################################################
+
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/t/max_binlog_cache_size_basic.test b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic.test
new file mode 100644
index 00000000000..158c21a9489
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_basic.test
@@ -0,0 +1,183 @@
+############## mysql-test\t\max_binlog_cache_size_basic.test ###############
+# #
+# Variable Name: max_binlog_cache_size #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value:4294967295 #
+# Range: 4096-4294967295 #
+# #
+# #
+# #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable max_binlog_cache_size #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF max_binlog_cache_size TESTS #
+########################################################################
+
+
+########################################################################
+# Saving initial value of max_binlog_cache_size in a temporary variable#
+########################################################################
+
+SET @start_value = @@global.max_binlog_cache_size;
+SELECT @start_value;
+
+
+--echo '#--------------------FN_DYNVARS_072_01------------------------#'
+########################################################################
+# Display the DEFAULT value of max_binlog_cache_size #
+########################################################################
+
+SET @@global.max_binlog_cache_size = 5000;
+SET @@global.max_binlog_cache_size = DEFAULT;
+SELECT @@global.max_binlog_cache_size;
+
+
+--echo '#---------------------FN_DYNVARS_072_02-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.max_binlog_cache_size = @start_value;
+SELECT @@global.max_binlog_cache_size = 4294967295;
+
+--echo '#--------------------FN_DYNVARS_072_03------------------------#'
+########################################################################
+# Change the value of max_binlog_cache_size to a valid value #
+########################################################################
+
+SET @@global.max_binlog_cache_size = 4096;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 4294967295;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 4294967294;
+SELECT @@global.max_binlog_cache_size;
+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 '#--------------------FN_DYNVARS_072_04-------------------------#'
+###########################################################################
+# Change the value of max_binlog_cache_size to invalid value #
+###########################################################################
+
+SET @@global.max_binlog_cache_size = -1;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 100000000000;
+SELECT @@global.max_binlog_cache_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_binlog_cache_size = 10000.01;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = -1024;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 1024;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 4294967296;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = 4095;
+SELECT @@global.max_binlog_cache_size;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_binlog_cache_size = ON;
+SELECT @@global.max_binlog_cache_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.max_binlog_cache_size = 'test';
+SELECT @@global.max_binlog_cache_size;
+
+
+--echo '#-------------------FN_DYNVARS_072_05----------------------------#'
+###########################################################################
+# Test if accessing session max_binlog_cache_size gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.max_binlog_cache_size = 4096;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.max_binlog_cache_size;
+
+
+--echo '#----------------------FN_DYNVARS_072_06------------------------#'
+##############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches values in variable #
+##############################################################################
+
+SELECT @@global.max_binlog_cache_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_binlog_cache_size';
+
+SELECT @@max_binlog_cache_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='max_binlog_cache_size';
+
+
+--echo '#---------------------FN_DYNVARS_072_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.max_binlog_cache_size = TRUE;
+SELECT @@global.max_binlog_cache_size;
+SET @@global.max_binlog_cache_size = FALSE;
+SELECT @@global.max_binlog_cache_size;
+
+
+--echo '#---------------------FN_DYNVARS_072_08----------------------#'
+########################################################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
+########################################################################################################
+
+SET @@global.max_binlog_cache_size = 5000;
+SELECT @@max_binlog_cache_size = @@global.max_binlog_cache_size;
+
+
+--echo '#---------------------FN_DYNVARS_072_09----------------------#'
+################################################################################
+# Check if max_binlog_cache_size can be accessed with and without @@ sign #
+################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET max_binlog_cache_size = 6000;
+SELECT @@max_binlog_cache_size;
+--Error ER_PARSE_ERROR
+SET local.max_binlog_cache_size = 7000;
+--Error ER_UNKNOWN_TABLE
+SELECT local.max_binlog_cache_size;
+--Error ER_PARSE_ERROR
+SET global.max_binlog_cache_size = 8000;
+--Error ER_UNKNOWN_TABLE
+SELECT global.max_binlog_cache_size;
+--Error ER_BAD_FIELD_ERROR
+SELECT max_binlog_cache_size = @@session.max_binlog_cache_size;
+
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.max_binlog_cache_size = @start_value;
+SELECT @@global.max_binlog_cache_size;
+
+
+########################################################################
+# END OF max_binlog_cache_size TESTS #
+########################################################################
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/t/max_heap_table_size_basic.test b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
new file mode 100644
index 00000000000..4b9c7cf3b8e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_heap_table_size_basic.test
@@ -0,0 +1,217 @@
+############## mysql-test\t\max_heap_table_size_basic.test ###############
+# #
+# Variable Name: max_heap_table_size #
+# Scope: GLOBAL | SESSION #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: 16777216 #
+# Range: 16384-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman #
+# #
+# Description: Test Cases of Dynamic System Variable max_heap_table_size #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+###############################################################
+# START OF max_heap_table_size TESTS #
+###############################################################
+
+
+#############################################################
+# Save initial value #
+#############################################################
+
+SET @start_global_value = @@global.max_heap_table_size;
+SELECT @start_global_value;
+SET @start_session_value = @@session.max_heap_table_size;
+SELECT @start_session_value;
+
+
+--echo '#--------------------FN_DYNVARS_077_01-------------------------#'
+###############################################################
+# Display the DEFAULT value of max_heap_table_size #
+###############################################################
+
+SET @@global.max_heap_table_size = 1677721610;
+SET @@global.max_heap_table_size = DEFAULT;
+SELECT @@global.max_heap_table_size;
+
+SET @@session.max_heap_table_size = 1677721610;
+SET @@session.max_heap_table_size = DEFAULT;
+SELECT @@session.max_heap_table_size;
+
+
+--echo '#--------------------FN_DYNVARS_077_02-------------------------#'
+##################################################################
+# Check the DEFAULT value of max_heap_table_size #
+##################################################################
+
+SET @@global.max_heap_table_size = DEFAULT;
+SELECT @@global.max_heap_table_size = 16777216;
+
+SET @@session.max_heap_table_size = DEFAULT;
+SELECT @@session.max_heap_table_size = 16777216;
+
+
+--echo '#--------------------FN_DYNVARS_077_03-------------------------#'
+############################################################################
+# Change the value of max_heap_table_size to a valid value for GLOBAL Scope #
+############################################################################
+
+SET @@global.max_heap_table_size = 16384;
+SELECT @@global.max_heap_table_size;
+SET @@global.max_heap_table_size = 16385;
+SELECT @@global.max_heap_table_size;
+SET @@global.max_heap_table_size = 65535;
+SELECT @@global.max_heap_table_size;
+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 '#--------------------FN_DYNVARS_077_04-------------------------#'
+#############################################################################
+# Change the value of max_heap_table_size to a valid value for SESSION Scope #
+#############################################################################
+
+SET @@session.max_heap_table_size = 16384;
+SELECT @@session.max_heap_table_size;
+SET @@session.max_heap_table_size = 16385;
+SELECT @@session.max_heap_table_size;
+SET @@session.max_heap_table_size = 65535;
+SELECT @@session.max_heap_table_size;
+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 '#------------------FN_DYNVARS_077_05-----------------------#'
+##############################################################
+# Change the value of max_heap_table_size to an invalid value #
+##############################################################
+
+SET @@global.max_heap_table_size = -1;
+SELECT @@global.max_heap_table_size;
+SET @@global.max_heap_table_size = -1024;
+SELECT @@global.max_heap_table_size;
+SET @@global.max_heap_table_size = 1024;
+SELECT @@global.max_heap_table_size;
+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_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;
+SELECT @@global.max_heap_table_size;
+
+SET @@session.max_heap_table_size = -1;
+SELECT @@session.max_heap_table_size;
+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_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;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.max_heap_table_size = test;
+SELECT @@session.max_heap_table_size;
+
+
+--echo '#------------------FN_DYNVARS_077_06-----------------------#'
+####################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+####################################################################
+
+
+SELECT @@global.max_heap_table_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_heap_table_size';
+
+--echo '#------------------FN_DYNVARS_077_07-----------------------#'
+####################################################################
+# Check if the value in SESSION Table matches value in variable #
+####################################################################
+
+SELECT @@session.max_heap_table_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='max_heap_table_size';
+
+
+--echo '#------------------FN_DYNVARS_077_08-----------------------#'
+####################################################################
+# Check if TRUE and FALSE values can be used on variable #
+####################################################################
+
+SET @@global.max_heap_table_size = TRUE;
+SELECT @@global.max_heap_table_size;
+SET @@global.max_heap_table_size = FALSE;
+SELECT @@global.max_heap_table_size;
+
+
+--echo '#---------------------FN_DYNVARS_077_09----------------------#'
+#################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+#################################################################################
+
+SET @@global.max_heap_table_size = 163845;
+SELECT @@max_heap_table_size = @@global.max_heap_table_size;
+
+
+--echo '#---------------------FN_DYNVARS_077_10----------------------#'
+########################################################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
+########################################################################################################
+
+SET @@max_heap_table_size = 16777216;
+SELECT @@max_heap_table_size = @@local.max_heap_table_size;
+SELECT @@local.max_heap_table_size = @@session.max_heap_table_size;
+
+
+--echo '#---------------------FN_DYNVARS_077_11----------------------#'
+#############################################################################
+# Check if max_heap_table_size can be accessed with and without @@ sign #
+#############################################################################
+
+SET max_heap_table_size = 316777216;
+SELECT @@max_heap_table_size;
+--Error ER_UNKNOWN_TABLE
+SELECT local.max_heap_table_size;
+--Error ER_UNKNOWN_TABLE
+SELECT session.max_heap_table_size;
+--Error ER_BAD_FIELD_ERROR
+SELECT max_heap_table_size = @@session.max_heap_table_size;
+
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.max_heap_table_size = @start_global_value;
+SELECT @@global.max_heap_table_size;
+SET @@session.max_heap_table_size = @start_session_value;
+SELECT @@session.max_heap_table_size;
+
+
+#######################################################
+# END OF max_heap_table_size TESTS #
+#######################################################
+
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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.query_cache_wlock_invalidate = ÕN;
-
+--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 = ÓFF;
@@ -138,12 +134,8 @@ SET @@global.query_cache_wlock_invalidate = "Y";
SET @@global.query_cache_wlock_invalidate = TRÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.query_cache_wlock_invalidate = ÕN;
-
+--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 = ÓFF;
diff --git a/mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test
new file mode 100644
index 00000000000..3914bff4ca9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/query_prealloc_size_basic.test
@@ -0,0 +1,240 @@
+################# mysql-test\t\query_prealloc_size_basic.test ##################
+# #
+# Variable Name: query_prealloc_size #
+# Scope: GLOBAL | SESSION #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: 8192 #
+# Range: 8192-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+# Description: Test Cases of Dynamic System Variable query_prealloc_size #
+# that checks the behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: #
+# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
+# #
+################################################################################
+
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF query_prealloc_size TESTS #
+########################################################################
+
+
+#############################################################
+# Save initial value #
+#############################################################
+
+SET @start_global_value = @@global.query_prealloc_size ;
+SELECT @start_global_value;
+SET @start_session_value = @@session.query_prealloc_size ;
+SELECT @start_session_value;
+
+
+--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
+########################################################################
+# Display the DEFAULT value of myisam_block_size #
+########################################################################
+
+SET @@global.query_prealloc_size = 100;
+SET @@global.query_prealloc_size = DEFAULT;
+SELECT @@global.query_prealloc_size ;
+
+SET @@session.query_prealloc_size = 200;
+SET @@session.query_prealloc_size = DEFAULT;
+SELECT @@session.query_prealloc_size ;
+
+
+--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
+########################################################################
+# Check the DEFAULT value of query_prealloc_size #
+########################################################################
+
+SET @@global.query_prealloc_size = DEFAULT;
+SELECT @@global.query_prealloc_size = 8192;
+
+SET @@session.query_prealloc_size = DEFAULT;
+SELECT @@session.query_prealloc_size = 8192;
+
+
+--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
+################################################################################
+# Change the value of query_prealloc_size to a valid value for GLOBAL Scope #
+################################################################################
+
+SET @@global.query_prealloc_size = 8192;
+SELECT @@global.query_prealloc_size ;
+
+#SET @@global.query_prealloc_size = 4294967295;
+#SELECT @@global.query_prealloc_size ;
+
+SET @@global.query_prealloc_size = 655354;
+SELECT @@global.query_prealloc_size ;
+
+
+--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
+##################################################################################
+# Change the value of query_prealloc_size to a valid value for SESSION Scope #
+##################################################################################
+
+SET @@session.query_prealloc_size = 8192;
+SELECT @@session.query_prealloc_size ;
+
+#SET @@session.query_prealloc_size = 4294967295;
+#SELECT @@session.query_prealloc_size ;
+
+SET @@session.query_prealloc_size = 655345;
+SELECT @@session.query_prealloc_size ;
+
+
+
+
+--echo '#------------------FN_DYNVARS_005_05-----------------------#'
+####################################################################
+# Change the value of query_prealloc_size to an invalid value #
+####################################################################
+
+SET @@global.query_prealloc_size = 0;
+SELECT @@global.query_prealloc_size ;
+
+#SET @@global.query_prealloc_size = -1024;
+#SELECT @@global.query_prealloc_size ;
+
+#SET @@global.query_prealloc_size = 429496729533;
+#SELECT @@global.query_prealloc_size ;
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = 65530.34;
+SELECT @@global.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = test;
+SELECT @@global.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = "test";
+SELECT @@global.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = 'test';
+SELECT @@global.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.query_prealloc_size = ON;
+SELECT @@global.query_prealloc_size ;
+
+
+SET @@session.query_prealloc_size = 0;
+SELECT @@session.query_prealloc_size ;
+
+#SET @@session.query_prealloc_size = -2;
+#SELECT @@session.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.query_prealloc_size = 65530.34;
+SELECT @@session.query_prealloc_size ;
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.query_prealloc_size = test;
+SELECT @@session.query_prealloc_size ;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.query_prealloc_size = "test";
+SELECT @@session.query_prealloc_size ;
+
+
+--echo '#------------------FN_DYNVARS_005_06-----------------------#'
+####################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+####################################################################
+
+
+SELECT @@global.query_prealloc_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='query_prealloc_size ';
+
+--echo '#------------------FN_DYNVARS_005_07-----------------------#'
+####################################################################
+# Check if the value in SESSION Table matches value in variable #
+####################################################################
+
+SELECT @@session.query_prealloc_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='query_prealloc_size ';
+
+
+--echo '#------------------FN_DYNVARS_005_08-----------------------#'
+####################################################################
+# Check if TRUE and FALSE values can be used on variable #
+####################################################################
+
+SET @@global.query_prealloc_size = TRUE;
+SELECT @@global.query_prealloc_size ;
+SET @@global.query_prealloc_size = FALSE;
+SELECT @@global.query_prealloc_size ;
+
+
+
+--echo '#---------------------FN_DYNVARS_001_09----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+
+SET @@global.query_prealloc_size = 10;
+SELECT @@query_prealloc_size = @@global.query_prealloc_size ;
+
+
+--echo '#---------------------FN_DYNVARS_001_10----------------------#'
+##############################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points to #
+# to the same session variable #
+##############################################################################
+
+SET @@query_prealloc_size = 100;
+SELECT @@query_prealloc_size = @@local.query_prealloc_size ;
+SELECT @@local.query_prealloc_size = @@session.query_prealloc_size ;
+
+
+--echo '#---------------------FN_DYNVARS_001_11----------------------#'
+################################################################################
+# Check if query_prealloc_size can be accessed with and without @@ sign #
+################################################################################
+
+SET query_prealloc_size = 1;
+SELECT @@query_prealloc_size ;
+--Error ER_UNKNOWN_TABLE
+
+SELECT local.query_prealloc_size ;
+
+--Error ER_UNKNOWN_TABLE
+SELECT session.query_prealloc_size ;
+
+--Error ER_BAD_FIELD_ERROR
+SELECT query_prealloc_size = @@session.query_prealloc_size ;
+
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.query_prealloc_size = @start_global_value;
+SELECT @@global.query_prealloc_size ;
+SET @@session.query_prealloc_size = @start_session_value;
+SELECT @@session.query_prealloc_size ;
+
+
+#############################################################
+# END OF query_prealloc_size TESTS #
+#############################################################
+
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/t/server_id_basic.test b/mysql-test/suite/sys_vars/t/server_id_basic.test
new file mode 100644
index 00000000000..9d41823053a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/server_id_basic.test
@@ -0,0 +1,187 @@
+############## mysql-test\t\server_id_basic.test ################
+# #
+# Variable Name: server_id #
+# Scope: GLOBAL & SESSION #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 1 #
+# Range: 1 - 65536 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan Maredia #
+# #
+# Description: Test Cases of Dynamic System Variable server_id #
+# that checks the behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+################################################################################
+
+--source include/load_sysvars.inc
+
+###################################################################
+# START OF server_id TESTS #
+###################################################################
+
+
+#############################################################
+# Save initial value #
+#############################################################
+
+let $save_general_log= `SELECT @@global.general_log`;
+SET @@global.general_log= 0;
+SET @start_global_value = @@global.server_id;
+SELECT @start_global_value;
+
+--echo '#--------------------FN_DYNVARS_144_01-------------------------#'
+###################################################################
+# Display the DEFAULT value of server_id #
+###################################################################
+
+SET @@global.server_id = 500000;
+SET @@global.server_id = DEFAULT;
+SELECT @@global.server_id;
+
+--echo '#--------------------FN_DYNVARS_144_02-------------------------#'
+###################################################################
+# Check the DEFAULT value of server_id #
+###################################################################
+
+SET @@global.server_id = DEFAULT;
+SELECT @@global.server_id = 0;
+
+--echo '#--------------------FN_DYNVARS_144_03-------------------------#'
+##################################################################################
+# Change the value of server_id to a valid value for GLOBAL Scope #
+##################################################################################
+
+SET @@global.server_id = 0;
+SELECT @@global.server_id;
+SET @@global.server_id = 1;
+SELECT @@global.server_id;
+SET @@global.server_id = 15;
+SELECT @@global.server_id;
+SET @@global.server_id = 1024;
+SELECT @@global.server_id;
+SET @@global.server_id = 123456789;
+SELECT @@global.server_id;
+SET @@global.server_id = 2147483648;
+SELECT @@global.server_id;
+SET @@global.server_id = 2147483648*2-1;
+SELECT @@global.server_id;
+
+
+--echo '#--------------------FN_DYNVARS_144_04-------------------------#'
+#################################################################################
+# Check if variable can be access with session scope #
+#################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@server_id = 2;
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.server_id = 3;
+
+--Error ER_GLOBAL_VARIABLE
+SET @@local.server_id = 4;
+
+
+
+--echo '#------------------FN_DYNVARS_144_05-----------------------#'
+####################################################################
+# Change the value of server_id to an invalid value #
+####################################################################
+
+SET @@global.server_id = -1;
+SELECT @@global.server_id;
+
+SET @@global.server_id = -2147483648;
+SELECT @@global.server_id;
+
+SET @@global.server_id = 2147483649*2;
+SELECT @@global.server_id;
+
+--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
+SET @@global.server_id = 7483649.56;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.server_id = 1G;
+
+--echo '#------------------FN_DYNVARS_144_06-----------------------#'
+####################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+####################################################################
+
+SET @@global.server_id = 3000;
+SELECT @@global.server_id = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='server_id';
+
+
+--echo '#------------------FN_DYNVARS_144_07-----------------------#'
+###########################################################################
+# Check if the value is present in INFORMATION_SCHEMA.SESSION_VARIABLES #
+###########################################################################
+
+SELECT count(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='server_id';
+
+
+--echo '#------------------FN_DYNVARS_144_08-----------------------#'
+####################################################################
+# Check if TRUE and FALSE values can be used on variable #
+####################################################################
+
+SET @@global.server_id = TRUE;
+SELECT @@global.server_id;
+SET @@global.server_id = FALSE;
+SELECT @@global.server_id;
+
+
+--echo '#---------------------FN_DYNVARS_001_09----------------------#'
+#################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+#################################################################################
+
+
+SET @@global.server_id = 512;
+SELECT @@server_id = @@global.server_id;
+
+
+--echo '#---------------------FN_DYNVARS_001_10----------------------#'
+##################################################################################
+# Check if server_id can be accessed without @@ sign and scope #
+##################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET server_id = 2048;
+--Error ER_BAD_FIELD_ERROR
+SELECT server_id;
+
+SELECT @@server_id;
+
+#verifying another another syntax for setting value
+SET global server_id = 99;
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.server_id = @start_global_value;
+SELECT @@global.server_id;
+
+eval SET @@global.general_log= $save_general_log;
+########################################################
+# END OF server_id TESTS #
+########################################################
+
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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_selects = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_big_tables = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_buffer_result = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_bin = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_log_off = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_low_priority_updates = ÕN;
-
+--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 = ÓFF;
@@ -139,12 +131,8 @@ SET @@global.sql_low_priority_updates = "Y";
SET @@global.sql_low_priority_updates = TRÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_low_priority_updates = ÕN;
-
+--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 = ÓFF;
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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_notes = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_quote_show_create = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_safe_updates = ÕN;
-
+--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 = ÓFF;
--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ÜE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.sql_warnings = ÕN;
-
+--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 = ÓFF;
--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/t/sync_binlog_basic.test b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
new file mode 100644
index 00000000000..71a35a30c58
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_binlog_basic.test
@@ -0,0 +1,156 @@
+#################### mysql-test\t\sync_binlog_basic.test ######################
+# #
+# Variable Name: sync_binlog #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: 0 #
+# Range: 0 - 4294967295 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Salman Rawala #
+# #
+# Description: Test Cases of Dynamic System Variable sync_binlog #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/not_embedded.inc
+--source include/load_sysvars.inc
+
+##################################################################
+# START OF sync_binlog TESTS #
+##################################################################
+
+
+##################################################################
+# Saving initial value of sync_binlog in a temporary variable #
+##################################################################
+
+SET @start_value = @@global.sync_binlog;
+SELECT @start_value;
+
+
+--echo '#--------------------FN_DYNVARS_168_01------------------------#'
+##################################################################
+# Display the DEFAULT value of sync_binlog #
+##################################################################
+
+SET @@global.sync_binlog = 99;
+SET @@global.sync_binlog = DEFAULT;
+SELECT @@global.sync_binlog;
+
+
+--echo '#---------------------FN_DYNVARS_168_02-------------------------#'
+###############################################
+# Verify default value of variable #
+###############################################
+
+SET @@global.sync_binlog = @start_value;
+SELECT @@global.sync_binlog = 0;
+
+
+--echo '#--------------------FN_DYNVARS_168_03------------------------#'
+###################################################################
+# Change the value of sync_binlog to a valid value #
+###################################################################
+
+SET @@global.sync_binlog = 0;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 1;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 4294967295;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 4294967294;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 65536;
+SELECT @@global.sync_binlog;
+
+
+--echo '#--------------------FN_DYNVARS_168_04-------------------------#'
+######################################################################
+# Change the value of sync_binlog to invalid value #
+######################################################################
+
+SET @@global.sync_binlog = -1;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 4294967296;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 10240022115;
+SELECT @@global.sync_binlog;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.sync_binlog = 10000.01;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = -1024;
+SELECT @@global.sync_binlog;
+SET @@global.sync_binlog = 42949672950;
+SELECT @@global.sync_binlog;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.sync_binlog = ON;
+SELECT @@global.sync_binlog;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.sync_binlog = 'test';
+SELECT @@global.sync_binlog;
+
+
+--echo '#-------------------FN_DYNVARS_168_05----------------------------#'
+###########################################################################
+# Test if accessing session sync_binlog gives error #
+###########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.sync_binlog = 0;
+SELECT @@sync_binlog;
+
+
+--echo '#----------------------FN_DYNVARS_168_06------------------------#'
+##############################################################################
+# Check if the value in GLOBAL & SESSION Tables matches values in variable #
+##############################################################################
+
+SELECT @@global.sync_binlog = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='sync_binlog';
+
+
+
+--echo '#---------------------FN_DYNVARS_168_07----------------------#'
+##########################################################################
+# Check if sync_binlog can be accessed with and without @@ sign #
+##########################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET sync_binlog = 1;
+SELECT @@sync_binlog;
+--Error ER_PARSE_ERROR
+SET local.sync_binlog = 1;
+--Error ER_UNKNOWN_TABLE
+SELECT local.sync_binlog;
+--Error ER_PARSE_ERROR
+SET global.sync_binlog = 1;
+--Error ER_UNKNOWN_TABLE
+SELECT global.sync_binlog;
+--Error ER_BAD_FIELD_ERROR
+SELECT sync_binlog = @@session.sync_binlog;
+
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.sync_binlog = @start_value;
+SELECT @@global.sync_binlog;
+
+
+########################################################################
+# END OF sync_binlog TESTS #
+########################################################################
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/t/timestamp_basic.test b/mysql-test/suite/sys_vars/t/timestamp_basic.test
new file mode 100644
index 00000000000..a5baf304bf3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/timestamp_basic.test
@@ -0,0 +1,155 @@
+################## mysql-test/t/timestamp_basic.test ##########################
+# #
+# Variable Name: timestamp #
+# Scope: SESSION #
+# Access Type: Dynamic #
+# Data Type: string #
+# Default Value: #
+# Range: #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+# Description: Test Cases of Dynamic System Variable timestamp #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: #
+# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
+# #
+###############################################################################
+
+--source include/load_sysvars.inc
+
+#######################################################################
+# START OF timestamp TESTS #
+#######################################################################
+
+
+#######################################################################
+# Saving initial value of timestamp in a temporary variable #
+#######################################################################
+
+SET @session_start_value = @@session.timestamp;
+
+--echo '#--------------------FN_DYNVARS_001_01------------------------#'
+########################################################################
+# Display the DEFAULT value of timestamp #
+########################################################################
+
+
+SET @@timestamp = DEFAULT;
+SELECT @@timestamp = UNIX_TIMESTAMP();
+
+--echo '#---------------------FN_DYNVARS_001_02-------------------------#'
+##############################################################
+# see if accessable using global scope #
+##############################################################
+
+--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 = UNIX_TIMESTAMP();
+
+--echo 'Setting 0 resets timestamp to session default timestamp'
+
+SET @@timestamp = -1000000000;
+SELECT @@timestamp = UNIX_TIMESTAMP();
+
+SET @temp_ts = @@timestamp - @@timestamp;
+SELECT @temp_ts;
+
+--echo '#--------------------FN_DYNVARS_001_04-------------------------#'
+###########################################################################
+# Change the value of timestamp to invalid value #
+###########################################################################
+
+# for session scope
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = "100";
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = " ";
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = 1.1;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = 9999999999999999999999;
+
+
+
+--echo '#----------------------FN_DYNVARS_001_06------------------------#'
+#########################################################################
+# Check if the value in SESSION Table matches value in variable #
+#########################################################################
+
+# disabled due to bug#41584
+#SELECT @@timestamp = VARIABLE_VALUE
+#FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+#WHERE VARIABLE_NAME='timestamp';
+
+--echo '#---------------------FN_DYNVARS_001_08-------------------------#'
+#############################################################################
+# Check if ON, OFF, TRUE and FALSE values can be used on variable #
+#############################################################################
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = OFF;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@timestamp = ON;
+
+SET @@timestamp = TRUE;
+SELECT @@timestamp;
+
+SET @@timestamp = FALSE;
+#SELECT @@timestamp;
+
+
+
+--echo '#---------------------FN_DYNVARS_001_10----------------------#'
+#############################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE points
+# to same session variable
+#############################################################################
+
+SET @@timestamp = 123456;
+SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
+SET @@timestamp = 654321;
+SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
+
+
+--echo '#---------------------FN_DYNVARS_001_11----------------------#'
+#####################################################################
+# Check if timestamp can be accessed with and without @@ sign #
+#####################################################################
+
+SET timestamp = 1;
+SELECT @@timestamp;
+--Error ER_UNKNOWN_TABLE
+SELECT local.timestamp;
+--Error ER_UNKNOWN_TABLE
+SELECT session.timestamp;
+--Error ER_BAD_FIELD_ERROR
+SELECT timestamp = @@session.timestamp;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@timestamp = @session_start_value;
+
+#######################################################################
+# END OF timestamp TESTS #
+#######################################################################
+
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/t/wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/wait_timeout_basic.test
new file mode 100644
index 00000000000..e92a3294b86
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/wait_timeout_basic.test
@@ -0,0 +1,216 @@
+############## mysql-test\t\wait_timeout_basic.test ###########################
+# #
+# Variable Name: wait_timeout #
+# Scope: GLOBAL | SESSION #
+# Access Type: Dynamic #
+# Data Type: numeric #
+# Default Value: #
+# Range: #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Sharique Abdullah #
+# #
+# Description: Test Cases of Dynamic System Variable wait_timeout #
+# that checks the behavior of this variable in the following ways#
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Data Integrity #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html#option_mysqld_wait_timeouts #
+# #
+###############################################################################
+# Due to differnces between linux and windows in the results
+
+--source include/not_windows.inc
+--source include/load_sysvars.inc
+
+############################################################
+# START OF wait_timeout TESTS #
+############################################################
+
+#############################################################
+# Save initial value #
+#############################################################
+
+SET @start_global_value = @@global.wait_timeout;
+SET @start_session_value = @@session.wait_timeout;
+
+--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
+############################################################
+# Display the DEFAULT value of wait_timeout #
+############################################################
+
+SET @@global.wait_timeout = 100;
+SET @@global.wait_timeout = DEFAULT;
+SELECT @@global.wait_timeout;
+
+SET @@session.wait_timeout = 200;
+SET @@session.wait_timeout = DEFAULT;
+SELECT @@session.wait_timeout;
+
+
+--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
+############################################################
+# Check the DEFAULT value of wait_timeout #
+############################################################
+
+SET @@global.wait_timeout = DEFAULT;
+SELECT @@global.wait_timeout = @default_wait_timeout;
+
+SET @@session.wait_timeout = DEFAULT;
+SELECT @@session.wait_timeout = @default_wait_timeout;
+
+
+
+--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
+######################################################################
+# Change the value of wait_timeout to a valid value for GLOBAL Scope #
+######################################################################
+
+#SET @@global.wait_timeout= @min_wait_timeout;
+SET @@global.wait_timeout= 1;
+SELECT @@global.wait_timeout;
+
+SET @@global.wait_timeout = 60020;
+SELECT @@global.wait_timeout;
+
+#SET @@global.wait_timeout = @max_wait_timeout;
+SET @@global.wait_timeout = 31536000;
+SELECT @@global.wait_timeout = @max_wait_timeout;
+
+
+--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
+#######################################################################
+# Change the value of wait_timeout to a valid value for SESSION Scope #
+#######################################################################
+#SET @@session.wait_timeout = @min_wait_timeout;
+#SELECT @@session.wait_timeout;
+
+SET @@session.wait_timeout =6000;
+SELECT @@session.wait_timeout;
+
+#SET @@session.wait_timeout = @max_wait_timeout;
+#SELECT @@session.wait_timeout = @max_wait_timeout;
+
+
+--echo '#------------------FN_DYNVARS_005_05-----------------------#'
+########################################################
+# Change the value of wait_timeout to an invalid value #
+########################################################
+
+SET @@global.wait_timeout = 0;
+SET @@global.wait_timeout = -1024;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.wait_timeout = ON;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.wait_timeout = OFF;
+
+SET @@global.wait_timeout = True;
+SELECT @@global.wait_timeout;
+
+SET @@global.wait_timeout = False;
+SELECT @@global.wait_timeout;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.wait_timeout = 65530.34;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.wait_timeout ="Test";
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.wait_timeout = ON;
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.wait_timeout = OFF;
+
+SET @@session.wait_timeout = True;
+SELECT @@session.wait_timeout;
+
+SET @@session.wait_timeout = False;
+SELECT @@session.wait_timeout;
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.wait_timeout = "Test";
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.wait_timeout = 'test';
+
+SET @@session.wait_timeout = 123456789031;
+SELECT @@session.wait_timeout = @max_wait_timeout;
+
+
+--echo '#------------------FN_DYNVARS_005_06-----------------------#'
+####################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+####################################################################
+
+SELECT @@global.wait_timeout = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='wait_timeout';
+
+--echo '#------------------FN_DYNVARS_005_07-----------------------#'
+####################################################################
+# Check if the value in SESSION Table matches value in variable #
+####################################################################
+
+SELECT @@session.wait_timeout = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.SESSION_VARIABLES
+WHERE VARIABLE_NAME='wait_timeout';
+
+--echo '#---------------------FN_DYNVARS_001_09----------------------#'
+###########################################################################
+# Check if global and session variable are independent of each other #
+###########################################################################
+
+SET @@global.wait_timeout = 30000;
+SET @@global.wait_timeout = 40000;
+SELECT @@wait_timeout = @@global.wait_timeout;
+
+--echo '#---------------------FN_DYNVARS_001_10----------------------#'
+########################################################################
+# Check if accessing variable with SESSION,LOCAL and without SCOPE #
+# points to same session variable #
+########################################################################
+
+SET @@wait_timeout = 100;
+SELECT @@wait_timeout = @@local.wait_timeout;
+SELECT @@local.wait_timeout = @@session.wait_timeout;
+
+--echo '#---------------------FN_DYNVARS_001_11----------------------#'
+#######################################################################
+# Check if wait_timeout can be accessed with and without @@ sign #
+#######################################################################
+
+SET wait_timeout = 1027;
+SELECT @@wait_timeout;
+
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.wait_timeout;
+
+--Error ER_UNKNOWN_TABLE
+SELECT session.wait_timeout;
+
+--Error ER_BAD_FIELD_ERROR
+SELECT wait_timeout = @@session.wait_timeout;
+
+
+####################################
+# Restore initial value #
+####################################
+
+SET @@global.wait_timeout = @start_global_value;
+SET @@session.wait_timeout = @start_session_value;
+
+#################################################
+# END OF wait_timeout TESTS #
+#################################################
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
-