diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/partition_innodb_stmt.test | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/partition_innodb_stmt.test')
-rw-r--r-- | mysql-test/main/partition_innodb_stmt.test | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/main/partition_innodb_stmt.test b/mysql-test/main/partition_innodb_stmt.test new file mode 100644 index 00000000..96a59cb9 --- /dev/null +++ b/mysql-test/main/partition_innodb_stmt.test @@ -0,0 +1,56 @@ +--source include/have_partition.inc +--source include/have_binlog_format_statement.inc +--source include/have_innodb.inc + +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; + +CREATE TABLE t1 +( + id SMALLINT NOT NULL, + PRIMARY KEY (id) +) ENGINE=innodb +PARTITION BY RANGE (id) +( + PARTITION p1 VALUES LESS THAN (2), + PARTITION p2 VALUES LESS THAN (4), + PARTITION p3 VALUES LESS THAN (10) +); + +INSERT INTO t1 VALUES (1),(2),(3); + +--echo # Test READ COMMITTED -> REPEATABLE READ +FLUSH TABLES; +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +BEGIN; +SELECT * FROM t1; + +connect (con1, localhost, root,,); +connection con1; + +SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; +BEGIN; +INSERT INTO t1 VALUES(7); +COMMIT; + +connection default; +COMMIT; + +FLUSH TABLES; + +--echo # Test REPEATABLE READ -> READ COMMITTED +SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; +BEGIN; +SELECT * FROM t1; + +connection con1; + +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +BEGIN; +--error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE +INSERT INTO t1 VALUES(9); +COMMIT; + +disconnect con1; +connection default; +COMMIT; +DROP TABLE t1; |