Debian Codegraph @

mysql-test/suite/perfschema/t/idx_replication_applier_status_by_worker.test

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 # Test requires master-info-repository=TABLE, relay-log-info-repository=TABLE
4 --source include/have_slave_repository_type_table.inc
5 #setup
6 let $select_column = SERVICE_STATE;
7 let $table = performance_schema.replication_applier_status_by_worker;
8
9 --disable_warnings
10 --source include/master-slave.inc
11
12 --connection slave
13
14 --source include/stop_slave.inc
15 RESET SLAVE ALL;
16 SET @old_replica_parallel_workers= @@global.replica_parallel_workers;
17 SET GLOBAL replica_parallel_workers = 4;
18 --disable_query_log
19 --eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT, SOURCE_DELAY=0 FOR CHANNEL 'channel_1';
20 --enable_query_log
21 --source include/start_slave.inc
22
23 --connection master
24 --let $rpl_channel_name= 'channel_1'
25 --let $sync_slave_connection= slave
26 --source include/sync_slave_sql_with_master.inc
27
28 select CHANNEL_NAME, WORKER_ID, THREAD_ID
29 from performance_schema.replication_applier_status_by_worker
30 where WORKER_ID = 1
31 into @c_name, @w_id, @t_id;
32
33 # Make sure we found data to look at.
34 select @c_name, @w_id, @t_id is not null;
35
36 # Debug
37 # select * from performance_schema.replication_applier_status_by_worker;
38
39 --enable_warnings
40
41 ###########################################################################
42 # Test index on CHANNEL_NAME, WORKER_ID
43 ###########################################################################
44
45 let $column_count = 2;
46 let $col1 = CHANNEL_NAME;
47 let $col2 = WORKER_ID;
48 let $col1_act = @c_name;
49 let $col2_act = @w_id;
50
51 --source ../include/idx_explain_test.inc
52
53 ###########################################################################
54 # Test index on THREAD_ID
55 ###########################################################################
56
57 let $column_count = 1;
58 let $col1 = THREAD_ID;
59 let $col1_act = @t_id;
60
61 --source ../include/idx_explain_test.inc
62
63 # Cleanup
64 source include/stop_slave.inc;
65 RESET SLAVE ALL;
66 SET GLOBAL replica_parallel_workers= @old_replica_parallel_workers;
67 --disable_warnings
68 --disable_query_log
69 eval CHANGE REPLICATION SOURCE to SOURCE_HOST='127.0.0.1', SOURCE_PORT=$MASTER_MYPORT, SOURCE_USER='root';
70 --enable_query_log
71 --enable_warnings
72 --let $rpl_channel_name=
73 --let $sync_slave_connection= slave
74 source include/start_slave.inc;
75 --connection master
76
77 --source include/rpl_end.inc