Bug #64892 | Session-level low_priority_updates does not work for INSERT | ||
---|---|---|---|
Submitted: | 6 Apr 2012 17:53 | Modified: | 13 Aug 2012 16:22 |
Reporter: | Elena Stepanova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S3 (Non-critical) |
Version: | 5.1, 5.5, 5.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[6 Apr 2012 17:53]
Elena Stepanova
[6 Apr 2012 21:03]
Elena Stepanova
In fact, although in the test case the table is MyISAM, it's reproducible with the MEMORY engine too (I didn't try MERGE), so I'm changing the category, for now to 'Locking' -- please adjust if needed.
[7 Apr 2012 13:16]
Valeriy Kravchuk
Thank you for the problem report. Verified with 5.1.61 on Mac OS X: ... +SET GLOBAL LOW_PRIORITY_UPDATES = 0; +SET GLOBAL concurrent_insert = 0; +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +connect con0,localhost,root,,; +connect con1,localhost,root,,; +SET LOW_PRIORITY_UPDATES = 1; +connect con2,localhost,root,,; +connection con0; +SELECT i+SLEEP(1) FROM t1; +connection con1; +INSERT INTO t1 VALUES (3); +connection con2; +# Should return 2 rows with low_priority_updates=1 +# and 3 rows with low_priority_updates=0 +SELECT i+SLEEP(1) FROM t1; +i+SLEEP(1) +1 +2 +3 +connection con0; +connection con1; +DELETE FROM t1 WHERE i=3; +connection con0; +SELECT i+SLEEP(1) FROM t1; +connection con1; +UPDATE t1 SET i=10 WHERE i=1; +connection con2; +# Should return 1, 2 with low_priority_updates=1 +# and 10, 2 with low_priority_updates=0 +SELECT i+SLEEP(1) FROM t1; +i+SLEEP(1) +1 +2 +connection con0; +connection con1; +UPDATE t1 SET i=1 WHERE i=10; +connection con0; +SELECT i+SLEEP(1) FROM t1; +connection con1; +DELETE FROM t1 LIMIT 1; +connection con2; +# Should return 2 rows with low_priority_updates=1 +# and 1 row with low_priority_updates=0 +SELECT i+SLEEP(1) FROM t1; +i+SLEEP(1) +1 +2 +connection con0; +DROP TABLE t1; ...
[13 Aug 2012 16:22]
Paul DuBois
Noted in 5.7.0 changelog. Enabling the session value of low_priority_updates had no effect for INSERT statements.