| 1 |
|
| 2 |
# 1. Create a source-replica topology. |
| 3 |
|
| 4 |
include/master-slave.inc |
| 5 |
Warnings: |
| 6 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 7 |
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. |
| 8 |
[connection master] |
| 9 |
|
| 10 |
# 2. Prepare initial test data and ensure it is replicated. |
| 11 |
|
| 12 |
[connection master] |
| 13 |
CREATE TABLE t (a LONGBLOB) ENGINE = InnoDB; |
| 14 |
INSERT INTO t VALUES (REPEAT('a', 1000)); |
| 15 |
include/sync_slave_sql_with_master.inc |
| 16 |
call mtr.add_suppression("Could not purge binary logs since an.*"); |
| 17 |
|
| 18 |
# 3. Take backup lock on the replica. |
| 19 |
|
| 20 |
[connection slave] |
| 21 |
LOCK INSTANCE FOR BACKUP; |
| 22 |
|
| 23 |
# 4. Generate a transaction that exceeds the relay log space limit. |
| 24 |
|
| 25 |
[connection master] |
| 26 |
INSERT INTO t VALUES (REPEAT('a', 10000)); |
| 27 |
|
| 28 |
# 5. Verify that the receiver thread is waiting for applier thread to |
| 29 |
# free relay log space. |
| 30 |
|
| 31 |
[connection slave] |
| 32 |
|
| 33 |
# 6. Unlock the replica instance. |
| 34 |
|
| 35 |
UNLOCK INSTANCE; |
| 36 |
|
| 37 |
# 7. Verify that the receiver thread is waiting for the source to send |
| 38 |
# events. |
| 39 |
|
| 40 |
|
| 41 |
# 8. Verify that the files slave-relay-bin.000001 and |
| 42 |
# slave-relay-bin.000002 have been deleted (purged) to free relay |
| 43 |
# log space. |
| 44 |
|
| 45 |
|
| 46 |
# 9. Synchronize the source and replica servers. |
| 47 |
|
| 48 |
[connection master] |
| 49 |
include/sync_slave_sql_with_master.inc |
| 50 |
|
| 51 |
# 10. Clean up. |
| 52 |
|
| 53 |
[connection master] |
| 54 |
DROP TABLE t; |
| 55 |
include/rpl_end.inc |