[MDEV-18757] ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine.... Created: 2019-02-27  Updated: 2021-11-08  Resolved: 2021-11-08

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.4.3, 10.3.14
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Matthias Leich Assignee: Aleksey Midenkov
Resolution: Duplicate Votes: 0
Labels: None

Attachments: HTML File prt     File t_s_5.test    
Issue Links:
Duplicate
duplicates MDEV-25803 Inplace ALTER breaks MyISAM/Aria tabl... Closed

 Description   

Problem (Slave SQL thread catches ERROR HY000: Got error 190 ...) found during RQG testing invoking DDL and row based binlogging.
But the ugly things happen already without replication.

CREATE TABLE t0 ( col1 INT, col2 INT ) ENGINE = MyISAM ;
ALTER TABLE t0 ADD UNIQUE INDEX `uidx2` ( col1, col2 );
ALTER TABLE t0 ADD UNIQUE INDEX `uidX1` ( col2 );
ALTER TABLE t0 ADD PRIMARY KEY ( col2 );
ALTER TABLE t0 CHANGE COLUMN col2 col2 INT;
ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
The problem disappears in case the storage engine Aria or MEMORY is used.
Replay on
- 10.4 commit 5b4d6595d26aaaf0bf8bb3c9171cf1da96306a7c 2019-02-21
- 10.3 commit 09bd2138522787a4e0b015695c462903f4a9e728 2019-02-22
 
No replay with 10.2.22-MariaDB-debug
10.2 commit af6fdc13072cc310cf17fd3b28c749515d9c563c 2019-02-19
 
Workaround:
Run a
     ALTER TABLE t0 DROP KEY `uidX1`;
before the
    ALTER TABLE t0 ADD PRIMARY KEY ( col2 );


Generated at Thu Feb 08 08:46:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.