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 --source include/not_embedded.inc
7 --source include/have_perfschema.inc
8 --source include/have_innodb.inc
9
10 --disable_warnings
11 drop table if exists test.t1;
12 --enable_warnings
13
14 let $engine_type= InnoDB;
15 eval create table test.t1 (col1 bigint, col2 varchar(30)) engine = $engine_type;
16 show create table test.t1;
17 insert into test.t1 values(1,'One');
18 eval set default_storage_engine=$engine_type;
19
20 --source ../include/table_io_setup_helper.inc
21 let $schema_to_dump= 'test';
22
23 # Start recording of events
24 update performance_schema.setup_consumers set enabled = 'YES';
25
26 set autocommit = off;
27
28 # Code to test
29
30 delete from test.t1 where col1 = 1;
31 insert into marker set a = 1;
32 rollback;
33 insert into marker set a = 1;
34 update test.t1 set col2 = 'Updated' where col1 = 1;
35 insert into marker set a = 1;
36 rollback;
37 insert into marker set a = 1;
38 insert into test.t1 values(2,'Two');
39 insert into marker set a = 1;
40 rollback;
41
42 # Stop recording of events + pull results
43 --source ../include/table_io_result_helper.inc
44
45 # Cleanup
46 drop table test.t1;
47 --source ../include/table_io_cleanup_helper.inc
48