You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "TeslaCN (via GitHub)" <gi...@apache.org> on 2023/04/27 02:03:55 UTC

[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #25330: support MySQL SET session variable (#24124)

TeslaCN commented on code in PR #25330:
URL: https://github.com/apache/shardingsphere/pull/25330#discussion_r1178552394


##########
proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/executor/DefaultSessionVariableHandler.java:
##########
@@ -37,13 +37,18 @@ public abstract class DefaultSessionVariableHandler implements SessionVariableHa
     @Override
     public final void handle(final ConnectionSession connectionSession, final String variableName, final String assignValue) {
         if (TypedSPILoader.findService(ReplayedSessionVariablesProvider.class, databaseType).map(ReplayedSessionVariablesProvider::getVariables).orElseGet(Collections::emptySet)
-                .contains(variableName)) {
+                .contains(variableName)
+                || isNeedHandel(variableName)) {
             connectionSession.getRequiredSessionVariableRecorder().setVariable(variableName, assignValue);
         } else {
             log.debug("Set statement {} = {} was discarded.", variableName, assignValue);
         }
     }
     
+    protected boolean isNeedHandel(final String variableName) {

Review Comment:
   `Handel` or `Handle`?



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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org