1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merged sys_vars.wsrep_* tests from maria-10.0-galera tree.

This commit is contained in:
Nirbhay Choubey
2014-09-08 13:19:20 -04:00
parent 7c58dd80e5
commit 26e048ffd3
75 changed files with 3166 additions and 1004 deletions

View File

@@ -1,8 +1,50 @@
set @start_value = @@wsrep_on;
set @@global.wsrep_on=ON;
set @@global.wsrep_on=OFF;
set @@global.wsrep_on=1;
set @@global.wsrep_on=0;
SET @@global.wsrep_on = -1;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of '-1'
set @@global.wsrep_on = @start_value;
#
# wsrep_on
#
# save the initial values
SET @wsrep_on_global_saved = @@global.wsrep_on;
SET @wsrep_on_session_saved = @@session.wsrep_on;
# default
SELECT @@global.wsrep_on;
@@global.wsrep_on
0
SELECT @@session.wsrep_on;
@@session.wsrep_on
0
# scope and valid values
SET @@global.wsrep_on=OFF;
SELECT @@global.wsrep_on;
@@global.wsrep_on
0
SET @@global.wsrep_on=ON;
SELECT @@global.wsrep_on;
@@global.wsrep_on
1
SET @@session.wsrep_on=OFF;
SELECT @@session.wsrep_on;
@@session.wsrep_on
0
SET @@session.wsrep_on=ON;
SELECT @@session.wsrep_on;
@@session.wsrep_on
1
SET @@session.wsrep_on=default;
SELECT @@session.wsrep_on;
@@session.wsrep_on
1
# invalid values
SET @@global.wsrep_on=NULL;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
SET @@global.wsrep_on='junk';
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
SET @@session.wsrep_on=NULL;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
SET @@session.wsrep_on='junk';
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
# restore the initial values
SET @@global.wsrep_on = @wsrep_on_global_saved;
SET @@session.wsrep_on = @wsrep_on_session_saved;
# End of test