Description:
Currently InnoDB fulltext index requires FTS_DOC_ID column as documented in https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html.
Please enable usage of generated virtual columns (which are defined as BIGINT NOT NULL) as FTS_DOC_ID.
Alternatively, please add syntax to FULLTEXT INDEX creation statement to select uniquely indexed integer column, possibly of smaller size than BIGINT, to be used as FTS_DOC_ID.
How to repeat:
CREATE TABLE test (
other_id INT UNSIGNED NOT NULL PRIMARY KEY,
data TEXT,
FTS_DOC_ID BIGINT GENERATED ALWAYS AS (other_id),
UNIQUE KEY FTS_DOC_ID_INDEX(FTS_DOC_ID)
) ENGINE=InnoDB;
INSERT INTO test(other_id, data) VALUES (1, 'some'), (2, 'text');
ALTER TABLE test ADD FULLTEXT KEY ft_data(data);
Reports:
ERROR 1797 (HY000): Column 'FTS_DOC_ID' is of wrong type for an InnoDB FULLTEXT index