Bug #67004 Unable to add a column to an InnoDB table with multiple FULLTEXT indexes
Submitted: 28 Sep 2012 8:32 Modified: 10 Jan 2013 13:57
Reporter: David Damerell Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: FULLTEXT search Severity:S3 (Non-critical)
Version:5.6.6 m9/5.6.7 OS:Any
Assigned to: CPU Architecture:Any

[28 Sep 2012 8:32] David Damerell
Description:
Unable to add a new column to an existing InnoDB table that has multiple columns with FULLTEXT indexes.

We get the following error message....

ERROR 1795 (HY000): InnoDB presently supports one FULLTEXT index creation at a time

How to repeat:
CREATE TABLE ftsAlter (ftsCol1 TEXT, ftsCol2 TEXT, FULLTEXT(ftsCol1), FULLTEXT(ftsCol2));

ALTER TABLE ftsAlter ADD COLUMN col3 INT(11);

Suggested fix:
Based on a quick scan of the code it looks like the FULLTEXT indexes are being dropped and then being recreated with a single ALTER statement; which doesn't seem to be allowed.

So the fix seems to be to recreate the indexes with individual ALTER statements.
[28 Sep 2012 12:02] MySQL Verification Team
d:\tmp\mysql-5.6.6-m9-winx64>bin\mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.6-m9 MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE TABLE ftsAlter (ftsCol1 TEXT, ftsCol2 TEXT, FULLTEXT(ftsCol1), FULLTEXT(ftsCol2));
Query OK, 0 rows affected (0.13 sec)

mysql> SHOW CREATE TABLE ftsAlter\G
*************************** 1. row ***************************
       Table: ftsAlter
Create Table: CREATE TABLE `ftsalter` (
  `ftsCol1` text,
  `ftsCol2` text,
  FULLTEXT KEY `ftsCol1` (`ftsCol1`),
  FULLTEXT KEY `ftsCol2` (`ftsCol2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> ALTER TABLE ftsAlter ADD COLUMN col3 INT(11);
ERROR 1795 (HY000): InnoDB presently supports one FULLTEXT index creation at a time
mysql>
[30 Sep 2012 0:07] MySQL Verification Team
Thank you for the bug report.

d:\tmp\mysql-5.6.7-rc-winx64>bin\mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.7-rc MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE TABLE ftsAlter (ftsCol1 TEXT, ftsCol2 TEXT, FULLTEXT(ftsCol1), FULLTEXT(ftsCol2));
Query OK, 0 rows affected (0.09 sec)

mysql>
mysql> ALTER TABLE ftsAlter ADD COLUMN col3 INT(11);
ERROR 1795 (HY000): InnoDB presently supports one FULLTEXT index creation at a time
mysql>
[3 Oct 2012 9:54] Erlend Dahl
In 5.6.8, the alter will succeed, but using ALGORITHM=COPY.
[10 Jan 2013 13:57] Erlend Dahl
Duplicate of an internally filed bug, fixed in 5.6.8.