summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/sys_vars/t/wsrep_node_address_basic.test
blob: fccb40de6bf7c9d11d9a1b19d1639dd46ed9d8f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--source include/have_wsrep.inc

--echo #
--echo # wsrep_node_address
--echo #

--echo # save the initial value
SET @wsrep_node_address_global_saved = @@global.wsrep_node_address;

--echo # default
SELECT @@global.wsrep_node_address;

--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_node_address;
SELECT @@global.wsrep_node_address;

--echo
--echo # valid values
SET @@global.wsrep_node_address='127.0.0.1';
SELECT @@global.wsrep_node_address;
# default == ''
SET @@global.wsrep_node_address=default;
SELECT @@global.wsrep_node_address;

--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_node_address=NULL;
SELECT @@global.wsrep_node_address;
# The values being assigned to wsrep_node_address are not verified so the
# following alues are currently valid too.
SET @@global.wsrep_node_address=ON;
SELECT @@global.wsrep_node_address;
SET @@global.wsrep_node_address='OFF';
SELECT @@global.wsrep_node_address;
SET @@global.wsrep_node_address='junk';
SELECT @@global.wsrep_node_address;

--echo
--echo # restore the initial value
SET @@global.wsrep_node_address = @wsrep_node_address_global_saved;

--echo # End of test