Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA table io
2 # Show the impact of a rollback in case of the transactional engine InnoDB
3
4 # Setup
5
6 --disable_warnings
7 drop table if exists test.t1;
8 --enable_warnings
9
10 let $engine_type= InnoDB;
11 eval create table test.t1 (col1 bigint, col2 varchar(30)) engine = $engine_type;
12 show create table test.t1;
13 insert into test.t1 values(1,'One');
14
15 --source ../include/table_io_setup_helper.inc
16 let $schema_to_dump= 'test';
17
18 # Start recording of events
19 update performance_schema.setup_consumers set enabled = 'YES';
20
21 set autocommit = off;
22
23 # Code to test
24
25 delete from test.t1 where col1 = 1;
26 insert into marker set a = 1;
27 rollback;
28 insert into marker set a = 1;
29 update test.t1 set col2 = 'Updated' where col1 = 1;
30 insert into marker set a = 1;
31 rollback;
32 insert into marker set a = 1;
33 insert into test.t1 values(2,'Two');
34 insert into marker set a = 1;
35 rollback;
36
37 # Stop recording of events + pull results
38 --source ../include/table_io_result_helper.inc
39
40 # Cleanup
41 drop table test.t1;
42 --source ../include/table_io_cleanup_helper.inc