diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/perfschema/t/rollback_table_io.test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/perfschema/t/rollback_table_io.test')
-rw-r--r-- | mysql-test/suite/perfschema/t/rollback_table_io.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/rollback_table_io.test b/mysql-test/suite/perfschema/t/rollback_table_io.test new file mode 100644 index 00000000..67d7e4ca --- /dev/null +++ b/mysql-test/suite/perfschema/t/rollback_table_io.test @@ -0,0 +1,48 @@ +# Tests for PERFORMANCE_SCHEMA table io +# Show the impact of a rollback in case of the transactional engine InnoDB + +# Setup + +--source include/not_embedded.inc +--source include/have_perfschema.inc +--source include/have_innodb.inc + +--disable_warnings +drop table if exists test.t1; +--enable_warnings + +let $engine_type= InnoDB; +eval create table test.t1 (col1 bigint, col2 varchar(30)) engine = $engine_type; +show create table test.t1; +insert into test.t1 values(1,'One'); +eval set default_storage_engine=$engine_type; + +--source ../include/table_io_setup_helper.inc +let $schema_to_dump= 'test'; + +# Start recording of events +update performance_schema.setup_consumers set enabled = 'YES'; + +set autocommit = off; + +# Code to test + +delete from test.t1 where col1 = 1; +insert into marker set a = 1; +rollback; +insert into marker set a = 1; +update test.t1 set col2 = 'Updated' where col1 = 1; +insert into marker set a = 1; +rollback; +insert into marker set a = 1; +insert into test.t1 values(2,'Two'); +insert into marker set a = 1; +rollback; + +# Stop recording of events + pull results +--source ../include/table_io_result_helper.inc + +# Cleanup +drop table test.t1; +--source ../include/table_io_cleanup_helper.inc + |