druid 1.1.16版本解析SPATIAL KEY报错

afdcj2ne  于 2022-11-02  发布在  Druid
关注(0)|答案(1)|浏览(220)

版本信息:

<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.1.16</version>
    </dependency>

sql语句:

CREATE TABLE `t_point` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',  `coverage_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '所属图层id',  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '点名称',  `lonlat` point NOT NULL COMMENT '点的位置坐标(lon lat)',  `city` varchar(30) NOT NULL DEFAULT '' COMMENT '点所在的城市',  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '跟新时间',  PRIMARY KEY (`id`),  KEY `idx_coverage_id` (`coverage_id`),  KEY `idx_city` (`city`),  SPATIAL KEY `idx_lonlat` (`lonlat`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='点表';

异常堆栈:

Caused by: com.alibaba.druid.sql.parser.ParserException: syntax error, error in :' key `idx_lonlat` (`lonlat`)) engi', expect RPAREN, actual IDENTIFIER pos 1239, line 22, column 13, token IDENTIFIER `idx_lonlat`
    at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:287) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.parser.SQLParser.accept(SQLParser.java:295) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.dialect.mysql.parser.MySqlCreateTableParser.parseCreateTable(MySqlCreateTableParser.java:322) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreate(MySqlStatementParser.java:414) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:260) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:171) ~[druid-1.1.16.jar:1.1.16]
    at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:495) ~[druid-1.1.16.jar:1.1.16]
    at com.ucar.datalink.biz.utils.ddl.DdlSqlUtils.buildSQLStatement(DdlSqlUtils.java:25) ~[dl-biz-0.0.1.jar:na]
    at com.ucar.datalink.biz.service.impl.SyncRelationServiceImpl.checkSqls(SyncRelationServiceImpl.java:197) ~[dl-biz-0.0.1.jar:na]
    at com.ucar.datalink.manager.core.web.controller.sync.SyncRelationController.checkSql_4_dbms(SyncRelationController.java:142) ~[dl-manager-core-0.0.1.jar:na]
    at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) ~[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    ... 28 common frames omitted
v64noz0r

v64noz0r1#

请问是1.1.16版本不支持解析SPATIAL KEY吗?有解决方案没?

相关问题