zhaojinchao95 commented on code in PR #25743:
URL: https://github.com/apache/shardingsphere/pull/25743#discussion_r1196585749


##########
proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdater.java:
##########
@@ -122,12 +126,18 @@ private void syncSQLSimpleToLoggingRule(final 
TypedPropertyKey propertyKey, fina
     
     private void handleVariables(final ConnectionSession connectionSession, 
final SetDistVariableStatement sqlStatement) {
         VariableEnum variable = 
VariableEnum.getValueOf(sqlStatement.getName());
-        switch (variable) {
-            case TRANSACTION_TYPE:
-                
connectionSession.getTransactionStatus().setTransactionType(getTransactionType(sqlStatement.getValue()));
-                break;
-            default:
-                throw new UnsupportedVariableException(sqlStatement.getName());
+        if (variable == VariableEnum.TRANSACTION_TYPE) {
+            ContextManager contextManager = 
ProxyContext.getInstance().getContextManager();
+            Collection<RuleConfiguration> ruleConfigurations = 
contextManager.getMetaDataContexts().getMetaData().getGlobalRuleMetaData().getConfigurations();

Review Comment:
   Change `ruleConfigurations` to `ruleConfigs` are better.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to