Debian Codegraph @

mysql-test/suite/group_replication/include/gr_psi_keys.inc

raw
1 ################################################################################
2 # Verify that performance schema keys are available in instrument table
3 # immediately after plugin installation.
4 #
5 # Test:
6 # 0. The test requires one Server: M1
7 # 1. Verify that performance schema keys are available in instrument table
8 # immediately after plugin installation (before starting the GR).
9 # 2. Start GR on M1
10 # 3. Verify that there are no extra psi keys that were added after starting
11 # the GR
12 # 4. Verify that performance_schema.threads list the usual
13 # threads after member is ONLINE.
14 # 5. Test end.
15 ################################################################################
16
17 --source include/have_group_replication_plugin.inc
18 --let $rpl_skip_group_replication_start= 1
19 --source include/group_replication.inc
20
21 --echo
22 --echo ############################################################
23 --echo # 1. verify that performance schema keys are available in instrument
24 --echo # table immediately after plugin installation
25 --echo # (before starting the GR).
26 --connection server1
27 SELECT * FROM performance_schema.setup_instruments WHERE NAME LIKE '%group_rpl%' AND NAME NOT LIKE 'wait/synch/%/group_rpl/GCS_%' AND NAME NOT LIKE 'memory/group_rpl/gcs_%';
28 --let $psi_keys_count_before_gr=`SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE '%group_rpl%' AND NAME NOT LIKE 'wait/synch/%/group_rpl/GCS_%' AND NAME NOT LIKE 'memory/group_rpl/gcs_%'`
29
30 --echo
31 --echo ############################################################
32 --echo # 2. Start the GR
33 --source include/start_and_bootstrap_group_replication.inc
34
35 --echo
36 --echo ############################################################
37 --echo # 3. Verify that there are no extra psi keys that were added
38 --echo # after starting the GR
39 --let $psi_keys_count_after_gr=`SELECT COUNT(*) FROM performance_schema.setup_instruments WHERE NAME LIKE '%group_rpl%' AND NAME NOT LIKE 'wait/synch/%/group_rpl/GCS_%' AND NAME NOT LIKE 'memory/group_rpl/gcs_%'`
40 --let $assert_text= 'There should be no extra psi keys added after starting the GR'
41 --let $assert_cond= $psi_keys_count_before_gr = $psi_keys_count_after_gr
42 --source include/assert.inc
43
44 --echo
45 --echo ############################################################
46 --echo # 4. Verify that performance_schema.threads list the usual
47 --echo # threads after member is ONLINE.
48 SELECT NAME, TYPE, INSTRUMENTED FROM performance_schema.threads WHERE NAME LIKE '%group_rpl%' ORDER BY NAME;
49
50 --echo
51 --echo ############################################################
52 --echo # 5. Test end.
53 --source include/group_replication_end.inc