Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. 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"

    XMLWordPrintable

    Details

      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.

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: