Details
Description
When main.delayed is run after main.deadlock_ftwrl, it fails, seemingly reliably, with "succeeded - should have failed with errno 1213":
10.4 5e04c08d |
perl ./mtr --mem --noreorder main.deadlock_ftwrl main.delayed |
|
main.deadlock_ftwrl [ pass ] 14
|
main.delayed [ fail ]
|
Test ended at 2022-01-17 02:29:06 |
|
CURRENT_TEST: main.delayed
|
mysqltest: At line 494: query 'INSERT DELAYED INTO t1 VALUES (4)' succeeded - should have failed with errno 1213... |
|
The result from queries just before the failure was: |
< snip >
|
connection con1; |
# Sending:
|
ALTER TABLE t1 MODIFY a INT UNSIGNED;; |
connection default; |
# Wait until ALTER TABLE is blocked on table 't1'. |
INSERT DELAYED INTO t1 VALUES (3); |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
COMMIT; |
connection con1; |
# Reaping: ALTER TABLE t1 COMMENT 'test' |
# Test 3: Using RENAME TABLE |
connection default; |
START TRANSACTION; |
INSERT INTO t2 VALUES (1); |
connection con1; |
# Sending:
|
RENAME TABLE t1 to t5, t2 to t4; |
connection default; |
# Wait until RENAME TABLE is blocked on table 't1'. |
INSERT DELAYED INTO t1 VALUES (4); |
With one more test in the chain it hangs instead, also seemingly reliably:
perl ./mtr --mem --noreorder main.ddl_i18n_koi8r main.deadlock_ftwrl main.delayed |
|
main.ddl_i18n_koi8r [ pass ] 733
|
main.deadlock_ftwrl [ pass ] 8
|
worker[1] Trying to dump core for [mysqltest - pid: 3093574, winpid: 3093574] |
worker[1] Trying to dump core for [mysqld.1 - pid: 3093506, winpid: 3093506] |
main.delayed [ fail ] timeout after 120 seconds |
main.deadlock_ftwrl was added in 10.4 by this commit:
commit fa5f60681fe4ed9d5bb160e551381cb7b1be5850
|
Author: Rinat Ibragimov
|
Date: Thu Jun 18 01:11:39 2020 +0300
|
|
MDEV-20946: Hard FTWRL deadlock under user level locks
|
I suppose the chain of tests has been failing ever since, but I didn't check.