-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-11168: InnoDB: Failing assertion: !other_lock || wsrep_thd_is_BF…
…(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE) Merged pull request: Fix error in lock_has_higher_priority #266 #266 Added test case.
- Loading branch information
Showing
5 changed files
with
229 additions
and
35 deletions.
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--loose-innodb-lock-wait-timeout=1 | ||
--loose-innodb-lock-schedule-algorithm=VATS |
106 changes: 106 additions & 0 deletions
106
mysql-test/suite/innodb/t/innodb-lock-schedule-algorithm.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--source include/have_innodb.inc | ||
|
||
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (1),(2); | ||
|
||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM; | ||
BEGIN; | ||
DELETE FROM t1; | ||
|
||
--connect (con1,localhost,root,,test) | ||
connection con1; | ||
BEGIN; | ||
INSERT INTO t2 VALUES (1),(2); | ||
SELECT * from t1; | ||
--error 1205 | ||
UPDATE t1 SET i1 = 1; | ||
COMMIT; | ||
|
||
connection default; | ||
COMMIT; | ||
SELECT * FROM t1; | ||
SELECT * FROM t2; | ||
DROP TABLE t1, t2; | ||
disconnect con1; | ||
|
||
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (1),(2); | ||
|
||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM; | ||
BEGIN; | ||
DELETE FROM t1; | ||
|
||
--connect (con1,localhost,root,,test) | ||
connection con1; | ||
BEGIN; | ||
INSERT INTO t2 VALUES (1),(2); | ||
SELECT * FROM t1; | ||
--error 1205 | ||
UPDATE t1 SET i1 = 1; | ||
|
||
connection default; | ||
COMMIT; | ||
|
||
connection con1; | ||
COMMIT; | ||
|
||
connection default; | ||
SELECT * FROM t1; | ||
SELECT * FROM t2; | ||
DROP TABLE t1, t2; | ||
disconnect con1; | ||
|
||
--echo # "restart: --loose-innodb-lock-schedule-algorithm=FCFS" | ||
--let $restart_parameters=--loose_innodb_lock_schedule_algorithm=FCFS | ||
-- source include/restart_mysqld.inc | ||
|
||
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (1),(2); | ||
|
||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM; | ||
BEGIN; | ||
DELETE FROM t1; | ||
|
||
--connect (con1,localhost,root,,test) | ||
connection con1; | ||
BEGIN; | ||
INSERT INTO t2 VALUES (1),(2); | ||
SELECT * from t1; | ||
--error 1205 | ||
UPDATE t1 SET i1 = 1; | ||
COMMIT; | ||
|
||
connection default; | ||
COMMIT; | ||
SELECT * FROM t1; | ||
SELECT * FROM t2; | ||
DROP TABLE t1, t2; | ||
disconnect con1; | ||
|
||
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (1),(2); | ||
|
||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM; | ||
BEGIN; | ||
DELETE FROM t1; | ||
|
||
--connect (con1,localhost,root,,test) | ||
connection con1; | ||
BEGIN; | ||
INSERT INTO t2 VALUES (1),(2); | ||
SELECT * FROM t1; | ||
--error 1205 | ||
UPDATE t1 SET i1 = 1; | ||
|
||
connection default; | ||
COMMIT; | ||
|
||
connection con1; | ||
COMMIT; | ||
|
||
connection default; | ||
SELECT * FROM t1; | ||
SELECT * FROM t2; | ||
DROP TABLE t1, t2; | ||
disconnect con1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters