| 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 |
|
| 7 |
################################################## |
| 8 |
# 0. This test requires the source to execute its transactions with |
| 9 |
# binlog_row_image = minimal |
| 10 |
[connection master] |
| 11 |
SET @@SESSION.binlog_row_image = 'MINIMAL'; |
| 12 |
|
| 13 |
################################################## |
| 14 |
# 1. Enable the generation of GIPKs in the source |
| 15 |
# With the binary log temporarily disabled, create table t1 |
| 16 |
# Create the same table on the replica |
| 17 |
# Add a row to the table on the source |
| 18 |
[connection slave] |
| 19 |
CREATE TABLE t1(f1 INT, f2 INT); |
| 20 |
[connection master] |
| 21 |
SET SESSION sql_generate_invisible_primary_key = ON; |
| 22 |
include/disable_binlog.inc |
| 23 |
CREATE TABLE t1(f1 INT, f2 INT); |
| 24 |
include/restore_binlog.inc |
| 25 |
SET SESSION sql_generate_invisible_primary_key = OFF; |
| 26 |
INSERT INTO t1 VALUES (1, 1); |
| 27 |
include/sync_slave_sql_with_master.inc |
| 28 |
include/assert.inc [The table t1 contains the inserted row] |
| 29 |
|
| 30 |
################################################## |
| 31 |
# 2. Update the row on the source |
| 32 |
# Check the replica applier fails as it cannot locate the key |
| 33 |
[connection master] |
| 34 |
UPDATE t1 SET t1.f1 = 3 WHERE t1.f1=1; |
| 35 |
[connection slave] |
| 36 |
include/wait_for_slave_sql_error.inc [errno=1032] |
| 37 |
include/assert.inc [The table t1 contains no rows on the replica] |
| 38 |
|
| 39 |
################################################## |
| 40 |
# 3. Cleanup |
| 41 |
[connection master] |
| 42 |
RESET MASTER; |
| 43 |
[connection slave] |
| 44 |
include/stop_slave.inc |
| 45 |
include/rpl_reset_slave.inc |
| 46 |
RESET MASTER; |
| 47 |
include/start_slave.inc |
| 48 |
include/suppress_messages.inc |
| 49 |
# Connection 2 suppresses message <Replica SQL for channel .*: Worker .* failed executing transaction .* at source log master-bin.000001, end_log_pos .* Could not execute Update_rows event on table test>. |
| 50 |
# Connection 2 suppresses message <Replica SQL for channel .*: ... The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state.>. |
| 51 |
# Connection 2 suppresses message <Replica SQL for channel .*: Could not execute Update_rows event on table test.t1>. |
| 52 |
# Connection 2 suppresses message <Replica: Can.* find record in 't1'>. |
| 53 |
[connection master] |
| 54 |
DROP TABLE t1; |
| 55 |
include/rpl_end.inc |