错误判断:
RROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index orde
类似这样的错误是因为给索引提供了错误的附加条件,
son表如下:
mysql> desc son;
+-----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| id | int | YES | MUL | NULL | |
| name | char(20) | YES | | NULL | |
| grade | tinyint | YES | | NULL | |
| favourate | varchar(39) | YES | | NULL | |
+-----------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
给son表增加一个fulltext索引,code如下:
mysql> create fulltext index son_index on son(name(10) asc);
ERROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index order
结果引发错误,varchar类型不能指定asc