Debian Codegraph @

mysql-test/suite/rpl/r/rpl_row_basic_11bugs.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 # Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table
7 # on slave for writes)
8 CREATE DATABASE test_ignore;
9 **** On Master ****
10 SHOW DATABASES;
11 Database
12 information_schema
13 mtr
14 mysql
15 performance_schema
16 sys
17 test
18 test_ignore
19 USE test;
20 CREATE TABLE t1 (a INT, b INT);
21 SHOW TABLES;
22 Tables_in_test
23 t1
24 INSERT INTO t1 VALUES (1,1), (2,2);
25 USE test_ignore;
26 CREATE TABLE t2 (a INT, b INT);
27 SHOW TABLES;
28 Tables_in_test_ignore
29 t2
30 INSERT INTO t2 VALUES (3,3), (4,4);
31 include/show_binlog_events.inc
32 Log_name Pos Event_type Server_id End_log_pos Info
33 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
34 master-bin.000001 # Query # # BEGIN
35 master-bin.000001 # Table_map # # table_id: # (test.t1)
36 master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
37 master-bin.000001 # Query # # COMMIT
38 include/sync_slave_sql_with_master.inc
39 **** On Slave ****
40 SHOW DATABASES;
41 Database
42 information_schema
43 mtr
44 mysql
45 performance_schema
46 sys
47 test
48 USE test;
49 SHOW TABLES;
50 Tables_in_test
51 t1
52 USE test_ignore;
53 ERROR 42000: Unknown database 'test_ignore'
54 DROP DATABASE test_ignore;
55 USE test;
56 DROP TABLE t1;
57 include/sync_slave_sql_with_master.inc
58 USE test;
59 # Bug#19995: Extreneous table maps generated for statements that does
60 # not generate rows
61 include/rpl_reset.inc
62 CREATE TABLE t1 (a INT);
63 DELETE FROM t1;
64 INSERT INTO t1 VALUES (1),(2);
65 DELETE FROM t1 WHERE a = 0;
66 UPDATE t1 SET a=99 WHERE a = 0;
67 include/show_binlog_events.inc
68 Log_name Pos Event_type Server_id End_log_pos Info
69 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
70 master-bin.000001 # Query # # BEGIN
71 master-bin.000001 # Table_map # # table_id: # (test.t1)
72 master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
73 master-bin.000001 # Query # # COMMIT
74 DROP TABLE t1;
75 ================ Test for BUG#17620 ================
76 include/rpl_reset.inc
77 **** On Slave ****
78 call mtr.add_suppression("Replica SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032");
79 **** On Master ****
80 CREATE TABLE t1 (a INT);
81 INSERT INTO t1 VALUES (1),(2),(3);
82 **** On Slave ****
83 include/sync_slave_sql_with_master.inc
84 **** On Master ****
85 INSERT INTO t1 VALUES (4),(5),(6);
86 **** On Slave ****
87 include/sync_slave_sql_with_master.inc
88 SELECT * FROM t1;
89 a
90 1
91 2
92 3
93 4
94 5
95 6
96 **** On Master ****
97 INSERT INTO t1 VALUES (7),(8),(9);
98 **** On Slave ****
99 include/sync_slave_sql_with_master.inc
100 SELECT * FROM t1;
101 a
102 1
103 2
104 3
105 4
106 5
107 6
108 7
109 8
110 9
111 DROP TABLE t1;
112 ================ Test for BUG#22550 ================
113 include/rpl_reset.inc
114 CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM;
115 include/sync_slave_sql_with_master.inc
116 INSERT INTO t1 VALUES(1,2);
117 SELECT HEX(a),b FROM t1;
118 HEX(a) b
119 1 2
120 include/sync_slave_sql_with_master.inc
121 SELECT HEX(a),b FROM t1;
122 HEX(a) b
123 1 2
124 UPDATE t1 SET a=0 WHERE b=2;
125 SELECT HEX(a),b FROM t1;
126 HEX(a) b
127 0 2
128 include/sync_slave_sql_with_master.inc
129 SELECT HEX(a),b FROM t1;
130 HEX(a) b
131 0 2
132 DROP TABLE IF EXISTS t1;
133 include/sync_slave_sql_with_master.inc
134 ================ Test for BUG#22583 ================
135 include/rpl_reset.inc
136 **** On Master ****
137 CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM;
138 CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB;
139 CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM;
140 CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB;
141 **** On Slave ****
142 include/sync_slave_sql_with_master.inc
143 ALTER TABLE t1_myisam ENGINE=INNODB;
144 ALTER TABLE t1_innodb ENGINE=MYISAM;
145 ALTER TABLE t2_myisam ENGINE=INNODB;
146 ALTER TABLE t2_innodb ENGINE=MYISAM;
147 **** On Master ****
148 INSERT INTO t1_myisam VALUES(1, b'0', 257);
149 INSERT INTO t1_myisam VALUES(2, b'1', 256);
150 INSERT INTO t1_innodb VALUES(1, b'0', 257);
151 INSERT INTO t1_innodb VALUES(2, b'1', 256);
152 SELECT k, HEX(a),HEX(b) FROM t1_myisam;
153 k HEX(a) HEX(b)
154 1 0 101
155 2 1 100
156 SELECT k, HEX(a),HEX(b) FROM t1_innodb;
157 k HEX(a) HEX(b)
158 1 0 101
159 2 1 100
160 INSERT INTO t2_myisam VALUES(1, b'0', 9);
161 INSERT INTO t2_myisam VALUES(2, b'1', 8);
162 INSERT INTO t2_innodb VALUES(1, b'0', 9);
163 INSERT INTO t2_innodb VALUES(2, b'1', 8);
164 SELECT k, HEX(a),HEX(b) FROM t2_myisam;
165 k HEX(a) HEX(b)
166 1 0 9
167 2 1 8
168 SELECT k, HEX(a),HEX(b) FROM t2_innodb;
169 k HEX(a) HEX(b)
170 1 0 9
171 2 1 8
172 **** On Slave ****
173 include/sync_slave_sql_with_master.inc
174 SELECT k, HEX(a),HEX(b) FROM t1_myisam;
175 k HEX(a) HEX(b)
176 1 0 101
177 2 1 100
178 SELECT k, HEX(a),HEX(b) FROM t1_innodb;
179 k HEX(a) HEX(b)
180 1 0 101
181 2 1 100
182 SELECT k, HEX(a),HEX(b) FROM t2_myisam;
183 k HEX(a) HEX(b)
184 1 0 9
185 2 1 8
186 SELECT k, HEX(a),HEX(b) FROM t2_innodb;
187 k HEX(a) HEX(b)
188 1 0 9
189 2 1 8
190 **** On Master ****
191 UPDATE t1_myisam SET a=0 WHERE k=2;
192 SELECT k, HEX(a),HEX(b) FROM t1_myisam;
193 k HEX(a) HEX(b)
194 1 0 101
195 2 0 100
196 UPDATE t1_innodb SET a=0 WHERE k=2;
197 SELECT k, HEX(a),HEX(b) FROM t1_innodb;
198 k HEX(a) HEX(b)
199 1 0 101
200 2 0 100
201 UPDATE t2_myisam SET a=0 WHERE k=2;
202 SELECT k, HEX(a),HEX(b) FROM t2_myisam;
203 k HEX(a) HEX(b)
204 1 0 9
205 2 0 8
206 UPDATE t2_innodb SET a=0 WHERE k=2;
207 SELECT k, HEX(a),HEX(b) FROM t2_innodb;
208 k HEX(a) HEX(b)
209 1 0 9
210 2 0 8
211 **** On Slave ****
212 include/sync_slave_sql_with_master.inc
213 SELECT k, HEX(a),HEX(b) FROM t1_myisam;
214 k HEX(a) HEX(b)
215 1 0 101
216 2 0 100
217 SELECT k, HEX(a),HEX(b) FROM t1_innodb;
218 k HEX(a) HEX(b)
219 1 0 101
220 2 0 100
221 SELECT k, HEX(a),HEX(b) FROM t2_myisam;
222 k HEX(a) HEX(b)
223 1 0 9
224 2 0 8
225 SELECT k, HEX(a),HEX(b) FROM t2_innodb;
226 k HEX(a) HEX(b)
227 1 0 9
228 2 0 8
229 **** On Master ****
230 DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb;
231 include/sync_slave_sql_with_master.inc
232 #
233 # Bug#27716 multi-update did partially and has not binlogged
234 #
235 drop table if exists t1, t2;
236 CREATE TABLE `t1` (
237 `a` int(11) NOT NULL auto_increment,
238 `b` int(11) default NULL,
239 PRIMARY KEY (`a`)
240 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
241 Warnings:
242 Warning 1681 Integer display width is deprecated and will be removed in a future release.
243 Warning 1681 Integer display width is deprecated and will be removed in a future release.
244 CREATE TABLE `t2` (
245 `a` int(11) NOT NULL auto_increment,
246 `b` int(11) default NULL,
247 PRIMARY KEY (`a`)
248 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
249 Warnings:
250 Warning 1681 Integer display width is deprecated and will be removed in a future release.
251 Warning 1681 Integer display width is deprecated and will be removed in a future release.
252 insert into t1 values (1,1),(2,2);
253 insert into t2 values (1,1),(4,4);
254 UPDATE t2,t1 SET t2.a=t1.a+2;
255 ERROR 23000: Duplicate entry '3' for key 't2.PRIMARY'
256 select * from t2 /* must be (3,1), (4,4) */;
257 a b
258 3 1
259 4 4
260 include/sync_slave_sql_with_master.inc
261 select * from t2 /* must be (3,1), (4,4) */;
262 a b
263 3 1
264 4 4
265 drop table t1,t2;
266 include/sync_slave_sql_with_master.inc
267 #
268 # BUG#31702: Missing row on slave causes assertion failure under
269 # row-based replication
270 #
271 include/rpl_reset.inc
272 **** On Master ****
273 CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave'));
274 INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave');
275 **** On Slave ****
276 include/sync_slave_sql_with_master.inc
277 UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1;
278 SELECT * FROM t1 ORDER BY a;
279 a b
280 2 master,slave
281 5 slave
282 set @@global.replica_exec_mode= 'IDEMPOTENT';
283 **** On Master ****
284 UPDATE t1 SET a = 5, b = 'master' WHERE a = 1;
285 SELECT * FROM t1 ORDER BY a;
286 a b
287 2 master,slave
288 5 master
289 **** On Slave ****
290 include/sync_slave_sql_with_master.inc
291 set @@global.replica_exec_mode= default;
292 Last_SQL_Error
293
294 SELECT * FROM t1 ORDER BY a;
295 a b
296 2 master,slave
297 5 slave
298 **** On Master ****
299 DROP TABLE t1;
300 include/rpl_end.inc