mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
2fd3af4483
Merged pull request: Fix error in lock_has_higher_priority #266 https://github.com/MariaDB/server/pull/266 Added test case.
89 lines
1.5 KiB
Text
89 lines
1.5 KiB
Text
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
BEGIN;
|
|
INSERT INTO t2 VALUES (1),(2);
|
|
SELECT * from t1;
|
|
i1
|
|
1
|
|
2
|
|
UPDATE t1 SET i1 = 1;
|
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|
COMMIT;
|
|
COMMIT;
|
|
SELECT * FROM t1;
|
|
i1
|
|
SELECT * FROM t2;
|
|
i2
|
|
1
|
|
2
|
|
DROP TABLE t1, t2;
|
|
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
BEGIN;
|
|
INSERT INTO t2 VALUES (1),(2);
|
|
SELECT * FROM t1;
|
|
i1
|
|
1
|
|
2
|
|
UPDATE t1 SET i1 = 1;
|
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|
COMMIT;
|
|
COMMIT;
|
|
SELECT * FROM t1;
|
|
i1
|
|
SELECT * FROM t2;
|
|
i2
|
|
1
|
|
2
|
|
DROP TABLE t1, t2;
|
|
# "restart: --loose-innodb-lock-schedule-algorithm=FCFS"
|
|
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
BEGIN;
|
|
INSERT INTO t2 VALUES (1),(2);
|
|
SELECT * from t1;
|
|
i1
|
|
1
|
|
2
|
|
UPDATE t1 SET i1 = 1;
|
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|
COMMIT;
|
|
COMMIT;
|
|
SELECT * FROM t1;
|
|
i1
|
|
SELECT * FROM t2;
|
|
i2
|
|
1
|
|
2
|
|
DROP TABLE t1, t2;
|
|
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
BEGIN;
|
|
INSERT INTO t2 VALUES (1),(2);
|
|
SELECT * FROM t1;
|
|
i1
|
|
1
|
|
2
|
|
UPDATE t1 SET i1 = 1;
|
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|
COMMIT;
|
|
COMMIT;
|
|
SELECT * FROM t1;
|
|
i1
|
|
SELECT * FROM t2;
|
|
i2
|
|
1
|
|
2
|
|
DROP TABLE t1, t2;
|