1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-07 04:01:59 +03:00
mariadb/mysql-test/suite/storage_engine/update_low_prio.result
2012-07-16 06:17:56 +04:00

67 lines
1.1 KiB
Plaintext

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
INSERT INTO t1 (a,b) VALUES (11,'foobar'),(12,'b');
SET LOW_PRIORITY_UPDATES = 0;
SET lock_wait_timeout = 4;
connect con1,localhost,root,,;
SET lock_wait_timeout = 2;
SELECT a+SLEEP(1) FROM t1;
connection default;
UPDATE t1 SET a=a+10;
connect con2,localhost,root,,;
SET lock_wait_timeout = 3;
SELECT a+SLEEP(1) FROM t1;
a+SLEEP(1)
21
22
connection con1;
a+SLEEP(1)
11
12
connection default;
SELECT * FROM t1;
a b
21 foobar
22 b
connection con1;
SELECT a+SLEEP(1) FROM t1;
connection default;
UPDATE LOW_PRIORITY t1 SET a=a+20;
connection con2;
SELECT a+SLEEP(1) FROM t1;
a+SLEEP(1)
21
22
connection con1;
a+SLEEP(1)
21
22
connection default;
SELECT * FROM t1;
a b
41 foobar
42 b
SET LOW_PRIORITY_UPDATES = 1;
connection con1;
SELECT a+SLEEP(1) FROM t1;
connection default;
UPDATE t1 SET a=a+30;
connection con2;
SELECT a+SLEEP(1) FROM t1;
a+SLEEP(1)
41
42
connection con1;
a+SLEEP(1)
41
42
connection default;
SELECT * FROM t1;
a b
71 foobar
72 b
disconnect con1;
disconnect con2;
connection default;
DROP TABLE t1;