[MDEV-22409] Draft: 1932: Table 'test.t1' doesn't exist in engine after crash recovery Created: 2020-04-29  Updated: 2022-02-01  Resolved: 2022-01-28

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4.13, 10.5.3, 10.2, 10.3
Fix Version/s: 10.6.3

Type: Bug Priority: Major
Reporter: Matthias Leich Assignee: Marko Mäkelä
Resolution: Won't Fix Votes: 0
Labels: not-10.6

Issue Links:
Relates
relates to MDEV-25506 Atomic DDL: .frm file is removed and ... Closed

 Description   

Workflow
1. A session connects and creates the table t1 and inserts one record.
    CREATE TABLE t1 (col1 INT, col2 INT, col3 INT, col4 TEXT) ENGINE = InnoDB ;
    ALTER TABLE t1 ADD PRIMARY KEY ( col4(10), col2 ) ;
    INSERT INTO t1 (col2,col4) VALUES(2, 'Sooo inportant data');
    Mode is auto commit.
2. The same session runs random
     ALTER TABLE t1 FORCE         or
     ALTER TABLE t1 ADD COLUMN extra INT; ALTER TABLE t1 DROP COLUMN col3 ; ALTER TABLE t1 CHANGE COLUMN extra col3 INT ;
3. At some point of time the server process gets killed (SIGKILL).
4. The server gets restartet.
5. Now
     SHOW KEYS FROM `test`.`t1` harvests
    1932: Table 'test.t1' doesn't exist in engine.
     



 Comments   
Comment by Marko Mäkelä [ 2022-01-28 ]

I used to believe that the only reason why DDL operations were not crash-safe was that the SQL layer table definition (tablename.frm files) would get out of sync with the InnoDB storage engine.

While we worked on MDEV-25180 and other changes related to Atomic DDL in MariaDB Server 10.6, it turned out that there are also InnoDB side problems. I think that the third commit of MDEV-25506 fixed most of them.

In older versions than 10.6 it is not feasible to fix this.

Generated at Thu Feb 08 09:14:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.