wang7241 commented on issue #7489: URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693774794
> > ## Bug Report > > **For English only**, other languages will not accept. > > Before report a bug, make sure you have: > > * Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). > > * Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). > > > Please pay attention on issues you submitted, because we maybe need more details. > If no response anymore and we cannot reproduce it on current information, we will **close it**. > > Please answer these questions before submitting your issue. Thanks! > ### Which version of ShardingSphere did you use? > > 4.1.1 > ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? > > ShardingSphere-JDBC > ### Expected behavior > > every sql route to shard tables > ### Actual behavior > > three sqls only one sql route shard tables > ### Reason analyze (If you can) > ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. > > Actual SQL: ds0 ::: UPDATE oral_cw_classwork_stu_0 SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = ? > WHERE tea_cw_id = ? > AND school_id = ? > AND class_id = ? > AND stu_cw_id = ? > AND cw_show_status = ? > ; > UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = ? > WHERE tea_cw_id = ? > AND school_id = ? > AND class_id = ? > AND stu_cw_id = ? > AND cw_show_status = ? > ; > UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = ? > WHERE tea_cw_id = ? > AND school_id = ? > AND class_id = ? > AND stu_cw_id = ? > AND cw_show_status = ? ::: [2020-09-16 20:19:24.309, e52b673ea8474602a1ad4bf97ea943a4, 2811000226000000690, 2811000226000215069, 85a006abbedc41e6add74b2b3c3aba98, 0, > 2020-09-16 20:19:24.314, e52b673ea8474602a1ad4bf97ea943a4, 2811000226000000690, 2811000226000215069, f4b91a8834ba4de5be2041804c56398b, 0, > 2020-09-16 20:19:24.319, e52b673ea8474602a1ad4bf97ea943a4, 2811000226000000690, 2811000226000215069, 01364ab96ad54c68bd0c8794e712aecf, 0] > > my shard column is schoolId > UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime} AND tea_cw_id = #{item.teaCwId} AND school_id = #{item.schoolId} AND class_id = #{item.classId} AND stu_cw_id = #{item.stuCwId} AND cw_show_status = #{item.cwShowStatus} ### Example codes for reproduce this issue (such as a github link). > Sorry, but you put three independent SQLs together as one SQL, didn't you? If so, currently, that is unsupported. My suggestion is to split one SQL as one query for ShardingJDBC Thanks for your reply.Actually I do not make three sqls to one sql. according to the actual sql result,I think mybatis did it.Can you send your email to me.I can send my mapper.xml to you if you willing ---------------------------------------------------------------- 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: [email protected]
