Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 #setup
4 let $select_column = END_EVENT_ID;
5 let $table = performance_schema.events_statements_current;
6
7 select connection_id() into @conid;
8
9 let $tid = `select thread_id from performance_schema.threads
10 where PROCESSLIST_ID = @conid`;
11
12 truncate table performance_schema.events_statements_current;
13 truncate table performance_schema.events_statements_history;
14
15 select 1;
16
17 # Connection 1
18 connect(con1,127.0.0.1,root,,);
19
20 --echo # Connection 1
21 --connection con1
22
23 --disable_query_log
24 --eval select $tid into @tid_default;
25 --let $wait_condition = select count(*) > 0 from performance_schema.events_statements_current where THREAD_ID = @tid_default
26 --source include/wait_condition.inc
27 select EVENT_ID from performance_schema.events_statements_current where THREAD_ID = @tid_default limit 1 into @eid_default;
28 --enable_query_log
29
30 ###########################################################################
31 # Test index on THREAD_ID, EVENT_ID
32 ###########################################################################
33
34 let $column_count = 2;
35 let $col1 = THREAD_ID;
36 let $col2 = EVENT_ID;
37 let $col1_act = @tid_default;
38 let $col2_act = @eid_default;
39
40 --source ../include/idx_explain_test.inc