1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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,45 @@
set @start_value = @@wsrep_log_conflicts;
set @@global.wsrep_log_conflicts=ON;
set @@global.wsrep_log_conflicts=OFF;
set @@global.wsrep_log_conflicts=1;
set @@global.wsrep_log_conflicts=0;
SET @@global.wsrep_log_conflicts = -1;
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of '-1'
set @@global.wsrep_log_conflicts = @start_value;
#
# wsrep_log_conflicts
#
# save the initial value
SET @wsrep_log_conflicts_global_saved = @@global.wsrep_log_conflicts;
# default
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
# scope
SELECT @@session.wsrep_log_conflicts;
ERROR HY000: Variable 'wsrep_log_conflicts' is a GLOBAL variable
SET @@global.wsrep_log_conflicts=OFF;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
1
# valid values
SET @@global.wsrep_log_conflicts='OFF';
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
1
SET @@global.wsrep_log_conflicts=default;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
# invalid values
SET @@global.wsrep_log_conflicts=NULL;
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of 'NULL'
SET @@global.wsrep_log_conflicts='junk';
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_log_conflicts = @wsrep_log_conflicts_global_saved;
# End of test