开发者社区> 问答> 正文

com.alibaba.fastsql.sql.parser.ParserException: il

环境信息

canal version 1.1.3 mysql version 5.7

问题描述

2019-04-10 21:13:22.853 [MultiStageCoprocessor-other-mgr_im-0] WARN c.a.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta - parse faield : CREATE TABLE webim_knowledge ( id int(11) NOT NULL AUTO_INCREMENT, type varchar(20) NOT NULL DEFAULT '' COMMENT '????', title varchar(512) NOT NULL DEFAULT '' COMMENT '??', creator int(11) NOT NULL DEFAULT '0' COMMENT '???', index int(11) NOT NULL DEFAULT '0' COMMENT '??', ctime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, ota_id int(11) unsigned NOT NULL DEFAULT '0', sort_id int(3) unsigned NOT NULL DEFAULT '0', owner int(11) NOT NULL DEFAULT '0', PRIMARY KEY (id), KEY owner (owner), KEY ota_id (ota_id), FULLTEXT KEY idx_title (title) /*!50100 WITH PARSER ngram */ ) ENGINE=InnoDB AUTO_INCREMENT=1243717 DEFAULT CHARSET=utf8 com.alibaba.fastsql.sql.parser.ParserException: illegal name, pos 634, line 14, column 39, token HINT at com.alibaba.fastsql.sql.parser.SQLExprParser.name(SQLExprParser.java:1812) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.dialect.mysql.parser.MySqlExprParser.parseColumn(MySqlExprParser.java:559) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.dialect.mysql.parser.MySqlCreateTableParser.parseCreateTable(MySqlCreateTableParser.java:425) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.dialect.mysql.parser.MySqlStatementParser.parseCreate(MySqlStatementParser.java:276) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:228) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.SQLUtils.parseStatements(SQLUtils.java:536) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.fastsql.sql.repository.SchemaRepository.console(SchemaRepository.java:439) ~[fastsql-2.0.0_preview_855.jar:2.0.0_preview_855] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.apply(MemoryTableMeta.java:81) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache.parseTableMeta(TableMetaCache.java:104) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache.getTableMetaByDB(TableMetaCache.java:90) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache.access$000(TableMetaCache.java:32) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache$1.load(TableMetaCache.java:58) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache$1.load(TableMetaCache.java:53) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527) [guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319) [guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282) [guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) [guava-18.0.jar:na] at com.google.common.cache.LocalCache.get(LocalCache.java:3937) [guava-18.0.jar:na] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941) [guava-18.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824) [guava-18.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830) [guava-18.0.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache.getTableMeta(TableMetaCache.java:195) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.getTableMeta(LogEventConvert.java:933) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEventForTableMeta(LogEventConvert.java:475) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$SimpleParserStage.onEvent(MysqlMultiStageCoprocessor.java:274) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$SimpleParserStage.onEvent(MysqlMultiStageCoprocessor.java:246) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168) [disruptor-3.4.2.jar:na] at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) [disruptor-3.4.2.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_202] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_202] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202]

原提问者GitHub用户

展开
收起
古拉古拉 2023-05-08 12:37:13 642 0
2 条回答
写回答
取消 提交回答
  • 应该是这部分代码的解析异常

    /*!50100 WITH PARSER ngram */

    原回答者GitHub用户agapple

    2023-05-09 17:38:27
    赞同 展开评论 打赏
  • 值得去的地方都没有捷径

    根据日志信息,这是一个ParserException解析异常,出现在解析CREATE TABLE语句时,代码表明该语句有语法错误,错误信息为“illegal name”,位置在634,第14行第39列,标记为“HINT”。似乎在FULLTEXT KEY行上有问题。

    建议检查FULLTEXT KEY语句是否有语法错误,可能需要重新编写该语句。可以考虑删除该语句,重新编写或使用其他替代方案。同时也可检查解析器是否正确配置,并查看其他错误信息以获取更多帮助。

    2023-05-08 12:47:03
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载