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,7 +1,43 @@
set @start_value = @@wsrep_cluster_name;
set @@global.wsrep_cluster_name='test';
set @@global.wsrep_cluster_name=NULL;
#
# wsrep_cluster_name
#
# save the initial value
SET @wsrep_cluster_name_global_saved = @@global.wsrep_cluster_name;
# default
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_wsrep_cluster
# scope
SELECT @@session.wsrep_cluster_name;
ERROR HY000: Variable 'wsrep_cluster_name' is a GLOBAL variable
SET @@global.wsrep_cluster_name='my_galera_cluster';
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_galera_cluster
# valid values
SET @@global.wsrep_cluster_name='my_quoted_galera_cluster';
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_quoted_galera_cluster
SET @@global.wsrep_cluster_name=my_unquoted_cluster;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_unquoted_cluster
SET @@global.wsrep_cluster_name=OFF;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
OFF
SET @@global.wsrep_cluster_name=default;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_wsrep_cluster
# invalid values
SET @@global.wsrep_cluster_name=NULL;
ERROR 42000: Variable 'wsrep_cluster_name' can't be set to the value of 'NULL'
SET @@global.wsrep_cluster_name = 1;
ERROR 42000: Incorrect argument type to variable 'wsrep_cluster_name'
set @@global.wsrep_cluster_name = @start_value;
# restore the initial value
SET @@global.wsrep_cluster_name = @wsrep_cluster_name_global_saved;
# End of test