| 1 |
################################################################################ |
| 2 |
# Validate that a 8.0.35 server can join a group in multi-primary mode which |
| 3 |
# version is a higher 8.0 patch version. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 0. The test requires two servers: M1 and M2. |
| 7 |
# 1. Bootstrap the group with a server that is one patch version |
| 8 |
# higher than the current version (8.0.35 or higher). |
| 9 |
# 2. Join a 8.0.35 to the group. |
| 10 |
# 3. Validate that the group has two primaries and both are |
| 11 |
# writable. |
| 12 |
# 4. Clean up. |
| 13 |
################################################################################ |
| 14 |
--source include/have_debug.inc |
| 15 |
--source include/have_group_replication_plugin.inc |
| 16 |
--let $rpl_skip_group_replication_start= 1 |
| 17 |
--source include/group_replication.inc |
| 18 |
|
| 19 |
|
| 20 |
--echo |
| 21 |
--echo ############################################################ |
| 22 |
--echo # 1. Bootstrap the group with a server that is one patch version |
| 23 |
--echo # higher than the current version (8.0.35 or higher). |
| 24 |
--let $rpl_connection_name= server1 |
| 25 |
--source include/rpl_connection.inc |
| 26 |
SET @@GLOBAL.DEBUG= '+d,group_replication_compatibility_higher_patch_version'; |
| 27 |
--source include/start_and_bootstrap_group_replication.inc |
| 28 |
|
| 29 |
|
| 30 |
--echo |
| 31 |
--echo ############################################################ |
| 32 |
--echo # 2. Join a 8.0.35 to the group. |
| 33 |
--let $rpl_connection_name= server2 |
| 34 |
--source include/rpl_connection.inc |
| 35 |
SET @@GLOBAL.DEBUG= '+d,group_replication_version_8_0_35'; |
| 36 |
--source include/start_group_replication.inc |
| 37 |
|
| 38 |
|
| 39 |
--echo |
| 40 |
--echo ############################################################ |
| 41 |
--echo # 3. Validate that the group has two primaries and both are |
| 42 |
--echo # writable. |
| 43 |
--let $rpl_connection_name= server1 |
| 44 |
--source include/rpl_connection.inc |
| 45 |
--let $assert_text= There are two primaries on the group |
| 46 |
--let $assert_cond= [SELECT COUNT(*) count FROM performance_schema.replication_group_members WHERE MEMBER_ROLE="PRIMARY", count, 1] = 2 |
| 47 |
--source include/assert.inc |
| 48 |
|
| 49 |
--let $assert_text= The super_read_only must be disabled. |
| 50 |
--let $assert_cond= "[SELECT @@GLOBAL.super_read_only]" = 0; |
| 51 |
--source include/assert.inc |
| 52 |
--let $assert_text= The read_only must be disabled. |
| 53 |
--let $assert_cond= "[SELECT @@GLOBAL.read_only]" = 0; |
| 54 |
--source include/assert.inc |
| 55 |
|
| 56 |
--let $rpl_connection_name= server2 |
| 57 |
--source include/rpl_connection.inc |
| 58 |
--let $assert_text= There are two primaries on the group |
| 59 |
--let $assert_cond= [SELECT COUNT(*) count FROM performance_schema.replication_group_members WHERE MEMBER_ROLE="PRIMARY", count, 1] = 2 |
| 60 |
--source include/assert.inc |
| 61 |
|
| 62 |
--let $assert_text= The super_read_only must be disabled. |
| 63 |
--let $assert_cond= "[SELECT @@GLOBAL.super_read_only]" = 0; |
| 64 |
--source include/assert.inc |
| 65 |
--let $assert_text= The read_only must be disabled. |
| 66 |
--let $assert_cond= "[SELECT @@GLOBAL.read_only]" = 0; |
| 67 |
--source include/assert.inc |
| 68 |
|
| 69 |
|
| 70 |
--echo |
| 71 |
--echo ############################################################ |
| 72 |
--echo # 4. Clean up. |
| 73 |
--let $rpl_connection_name= server1 |
| 74 |
--source include/rpl_connection.inc |
| 75 |
SET @@GLOBAL.DEBUG= '-d,group_replication_compatibility_higher_patch_version'; |
| 76 |
|
| 77 |
--let $rpl_connection_name= server2 |
| 78 |
--source include/rpl_connection.inc |
| 79 |
SET @@GLOBAL.DEBUG= '-d,group_replication_version_8_0_35'; |
| 80 |
|
| 81 |
--source include/group_replication_end.inc |