Bug #77050 Syntax error if index type specified
Submitted: 15 May 2015 14:17 Modified: 18 May 2015 6:15
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6.24, 5.6.26, 5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[15 May 2015 14:17] Daniël van Eeden
Description:
This statement:
CREATE FULLTEXT INDEX idxft001 USING HASH ON fooname (fname ASC);

According to the manual it is valid.
But it results in a syntax error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING HASH ON fooname (fname ASC)' at line 1

How to repeat:
CREATE FULLTEXT INDEX idxft001 USING HASH ON fooname (fname ASC);

Suggested fix:
It should either:
 - Work and ignore the index type
 - Give an 'Index type not supported by storage engine' (or for FULLTEXT) error
[18 May 2015 6:15] MySQL Verification Team
Hello Daniël,

Thank you for the report.

Thanks,
Umesh
[18 May 2015 6:19] MySQL Verification Team
// leaving "doc" category as is but imhoo should be fixed instead

// 5.6.24, 5.6.26, 5.7.8

CREATE TABLE fooname (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
fname TEXT(500)
) ENGINE=InnoDB;

CREATE FULLTEXT INDEX idxft001 USING HASH ON fooname (fname ASC);
CREATE FULLTEXT INDEX idxft001 ON fooname (fname ASC) USING HASH ;

Database changed
mysql> CREATE FULLTEXT INDEX idxft001 ON fooname (fname ASC) USING HASH ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING HASH' at line 1
mysql>
mysql> CREATE FULLTEXT INDEX idxft001 USING HASH ON fooname (fname ASC);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING HASH ON fooname (fname ASC)' at line 1
[22 May 2015 15:01] Paul DuBois
Agree with Umesh. Should be treated as a server bug, or at least evaluated by server team for a verdict as to whether to fix.