| 1 |
################################################################################ |
| 2 |
# This test is only checking that capture code does not cause |
| 3 |
# errors, for complete testing it will need to be completed when |
| 4 |
# WL#6826, WL#6833, WL#6834, WL#6842, WL#6829, WL#6855 and WL#7237 |
| 5 |
# are finished. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 0. The test requires two servers: M1 and M2. |
| 9 |
# 1. With both members ONLINE, create table t1 on M1, create table t2 on M2. |
| 10 |
# 2. On M1, perform some DML operations, create temporary table t3. |
| 11 |
# On M2, perform DML operation. |
| 12 |
# 3. On M1, check tables and GTID_EXECUTED details. |
| 13 |
# 4. On M2, check tables and GTID_EXECUTED details. |
| 14 |
# Diff tables t1 and t2 on M1 and M2. |
| 15 |
# 5. Clean up. |
| 16 |
################################################################################ |
| 17 |
--let $group_replication_group_name= 8a94f357-aab4-11df-86ab-c80aa9429562 |
| 18 |
--source include/have_group_replication_plugin.inc |
| 19 |
--source include/group_replication.inc |
| 20 |
|
| 21 |
--connection server1 |
| 22 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 23 |
|
| 24 |
--connection server2 |
| 25 |
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 26 |
|
| 27 |
--source include/rpl_sync.inc |
| 28 |
|
| 29 |
--connection server1 |
| 30 |
BEGIN; |
| 31 |
INSERT INTO t1 VALUES (1); |
| 32 |
INSERT INTO t2 VALUES (2); |
| 33 |
COMMIT; |
| 34 |
|
| 35 |
INSERT INTO t1 VALUES (3); |
| 36 |
|
| 37 |
BEGIN; |
| 38 |
INSERT INTO t1 VALUES (4); |
| 39 |
ROLLBACK; |
| 40 |
|
| 41 |
BEGIN; |
| 42 |
INSERT INTO t1 VALUES (5); |
| 43 |
INSERT INTO t1 VALUES (6); |
| 44 |
COMMIT; |
| 45 |
|
| 46 |
CREATE TEMPORARY TABLE t3 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 47 |
|
| 48 |
--connection server2 |
| 49 |
INSERT INTO t1 VALUES (1000); |
| 50 |
|
| 51 |
--source include/rpl_sync.inc |
| 52 |
|
| 53 |
--connection server1 |
| 54 |
--echo |
| 55 |
--echo server1 |
| 56 |
|
| 57 |
--let $server1_gtid_executed= `SELECT @@GLOBAL.GTID_EXECUTED` |
| 58 |
SHOW TABLES FROM test; |
| 59 |
|
| 60 |
--connection server2 |
| 61 |
--echo |
| 62 |
--echo server2 |
| 63 |
--let $server2_gtid_executed= `SELECT @@GLOBAL.GTID_EXECUTED` |
| 64 |
SHOW TABLES FROM test; |
| 65 |
|
| 66 |
--let $assert_text= server1 GTID_EXECUTED must be equal to server2 GTID_EXECUTED |
| 67 |
--let $assert_cond= "$server1_gtid_executed" = "$server2_gtid_executed" |
| 68 |
--source include/assert.inc |
| 69 |
|
| 70 |
--let $diff_tables= server1:test.t1, server2:test.t1 |
| 71 |
--source include/diff_tables.inc |
| 72 |
--let $diff_tables= server1:test.t2, server2:test.t2 |
| 73 |
--source include/diff_tables.inc |
| 74 |
--echo |
| 75 |
|
| 76 |
--connection server1 |
| 77 |
DROP TABLE t1, t2, t3; |
| 78 |
--source include/group_replication_end.inc |