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 2019/10/30 06:17:29 UTC
[GitHub] [incubator-shardingsphere] xiyelife opened a new issue #3404: Insert failed when inserted sql contains “code” cloumn
xiyelife opened a new issue #3404: Insert failed when inserted sql contains “code” cloumn
URL: https://github.com/apache/incubator-shardingsphere/issues/3404
### Which version of ShardingSphere did you use?
4.0.0-RC3-SNAPSHOT
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
### Expected behavior
insert successfully
### Actual behavior
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: java.lang.IllegalStateException
The error may involve com.msxf.crm.workbench.dao.mapper.mdm.DemoMapper.insert-Inline
The error occurred while setting parameters
SQL: insert into w_demo (id,code,name,create_time, create_id, create_name,update_time, update_id, update_name,deleted) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Cause: java.lang.IllegalStateException
### Reason analyze (If you can)
antlr parse error:
**line 1:23 no viable alternative at input '(id,code'**
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Error SQL:
insert into w_demo (id,**code**,name,create_time, create_id, create_name,update_time, update_id, update_name,deleted) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
SQL like this is ok:
![image](https://user-images.githubusercontent.com/8772975/67833500-c5a51880-fb1f-11e9-890d-cec4668f87ca.png)
The insertValues is null:
![1](https://user-images.githubusercontent.com/8772975/67833396-74952480-fb1f-11e9-994c-5c764f10c615.png)
### Example codes for reproduce this issue (such as a github link).
----------------------------------------------------------------
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
With regards,
Apache Git Services