[MDEV-19661] Stray .ibd file left behind after killing "CREATE TABLE ... AS SELECT ..." Created: 2019-05-31 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table |
| Affects Version/s: | 10.2.24, 10.3.15, 10.4.5 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Under certain conditions, when killing a CREATE TABLE ... AS SELECT query, the InnoDB .ibd file stays behind even after the killed query has completely been rolled back, only the .frm file is removed, and the table still exists in the InnoDB data dictionary, so that DROP fails with 'Unknown table', but CREATE using the same name says 'Table already exists' This only seems to happen when two preconditions are met:
How to reproduce:
After killing the query with CTRL-C or KILL, the t2.frm file is gone, |
| Comments |
| Comment by Marko Mäkelä [ 2019-09-30 ] |
|
Unfortunately, CREATE TABLE…SELECT is internally implemented as at least 2 transactions: CREATE TABLE and INSERT…SELECT. InnoDB in its current form cannot execute both DDL and DML in the same transaction; see also MDEV-18572. Before we have
|