pingcap/tidb
View on GitHubImprove error message on SPATIAL types/indexes not supported
Open
#29,370 opened on Nov 2, 2021
help wantedseverity/minorsig/sql-infratype/bugtype/compatibility
Description
Bug Report
You can improve the parser to say this feature is not supported or a more specific error message like "SPATIAL index is not supported yet".
1. Minimal reproduce step
create table ti (pk int primary key, p point not null SRID 0, spatial index (p)) charset utf8mb4 engine=innodb;
2. What did you expect to see?
No error in MySQL
3. What did you see instead
mysql> create table ti (pk int primary key, p point not null SRID 0, spatial index (p)) charset utf8mb4 engine=innodb;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 44 near "point not null SRID 0, spatial index (p)) charset utf8mb4 engine=innodb"
4. What is your TiDB version?
+-------------------------+--------------------------------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------------------------------+
| innodb_version | 5.6.25 |
| protocol_version | 10 |
| tidb_analyze_version | 2 |
| tidb_row_format_version | 2 |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 5.7.25-TiDB-v5.2.2 |
| version_comment | TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible |
| version_compile_machine | x86_64 |
| version_compile_os | osx10.8 |
+-------------------------+--------------------------------------------------------------------------+