| 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 SQL.*Can.t find record in .t[12].* Error_code: 1032"); |
| 7 |
call mtr.add_suppression("Replica SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); |
| 8 |
call mtr.add_suppression("Replica SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); |
| 9 |
call mtr.add_suppression("Replica SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); |
| 10 |
CREATE TABLE t1 (a INT PRIMARY KEY); |
| 11 |
CREATE TABLE t2 (a INT); |
| 12 |
INSERT INTO t1 VALUES (-1),(-2),(-3); |
| 13 |
INSERT INTO t2 VALUES (-1),(-2),(-3); |
| 14 |
include/sync_slave_sql_with_master.inc |
| 15 |
SET @old_replica_exec_mode= @@global.replica_exec_mode; |
| 16 |
SET @@global.replica_exec_mode= IDEMPOTENT; |
| 17 |
DELETE FROM t1 WHERE a = -2; |
| 18 |
DELETE FROM t2 WHERE a = -2; |
| 19 |
DELETE FROM t1 WHERE a = -2; |
| 20 |
DELETE FROM t2 WHERE a = -2; |
| 21 |
SELECT * FROM t1 ORDER BY a; |
| 22 |
a |
| 23 |
-3 |
| 24 |
-1 |
| 25 |
SELECT * FROM t2 ORDER BY a; |
| 26 |
a |
| 27 |
-3 |
| 28 |
-1 |
| 29 |
include/sync_slave_sql_with_master.inc |
| 30 |
SELECT * FROM t1 ORDER BY a; |
| 31 |
a |
| 32 |
-3 |
| 33 |
-1 |
| 34 |
SELECT * FROM t2 ORDER BY a; |
| 35 |
a |
| 36 |
-3 |
| 37 |
-1 |
| 38 |
include/check_slave_no_error.inc |
| 39 |
INSERT IGNORE INTO t1 VALUES (-2); |
| 40 |
INSERT IGNORE INTO t1 VALUES (-2); |
| 41 |
SELECT * FROM t1 ORDER BY a; |
| 42 |
a |
| 43 |
-3 |
| 44 |
-2 |
| 45 |
-1 |
| 46 |
include/sync_slave_sql_with_master.inc |
| 47 |
SELECT * FROM t1 ORDER BY a; |
| 48 |
a |
| 49 |
-3 |
| 50 |
-2 |
| 51 |
-1 |
| 52 |
include/check_slave_no_error.inc |
| 53 |
UPDATE t1 SET a = 1 WHERE a = -1; |
| 54 |
UPDATE t2 SET a = 1 WHERE a = -1; |
| 55 |
UPDATE t1 SET a = 1 WHERE a = -1; |
| 56 |
UPDATE t2 SET a = 1 WHERE a = -1; |
| 57 |
SELECT * FROM t1 ORDER BY a; |
| 58 |
a |
| 59 |
-3 |
| 60 |
-2 |
| 61 |
1 |
| 62 |
SELECT * FROM t2 ORDER BY a; |
| 63 |
a |
| 64 |
-3 |
| 65 |
1 |
| 66 |
include/sync_slave_sql_with_master.inc |
| 67 |
SELECT * FROM t1 ORDER BY a; |
| 68 |
a |
| 69 |
-3 |
| 70 |
-2 |
| 71 |
1 |
| 72 |
SELECT * FROM t2 ORDER BY a; |
| 73 |
a |
| 74 |
-3 |
| 75 |
1 |
| 76 |
include/check_slave_no_error.inc |
| 77 |
DROP TABLE t1, t2; |
| 78 |
include/sync_slave_sql_with_master.inc |
| 79 |
SET @@global.replica_exec_mode= @old_replica_exec_mode; |
| 80 |
include/rpl_end.inc |