| 1 |
################################################################################ |
| 2 |
# Validate group_replication_consistency= 'AFTER' with 3 members. |
| 3 |
# This test is to cover all code paths, that is, we have 2 remote members which |
| 4 |
# will acknowledge the transaction but only the 2nd prepare will release the |
| 5 |
# COMMIT. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 00. The test requires three servers: M1, M2 and M3. |
| 9 |
# 01. Create a table on the group. |
| 10 |
# 02. Validate data. |
| 11 |
# 03. Clean up. |
| 12 |
################################################################################ |
| 13 |
--source include/have_group_replication_plugin.inc |
| 14 |
--let $rpl_server_count= 3 |
| 15 |
--source include/group_replication.inc |
| 16 |
|
| 17 |
--echo |
| 18 |
--echo ############################################################ |
| 19 |
--echo # 01. Create a table on the group. |
| 20 |
--let $rpl_connection_name= server1 |
| 21 |
--source include/rpl_connection.inc |
| 22 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY); |
| 23 |
INSERT INTO t1 VALUES (1); |
| 24 |
|
| 25 |
|
| 26 |
--echo |
| 27 |
--echo ############################################################ |
| 28 |
--echo # 02. Validate data. |
| 29 |
--let $rpl_connection_name= server1 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
--let $assert_text= 'There is 1 value in table t1' |
| 32 |
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE c1=1, count, 1] = 1 |
| 33 |
--source include/assert.inc |
| 34 |
|
| 35 |
--let $rpl_connection_name= server2 |
| 36 |
--source include/rpl_connection.inc |
| 37 |
--let $assert_text= 'There is 1 value in table t1' |
| 38 |
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE c1=1, count, 1] = 1 |
| 39 |
--source include/assert.inc |
| 40 |
|
| 41 |
--let $rpl_connection_name= server3 |
| 42 |
--source include/rpl_connection.inc |
| 43 |
--let $assert_text= 'There is 1 value in table t1' |
| 44 |
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE c1=1, count, 1] = 1 |
| 45 |
--source include/assert.inc |
| 46 |
|
| 47 |
--let $diff_tables=server1:t1, server2:t1, server3:t1 |
| 48 |
--source include/diff_tables.inc |
| 49 |
|
| 50 |
|
| 51 |
--echo |
| 52 |
--echo ############################################################ |
| 53 |
--echo # 03. Clean up. |
| 54 |
--let $rpl_connection_name= server1 |
| 55 |
--source include/rpl_connection.inc |
| 56 |
DROP TABLE t1; |
| 57 |
|
| 58 |
--source include/group_replication_end.inc |