| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
CREATE DATABASE db; |
| 4 |
USE db; |
| 5 |
CREATE TABLE t(num INT, num2 INT); |
| 6 |
CREATE PROCEDURE insertParallely() |
| 7 |
BEGIN |
| 8 |
DECLARE counter INT DEFAULT 1; |
| 9 |
WHILE counter <= 10000 DO |
| 10 |
INSERT INTO db.t VALUES(counter, 1); |
| 11 |
SET counter = counter + 1; |
| 12 |
END WHILE; |
| 13 |
END$ |
| 14 |
CALL insertParallely();; |
| 15 |
[connection server_1] |
| 16 |
[connection master] |
| 17 |
[connection slave] |
| 18 |
include/start_slave.inc |
| 19 |
[connection master] |
| 20 |
UPDATE db.t SET num2=2 WHERE num2=1; |
| 21 |
include/sync_slave_sql_with_master.inc |
| 22 |
[connection slave] |
| 23 |
include/assert.inc [The row count with num2=2 must be 10000 on slave] |
| 24 |
include/assert.inc [The slave's GTID_EXECUTED must be equal to the master's one] |
| 25 |
[connection master] |
| 26 |
DROP DATABASE db; |
| 27 |
include/rpl_end.inc |