| 1 |
# |
| 2 |
# 1. Create a user so we can set a privileged user to create GR channels |
| 3 |
CREATE USER 'u1'@'localhost'; |
| 4 |
# |
| 5 |
# 2. Create a group replication applier channel |
| 6 |
# Verify SOURCE_AUTO_POSITION, REQUIRE_ROW_FORMAT and GTID_ONLY are enabled |
| 7 |
CHANGE REPLICATION SOURCE TO PRIVILEGE_CHECKS_USER = 'u1'@'localhost' FOR CHANNEL "group_replication_applier"; |
| 8 |
include/assert.inc [Auto_position is set to 1 for GR applier channel] |
| 9 |
include/assert.inc [Require_row_format is set to 1 for GR applier channel] |
| 10 |
include/assert.inc [Gtid_only is set to 1 for GR applier channel] |
| 11 |
# |
| 12 |
# 3. For the group replication applier channel |
| 13 |
# Verify SOURCE_AUTO_POSITION, REQUIRE_ROW_FORMAT and GTID_ONLY can't be modified |
| 14 |
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION = 0 FOR CHANNEL "group_replication_applier"; |
| 15 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 16 |
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION = 1 FOR CHANNEL "group_replication_applier"; |
| 17 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 18 |
CHANGE REPLICATION SOURCE TO REQUIRE_ROW_FORMAT = 0 FOR CHANNEL "group_replication_applier"; |
| 19 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 20 |
CHANGE REPLICATION SOURCE TO REQUIRE_ROW_FORMAT = 1 FOR CHANNEL "group_replication_applier"; |
| 21 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 22 |
CHANGE REPLICATION SOURCE TO GTID_ONLY = 0 FOR CHANNEL "group_replication_applier"; |
| 23 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 24 |
CHANGE REPLICATION SOURCE TO GTID_ONLY = 1 FOR CHANNEL "group_replication_applier"; |
| 25 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_applier'. |
| 26 |
include/assert.inc [Auto_position is set to 1 for GR applier channel] |
| 27 |
include/assert.inc [Require_row_format is set to 1 for GR applier channel] |
| 28 |
include/assert.inc [Gtid_only is set to 1 for GR applier channel] |
| 29 |
# |
| 30 |
# 4. Create a group replication recovery channel |
| 31 |
# Verify SOURCE_AUTO_POSITION, REQUIRE_ROW_FORMAT and GTID_ONLY are enabled |
| 32 |
CHANGE REPLICATION SOURCE TO PRIVILEGE_CHECKS_USER = 'u1'@'localhost' FOR CHANNEL "group_replication_recovery"; |
| 33 |
include/assert.inc [Auto_position is set to 1 for GR recovery channel] |
| 34 |
include/assert.inc [Require_row_format is set to 1 for GR recovery channel] |
| 35 |
include/assert.inc [Gtid_only is set to 1 for GR recovery channel] |
| 36 |
# |
| 37 |
# 5. For the group replication recovery channel |
| 38 |
# Verify SOURCE_AUTO_POSITION, REQUIRE_ROW_FORMAT and GTID_ONLY can't be modified |
| 39 |
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION = 0 FOR CHANNEL "group_replication_recovery"; |
| 40 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 41 |
CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION = 1 FOR CHANNEL "group_replication_recovery"; |
| 42 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 43 |
CHANGE REPLICATION SOURCE TO REQUIRE_ROW_FORMAT = 0 FOR CHANNEL "group_replication_recovery"; |
| 44 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 45 |
CHANGE REPLICATION SOURCE TO REQUIRE_ROW_FORMAT = 1 FOR CHANNEL "group_replication_recovery"; |
| 46 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 47 |
CHANGE REPLICATION SOURCE TO GTID_ONLY = 0 FOR CHANNEL "group_replication_recovery"; |
| 48 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 49 |
CHANGE REPLICATION SOURCE TO GTID_ONLY = 1 FOR CHANNEL "group_replication_recovery"; |
| 50 |
ERROR HY000: CHANGE REPLICATION SOURCE with the given parameters cannot be performed on channel 'group_replication_recovery'. |
| 51 |
include/assert.inc [Auto_position is set to 1 for GR recovery channel] |
| 52 |
include/assert.inc [Require_row_format is set to 1 for GR recovery channel] |
| 53 |
include/assert.inc [Gtid_only is set to 1 for GR recovery channel] |
| 54 |
# |
| 55 |
# 6. Delete the channels |
| 56 |
# Verify they cannot be created when GTID_MODE != ON |
| 57 |
RESET REPLICA ALL; |
| 58 |
SET GLOBAL GTID_MODE = ON_PERMISSIVE; |
| 59 |
CHANGE REPLICATION SOURCE TO PRIVILEGE_CHECKS_USER = 'u1'@'localhost' FOR CHANNEL "group_replication_applier"; |
| 60 |
ERROR HY000: When configuring a group replication channel you must do it when GTID_MODE = ON. |
| 61 |
CHANGE REPLICATION SOURCE TO PRIVILEGE_CHECKS_USER = 'u1'@'localhost' FOR CHANNEL "group_replication_recovery"; |
| 62 |
ERROR HY000: When configuring a group replication channel you must do it when GTID_MODE = ON. |
| 63 |
# |
| 64 |
# 7. Cleanup |
| 65 |
SET GLOBAL GTID_MODE = ON; |
| 66 |
DROP USER 'u1'@'localhost'; |