diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-03 19:17:05 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-03 19:17:05 +0100 |
commit | 0e007344eae972b9be7d88ca43373cb33662ac1c (patch) | |
tree | 7b3561cb3ea2ad24d013e847680ec165f406387e /mysql-test/r/flush.result | |
parent | 3794110f0215f0631107c2694dc0f1675a4bb520 (diff) | |
parent | 681476255147dacac7e3674b6cd2ae770fee2208 (diff) | |
download | mariadb-git-0e007344eae972b9be7d88ca43373cb33662ac1c.tar.gz |
mysql-5.5.18 merge
Diffstat (limited to 'mysql-test/r/flush.result')
-rw-r--r-- | mysql-test/r/flush.result | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index 246cd40fd26..340a0863790 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -466,3 +466,26 @@ ALTER TABLE t1 COMMENT 'test'; ERROR HY000: Table 't1' was locked with a READ lock and can't be updated UNLOCK TABLES; DROP TABLE t1; +# +# Test for bug #12641342 - "61401: UPDATE PERFORMANCE DEGRADES +# GRADUALLY IF A TRIGGER EXISTS". +# +# One of side-effects of this bug was that a transaction which +# involved DML statements requiring prelocking blocked concurrent +# FLUSH TABLES WITH READ LOCK for the whole its duration, while +# correct behavior in this case is to block FTWRL only for duration +# of individual DML statements. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (id INT PRIMARY KEY, value INT); +INSERT INTO t1 VALUES (1, 1); +CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW SET @var = "a"; +BEGIN; +UPDATE t1 SET value= value + 1 WHERE id = 1; +# Switching to connection 'con1'. +# The below FLUSH TABLES WITH READ LOCK should succeed and +# should not be blocked by the transaction in default connection. +FLUSH TABLES WITH READ LOCK; +UNLOCK TABLES; +# Switching to connection 'default'. +COMMIT; +DROP TABLE t1; |