summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/sys_vars/t/wsrep_cluster_address_basic.test
blob: 6e0767ce8538f019696cd050f318d616c88c26e7 (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
46
47
--source include/have_wsrep.inc

--echo #
--echo # wsrep_cluster_address
--echo #

--echo # save the initial value
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;

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

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

--echo
--echo # valid values
SET @@global.wsrep_cluster_address='127.0.0.1';
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address=AUTO;
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address=default;
SELECT @@global.wsrep_cluster_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_cluster_address=ON;
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address='OFF';
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address='junk';
SELECT @@global.wsrep_cluster_address;

--echo
--echo # restore the initial value
--error 0,ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved;

--echo # End of test