Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.7(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
Description
In the test case below, I don't see any further effects, except for the error on the log and the extra error in SHOW WARNINGS. So, if it's innocent, it's just a cosmetic issue (should probably be a warning in the log and nothing at all in the client), and then it would be Minor.
However, in stress tests I see similar DDL_LOG errors in connection with corruption-like outcome, with errors like "table doesn't exist in engine". It can be a coincidence or can be a real relation, in the latter case as a corruption it would probably be Critical.
So, I will keep it Major for now, as a middle ground. Please adjust according to results of the analysis.
The test case is highly non-deterministic, but it's fast, so run with a big enough --repeat-N. On my machine, it usually fails within 50-100 attempts, but it can vary on different machines and builds.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, f INT) ENGINE=InnoDB; |
INSERT INTO t1 (f) VALUES (1),(2),(3),(4),(5); |
CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY, f INT, FOREIGN KEY (pk) REFERENCES t1(pk)) ENGINE=InnoDB; |
SET innodb_lock_wait_timeout= 0; |
START TRANSACTION; |
|
--connect (con1,localhost,root,,test)
|
SET innodb_lock_wait_timeout= 0; |
--send
|
RENAME TABLE t1 TO tmp1, tmp1 TO tmp2, tmp2 TO t1; |
|
--connection default
|
--error 0,ER_LOCK_WAIT_TIMEOUT
|
INSERT INTO t2 (f) VALUES (1),(2),(3),(4),(5); |
|
--connection con1
|
--error 0,ER_LOCK_WAIT_TIMEOUT
|
--reap
|
SHOW WARNINGS;
|
--error 0,1
|
--exec grep DDL_LOG $MYSQLTEST_VARDIR/log/mysqld.1.err
|
if ($sys_errno == 0) |
{
|
--die # Found DDL_LOG error in the log |
}
|
|
--connection default
|
DROP TABLE t2, t1; |
bb-10.6-release 109fc67d4 |
SHOW WARNINGS;
|
Level Code Message
|
Error 1205 Lock wait timeout exceeded; try restarting transaction
|
Error 1025 Error on rename of './test/tmp1' to './test/tmp2' (errno: 168 "Unknown (generic) error from engine")
|
Error 1205 Lock wait timeout exceeded; try restarting transaction
|
2021-11-07 18:02:10 220 [ERROR] DDL_LOG: Got error 1205 when trying to execute action for entry 1 of type 'rename table'
|
Reproducible on 10.6-10.7.
Attachments
Issue Links
- relates to
-
MDEV-33104 Assertion `table.get_ref_count() <= 1' failed in dberr_t trx_t::drop_table
- Closed