Details
-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
This is a pretty nasty one, because a simple "add index" statement can crash your database in a way that seems unpredictable. Bug is present in latest released MariaDB:
MySQL 44571: InnoDB Plugin crashes on ADD INDEX
http://bugs.mysql.com/bug.php?id=44571
The actual crash looks like so:
InnoDB: Error: no matching column for "renamed_column" in index "index_renamed_column"-temporary- of table "test"."test_table"!
091218 10:40:48 InnoDB: Assertion failure in thread 139964197152528 in file dict/dict0dict.c line 1768
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
091218 10:40:48 - mysqld got signal 6 ;
This could be because you hit a bug.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: MySQL crashes when InnoDB column is renamed and then added to an index, due to fast index creation bug
Thanks a lot for notifying us about the problem!
Seems that MySQL 5.1.41 contains a fix for this. This does not crash with the
innodb plugin in MySQL 5.1.41, instead it throws an error:
CREATE TABLE orgs ( salesperson INT) ENGINE=InnoDB;
ALTER TABLE orgs CHANGE salesperson sales_acct_id INT;
ALTER TABLE orgs ADD INDEX orgs$sales_acct_id (sales_acct_id);
In MariaDB latest trunk (which includes MySQL 5.1.41), it does crash. Seems we
lost the fix in the merge of MySQL 5.1.41. I will pull it in so that it will
be in MariaDB 5.1.41.
However, the MySQL fix really is not very nice. Seems basically after a column
is renamed, creating an index on that column no longer works. Since we use
XtraDB (which is based on the innodb plugin) by default, it seems to me we may
need a better solution for this in MariaDB.