diff options
author | Ingo Struewing <ingo.struewing@sun.com> | 2008-11-22 00:22:21 +0100 |
---|---|---|
committer | Ingo Struewing <ingo.struewing@sun.com> | 2008-11-22 00:22:21 +0100 |
commit | f92c5731453fd73077bb4a8034a5c351d89f091f (patch) | |
tree | a8e411aa264d817a003cdcf4cbcd4eae74aab63b /mysql-test/r/variables.result | |
parent | 75a6be98e06587190472106b582723944b76426b (diff) | |
download | mariadb-git-f92c5731453fd73077bb4a8034a5c351d89f091f.tar.gz |
Bug#28234 - global/session scope - documentation vs implementation
Several system variables did not behave like system variables should do.
When trying to SET them or use them in SELECT, they were reported as
"unknown system variable". But they appeared in SHOW VARIABLES.
This has been fixed by removing the "fixed_vars" array of variables
and integrating the variables into the normal system variables chain.
All of these variables do now behave as read-only global-only
variables. Trying to SET them tells they are read-only, trying to
SELECT the session value tells they are global only. Selecting the
global value works. It delivers the same value as SHOW VARIABLES.
mysql-test/r/variables-notembedded.result:
Bug#28234 - global/session scope - documentation vs implementation
New test result.
mysql-test/r/variables.result:
Bug#28234 - global/session scope - documentation vs implementation
New test result.
mysql-test/t/variables-notembedded.test:
Bug#28234 - global/session scope - documentation vs implementation
Added a test for each moved variable that is not present in an
embedded server.
mysql-test/t/variables.test:
Bug#28234 - global/session scope - documentation vs implementation
Added a test for each moved variable that is also present in an
embedded server.
sql/item_func.cc:
Bug#28234 - global/session scope - documentation vs implementation
Added SHOW_BOOL to some Item_func_get_system_var methods.
sql/set_var.cc:
Bug#28234 - global/session scope - documentation vs implementation
Moved all variables from the "fixed_vars" array into the normal
system variables chain by using the new variable class sys_var_const.
Removed the fixed_show_vars array and its initialization in
enumerate_sys_vars().
Removed mysql_append_static_vars(), which added fixed_vars arrays
to the fixed_show_vars array.
sql/set_var.h:
Bug#28234 - global/session scope - documentation vs implementation
Added the new system variable class sys_var_const.
Removed declaration of mysql_append_static_vars().
sql/slave.cc:
Bug#28234 - global/session scope - documentation vs implementation
Moved the definition of show_slave_skip_errors() from sql_repl.cc
to here and renamed it to print_slave_skip_errors().
Changed print_slave_skip_errors() to create a static buffer with
a printable version of the error numbers set.
Added a call of print_slave_skip_errors() to init_slave_skip_errors().
sql/slave.h:
Bug#28234 - global/session scope - documentation vs implementation
Added declaration of slave_skip_error_names.
sql/sql_repl.cc:
Bug#28234 - global/session scope - documentation vs implementation
Moved all variables from the "fixed_vars" array into the normal
system variables chain by using the new variable class sys_var_const.
Moved the definition of show_slave_skip_errors() to slave.cc and
modified it to compute the string once at server initialization only.
Removed the call to mysql_append_static_vars().
Diffstat (limited to 'mysql-test/r/variables.result')
-rw-r--r-- | mysql-test/r/variables.result | 339 |
1 files changed, 339 insertions, 0 deletions
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index c52f7f3578e..878416b4537 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1011,3 +1011,342 @@ SET GLOBAL log_output = 0; ERROR 42000: Variable 'log_output' can't be set to the value of '0' # -- End of Bug#34820. + +# +SHOW VARIABLES like 'ft_max_word_len'; +Variable_name Value +ft_max_word_len 84 +SELECT @@session.ft_max_word_len; +ERROR HY000: Variable 'ft_max_word_len' is a GLOBAL variable +SELECT @@global.ft_max_word_len; +@@global.ft_max_word_len +84 +SET @@session.ft_max_word_len= 7; +ERROR HY000: Variable 'ft_max_word_len' is a read only variable +SET @@global.ft_max_word_len= 7; +ERROR HY000: Variable 'ft_max_word_len' is a read only variable +# +SHOW VARIABLES like 'ft_min_word_len'; +Variable_name Value +ft_min_word_len 4 +SELECT @@session.ft_min_word_len; +ERROR HY000: Variable 'ft_min_word_len' is a GLOBAL variable +SELECT @@global.ft_min_word_len; +@@global.ft_min_word_len +4 +SET @@session.ft_min_word_len= 7; +ERROR HY000: Variable 'ft_min_word_len' is a read only variable +SET @@global.ft_min_word_len= 7; +ERROR HY000: Variable 'ft_min_word_len' is a read only variable +# +SHOW VARIABLES like 'ft_query_expansion_limit'; +Variable_name Value +ft_query_expansion_limit 20 +SELECT @@session.ft_query_expansion_limit; +ERROR HY000: Variable 'ft_query_expansion_limit' is a GLOBAL variable +SELECT @@global.ft_query_expansion_limit; +@@global.ft_query_expansion_limit +20 +SET @@session.ft_query_expansion_limit= 7; +ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable +SET @@global.ft_query_expansion_limit= 7; +ERROR HY000: Variable 'ft_query_expansion_limit' is a read only variable +# +SHOW VARIABLES like 'ft_stopword_file'; +Variable_name Value +ft_stopword_file (built-in) +SELECT @@session.ft_stopword_file; +ERROR HY000: Variable 'ft_stopword_file' is a GLOBAL variable +SELECT @@global.ft_stopword_file; +@@global.ft_stopword_file +(built-in) +SET @@session.ft_stopword_file= 'x'; +ERROR HY000: Variable 'ft_stopword_file' is a read only variable +SET @@global.ft_stopword_file= 'x'; +ERROR HY000: Variable 'ft_stopword_file' is a read only variable +# +SHOW VARIABLES like 'back_log'; +Variable_name Value +back_log 50 +SELECT @@session.back_log; +ERROR HY000: Variable 'back_log' is a GLOBAL variable +SELECT @@global.back_log; +@@global.back_log +50 +SET @@session.back_log= 7; +ERROR HY000: Variable 'back_log' is a read only variable +SET @@global.back_log= 7; +ERROR HY000: Variable 'back_log' is a read only variable +# +SHOW VARIABLES like 'large_files_support'; +Variable_name Value +large_files_support # +SELECT @@session.large_files_support; +ERROR HY000: Variable 'large_files_support' is a GLOBAL variable +SELECT @@global.large_files_support; +@@global.large_files_support +# +SET @@session.large_files_support= true; +ERROR HY000: Variable 'large_files_support' is a read only variable +SET @@global.large_files_support= true; +ERROR HY000: Variable 'large_files_support' is a read only variable +# +SHOW VARIABLES like 'character_sets_dir'; +Variable_name Value +character_sets_dir # +SELECT @@session.character_sets_dir; +ERROR HY000: Variable 'character_sets_dir' is a GLOBAL variable +SELECT @@global.character_sets_dir; +@@global.character_sets_dir +# +SET @@session.character_sets_dir= 'x'; +ERROR HY000: Variable 'character_sets_dir' is a read only variable +SET @@global.character_sets_dir= 'x'; +ERROR HY000: Variable 'character_sets_dir' is a read only variable +# +SHOW VARIABLES like 'init_file'; +Variable_name Value +init_file # +SELECT @@session.init_file; +ERROR HY000: Variable 'init_file' is a GLOBAL variable +SELECT @@global.init_file; +@@global.init_file +# +SET @@session.init_file= 'x'; +ERROR HY000: Variable 'init_file' is a read only variable +SET @@global.init_file= 'x'; +ERROR HY000: Variable 'init_file' is a read only variable +# +SHOW VARIABLES like 'language'; +Variable_name Value +language # +SELECT @@session.language; +ERROR HY000: Variable 'language' is a GLOBAL variable +SELECT @@global.language; +@@global.language +# +SET @@session.language= 'x'; +ERROR HY000: Variable 'language' is a read only variable +SET @@global.language= 'x'; +ERROR HY000: Variable 'language' is a read only variable +# +SHOW VARIABLES like 'large_page_size'; +Variable_name Value +large_page_size # +SELECT @@session.large_page_size; +ERROR HY000: Variable 'large_page_size' is a GLOBAL variable +SELECT @@global.large_page_size; +@@global.large_page_size +# +SET @@session.large_page_size= 7; +ERROR HY000: Variable 'large_page_size' is a read only variable +SET @@global.large_page_size= 7; +ERROR HY000: Variable 'large_page_size' is a read only variable +# +SHOW VARIABLES like 'large_pages'; +Variable_name Value +large_pages # +SELECT @@session.large_pages; +ERROR HY000: Variable 'large_pages' is a GLOBAL variable +SELECT @@global.large_pages; +@@global.large_pages +# +SET @@session.large_pages= true; +ERROR HY000: Variable 'large_pages' is a read only variable +SET @@global.large_pages= true; +ERROR HY000: Variable 'large_pages' is a read only variable +# +SHOW VARIABLES like 'log_bin'; +Variable_name Value +log_bin OFF +SELECT @@session.log_bin; +ERROR HY000: Variable 'log_bin' is a GLOBAL variable +SELECT @@global.log_bin; +@@global.log_bin +0 +SET @@session.log_bin= true; +ERROR HY000: Variable 'log_bin' is a read only variable +SET @@global.log_bin= true; +ERROR HY000: Variable 'log_bin' is a read only variable +# +SHOW VARIABLES like 'log_error'; +Variable_name Value +log_error # +SELECT @@session.log_error; +ERROR HY000: Variable 'log_error' is a GLOBAL variable +SELECT @@global.log_error; +@@global.log_error +# +SET @@session.log_error= 'x'; +ERROR HY000: Variable 'log_error' is a read only variable +SET @@global.log_error= 'x'; +ERROR HY000: Variable 'log_error' is a read only variable +# +SHOW VARIABLES like 'lower_case_file_system'; +Variable_name Value +lower_case_file_system # +SELECT @@session.lower_case_file_system; +ERROR HY000: Variable 'lower_case_file_system' is a GLOBAL variable +SELECT @@global.lower_case_file_system; +@@global.lower_case_file_system +# +SET @@session.lower_case_file_system= true; +ERROR HY000: Variable 'lower_case_file_system' is a read only variable +SET @@global.lower_case_file_system= true; +ERROR HY000: Variable 'lower_case_file_system' is a read only variable +# +SHOW VARIABLES like 'lower_case_table_names'; +Variable_name Value +lower_case_table_names # +SELECT @@session.lower_case_table_names; +ERROR HY000: Variable 'lower_case_table_names' is a GLOBAL variable +SELECT @@global.lower_case_table_names; +@@global.lower_case_table_names +# +SET @@session.lower_case_table_names= 7; +ERROR HY000: Variable 'lower_case_table_names' is a read only variable +SET @@global.lower_case_table_names= 7; +ERROR HY000: Variable 'lower_case_table_names' is a read only variable +# +SHOW VARIABLES like 'myisam_recover_options'; +Variable_name Value +myisam_recover_options OFF +SELECT @@session.myisam_recover_options; +ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable +SELECT @@global.myisam_recover_options; +@@global.myisam_recover_options +OFF +SET @@session.myisam_recover_options= 'x'; +ERROR HY000: Variable 'myisam_recover_options' is a read only variable +SET @@global.myisam_recover_options= 'x'; +ERROR HY000: Variable 'myisam_recover_options' is a read only variable +# +SHOW VARIABLES like 'open_files_limit'; +Variable_name Value +open_files_limit # +SELECT @@session.open_files_limit; +ERROR HY000: Variable 'open_files_limit' is a GLOBAL variable +SELECT @@global.open_files_limit; +@@global.open_files_limit +# +SET @@session.open_files_limit= 7; +ERROR HY000: Variable 'open_files_limit' is a read only variable +SET @@global.open_files_limit= 7; +ERROR HY000: Variable 'open_files_limit' is a read only variable +# +SHOW VARIABLES like 'pid_file'; +Variable_name Value +pid_file # +SELECT @@session.pid_file; +ERROR HY000: Variable 'pid_file' is a GLOBAL variable +SELECT @@global.pid_file; +@@global.pid_file +# +SET @@session.pid_file= 'x'; +ERROR HY000: Variable 'pid_file' is a read only variable +SET @@global.pid_file= 'x'; +ERROR HY000: Variable 'pid_file' is a read only variable +# +SHOW VARIABLES like 'plugin_dir'; +Variable_name Value +plugin_dir # +SELECT @@session.plugin_dir; +ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable +SELECT @@global.plugin_dir; +@@global.plugin_dir +# +SET @@session.plugin_dir= 'x'; +ERROR HY000: Variable 'plugin_dir' is a read only variable +SET @@global.plugin_dir= 'x'; +ERROR HY000: Variable 'plugin_dir' is a read only variable +# +SHOW VARIABLES like 'port'; +Variable_name Value +port # +SELECT @@session.port; +ERROR HY000: Variable 'port' is a GLOBAL variable +SELECT @@global.port; +@@global.port +# +SET @@session.port= 7; +ERROR HY000: Variable 'port' is a read only variable +SET @@global.port= 7; +ERROR HY000: Variable 'port' is a read only variable +# +SHOW VARIABLES like 'protocol_version'; +Variable_name Value +protocol_version 10 +SELECT @@session.protocol_version; +ERROR HY000: Variable 'protocol_version' is a GLOBAL variable +SELECT @@global.protocol_version; +@@global.protocol_version +10 +SET @@session.protocol_version= 7; +ERROR HY000: Variable 'protocol_version' is a read only variable +SET @@global.protocol_version= 7; +ERROR HY000: Variable 'protocol_version' is a read only variable +# +SHOW VARIABLES like 'skip_external_locking'; +Variable_name Value +skip_external_locking ON +SELECT @@session.skip_external_locking; +ERROR HY000: Variable 'skip_external_locking' is a GLOBAL variable +SELECT @@global.skip_external_locking; +@@global.skip_external_locking +1 +SET @@session.skip_external_locking= true; +ERROR HY000: Variable 'skip_external_locking' is a read only variable +SET @@global.skip_external_locking= true; +ERROR HY000: Variable 'skip_external_locking' is a read only variable +# +SHOW VARIABLES like 'skip_networking'; +Variable_name Value +skip_networking OFF +SELECT @@session.skip_networking; +ERROR HY000: Variable 'skip_networking' is a GLOBAL variable +SELECT @@global.skip_networking; +@@global.skip_networking +0 +SET @@session.skip_networking= true; +ERROR HY000: Variable 'skip_networking' is a read only variable +SET @@global.skip_networking= true; +ERROR HY000: Variable 'skip_networking' is a read only variable +# +SHOW VARIABLES like 'skip_show_database'; +Variable_name Value +skip_show_database OFF +SELECT @@session.skip_show_database; +ERROR HY000: Variable 'skip_show_database' is a GLOBAL variable +SELECT @@global.skip_show_database; +@@global.skip_show_database +0 +SET @@session.skip_show_database= true; +ERROR HY000: Variable 'skip_show_database' is a read only variable +SET @@global.skip_show_database= true; +ERROR HY000: Variable 'skip_show_database' is a read only variable +# +SHOW VARIABLES like 'socket'; +Variable_name Value +socket # +SELECT @@session.socket; +ERROR HY000: Variable 'socket' is a GLOBAL variable +SELECT @@global.socket; +@@global.socket +# +SET @@session.socket= 'x'; +ERROR HY000: Variable 'socket' is a read only variable +SET @@global.socket= 'x'; +ERROR HY000: Variable 'socket' is a read only variable +# +SHOW VARIABLES like 'thread_stack'; +Variable_name Value +thread_stack # +SELECT @@session.thread_stack; +ERROR HY000: Variable 'thread_stack' is a GLOBAL variable +SELECT @@global.thread_stack; +@@global.thread_stack +# +SET @@session.thread_stack= 7; +ERROR HY000: Variable 'thread_stack' is a read only variable +SET @@global.thread_stack= 7; +ERROR HY000: Variable 'thread_stack' is a read only variable |