| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
SET @low_prio_updates = @@global.low_priority_updates; |
| 3 |
SET @concur_insert = @@global.concurrent_insert; |
| 4 |
SET GLOBAL concurrent_insert = NEVER; |
| 5 |
connect con0,localhost,root,,; |
| 6 |
SET lock_wait_timeout = 4; |
| 7 |
connect con1,localhost,root,,; |
| 8 |
SET lock_wait_timeout = 4; |
| 9 |
connect con2,localhost,root,,; |
| 10 |
SET lock_wait_timeout = 4; |
| 11 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 12 |
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b'); |
| 13 |
SET GLOBAL LOW_PRIORITY_UPDATES = 1; |
| 14 |
connection con1; |
| 15 |
SELECT SLEEP(1) FROM t1; |
| 16 |
connection con0; |
| 17 |
INSERT INTO t1 (a,b) VALUES (3,'z'); |
| 18 |
connection con2; |
| 19 |
# Should return only 2 rows |
| 20 |
SELECT SLEEP(1) FROM t1; |
| 21 |
SLEEP(1) |
| 22 |
0 |
| 23 |
0 |
| 24 |
connection con1; |
| 25 |
SLEEP(1) |
| 26 |
0 |
| 27 |
0 |
| 28 |
connection con0; |
| 29 |
SELECT a,b FROM t1; |
| 30 |
a b |
| 31 |
1 f |
| 32 |
2 b |
| 33 |
3 z |
| 34 |
DROP TABLE t1; |
| 35 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 36 |
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b'); |
| 37 |
connection con1; |
| 38 |
SELECT SLEEP(1) FROM t1; |
| 39 |
connection con0; |
| 40 |
INSERT HIGH_PRIORITY INTO t1 (a,b) VALUES (3,'z'); |
| 41 |
connection con2; |
| 42 |
# Should return 3 rows |
| 43 |
SELECT SLEEP(1) FROM t1; |
| 44 |
SLEEP(1) |
| 45 |
0 |
| 46 |
0 |
| 47 |
0 |
| 48 |
connection con1; |
| 49 |
SLEEP(1) |
| 50 |
0 |
| 51 |
0 |
| 52 |
connection con0; |
| 53 |
SELECT a,b FROM t1; |
| 54 |
a b |
| 55 |
1 f |
| 56 |
2 b |
| 57 |
3 z |
| 58 |
disconnect con1; |
| 59 |
disconnect con2; |
| 60 |
disconnect con0; |
| 61 |
connection default; |
| 62 |
SET GLOBAL low_priority_updates = @low_prio_updates; |
| 63 |
SET GLOBAL concurrent_insert = @concur_insert; |
| 64 |
DROP TABLE t1; |