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/05/08 02:28:45 UTC

[GitHub] [shardingsphere] neil4dong commented on a change in pull request #5423: BugFix:1.ON DUPLICATE KEY UPDATE Sub-Clause paramter dropped https:…

neil4dong commented on a change in pull request #5423:
URL: https://github.com/apache/shardingsphere/pull/5423#discussion_r421901157



##########
File path: shardingsphere-underlying/shardingsphere-rewrite/shardingsphere-rewrite-engine/src/main/java/org/apache/shardingsphere/underlying/rewrite/engine/RouteSQLRewriteEngine.java
##########
@@ -62,7 +62,10 @@ public RouteSQLRewriteResult rewrite(final SQLRewriteContext sqlRewriteContext,
         int count = 0;
         for (Collection<DataNode> each : routeResult.getOriginalDataNodes()) {
             if (isInSameDataNode(each, routeUnit)) {
-                result.addAll(((GroupedParameterBuilder) parameterBuilder).getParameters(count));
+                GroupedParameterBuilder groupedParameterBuilder = (GroupedParameterBuilder) parameterBuilder;
+
+                result.addAll(groupedParameterBuilder.getParameters(count));
+                result.addAll(groupedParameterBuilder.getOriginalOnDuplicateKeyParameters());

Review comment:
       This line will lead  parameters miss match when sharding to mutiple datanodes..




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