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/09/18 10:03:40 UTC

[GitHub] [shardingsphere] cbxiaorenwu opened a new issue #7512: Error in 'update' operation using shardingshpere

cbxiaorenwu opened a new issue #7512:
URL: https://github.com/apache/shardingsphere/issues/7512


   ###你用了哪个版本的ShardingSphere?
   4.1.1
   
   
   ###你用了哪个项目?ShardingSphere JDBC还是ShardingSphere代理?
   ShardingSphere JDBC
   
   连接两个mysql数据库(ds_0,ds_1),库内表名一致(test),共有唯一主键进行区分,
   
   主键奇数的在ds_0库中,主键偶数的在ds_1中
   
   ###预期行为
   
   执行修改(update)操作,添加where  主键=5(表内有主键为5的数据)
   
   修改成功,且只执行一条sql语句;
   
   
   ###实际行为
   
   显示错误信息如下:
   
   Cannot support Multiple-Table for 'org.apache.shardingsphere.sql.parser.sql.statement.dml.UpdateStatement@3f7f9d3f'.
   
   详细信息:
   
   }{FATAL=Bright red, ERROR=Red, WARN=Bright yellow, INFO=Bright green, DEBUG=green, TRACE=cyan} java.lang.IllegalStateException: Failed to execute CommandLineRunner
   	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784) [spring-boot-2.1.15.RELEASE.jar:2.1.15.RELEASE]
   	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:765) [spring-boot-2.1.15.RELEASE.jar:2.1.15.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:319) [spring-boot-2.1.15.RELEASE.jar:2.1.15.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.15.RELEASE.jar:2.1.15.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.15.RELEASE.jar:2.1.15.RELEASE]
   	at net.engining.rrr.init.InitApplication.main(InitApplication.java:19) [classes/:?]
   Caused by: org.apache.shardingsphere.underlying.common.exception.ShardingSphereException: Cannot support Multiple-Table for 'org.apache.shardingsphere.sql.parser.sql.statement.dml.UpdateStatement@3f7f9d3f'.
   	at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:72) ~[sharding-core-route-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:69) ~[sharding-core-route-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:53) ~[sharding-core-route-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:91) ~[shardingsphere-route-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76) ~[shardingsphere-route-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.executeUpdate(ShardingPreparedStatement.java:131) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]
   	at net.engining.rrr.init.data.example.QueryDslDemoInit.update_aroundBody2(QueryDslDemoInit.java:124) ~[classes/:?]
   
   
   ###原因分析(如果可以)
   
   无
   
   ###重现行为的步骤,如:要执行的SQL、分片规则配置、异常发生时等等。
   
   无
   
   ###重现此问题的示例代码(例如github链接)。
   
   无


----------------------------------------------------------------
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



[GitHub] [shardingsphere] menghaoranss closed issue #7512: Error in 'update' operation using shardingshpere

Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #7512:
URL: https://github.com/apache/shardingsphere/issues/7512


   


----------------------------------------------------------------
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



[GitHub] [shardingsphere] menghaoranss commented on issue #7512: Error in 'update' operation using shardingshpere

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #7512:
URL: https://github.com/apache/shardingsphere/issues/7512#issuecomment-694784374


   For English only.


----------------------------------------------------------------
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