strongduanmu opened a new issue, #25332:
URL: https://github.com/apache/shardingsphere/issues/25332

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   
[50640ab](https://github.com/apache/shardingsphere/commit/50640ab4b7eee8338bc2c0ec29b3e921f3441b82)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   SHOW DIST VARIABLES return props `check_table_metadata_enabled`.
   
   ### Actual behavior
   
   
![88a20bcf-6eaa-4fbb-86d4-1069aac9b401](https://user-images.githubusercontent.com/10829171/234520368-590dfc3b-5dcc-4f2b-ad54-3d670b0e66b0.jpeg)
   
   ### Reason analyze (If you can)
   
   ShowDistVariablesExecutor getKeyNames method was used for props, and this 
requires all the props of enumeration class name must be consistent with the 
key. The enumeration class name for check_table_metadata_enabled is 
CHECK_TABLE_META_DATA_ENABLED.
   
   ```java
   /**
    * Show dist variables executor.
    */
   public final class ShowDistVariablesExecutor implements 
ConnectionSessionRequiredQueryableRALExecutor<ShowDistVariablesStatement> {
       
       @Override
       public Collection<String> getColumnNames() {
           return Arrays.asList("variable_name", "variable_value");
       }
       
       @Override
       public Collection<LocalDataQueryResultRow> getRows(final 
ShardingSphereMetaData metaData, final ConnectionSession connectionSession, 
final ShowDistVariablesStatement sqlStatement) {
           Collection<LocalDataQueryResultRow> result = 
ConfigurationPropertyKey.getKeyNames().stream().filter(each -> 
!"sql_show".equalsIgnoreCase(each) && !"sql_simple".equalsIgnoreCase(each))
                   .map(each -> new LocalDataQueryResultRow(each.toLowerCase(), 
metaData.getProps().getValue(ConfigurationPropertyKey.valueOf(each)).toString())).collect(Collectors.toList());
           result.addAll(InternalConfigurationPropertyKey.getKeyNames().stream()
                   .map(each -> new LocalDataQueryResultRow(each.toLowerCase(), 
metaData.getInternalProps().getValue(InternalConfigurationPropertyKey.valueOf(each)).toString()))
                   .collect(Collectors.toList()));
           result.add(new LocalDataQueryResultRow(
                   VariableEnum.AGENT_PLUGINS_ENABLED.name().toLowerCase(), 
SystemPropertyUtil.getSystemProperty(VariableEnum.AGENT_PLUGINS_ENABLED.name(), 
Boolean.TRUE.toString())));
           result.add(new 
LocalDataQueryResultRow(VariableEnum.CACHED_CONNECTIONS.name().toLowerCase(), 
connectionSession.getBackendConnection().getConnectionSize()));
           result.add(new 
LocalDataQueryResultRow(VariableEnum.TRANSACTION_TYPE.name().toLowerCase(), 
connectionSession.getTransactionStatus().getTransactionType().name()));
           addLoggingPropsRows(metaData, result);
           return result;
       }
   ```
   
   
![b3eba65a-0df1-4f7f-91bd-815697bcbb6d](https://user-images.githubusercontent.com/10829171/234520404-84235d0e-9f83-4366-9c9e-83e7cafc17d4.jpeg)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### 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.

To unsubscribe, e-mail: 
[email protected]

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

Reply via email to