| 1 |
# |
| 2 |
# 1. Create source-replica topology and initial setup. |
| 3 |
include/master-slave.inc |
| 4 |
Warnings: |
| 5 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 6 |
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. |
| 7 |
[connection master] |
| 8 |
CREATE TABLE t1(c1 INT) ENGINE=MyISAM; |
| 9 |
include/sync_slave_sql_with_master.inc |
| 10 |
call mtr.add_suppression("Replica SQL for channel.*Request to stop replica SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); |
| 11 |
# Adding debug point 'wait_after_do_update_pos' to @@GLOBAL.debug |
| 12 |
# |
| 13 |
# 2. Execute insert statement followed by STOP REPLICA SQL_THREAD for two |
| 14 |
# times. Wait for SLAVE_WAIT_GROUP_DONE(60s) after first iteration. |
| 15 |
# |
| 16 |
# 2.1 Execute a statement on source. |
| 17 |
[connection master] |
| 18 |
INSERT INTO t1 (c1) VALUES (1);; |
| 19 |
# |
| 20 |
# 2.2 Verify that applier thread is waiting on debug sync point. |
| 21 |
[connection slave] |
| 22 |
# |
| 23 |
# 2.3 Execute 'stop replica sql_thread' and let it wait |
| 24 |
# on debug sync point. |
| 25 |
[START] stop replica sql_thread; |
| 26 |
# |
| 27 |
# 2.4 Continue applier thread. |
| 28 |
SET DEBUG_SYNC= 'now SIGNAL signal.after_do_update_pos_continue'; |
| 29 |
# |
| 30 |
# 2.5 Continue 'stop replica sql_thread'. |
| 31 |
[END] stop replica sql_thread; |
| 32 |
[connection master] |
| 33 |
[connection slave] |
| 34 |
# |
| 35 |
# 2.6 Execute 'start replica sql_thread'. |
| 36 |
include/start_slave_sql.inc |
| 37 |
# |
| 38 |
# 2.1 Execute a statement on source. |
| 39 |
[connection master] |
| 40 |
INSERT INTO t1 (c1) VALUES (1);; |
| 41 |
# |
| 42 |
# 2.2 Verify that applier thread is waiting on debug sync point. |
| 43 |
[connection slave] |
| 44 |
# |
| 45 |
# 2.3 Execute 'stop replica sql_thread' and let it wait |
| 46 |
# on debug sync point. |
| 47 |
[START] stop replica sql_thread; |
| 48 |
# |
| 49 |
# 2.4 Continue applier thread. |
| 50 |
SET DEBUG_SYNC= 'now SIGNAL signal.after_do_update_pos_continue'; |
| 51 |
# |
| 52 |
# 2.5 Continue 'stop replica sql_thread'. |
| 53 |
[END] stop replica sql_thread; |
| 54 |
[connection master] |
| 55 |
[connection slave] |
| 56 |
# Removing debug point 'wait_after_do_update_pos' from @@GLOBAL.debug |
| 57 |
# |
| 58 |
# 2.6 Execute 'start replica sql_thread'. |
| 59 |
include/start_slave_sql.inc |
| 60 |
# |
| 61 |
# 3. Cleanup. |
| 62 |
[connection master] |
| 63 |
DROP TABLE t1; |
| 64 |
include/rpl_end.inc |