Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.0, 10.1.26, 10.0.32, 10.2.8, 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
10.0.34
Description
An ALTER TABLE CHANGE and ADD INDEX on auto_increment column fails with "Incorrect key file for table...".
CREATE TABLE t (
|
a bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
c bigint(20) unsigned NOT NULL,
|
PRIMARY KEY (a)
|
) ENGINE=InnoDB ;
|
|
ALTER TABLE t CHANGE a b BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, ADD KEY uk (c);
|
|
ERROR 1034 (HY000): Index for table 't' is corrupt; try to repair it
|
Attachments
Issue Links
- relates to
-
MDEV-9469 'Incorrect key file' on ALTER TABLE
-
- Closed
-
-
MDEV-9548 Alter table (renaming and adding index) fails with "Incorrect key file for table"
-
- Closed
-
-
MDEV-13625 Merge InnoDB test cases from MySQL 5.6
-
- Closed
-
-
MDEV-13626 Merge InnoDB test cases from MySQL 5.7
-
- Closed
-
-
MDEV-13668 InnoDB unnecessarily rebuilds table when renaming a column and adding index
-
- Closed
-
The error started happening in 10.0 after this fix:
commit 9b23f8054d2f37458901b4505429c30eddc440bc b3df257cfde490066933c4dc8329f9670aa8de58
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Thu Aug 11 14:39:47 2016 +0300
MDEV-10535: ALTER TABLE causes standalone/wsrep cluster crash
When checking is any of the renamed columns part of the
columns for new indexes we accessed NULL pointer if checked
column used on index was added on same statement. Additionally,
we tried to check too many indexes, added_index_count
is enough here.
Before that, the same query caused the crash. The crash started happening not long before that, between 10.0.23 and 10.0.24. In 10.0.23 and earlier, the query works okay.
Also reproducible on current 10.1, 10.2, 10.3. Not reproducible on MySQL 5.6, 5.7.