[MDEV-22410] Change the error when table schema mismatch happens Created: 2020-04-29  Updated: 2020-05-04  Resolved: 2020-05-04

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.4.13, 10.5.3

Type: Bug Priority: Major
Reporter: Matthias Leich Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: None

Attachments: File 000047.log     File mdev-22140.patch    

 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  (~ 1 case on 50 runs)
    1932: Table 'test.t1' doesn't exist in engine.
6. RQG kills the server process with SIGKILL because of 5.
 
origin/10.4 cfbbf5424bc68a31a996ab42a253f2c96365599c 2020-04-29T11:50:03+03:00
no matter if compiled with debug or not



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2020-05-04 ]

This issue looks like design flaw. It would be fixed by MDEV-17567. However, InnoDB can give better error compared to "Table doesn't exist".
The following patch does that:
mdev-22140.patch

Comment by Thirunarayanan Balathandayuthapani [ 2020-05-04 ]

matthias.leich mentioned that "Now I get either a pass (even before the majority of runs harvested a pass) or "Table 't1' is marked as crashed and should be repaired". IMHO better"

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