summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test')
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test60
1 files changed, 46 insertions, 14 deletions
diff --git a/mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test b/mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test
index 9e1adde76a3..d6d461075a5 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_osu_method_basic.test
@@ -1,18 +1,50 @@
---source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/have_wsrep.inc
-set @start_value = @@wsrep_osu_method;
+--echo #
+--echo # wsrep_osu_method
+--echo #
-set @@global.wsrep_osu_method='TOI';
-set @@global.wsrep_osu_method='RSU';
-set @@global.wsrep_osu_method=TOI;
-set @@global.wsrep_osu_method=RSU;
+--echo # save the initial value
+SET @wsrep_osu_method_global_saved = @@global.wsrep_osu_method;
---Error 1231
-set @@global.wsrep_osu_method=TSU;
---Error 1231
-set @@global.wsrep_osu_method='TSU';
---Error 1231
-SET @@global.wsrep_on = -1;
+--echo # default
+SELECT @@global.wsrep_osu_method;
-set @@global.wsrep_osu_method = @start_value;
+--echo
+--echo # scope
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.wsrep_osu_method;
+SET @@global.wsrep_osu_method=TOI;
+SELECT @@global.wsrep_osu_method;
+
+--echo
+--echo # valid values
+SET @@global.wsrep_osu_method=TOI;
+SELECT @@global.wsrep_osu_method;
+SET @@global.wsrep_osu_method=RSU;
+SELECT @@global.wsrep_osu_method;
+SET @@global.wsrep_osu_method="RSU";
+SELECT @@global.wsrep_osu_method;
+SET @@global.wsrep_osu_method=default;
+SELECT @@global.wsrep_osu_method;
+# numeric value
+SET @@global.wsrep_osu_method=1;
+SELECT @@global.wsrep_osu_method;
+
+--echo
+--echo # invalid values
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_osu_method=4;
+SELECT @@global.wsrep_osu_method;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_osu_method=NULL;
+SELECT @@global.wsrep_osu_method;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_osu_method='junk';
+SELECT @@global.wsrep_osu_method;
+
+--echo
+--echo # restore the initial value
+SET @@global.wsrep_osu_method = @wsrep_osu_method_global_saved;
+
+--echo # End of test