################################################################################ # Verify that entries corresponding to the GCS performance schema instrumented # mutexes and conds are in the setup_instruments table during the period the # group replication plugin is installed, and that the corresponding entries are # in the mutex_instances and cond_instances tables only during the execution of # the plugin. # # Test: # 0. The test requires one Server: M1 # 1. Verify that no entries corresponding to the instrumented GCS mutexes and # conds are in the mutex_instances, cond_instances, # events_waits_current and events_waits_history tables. # 2. Start GR on M1. # 3. Verify that the entries corresponding to the instrumented GCS mutexes and # conds are in the setup_instruments, mutex_instances, cond_instances, # events_waits_current and events_waits_history tables. # 4. Stop GR on M1. # 5. Verify that the entries corresponding to the instrumented GCS mutexes and # conds remain in the setup_instruments table, and that no instances related # entries remain in the mutex_instances, cond_instances, # events_waits_current and events_waits_history tables. # 6. Test end. ################################################################################ --source include/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source include/group_replication.inc --echo --echo ############################################################ --echo # 1. Verify that no entries corresponding to the --echo # instrumented GCS mutexes and conds are in the --echo # setup_instruments table, as well as no corresponding --echo # instances are in the mutex_instances or cond_instances --echo # tables immediately after plugin installation (before --echo # starting the GR). --connection server1 --let $assert_text= 'There should be no GCS instrumented mutex entries in the mutex_instances table before starting the GR' --let $assert_cond= COUNT(*) = 0 FROM performance_schema.mutex_instances WHERE NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" --source include/assert.inc --let $assert_text= 'There should be no GCS instrumented cond entries in the cond_instances table before starting the GR' --let $assert_cond= COUNT(*) = 0 FROM performance_schema.cond_instances WHERE NAME LIKE "%_COND_GCS_%" --source include/assert.inc --echo --echo ############################################################ --echo # 2. Start the GR --source include/start_and_bootstrap_group_replication.inc --echo --echo ############################################################ --echo # 3. Verify that the entries corresponding to the --echo # instrumented GCS mutexes and conds are in the --echo # setup_instruments table, and that the corresponding --echo # instances are in the mutex_instances and --echo # cond_instances tables after starting the GR. --let $assert_text= 'There should be 21 GCS instrumented mutex and cond entries in the setup_instruments table after starting the GR' --let $assert_cond= COUNT(*) = 21 FROM performance_schema.setup_instruments WHERE (NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" OR NAME LIKE "wait/synch/cond/group_rpl/GCS_%") --source include/assert.inc SELECT * FROM performance_schema.setup_instruments WHERE (NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" OR NAME LIKE "wait/synch/cond/group_rpl/GCS_%") ORDER BY NAME; --let $assert_text= 'There should be 9 GCS instrumented cond entries in the cond_instances table after starting the GR' --let $assert_cond= COUNT(*) = 9 FROM performance_schema.cond_instances WHERE NAME LIKE "wait/synch/cond/group_rpl/GCS_%" --source include/assert.inc SELECT NAME FROM performance_schema.cond_instances WHERE NAME LIKE "wait/synch/cond/group_rpl/GCS_%" ORDER BY NAME; --let $assert_text= 'There should be 12 GCS instrumented mutex entries in the mutex_instances table after starting the GR' --let $assert_cond= COUNT(*) = 12 FROM performance_schema.mutex_instances WHERE NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" --source include/assert.inc SELECT NAME FROM performance_schema.mutex_instances WHERE NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" ORDER BY NAME; --echo --echo ############################################################ --echo # 4. Stop the GR --source include/stop_group_replication.inc --echo --echo ############################################################ --echo # 5. Verify that the entries corresponding to the --echo # instrumented GCS mutexes and conds remain in the --echo # setup_instruments table, and that no corresponding --echo # instances remain in the mutex_instances and --echo # cond_instances tables after stopping the GR. --let $assert_text= 'There should be the same 21 GCS instrumented mutex and cond entries in the setup_instruments table after stopping the GR' --let $assert_cond= COUNT(*) = 21 FROM performance_schema.setup_instruments WHERE (NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" OR NAME LIKE "wait/synch/cond/group_rpl/GCS_%") --source include/assert.inc SELECT * FROM performance_schema.setup_instruments WHERE (NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" OR NAME LIKE "wait/synch/cond/group_rpl/GCS_%") ORDER BY NAME; --let $assert_text= 'There should be no GCS instrumented mutex entries in the mutex_instances table after stopping the GR' --let $assert_cond= COUNT(*) = 0 FROM performance_schema.mutex_instances WHERE NAME LIKE "wait/synch/mutex/group_rpl/GCS_%" --source include/assert.inc --let $assert_text= 'There should be no GCS instrumented cond entries in the cond_instances table after stopping the GR' --let $assert_cond= COUNT(*) = 0 FROM performance_schema.cond_instances WHERE NAME LIKE "wait/synch/cond/group_rpl/GCS_%" --source include/assert.inc --echo --echo ############################################################ --echo # 6. Test end. --source include/group_replication_end.inc