| 1 |
include/group_replication.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 server1] |
| 6 |
|
| 7 |
############################################################ |
| 8 |
# 1. Execute some transactions on server 1 with and without |
| 9 |
# GTID specified. |
| 10 |
[connection server1] |
| 11 |
SET SESSION sql_log_bin= 0; |
| 12 |
include/gtid_utils.inc |
| 13 |
SET SESSION sql_log_bin= 1; |
| 14 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 15 |
include/rpl_sync.inc |
| 16 |
|
| 17 |
############################################################ |
| 18 |
# 2. Force negative certification outcome of the next |
| 19 |
# transaction. |
| 20 |
[connection server2] |
| 21 |
SET @debug_save= @@GLOBAL.DEBUG; |
| 22 |
SET @@GLOBAL.DEBUG= '+d,certifier_force_1_negative_certification'; |
| 23 |
[connection server1] |
| 24 |
SET @debug_save= @@GLOBAL.DEBUG; |
| 25 |
SET @@GLOBAL.DEBUG= '+d,certifier_force_1_negative_certification'; |
| 26 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-bbbbbbbbbbbb:1'; |
| 27 |
INSERT INTO t1 VALUES (1); |
| 28 |
ERROR 40000: Plugin instructed the server to rollback the current transaction. |
| 29 |
include/assert.inc ['GTID_OWNED is empty'] |
| 30 |
SET GTID_NEXT= AUTOMATIC; |
| 31 |
[connection server2] |
| 32 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 33 |
[connection server1] |
| 34 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 35 |
INSERT INTO t1 VALUES (2); |
| 36 |
include/assert.inc ['There is no value 1 in table t1'] |
| 37 |
include/assert.inc ['There is a value 2 in table t1'] |
| 38 |
include/assert.inc [GTID_EXECUTED must contain 4 group transactions] |
| 39 |
|
| 40 |
############################################################ |
| 41 |
# 3. Force error on before commit hook. |
| 42 |
SET SESSION sql_log_bin= 0; |
| 43 |
call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed"); |
| 44 |
SET SESSION sql_log_bin= 1; |
| 45 |
SET @@GLOBAL.DEBUG= '+d,group_replication_force_error_on_before_commit_listener'; |
| 46 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-bbbbbbbbbbbb:2'; |
| 47 |
INSERT INTO t1 VALUES (3); |
| 48 |
ERROR HY000: Error on observer while running replication hook 'before_commit'. |
| 49 |
include/assert.inc ['GTID_OWNED is empty'] |
| 50 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-bbbbbbbbbbbb:3'; |
| 51 |
FLUSH RELAY LOGS; |
| 52 |
ERROR HY000: Error on observer while running replication hook 'before_commit'. |
| 53 |
include/assert.inc ['GTID_OWNED is empty'] |
| 54 |
SET GTID_NEXT= AUTOMATIC; |
| 55 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 56 |
INSERT INTO t1 VALUES (4); |
| 57 |
include/assert.inc ['There is no value 3 in table t1'] |
| 58 |
include/assert.inc ['There is a value 4 in table t1'] |
| 59 |
include/assert.inc [GTID_EXECUTED must contain 5 group transactions] |
| 60 |
|
| 61 |
############################################################ |
| 62 |
# 4. Clean up. |
| 63 |
DROP TABLE t1; |
| 64 |
SET SESSION sql_log_bin= 0; |
| 65 |
include/gtid_utils_end.inc |
| 66 |
SET SESSION sql_log_bin= 1; |
| 67 |
include/group_replication_end.inc |