diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-11-14 23:51:17 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-11-14 23:51:17 +0100 |
commit | 1db7d8f6cbd7ed0c31ce9920d0d0fd2eaaa83831 (patch) | |
tree | 61c703ee0ae786a7a2feda05649b57c2b6573497 /mysql-test/t/partition_innodb.test | |
parent | cba2743336055163874f6aec273f920ee0df5b11 (diff) | |
parent | a5ec6953e1fa9fc718cde08babbb1ceb812dea73 (diff) | |
download | mariadb-git-1db7d8f6cbd7ed0c31ce9920d0d0fd2eaaa83831.tar.gz |
Bug#40595: Non-matching rows not released with READ-COMMITTED on tables
with partitions
Pre push fix, optimized replace_regex, to cut 2 seconds
from test time.
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index c29b3458d19..2abbceffbb0 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -1,6 +1,46 @@ --source include/have_partition.inc --source include/have_innodb.inc +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Bug#40595: Non-matching rows not released with READ-COMMITTED on tables +# with partitions +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; + +# grouping/referencing in replace_regex is very slow on long strings, +# removing all before/after the interesting row before grouping/referencing +--replace_regex /.*---TRANSACTION [0-9]+ [0-9]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/ +SHOW ENGINE InnoDB STATUS; + +UPDATE t1 SET data = data*2 WHERE data = 2; + +# grouping/referencing in replace_regex is very slow on long strings, +# removing all before/after the interesting row before grouping/referencing +--replace_regex /.*---TRANSACTION [0-9]+ [0-9]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/ +SHOW ENGINE InnoDB STATUS; + +SET @@session.tx_isolation = @old_tx_isolation; + +DROP TABLE t1; + # # Bug37721: ORDER BY when WHERE contains non-partitioned index column # wrong order since it did not use pk as second compare |