[MDEV-29791] ER_NO_SUCH_TABLE_IN_ENGINE or "File not found" upon concurrent DDL with CREATE OR REPLACE Created: 2022-10-14  Updated: 2023-05-18  Resolved: 2023-01-26

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Create Table, Triggers
Affects Version/s: 10.11
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-25292 Atomic CREATE OR REPLACE TABLE Stalled
Relates

 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.



 Comments   
Comment by Aleksey Midenkov [ 2022-10-14 ]

Please review bb-10.11-midenok

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