What does the MySQL 5.6 error “InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED” mean?

社会主义新天地 提交于 2019-12-05 17:16:23

There is no fix. The two workarounds include:

  1. rebuild the table, or
  2. LOCK = SHARED

-- neither of which meet the criterion of "no locks".

I would recommend filing a report at the MySQL bug tracker. In the meantime, here is a test case that fails for me too:

drop table IF EXISTS so28666643a;
CREATE TABLE so28666643a (ai INT AUTO_INCREMENT PRIMARY KEY,
    txt TEXT NOT NULL ) ENGINE=InnoDB;
ALTER TABLE so28666643a ADD COLUMN x TINYINT, LOCK=NONE;  -- works OK

drop table so28666643a;
CREATE TABLE so28666643a (ai INT AUTO_INCREMENT PRIMARY KEY,
    txt TEXT NOT NULL ) ENGINE=InnoDB; -- same
ALTER TABLE so28666643a ADD FULLTEXT(txt);
ALTER TABLE so28666643a DROP INDEX txt;
ALTER TABLE so28666643a ADD COLUMN x TINYINT, LOCK=NONE;  -- fails with strange message:

ERROR 1846 (0A000): LOCK=NONE is not supported.
Reason: InnoDB presently supports one FULLTEXT index creation at a time.
Try LOCK=SHARED.

Edit: thanks for the bug report.

Manish Shrivastava

Found better workaround (solution),

I changed the table engine from InnoDB to MyISAM i.e.

ALTER TABLE `tablename` ENGINE='MyISAM';

and then I ran alter table to add fulltext column index:

ALTER TABLE `tablename` ADD FULLTEXT `asset_number` (`asset_number`);

After that, I changed back the table engine to InnoDB.

ALTER TABLE `tablename` ENGINE='InnoDB';
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!