Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29791

ER_NO_SUCH_TABLE_IN_ENGINE or "File not found" upon concurrent DDL with CREATE OR REPLACE

    XMLWordPrintable

Details

    Description

      _Run with default-storage-engine of your choice. The test case is not deterministic, run with --repeat=N. It usually fails for me with InnoDB within ~3-5 attempts, and with MyISAM within ~30-50 attempts. The test case is for reproducing purposes only, don't put it into the regression suite, create a deterministic one instead. _

      # Optional, only for trying with --default-storage-engine=InnoDB
      --source include/have_innodb.inc
       
      --connect (con1,localhost,root,,test)
       
      CREATE TABLE t1 (a INT);
      CREATE TRIGGER tr BEFORE DELETE ON t1 FOR EACH ROW BEGIN END;
      CREATE TABLE t2 (b INT);
      --send
        CREATE OR REPLACE TABLE t1 (c INT);
       
      --connection default
      CREATE OR REPLACE TABLE t2 (d INT);
      DROP TRIGGER IF EXISTS tr;
       
      # Cleanup
      --connection con1
      --reap
      DROP TABLE IF EXISTS t1, t2;
      --disconnect con1
      

      bb-10.11-midenok e386ed3dad, with InnoDB

      query 'DROP TRIGGER IF EXISTS tr' failed: ER_NO_SUCH_TABLE_IN_ENGINE (1932): Table 'test.#sql-backup-7eacb-5-t1' doesn't exist in engine
      

      with MyISAM

      query 'DROP TRIGGER IF EXISTS tr' failed: ER_FILE_NOT_FOUND (1017): Can't find file: './test/#sql-backup-7eb27-82-t1.MYI' (errno: 2 "No such file or directory")
      

      Couldn't reproduce before MDEV-25292.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.