summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r/wsrep_strict_ddl.result
blob: 6d25ec35549b9013e684fa6e786b64108c78d84b (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
connection node_1;
SET GLOBAL binlog_format='ROW';
create table before_t1(a int, count int, b int, key(b)) engine=Aria;
INSERT INTO before_t1 values (1,1,1);
set @@global.wsrep_strict_ddl=ON;
select @@global.wsrep_strict_ddl;
@@global.wsrep_strict_ddl
1
connection node_2;
set @@global.wsrep_strict_ddl=ON;
select @@global.wsrep_strict_ddl;
@@global.wsrep_strict_ddl
1
connection node_1;
CREATE TABLE t1(a int) engine=Aria;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW WARNINGS;
Level	Code	Message
Error	4165	DDL-statement is forbidden as table storage engine does not support Galera replication
Warning	1031	WSREP: wsrep_strict_ddl=true and storage engine does not support Galera replication.
connection node_2;
SHOW CREATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist
connection node_1;
CREATE TABLE t2(a int not null primary key) engine=InnoDB;
ALTER TABLE t2 engine=MyISAM;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW WARNINGS;
Level	Code	Message
Error	4165	DDL-statement is forbidden as table storage engine does not support Galera replication
Warning	1031	WSREP: wsrep_strict_ddl=true and storage engine does not support Galera replication.
SHOW CREATE TABLE t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `a` int(11) NOT NULL,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection node_2;
SHOW CREATE TABLE t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `a` int(11) NOT NULL,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection node_1;
TRUNCATE TABLE before_t1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SELECT * FROM before_t1;
a	count	b
1	1	1
connection node_2;
SET SESSION wsrep_sync_wait=15;
SELECT @@wsrep_sync_wait;
@@wsrep_sync_wait
15
SELECT * FROM before_t1;
a	count	b
connection node_1;
CREATE VIEW x1 AS SELECT * FROM before_t1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE VIEW x1;
ERROR 42S02: Table 'test.x1' doesn't exist
connection node_2;
SHOW CREATE VIEW x1;
ERROR 42S02: Table 'test.x1' doesn't exist
connection node_1;
CREATE DEFINER=`root`@`localhost` TRIGGER increment_before_t1
AFTER INSERT ON before_t1 FOR EACH ROW
UPDATE before_t1 SET before_t1.count = before_t1.count+1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TRIGGER increment_before_t1;
ERROR HY000: Trigger does not exist
connection node_2;
SHOW CREATE TRIGGER increment_before_t1;
ERROR HY000: Trigger does not exist
connection node_1;
CREATE INDEX xx2 ON before_t1(a);
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
DROP INDEX b ON before_t1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
ALTER TABLE before_t1 ADD COLUMN f int;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
RENAME TABLE before_t1 to after_t1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
SHOW CREATE TABLE after_t1;
ERROR 42S02: Table 'test.after_t1' doesn't exist
connection node_2;
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
SHOW CREATE TABLE after_t1;
ERROR 42S02: Table 'test.after_t1' doesn't exist
connection node_1;
DROP TABLE before_t1;
ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table	Create Table
before_t1	CREATE TABLE `before_t1` (
  `a` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
set @@global.wsrep_strict_ddl=OFF;
select @@global.wsrep_strict_ddl;
@@global.wsrep_strict_ddl
0
connection node_2;
set @@global.wsrep_strict_ddl=OFF;
select @@global.wsrep_strict_ddl;
@@global.wsrep_strict_ddl
0
DROP TABLE t2;
DROP TABLE before_t1;