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:
@ -1,45 +1,49 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SET @@GLOBAL.wsrep_node_address=1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_node_address'
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@GLOBAL.wsrep_node_address = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_address';
|
||||
@@GLOBAL.wsrep_node_address = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_address';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_node_address = @@GLOBAL.wsrep_node_address;
|
||||
@@wsrep_node_address = @@GLOBAL.wsrep_node_address
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_node_address);
|
||||
COUNT(@@wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_node_address);
|
||||
#
|
||||
# wsrep_node_address
|
||||
#
|
||||
# save the initial value
|
||||
SET @wsrep_node_address_global_saved = @@global.wsrep_node_address;
|
||||
# default
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
|
||||
|
||||
# scope
|
||||
SELECT @@session.wsrep_node_address;
|
||||
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_node_address);
|
||||
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
|
||||
|
||||
# valid values
|
||||
SET @@global.wsrep_node_address='127.0.0.1';
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
127.0.0.1
|
||||
SET @@global.wsrep_node_address=default;
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
|
||||
|
||||
# invalid values
|
||||
SET @@global.wsrep_node_address=NULL;
|
||||
ERROR 42000: Variable 'wsrep_node_address' can't be set to the value of 'NULL'
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
|
||||
SET @@global.wsrep_node_address=ON;
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
ON
|
||||
SET @@global.wsrep_node_address='OFF';
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
OFF
|
||||
SET @@global.wsrep_node_address='junk';
|
||||
SELECT @@global.wsrep_node_address;
|
||||
@@global.wsrep_node_address
|
||||
junk
|
||||
|
||||
# restore the initial value
|
||||
SET @@global.wsrep_node_address = @wsrep_node_address_global_saved;
|
||||
# End of test
|
||||
|
Reference in New Issue
Block a user