diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/variables-notembedded.test | 80 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 296 |
2 files changed, 376 insertions, 0 deletions
diff --git a/mysql-test/t/variables-notembedded.test b/mysql-test/t/variables-notembedded.test index 79011a89b36..823fecb8791 100644 --- a/mysql-test/t/variables-notembedded.test +++ b/mysql-test/t/variables-notembedded.test @@ -28,3 +28,83 @@ set global slave_net_timeout=default; # sql_slave_skip_counter is write-only, so we can't save previous # value and restore it here. That's ok, because it's normally 0. set global sql_slave_skip_counter= 0; + +# +# Bug#28234 - global/session scope - documentation vs implementation +# +--echo +# +# Additional variables fixed from sql_repl.cc. +# +--echo # +SHOW VARIABLES like 'log_slave_updates'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_slave_updates; +SELECT @@global.log_slave_updates; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_slave_updates= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_slave_updates= true; +# +--echo # +SHOW VARIABLES like 'relay_log'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log; +SELECT @@global.relay_log; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log= 'x'; +# +--echo # +SHOW VARIABLES like 'relay_log_index'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_index; +SELECT @@global.relay_log_index; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_index= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_index= 'x'; +# +--echo # +SHOW VARIABLES like 'relay_log_info_file'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_info_file; +SELECT @@global.relay_log_info_file; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_info_file= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_info_file= 'x'; +# +--echo # +SHOW VARIABLES like 'relay_log_space_limit'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.relay_log_space_limit; +SELECT @@global.relay_log_space_limit; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.relay_log_space_limit= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.relay_log_space_limit= 7; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'slave_load_tmpdir'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.slave_load_tmpdir; +--replace_column 1 # +SELECT @@global.slave_load_tmpdir; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.slave_load_tmpdir= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.slave_load_tmpdir= 'x'; +# +--echo # +SHOW VARIABLES like 'slave_skip_errors'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.slave_skip_errors; +SELECT @@global.slave_skip_errors; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.slave_skip_errors= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.slave_skip_errors= 7; +# diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index e98436fa62c..1ef114b1a16 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -793,3 +793,299 @@ SET GLOBAL log_output = 0; --echo --echo # -- End of Bug#34820. +# +# Bug#28234 - global/session scope - documentation vs implementation +# +--echo +--echo # +SHOW VARIABLES like 'ft_max_word_len'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.ft_max_word_len; +SELECT @@global.ft_max_word_len; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.ft_max_word_len= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.ft_max_word_len= 7; +# +--echo # +SHOW VARIABLES like 'ft_min_word_len'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.ft_min_word_len; +SELECT @@global.ft_min_word_len; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.ft_min_word_len= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.ft_min_word_len= 7; +# +--echo # +SHOW VARIABLES like 'ft_query_expansion_limit'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.ft_query_expansion_limit; +SELECT @@global.ft_query_expansion_limit; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.ft_query_expansion_limit= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.ft_query_expansion_limit= 7; +# +--echo # +SHOW VARIABLES like 'ft_stopword_file'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.ft_stopword_file; +SELECT @@global.ft_stopword_file; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.ft_stopword_file= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.ft_stopword_file= 'x'; +# +# Additional variables fixed. +# +--echo # +SHOW VARIABLES like 'back_log'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.back_log; +SELECT @@global.back_log; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.back_log= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.back_log= 7; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'large_files_support'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.large_files_support; +--replace_column 1 # +SELECT @@global.large_files_support; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.large_files_support= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.large_files_support= true; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'character_sets_dir'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.character_sets_dir; +--replace_column 1 # +SELECT @@global.character_sets_dir; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.character_sets_dir= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.character_sets_dir= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'init_file'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.init_file; +--replace_column 1 # +SELECT @@global.init_file; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.init_file= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.init_file= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'language'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.language; +--replace_column 1 # +SELECT @@global.language; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.language= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.language= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'large_page_size'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.large_page_size; +--replace_column 1 # +SELECT @@global.large_page_size; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.large_page_size= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.large_page_size= 7; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'large_pages'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.large_pages; +--replace_column 1 # +SELECT @@global.large_pages; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.large_pages= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.large_pages= true; +# +--echo # +SHOW VARIABLES like 'log_bin'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_bin; +SELECT @@global.log_bin; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_bin= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_bin= true; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'log_error'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.log_error; +--replace_column 1 # +SELECT @@global.log_error; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.log_error= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.log_error= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'lower_case_file_system'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.lower_case_file_system; +--replace_column 1 # +SELECT @@global.lower_case_file_system; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.lower_case_file_system= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.lower_case_file_system= true; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'lower_case_table_names'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.lower_case_table_names; +--replace_column 1 # +SELECT @@global.lower_case_table_names; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.lower_case_table_names= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.lower_case_table_names= 7; +# +--echo # +SHOW VARIABLES like 'myisam_recover_options'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.myisam_recover_options; +SELECT @@global.myisam_recover_options; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.myisam_recover_options= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.myisam_recover_options= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'open_files_limit'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.open_files_limit; +--replace_column 1 # +SELECT @@global.open_files_limit; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.open_files_limit= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.open_files_limit= 7; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'pid_file'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.pid_file; +--replace_column 1 # +SELECT @@global.pid_file; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.pid_file= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.pid_file= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'plugin_dir'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.plugin_dir; +--replace_column 1 # +SELECT @@global.plugin_dir; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.plugin_dir= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.plugin_dir= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'port'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.port; +--replace_column 1 # +SELECT @@global.port; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.port= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.port= 7; +# +--echo # +SHOW VARIABLES like 'protocol_version'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.protocol_version; +SELECT @@global.protocol_version; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.protocol_version= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.protocol_version= 7; +# +--echo # +SHOW VARIABLES like 'skip_external_locking'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.skip_external_locking; +SELECT @@global.skip_external_locking; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.skip_external_locking= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.skip_external_locking= true; +# +--echo # +SHOW VARIABLES like 'skip_networking'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.skip_networking; +SELECT @@global.skip_networking; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.skip_networking= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.skip_networking= true; +# +--echo # +SHOW VARIABLES like 'skip_show_database'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.skip_show_database; +SELECT @@global.skip_show_database; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.skip_show_database= true; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.skip_show_database= true; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'socket'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.socket; +--replace_column 1 # +SELECT @@global.socket; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.socket= 'x'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.socket= 'x'; +# +--echo # +--replace_column 2 # +SHOW VARIABLES like 'thread_stack'; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.thread_stack; +--replace_column 1 # +SELECT @@global.thread_stack; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@session.thread_stack= 7; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@global.thread_stack= 7; +# |