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/16 12:27:17 UTC

[GitHub] [shardingsphere] wang7241 opened a new issue #7489: When i updateBatch,the sqls only one route to shard tables

wang7241 opened a new issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489


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



[GitHub] [shardingsphere] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > what's your original sql?
   
   sorry i forget my mapper.xml as follow :
   <update id="updateBatchNoAssessCountByStuCwId">
   		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
   			UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime}
   			<where>
   				<if test="item.teaCwId != null"> AND tea_cw_id = #{item.teaCwId} </if>
   				<if test="item.schoolId != null"> AND school_id = #{item.schoolId} </if>
   				<if test="item.classId != null"> AND class_id = #{item.classId} </if>
   				<if test="item.stuCwId != null"> AND stu_cw_id = #{item.stuCwId} </if>
   				<if test="item.cwShowStatus != null"> AND cw_show_status = #{item.cwShowStatus}</if>
   			</where>
   		</foreach>
   	</update>
   my mapper as follow:
   void updateBatchNoAssessCountByStuCwId(@Param("list") List<OralCwClassworkStu> classworkStus);


----------------------------------------------------------------
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] wang7241 edited a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 edited a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693493773


   > 
   > 
   > > what's your original sql?
   > 
   > sorry i forget my mapper.xml as follow :
   > 
   > 
   《update id="updateBatchNoAssessCountByStuCwId"》
   		《foreach collection="list" item="item" index="index" open="" close="" separator=";"》
   			UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime}
   			《where》
   				《if test="item.teaCwId != null"》 AND tea_cw_id = #{item.teaCwId} 《/if》
   				《if test="item.schoolId != null"》 AND school_id = #{item.schoolId} 《/if》
   				《if test="item.classId != null"》 AND class_id = #{item.classId} 《/if》
   				《if test="item.stuCwId != null"》 AND stu_cw_id = #{item.stuCwId} 《/if》
   				《if test="item.cwShowStatus != null"》 AND cw_show_status = #{item.cwShowStatus}《/if》
   			《/where》
   		《/foreach》
   	《/update》
   > 
   In my sql , I use "《" and  "》"   instead of  " <" and ">" symbol
   > 
   > my mapper as follow:
   > void updateBatchNoAssessCountByStuCwId(@param("list") List classworkStus);
   
   


----------------------------------------------------------------
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] wang7241 removed a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 removed a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693489177


   > 
   > 
   > what's your original sql?
   
   my mapper is:
   /**
        * 批量更新待互评数通过学生作业id
        *
        * @param classworkStus
        */
       void updateBatchNoAssessCountByStuCwId(@Param("list") List<OralCwClassworkStu> classworkStus);


----------------------------------------------------------------
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] wang7241 commented on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

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


   > 
   > 
   > > 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.
   thank you again. Make sure joint SQL is not supported,I change my code
   
   


----------------------------------------------------------------
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] kimmking closed issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

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


   


----------------------------------------------------------------
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] kimmking commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   what's your original sql?


----------------------------------------------------------------
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] wang7241 removed a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 removed a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693488662


   > 
   > 
   > what's your original sql?
   
   sorry,i forget
   
   <update id="updateBatchNoAssessCountByStuCwId">
   		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
   			UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime}
   			<where>
   				<if test="item.teaCwId != null"> AND tea_cw_id = #{item.teaCwId} </if>
   				<if test="item.schoolId != null"> AND school_id = #{item.schoolId} </if>
   				<if test="item.classId != null"> AND class_id = #{item.classId} </if>
   				<if test="item.stuCwId != null"> AND stu_cw_id = #{item.stuCwId} </if>
   				<if test="item.cwShowStatus != null"> AND cw_show_status = #{item.cwShowStatus}</if>
   			</where>
   		</foreach>
   	</update>


----------------------------------------------------------------
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] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > > what's your original sql?
   > 
   > sorry i forget my mapper.xml as follow :
   > 
   > 
   > 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}
   > 
   > 
   > 
   > my mapper as follow:
   > void updateBatchNoAssessCountByStuCwId(@param("list") List classworkStus);
   There is also a foreach tag in the uppermost layer of the SQL above
   


----------------------------------------------------------------
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] wang7241 removed a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 removed a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693716122


   > 
   > 
   > what's your original sql?
   
   can you get me your email,I can send my complete sql to you


----------------------------------------------------------------
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] wang7241 removed a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 removed a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693492440


   > 
   > 
   > what's your original sql?
   
   when i copy my sql to github it is filter my mybatis tags,so I put my sql to my bug report


----------------------------------------------------------------
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] kimmking edited a comment on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-694131110


   It doesn't support for three statement in one sql.
   And you need one by one pass update statement to shardingsphere.


----------------------------------------------------------------
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] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > what's your original sql?
   
   can you get me your email,I can send my complete sql to you


----------------------------------------------------------------
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] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > what's your original sql?
   
   my mapper is:
   /**
        * 批量更新待互评数通过学生作业id
        *
        * @param classworkStus
        */
       void updateBatchNoAssessCountByStuCwId(@Param("list") List<OralCwClassworkStu> classworkStus);


----------------------------------------------------------------
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] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > what's your original sql?
   
   sorry,i forget
   
   <update id="updateBatchNoAssessCountByStuCwId">
   		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
   			UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime}
   			<where>
   				<if test="item.teaCwId != null"> AND tea_cw_id = #{item.teaCwId} </if>
   				<if test="item.schoolId != null"> AND school_id = #{item.schoolId} </if>
   				<if test="item.classId != null"> AND class_id = #{item.classId} </if>
   				<if test="item.stuCwId != null"> AND stu_cw_id = #{item.stuCwId} </if>
   				<if test="item.cwShowStatus != null"> AND cw_show_status = #{item.cwShowStatus}</if>
   			</where>
   		</foreach>
   	</update>


----------------------------------------------------------------
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] wang7241 commented on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [shardingsphere] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

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


   > 
   > 
   > what's your original sql?
   
   when i copy my sql to github it is filter my mybatis tags,so I put my sql to my bug report


----------------------------------------------------------------
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] kimmking commented on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

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


   It doesn't support for three statement in one sql.


----------------------------------------------------------------
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] tristaZero commented on issue #7489: Three sqls only one route to shard tables When I execute updateBatch operation

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [shardingsphere] wang7241 edited a comment on issue #7489: When i updateBatch,the sqls only one route to shard tables

Posted by GitBox <gi...@apache.org>.
wang7241 edited a comment on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693493773


   > 
   > 
   > > what's your original sql?
   > 
   > sorry i forget my mapper.xml as follow :
   > 
   > 
   > 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}
   > 
   > there is also a foreach tag in the uppermost layer of the SQL above,but it no appear when i copy to github
   > 
   > my mapper as follow:
   > void updateBatchNoAssessCountByStuCwId(@param("list") List classworkStus);
   
   


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