diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-02-06 20:18:40 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-06 20:18:40 +0100 |
commit | 3b267eb6465479c8ac9cdb5a68c4a9ffac68d979 (patch) | |
tree | 5444defaa15d92468426583b4c930956b1a2057d | |
parent | 2a1470a0ed4665e4a2602c5905042ac6732c2562 (diff) | |
download | mariadb-git-3b267eb6465479c8ac9cdb5a68c4a9ffac68d979.tar.gz |
after-merge fixes for test cases
-rw-r--r-- | mysql-test/suite/sys_vars/r/sysvars_wsrep.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/wsrep_causal_reads_basic.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result | 30 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/sysvars_wsrep.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/wsrep_data_home_dir_basic.test | 21 | ||||
-rw-r--r-- | sql/sys_vars.cc | 4 |
6 files changed, 27 insertions, 50 deletions
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result index fe12c2ca3ec..56a75ed8023 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result +++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result @@ -22,7 +22,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE OFF VARIABLE_SCOPE SESSION VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT (DEPRECATED) Setting this variable is equivalent to setting wsrep_sync_wait READ flag +VARIABLE_COMMENT Setting this variable is equivalent to setting wsrep_sync_wait READ flag NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL @@ -87,9 +87,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME WSREP_DATA_HOME_DIR SESSION_VALUE NULL -GLOBAL_VALUE +GLOBAL_VALUE DATADIR GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE +DEFAULT_VALUE DATADIR VARIABLE_SCOPE GLOBAL VARIABLE_TYPE VARCHAR VARIABLE_COMMENT home directory for wsrep provider diff --git a/mysql-test/suite/sys_vars/r/wsrep_causal_reads_basic.result b/mysql-test/suite/sys_vars/r/wsrep_causal_reads_basic.result index 501117dda9f..b5f0c0730b9 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_causal_reads_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_causal_reads_basic.result @@ -14,22 +14,32 @@ SELECT @@session.wsrep_causal_reads; # scope and valid values SET @@global.wsrep_causal_reads=OFF; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SELECT @@global.wsrep_causal_reads; @@global.wsrep_causal_reads 0 SET @@global.wsrep_causal_reads=ON; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SELECT @@global.wsrep_causal_reads; @@global.wsrep_causal_reads 1 SET @@session.wsrep_causal_reads=OFF; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SELECT @@session.wsrep_causal_reads; @@session.wsrep_causal_reads 0 SET @@session.wsrep_causal_reads=ON; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SELECT @@session.wsrep_causal_reads; @@session.wsrep_causal_reads 1 SET @@session.wsrep_causal_reads=default; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SELECT @@session.wsrep_causal_reads; @@session.wsrep_causal_reads 1 @@ -46,5 +56,9 @@ ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of 'junk' # restore the initial values SET @@global.wsrep_causal_reads = @wsrep_causal_reads_global_saved; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SET @@session.wsrep_causal_reads = @wsrep_causal_reads_session_saved; +Warnings: +Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead # End of test diff --git a/mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result b/mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result index 044ef8bf3bc..c794302adb0 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result @@ -4,45 +4,21 @@ # default SELECT @@global.wsrep_data_home_dir; @@global.wsrep_data_home_dir - +DATADIR # scope SELECT @@session.wsrep_data_home_dir; ERROR HY000: Variable 'wsrep_data_home_dir' is a GLOBAL variable -SET @@global.wsrep_data_home_dir='/tmp/data'; -ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable -SELECT @@global.wsrep_data_home_dir; -@@global.wsrep_data_home_dir - # valid values SET @@global.wsrep_data_home_dir='/tmp/data'; ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable SELECT @@global.wsrep_data_home_dir; @@global.wsrep_data_home_dir - -SET @@global.wsrep_data_home_dir=junk-dir; -ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable -SELECT @@global.wsrep_data_home_dir; -@@global.wsrep_data_home_dir - -SET @@global.wsrep_data_home_dir=junk/dir; -ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable -SELECT @@global.wsrep_data_home_dir; -@@global.wsrep_data_home_dir - -SET @@global.wsrep_data_home_dir=OFF; -ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable -SELECT @@global.wsrep_data_home_dir; -@@global.wsrep_data_home_dir - +DATADIR SET @@global.wsrep_data_home_dir=default; ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable SELECT @@global.wsrep_data_home_dir; @@global.wsrep_data_home_dir - - -# invalid values -SET @@global.wsrep_data_home_dir=NULL; -ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable +DATADIR # End of test diff --git a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test index bdcece2c020..32af7d3a5ca 100644 --- a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test +++ b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test @@ -1,6 +1,8 @@ --source include/have_wsrep.inc --source include/word_size.inc +--let $datadir = `SELECT @@datadir` +--replace_result $datadir DATADIR --vertical_results select * from information_schema.system_variables where variable_name like 'wsrep%' diff --git a/mysql-test/suite/sys_vars/t/wsrep_data_home_dir_basic.test b/mysql-test/suite/sys_vars/t/wsrep_data_home_dir_basic.test index 41f97cfdaf6..646600c7769 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_data_home_dir_basic.test +++ b/mysql-test/suite/sys_vars/t/wsrep_data_home_dir_basic.test @@ -1,41 +1,28 @@ --source include/have_wsrep.inc +--let $datadir = `SELECT @@datadir` --echo # --echo # wsrep_data_home_dir (readonly) --echo # --echo # default +--replace_result $datadir DATADIR SELECT @@global.wsrep_data_home_dir; --echo --echo # scope --error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT @@session.wsrep_data_home_dir; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@global.wsrep_data_home_dir='/tmp/data'; -SELECT @@global.wsrep_data_home_dir; --echo --echo # valid values --error ER_INCORRECT_GLOBAL_LOCAL_VAR SET @@global.wsrep_data_home_dir='/tmp/data'; -SELECT @@global.wsrep_data_home_dir; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@global.wsrep_data_home_dir=junk-dir; -SELECT @@global.wsrep_data_home_dir; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@global.wsrep_data_home_dir=junk/dir; -SELECT @@global.wsrep_data_home_dir; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@global.wsrep_data_home_dir=OFF; +--replace_result $datadir DATADIR SELECT @@global.wsrep_data_home_dir; --error ER_INCORRECT_GLOBAL_LOCAL_VAR SET @@global.wsrep_data_home_dir=default; +--replace_result $datadir DATADIR SELECT @@global.wsrep_data_home_dir; ---echo ---echo # invalid values ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@global.wsrep_data_home_dir=NULL; - --echo # End of test diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 315dc01952b..f6f5845610c 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -984,10 +984,8 @@ static bool check_master_connection(sys_var *self, THD *thd, set_var *var) tmp.str= var->save_result.string_value.str; tmp.length= var->save_result.string_value.length; if (!tmp.str || check_master_connection_name(&tmp)) - { - my_error(ER_WRONG_ARGUMENTS, MYF(0), var->var->name.str); return true; - } + return false; } |