| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
connect con0,localhost,root,,; |
| 3 |
SET lock_wait_timeout = 4; |
| 4 |
connect con1,localhost,root,,; |
| 5 |
SET lock_wait_timeout = 4; |
| 6 |
connect con2,localhost,root,,; |
| 7 |
SET lock_wait_timeout = 4; |
| 8 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 9 |
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b'); |
| 10 |
connection con1; |
| 11 |
LOCK TABLE t1 READ; |
| 12 |
connection con0; |
| 13 |
UPDATE t1 SET b = CONCAT(b,b); |
| 14 |
connection con2; |
| 15 |
SELECT a,b FROM t1; |
| 16 |
connection con1; |
| 17 |
UNLOCK TABLES; |
| 18 |
connection con0; |
| 19 |
connection con2; |
| 20 |
# Should return the new data |
| 21 |
a b |
| 22 |
1 ff |
| 23 |
2 bb |
| 24 |
DROP TABLE t1; |
| 25 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 26 |
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b'); |
| 27 |
connection con1; |
| 28 |
LOCK TABLE t1 READ; |
| 29 |
connection con0; |
| 30 |
UPDATE t1 SET b = CONCAT(b,b,b); |
| 31 |
connection con2; |
| 32 |
SET lock_wait_timeout = 1; |
| 33 |
# Should return old data |
| 34 |
SELECT HIGH_PRIORITY * FROM t1; |
| 35 |
a b |
| 36 |
1 f |
| 37 |
2 b |
| 38 |
connection con1; |
| 39 |
UNLOCK TABLES; |
| 40 |
connection con0; |
| 41 |
disconnect con1; |
| 42 |
disconnect con2; |
| 43 |
disconnect con0; |
| 44 |
connection default; |
| 45 |
DROP TABLE t1; |