1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#40595: Non-matching rows not released with READ-COMMITTED

on tables with partitions

Problem was that the handler function try_semi_consistent_read
was not propagated to the innodb handler.

Solution was to implement that function in the partitioning
handler.
This commit is contained in:
Mattias Jonsson
2008-11-10 21:13:24 +01:00
parent 0d2cbe95f6
commit a891c0e8f4
4 changed files with 99 additions and 1 deletions

View File

@ -1,3 +1,25 @@
drop table if exists t1;
CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB
PARTITION BY RANGE(id) (
PARTITION p0 VALUES LESS THAN (5),
PARTITION p1 VALUES LESS THAN (10),
PARTITION p2 VALUES LESS THAN MAXVALUE
);
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4), (5,5), (6,6), (7,7), (8,8),
(9,9), (10,10), (11,11);
SET @old_tx_isolation := @@session.tx_isolation;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET autocommit = 0;
UPDATE t1 SET DATA = data*2 WHERE id = 3;
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB 2 lock struct(s) 1 row lock(s)
UPDATE t1 SET data = data*2 WHERE data = 2;
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB 6 lock struct(s) 2 row lock(s)
SET @@session.tx_isolation = @old_tx_isolation;
DROP TABLE t1;
# Bug#37721, test of ORDER BY on PK and WHERE on INDEX
CREATE TABLE t1 (
a INT,