summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/wsrep/t/wsrep_on_basic.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/wsrep/t/wsrep_on_basic.test')
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_on_basic.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/suite/wsrep/t/wsrep_on_basic.test b/mysql-test/suite/wsrep/t/wsrep_on_basic.test
new file mode 100644
index 00000000..98062dbe
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_on_basic.test
@@ -0,0 +1,47 @@
+--source include/have_wsrep.inc
+--source include/have_wsrep_provider.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # wsrep_on
+--echo #
+
+--echo # save the initial values
+SET @wsrep_on_global_saved = @@global.wsrep_on;
+SET @wsrep_on_session_saved = @@session.wsrep_on;
+
+--echo # default
+SELECT @@global.wsrep_on;
+SELECT @@session.wsrep_on;
+
+--echo
+--echo # scope and valid values
+SET @@global.wsrep_on=OFF;
+SELECT @@global.wsrep_on;
+SET @@global.wsrep_on=ON;
+SELECT @@global.wsrep_on;
+
+SET @@session.wsrep_on=OFF;
+SELECT @@session.wsrep_on;
+SET @@session.wsrep_on=ON;
+SELECT @@session.wsrep_on;
+SET @@session.wsrep_on=default;
+SELECT @@session.wsrep_on;
+
+--echo
+--echo # invalid values
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_on=NULL;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_on='junk';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@session.wsrep_on=NULL;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@session.wsrep_on='junk';
+
+--echo
+--echo # restore the initial values
+SET @@global.wsrep_on = @wsrep_on_global_saved;
+SET @@session.wsrep_on = @wsrep_on_session_saved;
+
+--echo # End of test