Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.0.24, 5.5, 10.0, 10.1
Description
Dropping and adding a column that is included in an index fails if this is done in a single ALTER statement, even though it works fine if it's first dropped in one ALTER and then added back in a second ALTER statement.
Additionally, the error message is inapplicable.
Steps to reproduce:
DROP TABLE IF EXISTS `example`; |
|
|
CREATE TABLE `example` ( |
`id` int(11) NOT NULL AUTO_INCREMENT, |
`a` int(11) NOT NULL, |
`b` datetime DEFAULT NULL, |
PRIMARY KEY (`id`), |
KEY `c` (`a`,`b`) USING BTREE |
) ENGINE=InnoDB;
|
|
|
ALTER TABLE example DROP `b`, ADD `b` datetime; |
produces
ERROR 1089 (HY000) at line 12: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|