xiyelife commented on a change in pull request #3295: fixed for #3234 and add
the encrypted test case for more than four cipher coloumns
URL:
https://github.com/apache/incubator-shardingsphere/pull/3295#discussion_r335834439
##########
File path:
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/feature/encrypt/parameter/impl/EncryptAssignmentParameterRewriter.java
##########
@@ -78,22 +81,24 @@ private SetAssignmentsSegment
getSetAssignmentsSegment(final SQLStatement sqlSta
return ((UpdateStatement) sqlStatement).getSetAssignment();
}
- private void encryptParameters(final StandardParameterBuilder
parameterBuilder, final String tableName, final AssignmentSegment
assignmentSegment, final List<Object> parameters) {
+ private void encryptParameters(final StandardParameterBuilder
parameterBuilder, final String tableName, final AssignmentSegment
assignmentSegment, final List<Object> parameters,
+ final Collection<String>
assistedQueryColumns, final int count) {
Review comment:
The count has nothing to do with "one Assignment have multiple parameters".
It's for the purpose of calculating the parameter's index of the current
plain column every time after the pre plain column had been added to the set
assignment.
if well want to do with "one Assignment have multiple parameters", we must
add the logic for "CommonExpressionSegment" to generate token in
"org.apache.shardingsphere.core.rewrite.feature.encrypt.token.generator.impl.EncryptAssignmentTokenGenerator#generateSQLToken".
I think this is another place we did not considered.

----------------------------------------------------------------
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]
With regards,
Apache Git Services