Debian Codegraph @

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

raw
1 # Performance schema tests generally depend on specific query plans
2 # and behavior, and much of the perfschema suite is therefore disabled
3 # if the hypergraph optimizer is active.
4 --source include/not_hypergraph.inc
5
6 # Tests for PERFORMANCE_SCHEMA
7
8 #setup
9 let $select_column = END_EVENT_ID;
10 let $table = performance_schema.events_transactions_history;
11
12 create user foo@localhost;
13 grant ALL on *.* to foo@localhost;
14
15 truncate table performance_schema.events_transactions_history;
16
17 # Create a new Connection
18 connect(con1,localhost,foo,,);
19
20 --echo # Connection 1
21 --connection con1
22
23 select connection_id() into @conid;
24
25 let $tid = `select thread_id from performance_schema.threads
26 where PROCESSLIST_ID = @conid`;
27
28 start transaction;
29 rollback;
30
31 --echo # Default connection
32 --connection default
33
34 --disable_query_log
35 --eval select EVENT_ID from performance_schema.events_transactions_history where THREAD_ID = $tid and EVENT_NAME= 'transaction' limit 1 into @eid;
36 --eval select $tid into @tid;
37 --enable_query_log
38
39 ###########################################################################
40 # Test index on THREAD_ID, EVENT_ID
41 ###########################################################################
42
43 let $column_count = 2;
44 let $col1 = THREAD_ID;
45 let $col2 = EVENT_ID;
46 let $col1_act = @tid;
47 let $col2_act = @eid;
48
49 --source ../include/idx_explain_test.inc
50
51 # Cleanup
52 commit;
53 --disconnect con1
54 drop user foo@localhost;