Debian Codegraph @

mysql-test/suite/rpl/r/rpl_DML_error.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 # Verify the statements can be binlogged correctly when error happens
7 # ------------------------------------------------------------------
8 CREATE TABLE t1(c1 INT KEY) ENGINE=MyISAM;
9 CREATE TABLE t2(c1 INT KEY) ENGINE=MyISAM;
10 INSERT INTO t1 VALUES(1);
11 INSERT INTO t2 VALUES(1);
12
13 # Nothing is inserted.
14 INSERT INTO t1 VALUES(1),(2);
15 ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY'
16 include/show_binlog_events.inc
17
18 # A row is inserted.
19 INSERT INTO t1 VALUES(2),(1);
20 ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY'
21 include/sync_slave_sql_with_master.inc
22 include/diff_tables.inc [master:test.t1, slave:test.t1]
23
24 # Nothing is inserted.
25 INSERT INTO t1 SELECT 1 UNION SELECT 2;
26 ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY'
27 include/show_binlog_events.inc
28
29 # A row is inserted.
30 INSERT INTO t1 SELECT 3 UNION SELECT 2;
31 ERROR 23000: Duplicate entry '2' for key 't1.PRIMARY'
32 include/sync_slave_sql_with_master.inc
33 include/diff_tables.inc [master:test.t1, slave:test.t1]
34
35 # A row is updated.
36 UPDATE t1 SET c1=4;
37 ERROR 23000: Duplicate entry '4' for key 't1.PRIMARY'
38 include/sync_slave_sql_with_master.inc
39 include/diff_tables.inc [master:test.t1, slave:test.t1]
40 # Nothing is updated.
41 UPDATE t1 SET c1=4;
42 ERROR 23000: Duplicate entry '4' for key 't1.PRIMARY'
43 include/show_binlog_events.inc
44
45 # A row is updated.
46 UPDATE t1, t2 SET t1.c1= 5, t2.c1=5;
47 ERROR 23000: Duplicate entry '5' for key 't1.PRIMARY'
48 include/sync_slave_sql_with_master.inc
49 include/diff_tables.inc [master:test.t1, slave:test.t1]
50
51 Nothing is updated.
52 UPDATE t1, t2 SET t1.c1= 5, t2.c1=5;
53 ERROR 23000: Duplicate entry '5' for key 't1.PRIMARY'
54 include/show_binlog_events.inc
55 DROP TABLE t1, t2;
56 include/rpl_end.inc