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/17 02:37:25 UTC

[GitHub] [shardingsphere] tristaZero commented on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

tristaZero commented on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693772590


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


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