[MDEV-18209] Error "Couldn't fix table with quick recovery: Found wrong number of deleted records" and Warning "Enabling keys got errno 0 on test.tmp, retrying" Created: 2019-01-11  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Temporary, Storage Engine - MyISAM
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

CREATE TEMPORARY TABLE tmp (a INT, b INT) ENGINE=MyISAM;
ALTER TABLE tmp ADD FOREIGN KEY (b) REFERENCES tmp (a);
INSERT INTO tmp VALUES (1,1);
DELETE FROM tmp LIMIT 2;
--error ER_BLOB_KEY_WITHOUT_LENGTH
ALTER TABLE tmp CHANGE b c TEXT NULL DEFAULT '';
INSERT INTO tmp SELECT * FROM tmp;

The last statement fails with

1034: Couldn't fix table with quick recovery: Found wrong number of deleted records

And the error log contains

2019-01-11 14:42:28 140493904692992 [Warning] Warning: Enabling keys got errno 0 on test.tmp, retrying

The test case is not applicable to 10.1, INSERT cannot re-open a temporary table.
Couldn't reproduce with a non-temporary table.
Couldn't reproduce with Aria.


Generated at Thu Feb 08 08:42:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.