mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Create 'main' test directory and move 't' and 'r' there
This commit is contained in:
50
mysql-test/main/partition_innodb_stmt.result
Normal file
50
mysql-test/main/partition_innodb_stmt.result
Normal file
@ -0,0 +1,50 @@
|
||||
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);
|
||||
# Test READ COMMITTED -> REPEATABLE READ
|
||||
FLUSH TABLES;
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
BEGIN;
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
connect con1, localhost, root,,;
|
||||
connection con1;
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(7);
|
||||
COMMIT;
|
||||
connection default;
|
||||
COMMIT;
|
||||
FLUSH TABLES;
|
||||
# Test REPEATABLE READ -> READ COMMITTED
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
BEGIN;
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
7
|
||||
connection con1;
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(9);
|
||||
ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
|
||||
COMMIT;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user