| 1 |
################################################################################ |
| 2 |
# This test validates that even when there are concurrent select on |
| 3 |
# performance_schema.replication_group_member_actions table, server should work |
| 4 |
# fine and remain online state. |
| 5 |
# |
| 6 |
# Test: |
| 7 |
# 00. The test requires three servers: M1, M2 and M3. |
| 8 |
# 01. On M1, connection thread(T1) executes a select query on |
| 9 |
# performance_schema.replication_group_member_actions table, then wait on |
| 10 |
# sync point. |
| 11 |
# 02. Verify that T1 is waiting on sync point. |
| 12 |
# 03. Remove the debug flag and execute the select query from another |
| 13 |
# connection. |
| 14 |
# 04. Signal to continue T1 and verify that all members are online. |
| 15 |
# 05. Cleaning up. |
| 16 |
################################################################################ |
| 17 |
|
| 18 |
--source include/have_debug_sync.inc |
| 19 |
--source include/big_test.inc |
| 20 |
--source include/have_group_replication_plugin.inc |
| 21 |
--let $rpl_server_count= 3 |
| 22 |
--source include/group_replication.inc |
| 23 |
|
| 24 |
--echo |
| 25 |
--echo ######################################################################### |
| 26 |
--echo # 01. On M1, connection thread(T1) executes the select query on |
| 27 |
--echo # performance_schema.replication_group_member_actions table, then |
| 28 |
--echo # wait on sync point. |
| 29 |
--let $rpl_connection_name= server1 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
--let $_group_replication_action_enabled= query_get_value(SELECT enabled FROM performance_schema.replication_group_member_actions WHERE name = 'mysql_disable_super_read_only_if_primary', enabled, 1) |
| 32 |
|
| 33 |
--let $debug_point=group_replication_wait_before_group_member_actions_read_column_value |
| 34 |
--source include/add_debug_point.inc |
| 35 |
|
| 36 |
--send SELECT enabled FROM performance_schema.replication_group_member_actions WHERE name = 'mysql_disable_super_read_only_if_primary' |
| 37 |
|
| 38 |
--echo |
| 39 |
--echo ######################################################################### |
| 40 |
--echo # 02. Verify that T1 is waiting on sync point. |
| 41 |
--connect (server_1_2,127.0.0.1,root,,test,$MASTER_MYPORT,,) |
| 42 |
|
| 43 |
--let $rpl_connection_name= server_1_2 |
| 44 |
--source include/rpl_connection.inc |
| 45 |
--let $wait_condition=SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'debug sync point: now' and info = "SELECT enabled FROM performance_schema.replication_group_member_actions WHERE name = 'mysql_disable_super_read_only_if_primary'" |
| 46 |
--source include/wait_condition.inc |
| 47 |
|
| 48 |
--echo |
| 49 |
--echo ######################################################################### |
| 50 |
--echo # 03. Remove the debug flag and execute the select query from another |
| 51 |
--echo # connection. |
| 52 |
--let $debug_point=group_replication_wait_before_group_member_actions_read_column_value |
| 53 |
--source include/remove_debug_point.inc |
| 54 |
|
| 55 |
--replace_result $_group_replication_action_enabled MEMBER_ACTION |
| 56 |
SELECT enabled FROM performance_schema.replication_group_member_actions WHERE name = 'mysql_disable_super_read_only_if_primary'; |
| 57 |
|
| 58 |
--echo |
| 59 |
--echo ######################################################################## |
| 60 |
--echo # 04. Signal to continue T1 and verify that all members are online. |
| 61 |
SET DEBUG_SYNC= 'now SIGNAL signal.after_group_member_actions_read_column_value_continue'; |
| 62 |
|
| 63 |
--let $rpl_connection_name= server1 |
| 64 |
--source include/rpl_connection.inc |
| 65 |
--replace_result $_group_replication_action_enabled MEMBER_ACTION |
| 66 |
--reap |
| 67 |
|
| 68 |
let $wait_condition=SELECT COUNT(*)=3 FROM performance_schema.replication_group_members where MEMBER_STATE="ONLINE"; |
| 69 |
--source include/wait_condition.inc |
| 70 |
|
| 71 |
--echo |
| 72 |
--echo ################################################################ |
| 73 |
--echo # 05. Cleanup |
| 74 |
--source include/group_replication_end.inc |