Debian Codegraph @

mysql-test/suite/rpl/r/rpl_row_conflicts.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("Replica: Can\'t find record in \'t1\' Error_code: .*");
7 [on slave]
8 SET @old_replica_exec_mode= @@global.replica_exec_mode;
9 ######## Run with replica_exec_mode=STRICT ########
10 SET @@global.replica_exec_mode = 'STRICT';
11 ==== Initialize ====
12 [on master]
13 CREATE TABLE t1(a INT PRIMARY KEY);
14 [on slave]
15 include/sync_slave_sql_with_master.inc
16 ==== Test: SQL thread sees 'INSERT' of existing key ====
17 ---- Prepare slave so that it will get duplicate key error ----
18 INSERT INTO t1 VALUES (1);
19 ---- Insert rows on master ----
20 [on master]
21 INSERT INTO t1 VALUES (1);
22 SELECT * FROM t1;
23 a
24 1
25 [on slave]
26 ---- Wait until slave stops with an error ----
27 include/wait_for_slave_sql_error.inc [errno=1062]
28 SELECT "1062" as 'Last_SQL_Errno';
29 Last_SQL_Errno
30 1062
31 call mtr.add_suppression("Replica SQL.*Duplicate entry .1. for key .t1.PRIMARY.* Error_code: MY-001062");
32 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
33 SELECT * FROM t1;
34 a
35 1
36 ---- Resolve the conflict on the slave and restart SQL thread ----
37 DELETE FROM t1 WHERE a = 1;
38 START SLAVE SQL_THREAD;
39 Warnings:
40 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
41 include/wait_for_slave_sql_to_start.inc
42 ---- Sync slave and verify that there is no error ----
43 include/check_slave_no_error.inc
44 SELECT * FROM t1;
45 a
46 1
47 ==== Test: SQL thread sees 'DELETE' of non-existing row ====
48 ---- On master, insert two rows, the second with binlogging off ----
49 [on master]
50 DELETE FROM t1;
51 INSERT INTO t1 VALUES (1);
52 [on slave]
53 include/sync_slave_sql_with_master.inc
54 DELETE FROM t1 WHERE a = 1;
55 ---- On master, remove the row that does not exist on slave ----
56 [on master]
57 DELETE FROM t1 WHERE a = 1;
58 SELECT * FROM t1;
59 a
60 [on slave]
61 ---- Wait until slave stops with an error ----
62 call mtr.add_suppression("Replica SQL.*Can.t find record in .t1., Error_code: 1032");
63 include/wait_for_slave_sql_error.inc [errno=1032]
64 SELECT "1032" as 'Last_SQL_Errno';
65 Last_SQL_Errno
66 1032
67 SELECT * FROM t1;
68 a
69 ---- Resolve the conflict on the slave and restart SQL thread ----
70 INSERT INTO t1 VALUES (1);
71 START SLAVE SQL_THREAD;
72 Warnings:
73 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
74 include/wait_for_slave_sql_to_start.inc
75 ---- Sync slave and verify that there is no error ----
76 include/check_slave_no_error.inc
77 SELECT * FROM t1;
78 a
79 ==== Clean up ====
80 [on master]
81 DROP TABLE t1;
82 [on slave]
83 include/sync_slave_sql_with_master.inc
84 include/rpl_reset.inc
85 ######## Run with replica_exec_mode=IDEMPOTENT ########
86 set @@global.replica_exec_mode= 'IDEMPOTENT';
87 ==== Initialize ====
88 [on master]
89 CREATE TABLE t1(a INT PRIMARY KEY);
90 [on slave]
91 include/sync_slave_sql_with_master.inc
92 ==== Test: SQL thread sees 'INSERT' of existing key ====
93 ---- Prepare slave so that it will get duplicate key error ----
94 INSERT INTO t1 VALUES (1);
95 ---- Insert rows on master ----
96 [on master]
97 INSERT INTO t1 VALUES (1);
98 SELECT * FROM t1;
99 a
100 1
101 [on slave]
102 ---- Sync slave and verify that there is no error ----
103 include/check_slave_no_error.inc
104 SELECT * FROM t1;
105 a
106 1
107 ==== Test: SQL thread sees 'DELETE' of non-existing row ====
108 ---- On master, insert two rows, the second with binlogging off ----
109 [on master]
110 DELETE FROM t1;
111 INSERT INTO t1 VALUES (1);
112 [on slave]
113 include/sync_slave_sql_with_master.inc
114 DELETE FROM t1 WHERE a = 1;
115 ---- On master, remove the row that does not exist on slave ----
116 [on master]
117 DELETE FROM t1 WHERE a = 1;
118 SELECT * FROM t1;
119 a
120 [on slave]
121 ---- Sync slave and verify that there is no error ----
122 include/check_slave_no_error.inc
123 SELECT * FROM t1;
124 a
125 ==== Clean up ====
126 [on master]
127 DROP TABLE t1;
128 [on slave]
129 include/sync_slave_sql_with_master.inc
130 SET @@global.replica_exec_mode= @old_replica_exec_mode;
131 include/rpl_end.inc