Closed
Description
It seems the parser has an issue with fulltext index with ngram, which throws an exception. I've seen it on phpmyadmin: foreign keys (that are defined after the fulltext) are missing on the table's relations page.
Simple example with:
CREATE TABLE `mytable` (
`column_one` smallint unsigned DEFAULT NULL,
FULLTEXT KEY `fulltext_index` (`column_one`) /*!50100 WITH PARSER `ngram` */,
CONSTRAINT `my_constraint_1` FOREIGN KEY (`column_one`) REFERENCES `other_table` (`column_two`) ON DELETE RESTRICT ON UPDATE RESTRICT
)
Exception: A comma or a closing bracket was expected.
Exception debug for ->token
:
public 'token' =>
object(PhpMyAdmin\SqlParser\Token)[1299]
public 'token' => string 'WITH' (length=4)
public 'value' => string 'WITH' (length=4)
public 'keyword' => string 'WITH' (length=4)
public 'type' => int 1
public 'flags' => int 3
public 'position' => int 128