summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t/galera_var_wsrep_mode.test
blob: 56953b1e71b8f255247ebd83efe8b0acaf5fdd33 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--source include/galera_cluster.inc

# default
SELECT @@wsrep_mode;

SET GLOBAL wsrep_mode=DEFAULT;
SELECT @@wsrep_mode;

--error ER_GLOBAL_VARIABLE
SET SESSION wsrep_mode=DEFAULT;
SELECT @@global.wsrep_mode;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_mode;

#
# Incorrect input
#
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL wsrep_mode=A;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL wsrep_mode='A';
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL wsrep_mode=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL wsrep_mode=64;
--error ER_PARSE_ERROR
SET GLOBAL wsrep_mode=REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM;
#
# Correct input
#
SET GLOBAL wsrep_mode=1;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=32;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode='';
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=STRICT_REPLICATION;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=BINLOG_ROW_FORMAT_ONLY;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=REQUIRED_PRIMARY_KEY;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode=DISALLOW_LOCAL_GTID;
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode='STRICT_REPLICATION,BINLOG_ROW_FORMAT_ONLY';
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode='STRICT_REPLICATION,BINLOG_ROW_FORMAT_ONLY,REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM,REPLICATE_ARIA,DISALLOW_LOCAL_GTID';
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode='BINLOG_ROW_FORMAT_ONLY,STRICT_REPLICATION';
SELECT @@wsrep_mode;
SET GLOBAL wsrep_mode='STRICT_REPLICATION,REQUIRED_PRIMARY_KEY,REPLICATE_ARIA,DISALLOW_LOCAL_GTID';
SELECT @@wsrep_mode;

# reset
SET GLOBAL wsrep_mode=DEFAULT;