Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_gtid_split_statements.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 CALL mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
7 CALL mtr.add_suppression('Cannot execute statement because it needs to be written to the binary log as multiple statements');
8 CALL mtr.add_suppression('DROP DATABASE failed; some tables may have been dropped but the database directory remains.');
9 CALL mtr.add_suppression("Error dropping database");
10 CALL mtr.add_suppression("Can't drop database '.*'; database doesn't exist");
11 CALL mtr.add_suppression("Replica SQL for channel '': ... The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state. .* Error_code: 1756");
12 ==== Case 1: CALL is split on master ====
13 ---- Initialize ----
14 CREATE TABLE t (a INT);
15 CREATE PROCEDURE proc ()
16 BEGIN
17 INSERT INTO t VALUES (1);
18 INSERT INTO t VALUES (2);
19 END|
20 ---- GTID_NEXT=AUTOMATIC ----
21 include/gtid_step_reset.inc
22 CALL proc();
23 include/gtid_step_assert.inc [count=2, only_count=0]
24 include/assert.inc [Both rows were inserted]
25 DELETE FROM t;
26 ---- GTID_NEXT=non-automatic ----
27 include/gtid_step_reset.inc
28 SET GTID_NEXT = '#';
29 CALL proc();
30 ERROR HY000: When @@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it to a different value after a COMMIT or ROLLBACK. Please check GTID_NEXT variable manual page for detailed explanation. Current @@SESSION.GTID_NEXT is 'SOURCE_UUID:9'.
31 SET GTID_NEXT= 'AUTOMATIC';
32 include/gtid_step_assert.inc [count=1, only_count=0]
33 include/assert.inc [One row inserted if GTID_MODE=ON, two if GTID_MODE=OFF]
34 DROP TABLE t;
35 DROP PROCEDURE proc;
36 ==== Case 2A: DROP TABLE is split on master ====
37 ---- Initialize ----
38 CREATE PROCEDURE create_tables()
39 BEGIN
40 CREATE TABLE base (a INT) ENGINE = InnoDB;
41 CREATE TEMPORARY TABLE temp_t (a INT) ENGINE = InnoDB;
42 CREATE TEMPORARY TABLE temp_n (a INT) ENGINE = MyISAM;
43 END|
44 CREATE PROCEDURE drop_tables()
45 BEGIN
46 DROP TABLE IF EXISTS base;
47 DROP TABLE IF EXISTS temp_t;
48 DROP TABLE IF EXISTS temp_n;
49 END|
50 include/rpl_sync.inc
51 ---- GTID_MODE=AUTOMATIC ----
52 CALL create_tables();
53 include/gtid_step_reset.inc
54 DROP TABLE base, temp_t;
55 include/gtid_step_assert.inc [count=2, only_count=0]
56 include/assert_binlog_events.inc
57 DROP TABLE temp_n;
58 include/rpl_sync.inc
59 include/rpl_reset.inc
60 CALL create_tables();
61 include/gtid_step_reset.inc
62 DROP TABLE base, temp_n;
63 include/gtid_step_assert.inc [count=2, only_count=0]
64 include/assert_binlog_events.inc
65 DROP TABLE temp_t;
66 include/rpl_sync.inc
67 include/rpl_reset.inc
68 CALL create_tables();
69 include/gtid_step_reset.inc
70 DROP TABLE temp_t, temp_n;
71 include/gtid_step_assert.inc [count=2, only_count=0]
72 include/assert_binlog_events.inc
73 DROP TABLE base;
74 include/rpl_sync.inc
75 include/rpl_reset.inc
76 CALL create_tables();
77 include/gtid_step_reset.inc
78 DROP TABLE base, temp_t, temp_n;
79 include/gtid_step_assert.inc [count=3, only_count=0]
80 include/assert_binlog_events.inc
81 include/rpl_sync.inc
82 include/rpl_reset.inc
83 ---- GTID_MODE=non-automatic ----
84 CALL create_tables();
85 include/gtid_step_reset.inc
86 SET GTID_NEXT = '#';
87 DROP TABLE base, temp_t;
88 ERROR HY000: Cannot execute statement because it needs to be written to the binary log as multiple statements, and this is not allowed when @@SESSION.GTID_NEXT == 'UUID:NUMBER'.
89 SET GTID_NEXT = 'AUTOMATIC';
90 include/gtid_step_assert.inc [count=0, only_count=0]
91 include/assert_binlog_events.inc
92 DROP TABLE temp_n;
93 DROP TABLE base, temp_t;
94 include/rpl_sync.inc
95 include/rpl_reset.inc
96 CALL create_tables();
97 include/gtid_step_reset.inc
98 SET GTID_NEXT = '#';
99 DROP TABLE base, temp_n;
100 ERROR HY000: Cannot execute statement because it needs to be written to the binary log as multiple statements, and this is not allowed when @@SESSION.GTID_NEXT == 'UUID:NUMBER'.
101 SET GTID_NEXT = 'AUTOMATIC';
102 include/gtid_step_assert.inc [count=0, only_count=0]
103 include/assert_binlog_events.inc
104 DROP TABLE temp_t;
105 DROP TABLE base, temp_n;
106 include/rpl_sync.inc
107 include/rpl_reset.inc
108 CALL create_tables();
109 include/gtid_step_reset.inc
110 SET GTID_NEXT = '#';
111 DROP TABLE temp_t, temp_n;
112 ERROR HY000: Cannot execute statement because it needs to be written to the binary log as multiple statements, and this is not allowed when @@SESSION.GTID_NEXT == 'UUID:NUMBER'.
113 SET GTID_NEXT = 'AUTOMATIC';
114 include/gtid_step_assert.inc [count=0, only_count=0]
115 include/assert_binlog_events.inc
116 DROP TABLE base;
117 DROP TABLE temp_t, temp_n;
118 include/rpl_sync.inc
119 include/rpl_reset.inc
120 CALL create_tables();
121 include/gtid_step_reset.inc
122 SET GTID_NEXT = '#';
123 DROP TABLE base, temp_t, temp_n;
124 ERROR HY000: Cannot execute statement because it needs to be written to the binary log as multiple statements, and this is not allowed when @@SESSION.GTID_NEXT == 'UUID:NUMBER'.
125 SET GTID_NEXT = 'AUTOMATIC';
126 include/gtid_step_assert.inc [count=0, only_count=0]
127 include/assert_binlog_events.inc
128 DROP TABLE base, temp_t, temp_n;
129 include/rpl_sync.inc
130 include/rpl_reset.inc
131 ==== Case 2B: DROP TABLE is split on slave ====
132 ---- Initialize ----
133 CREATE TABLE dummy (a INT);
134 DROP PROCEDURE create_tables;
135 CREATE FUNCTION create_tables_func() RETURNS INT
136 BEGIN
137 IF @@GLOBAL.SERVER_ID = 2 THEN
138 CREATE TEMPORARY TABLE temp_t (a INT) ENGINE = InnoDB;
139 CREATE TEMPORARY TABLE temp_n (a INT) ENGINE = MyISAM;
140 END IF;
141 RETURN 0;
142 END|
143 CREATE PROCEDURE create_tables()
144 BEGIN
145 CREATE TABLE base (a INT);
146 SET @@SESSION.SQL_LOG_BIN = 0;
147 CREATE TABLE temp_t (a INT);
148 CREATE TABLE temp_n (a INT);
149 SET @@SESSION.SQL_LOG_BIN = 1;
150 INSERT INTO dummy VALUES (create_tables_func());
151 END|
152 include/rpl_sync.inc
153 ---- GTID_MODE=AUTOMATIC ----
154 CALL create_tables();
155 Warnings:
156 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
157 include/gtid_step_reset.inc
158 DROP TABLE base, temp_t;
159 include/gtid_step_assert.inc [count=1, only_count=0]
160 include/assert_binlog_events.inc
161 DROP TABLE temp_n;
162 include/rpl_sync.inc
163 include/rpl_reset.inc
164 CALL create_tables();
165 Warnings:
166 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
167 include/gtid_step_reset.inc
168 DROP TABLE base, temp_n;
169 include/gtid_step_assert.inc [count=1, only_count=0]
170 include/assert_binlog_events.inc
171 DROP TABLE temp_t;
172 include/rpl_sync.inc
173 include/rpl_reset.inc
174 CALL create_tables();
175 Warnings:
176 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
177 include/gtid_step_reset.inc
178 DROP TABLE temp_t, temp_n;
179 include/gtid_step_assert.inc [count=1, only_count=0]
180 include/assert_binlog_events.inc
181 DROP TABLE base;
182 include/rpl_sync.inc
183 include/rpl_reset.inc
184 CALL create_tables();
185 Warnings:
186 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
187 include/gtid_step_reset.inc
188 DROP TABLE base, temp_t, temp_n;
189 include/gtid_step_assert.inc [count=1, only_count=0]
190 include/assert_binlog_events.inc
191 include/rpl_sync.inc
192 include/rpl_reset.inc
193 ---- Clean up ----
194 DROP FUNCTION create_tables_func;
195 DROP PROCEDURE create_tables;
196 DROP PROCEDURE drop_tables;
197 DROP TABLE dummy;
198 ==== Case 2C: DROP TABLES for base tables in engines with and without atomic DDL support ====
199 CREATE TABLE base_1_n (a INT) ENGINE = MyISAM;
200 CREATE TABLE base_2_n (a INT) ENGINE = MyISAM;
201 CREATE TABLE base_3_a (a INT) ENGINE = InnoDB;
202 CREATE TABLE base_4_a (a INT) ENGINE = InnoDB;
203 include/rpl_sync.inc
204 ---- GTID_MODE=AUTOMATIC ----
205 include/gtid_step_reset.inc
206 DROP TABLES base_1_n, base_2_n, base_3_a, base_4_a;
207 # In AUTOMATIC mode the above statement should be split into three:
208 # two statements for each of MyISAM tables and single statement
209 # dropping both of InnoDB tables.
210 include/gtid_step_assert.inc [count=3, only_count=0]
211 CREATE TABLE base_1_n (a INT) ENGINE = MyISAM;
212 CREATE TABLE base_2_n (a INT) ENGINE = MyISAM;
213 CREATE TABLE base_3_a (a INT) ENGINE = InnoDB;
214 CREATE TABLE base_4_a (a INT) ENGINE = InnoDB;
215 include/rpl_sync.inc
216 ---- GTID_NEXT=non-automatic ----
217 include/gtid_step_reset.inc
218 SET GTID_NEXT = '#';
219 DROP TABLES base_1_n, base_2_n, base_3_a, base_4_a;
220 SET GTID_NEXT= 'AUTOMATIC';
221 # With GTID assigned the above statement should not be split.
222 include/gtid_step_assert.inc [count=1, only_count=0]
223 include/rpl_sync.inc
224 ==== Case 2D: Failing DROP TABLES for base tables with and without atomic DDL support ====
225 See rpl_split_statements_debug.test
226 ==== Case 3: DROP DATABASE ====
227 See rpl_split_statements_debug.test
228 ==== Case 4: CREATE TABLE ... SELECT ====
229 See rpl_gtid_create_select.test
230 include/rpl_end.inc