You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:41:45 UTC

[GitHub] [shardingsphere] trydofor edited a comment on issue #5330: replace into can not execute

trydofor edited a comment on issue #5330:
URL: https://github.com/apache/shardingsphere/issues/5330#issuecomment-641006416


   sharding-sphere.version = 4.1.0
   
   ```sql
   -- apply@tst_.* error@stop
   CREATE TABLE `tst_中文也分表` (
       `id`         BIGINT(20) NOT NULL COMMENT '主键',
       `create_dt`  DATETIME   NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日时',
       `modify_dt`  DATETIME   NOT NULL DEFAULT '1000-01-01' ON UPDATE CURRENT_TIMESTAMP COMMENT '修改日时',
       `delete_dt`  DATETIME   NOT NULL DEFAULT '1000-01-01' COMMENT '标记删除',
       `commit_id`  BIGINT(20) NOT NULL COMMENT '提交ID',
       `login_info` TEXT COMMENT '登陆信息,用户,终端等',
       `other_info` TEXT COMMENT '其他信息,业务侧自定义',
       PRIMARY KEY (`id`)
   ) ENGINE = InnoDB
     DEFAULT CHARSET = utf8mb4 COMMENT ='201/奇葩测试';
   ```
   
   ```
   replace into `tst_中文也分表` (`id`,`create_dt`,`modify_dt`,`delete_dt`,`commit_id`,`login_info`,`other_info`) values (?,?,?,?,?,?,?)
   
   java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.statement.dml.InsertStatement cannot be cast to org.apache.shardingsphere.sql.parser.sql.statement.dml.ReplaceStatement
   	at org.jooq_3.12.4.MYSQL.debug(Unknown Source) ~[na:na]
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitReplace(MySQLDMLVisitor.java:163) ~[shardingsphere-sql-parser-mysql-4.1.0.jar:4.1.0]
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitReplace(MySQLDMLVisitor.java:127) ~[shardingsphere-sql-parser-mysql-4.1.0.jar:4.1.0]
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$ReplaceContext.accept(MySQLStatementParser.java:1471) ~[shardingsphere-sql-parser-mysql-4.1.0.jar:4.1.0]
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.2.jar:4.7.2]
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org