2012-07-16 06:17:56 +04:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
connect con0,localhost,root,,;
|
|
|
|
SET lock_wait_timeout = 4;
|
|
|
|
connect con1,localhost,root,,;
|
|
|
|
SET lock_wait_timeout = 4;
|
|
|
|
connect con2,localhost,root,,;
|
|
|
|
SET lock_wait_timeout = 4;
|
|
|
|
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
|
|
|
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b');
|
|
|
|
connection con1;
|
|
|
|
LOCK TABLE t1 READ;
|
|
|
|
connection con0;
|
|
|
|
UPDATE t1 SET b = CONCAT(b,b);
|
|
|
|
connection con2;
|
2013-02-03 02:53:57 +04:00
|
|
|
SELECT a,b FROM t1;
|
2012-07-16 06:17:56 +04:00
|
|
|
connection con1;
|
|
|
|
UNLOCK TABLES;
|
|
|
|
connection con0;
|
|
|
|
connection con2;
|
|
|
|
# Should return the new data
|
|
|
|
a b
|
|
|
|
1 ff
|
|
|
|
2 bb
|
|
|
|
DROP TABLE t1;
|
|
|
|
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
|
|
|
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b');
|
|
|
|
connection con1;
|
|
|
|
LOCK TABLE t1 READ;
|
|
|
|
connection con0;
|
|
|
|
UPDATE t1 SET b = CONCAT(b,b,b);
|
|
|
|
connection con2;
|
|
|
|
SET lock_wait_timeout = 1;
|
|
|
|
# Should return old data
|
|
|
|
SELECT HIGH_PRIORITY * FROM t1;
|
|
|
|
a b
|
|
|
|
1 f
|
|
|
|
2 b
|
|
|
|
connection con1;
|
|
|
|
UNLOCK TABLES;
|
|
|
|
connection con0;
|
|
|
|
disconnect con1;
|
|
|
|
disconnect con2;
|
|
|
|
disconnect con0;
|
|
|
|
connection default;
|
|
|
|
DROP TABLE t1;
|