1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
include/group_replication.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection server1]
############################################################
# 01. Create one table on the group.
[connection server1]
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
include/rpl_sync.inc
############################################################
# 02. Force that there is a lower version member.
[connection server1]
SET @@GLOBAL.DEBUG= '+d,group_replication_force_lower_version_on_group_replication_consistency';
[connection server2]
SET @@GLOBAL.DEBUG= '+d,group_replication_force_lower_version_on_group_replication_consistency';
############################################################
# 03. Test BEFORE consistency, it is allowed.
SET @@SESSION.group_replication_consistency= 'BEFORE';
INSERT INTO t1 VALUES (1);
############################################################
# 04. Test AFTER consistency, it is not allowed.
SET @@SESSION.group_replication_consistency= 'AFTER';
INSERT INTO t1 VALUES (2);
ERROR 40000: Plugin instructed the server to rollback the current transaction.
############################################################
# 05. Test BEFORE_AND_AFTER consistency, it is not allowed.
SET @@SESSION.group_replication_consistency= 'BEFORE_AND_AFTER';
INSERT INTO t1 VALUES (3);
ERROR 40000: Plugin instructed the server to rollback the current transaction.
############################################################
# 06. Validate data.
SET @@SESSION.group_replication_consistency= DEFAULT;
INSERT INTO t1 VALUES (0);
include/rpl_sync.inc
[connection server1]
include/assert.inc ['1 exists in table t1']
include/assert.inc ['2 does not exist in table t1']
include/assert.inc ['3 does not exist in table t1']
[connection server2]
include/assert.inc ['1 exists in table t1']
include/assert.inc ['2 does not exist in table t1']
include/assert.inc ['3 does not exist in table t1']
############################################################
# 07. Clean up.
[connection server1]
DROP TABLE t1;
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
[connection server2]
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
include/group_replication_end.inc
|