Debian Codegraph @

mysql-test/suite/rpl/r/rpl_known_bugs_detection.result

raw
1 call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
2 include/master-slave.inc
3 connection master;
4 CREATE TABLE t1 (
5 id bigint(20) unsigned NOT NULL auto_increment,
6 field_1 int(10) unsigned NOT NULL,
7 field_2 varchar(255) NOT NULL,
8 field_3 varchar(255) NOT NULL,
9 PRIMARY KEY (id),
10 UNIQUE KEY field_1 (field_1, field_2)
11 );
12 CREATE TABLE t2 (
13 field_a int(10) unsigned NOT NULL,
14 field_b varchar(255) NOT NULL,
15 field_c varchar(255) NOT NULL
16 );
17 INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a');
18 INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b');
19 INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c');
20 INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d');
21 INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e');
22 connection slave;
23 connection master;
24 INSERT INTO t1 (field_1, field_2, field_3)
25 SELECT t2.field_a, t2.field_b, t2.field_c
26 FROM t2
27 ON DUPLICATE KEY UPDATE
28 t1.field_3 = t2.field_c;
29 Warnings:
30 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.
31 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
32 INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f');
33 INSERT INTO t1 (field_1, field_2, field_3)
34 SELECT t2.field_a, t2.field_b, t2.field_c
35 FROM t2
36 ON DUPLICATE KEY UPDATE
37 t1.field_3 = t2.field_c;
38 Warnings:
39 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.
40 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
41 SELECT * FROM t1;
42 id field_1 field_2 field_3
43 1 1 a 1a
44 2 2 b 2b
45 3 3 c 3c
46 4 4 d 4d
47 5 5 e 5e
48 6 6 f 6f
49 connection slave;
50 include/wait_for_slave_sql_error.inc [errno=1105]
51 Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3)
52 SELECT t2.field_a, t2.field_b, t2.field_c
53 FROM t2
54 ON DUPLICATE KEY UPDATE
55 t1.field_3 = t2.field_c''
56 SELECT * FROM t1;
57 id field_1 field_2 field_3
58 connection master;
59 drop table t1, t2;
60 connection slave;
61 drop table t1, t2;
62 include/stop_slave_io.inc
63 RESET SLAVE;
64 include/rpl_end.inc