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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
################################################################################
# This test verifies that parallel execution of
# SELECT * FROM performance_schema.replication_group_member_stats and
# Group Replication options change are handled properly by the server.
#
# Test:
# 0. The test requires one server: M1
# 1. Bootstrap a group on server1.
# Setup a debug point that will block a future
# SELECT * FROM performance_schema.replication_group_member_stats
# after the plugin_running_lock is acquired.
# 2. Asynchronously execute a query on the table
# performance_schema.replication_group_member_stats
# 3. Change a Group Replication option, it must succeed.
# 4. Resume the query on the table
# performance_schema.replication_group_member_stats
# 5. Clean up.
################################################################################
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--echo ############################################################
--echo # 1. Bootstrap a group on server1.
--echo # Setup a debug point that will block a future
--echo # SELECT * FROM performance_schema.replication_group_member_stats
--echo # after the plugin_running_lock is acquired.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/start_and_bootstrap_group_replication.inc
SET @@GLOBAL.DEBUG='+d,group_replication_get_group_member_stats_plugin_running_lock_acquired';
--echo ############################################################
--echo # 2. Asynchronously execute a query on the table
--echo # performance_schema.replication_group_member_stats
--let $rpl_connection_name= server_1
--source include/rpl_connection.inc
--send SELECT CHANNEL_NAME, COUNT_TRANSACTIONS_ROWS_VALIDATING, COUNT_TRANSACTIONS_REMOTE_APPLIED FROM performance_schema.replication_group_member_stats
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET DEBUG_SYNC= "now WAIT_FOR signal.reached_get_group_member_stats_plugin_running_lock_acquired";
SET @@GLOBAL.DEBUG='-d,group_replication_get_group_member_stats_plugin_running_lock_acquired';
--echo ############################################################
--echo # 3. Change a Group Replication option, it must succeed.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @group_replication_member_weight_saved= @@GLOBAL.group_replication_member_weight;
SET @@GLOBAL.group_replication_member_weight= 100;
--let $assert_text= group_replication_member_weight is 100
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_member_weight]" = "100"
--source include/assert.inc
--echo ############################################################
--echo # 4. Resume the query on the table
--echo # performance_schema.replication_group_member_stats
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET DEBUG_SYNC= "now SIGNAL signal.resume_get_group_member_stats_plugin_running_lock_acquired";
--let $rpl_connection_name= server_1
--source include/rpl_connection.inc
--reap
--echo ############################################################
--echo # 5. Clean up.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @@GLOBAL.group_replication_member_weight= @group_replication_member_weight_saved;
SET DEBUG_SYNC= 'RESET';
--source include/group_replication_end.inc
|