This is an automated email from the ASF dual-hosted git repository.
menghaoranss pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 41c6339f797 Move METADATA_IDENTIFIER_CASE_SENSITIVITY to temporary
config (#38979)
41c6339f797 is described below
commit 41c6339f797dc7b914c0e4abd463798a7b313273
Author: Haoran Meng <[email protected]>
AuthorDate: Thu Jul 2 14:32:34 2026 +0800
Move METADATA_IDENTIFIER_CASE_SENSITIVITY to temporary config (#38979)
* Move METADATA_IDENTIFIER_CASE_SENSITIVITY to temporary config
* Fix RALE2EIT
---
.../config/props/ConfigurationPropertyKey.java | 5 -----
.../TemporaryConfigurationPropertyKey.java | 8 +++++++-
.../identifier/IdentifierCaseRuleResolver.java | 6 ++++--
.../config/props/ConfigurationPropertiesTest.java | 5 +----
.../ShardingSphereDatabaseIdentifierTest.java | 4 ++--
.../database/ShardingSphereDatabaseTest.java | 6 +++---
.../DatabaseIdentifierContextFactoryTest.java | 22 +++++++++++-----------
.../identifier/IdentifierCaseRuleResolverTest.java | 4 ++--
.../manager/rule/GlobalConfigurationManager.java | 9 ++++-----
.../variable/ShowDistVariablesExecutorTest.java | 4 ++--
.../dataset/empty_rules/show_dist_variables.xml | 1 -
.../test/it/sql/binder/SQLBinderIT.java | 8 ++++----
.../test/it/rewriter/engine/SQLRewriterIT.java | 6 +++---
13 files changed, 43 insertions(+), 45 deletions(-)
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
index 9d48fede377..6003884e971 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
@@ -135,11 +135,6 @@ public enum ConfigurationPropertyKey implements
TypedPropertyKey {
*/
AGENT_PLUGINS_ENABLED("agent-plugins-enabled",
String.valueOf(Boolean.TRUE), boolean.class, false),
- /**
- * Metadata identifier case sensitivity.
- */
-
METADATA_IDENTIFIER_CASE_SENSITIVITY("metadata-identifier-case-sensitivity",
MetadataIdentifierCaseSensitivity.DATABASE.name(),
MetadataIdentifierCaseSensitivity.class, true),
-
/**
* Maximum size of Groovy inline expression parsing cache.
*/
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/temporary/TemporaryConfigurationPropertyKey.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/temporary/TemporaryConfigurationPropertyKey.java
index 7aa5a463dce..66bd40bf02b 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/temporary/TemporaryConfigurationPropertyKey.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/config/props/temporary/TemporaryConfigurationPropertyKey.java
@@ -19,6 +19,7 @@ package
org.apache.shardingsphere.infra.config.props.temporary;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
+import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
import org.apache.shardingsphere.infra.props.TypedPropertyKey;
import java.util.Arrays;
@@ -50,7 +51,12 @@ public enum TemporaryConfigurationPropertyKey implements
TypedPropertyKey {
/**
* Instance connection enabled.
*/
- INSTANCE_CONNECTION_ENABLED("instance-connection-enabled",
String.valueOf(Boolean.FALSE), boolean.class, false);
+ INSTANCE_CONNECTION_ENABLED("instance-connection-enabled",
String.valueOf(Boolean.FALSE), boolean.class, false),
+
+ /**
+ * Metadata identifier case sensitivity.
+ */
+
METADATA_IDENTIFIER_CASE_SENSITIVITY("metadata-identifier-case-sensitivity",
MetadataIdentifierCaseSensitivity.DATABASE.name(),
MetadataIdentifierCaseSensitivity.class, true);
private final String key;
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolver.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolver.java
index 6433a6d1d2a..57953130264 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolver.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolver.java
@@ -24,8 +24,9 @@ import
org.apache.shardingsphere.database.connector.core.metadata.identifier.Ide
import
org.apache.shardingsphere.database.connector.core.spi.DatabaseTypedSPILoader;
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationProperties;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import javax.sql.DataSource;
@@ -46,7 +47,8 @@ public final class IdentifierCaseRuleResolver {
if (null == databaseType || null == databaseType.getType()) {
return IdentifierCaseRuleSets.newInsensitiveRuleSet();
}
- MetadataIdentifierCaseSensitivity configuredCaseSensitivity =
props.getValue(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
+ MetadataIdentifierCaseSensitivity configuredCaseSensitivity = new
TemporaryConfigurationProperties(props.getProps())
+
.getValue(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
if (MetadataIdentifierCaseSensitivity.INSENSITIVE ==
configuredCaseSensitivity) {
return IdentifierCaseRuleSets.newInsensitiveRuleSet();
}
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertiesTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertiesTest.java
index 0fb01dfcc30..85068cc872b 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertiesTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertiesTest.java
@@ -55,7 +55,6 @@ class ConfigurationPropertiesTest {
assertThat(actual.getValue(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_VERSION),
is("TLSv1.3"));
assertThat(actual.getValue(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_CIPHER),
is("ECDHE"));
assertTrue((Boolean)
actual.getValue(ConfigurationPropertyKey.AGENT_PLUGINS_ENABLED));
-
assertThat(actual.getValue(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY),
is(MetadataIdentifierCaseSensitivity.INSENSITIVE));
}
private Properties createProperties() {
@@ -78,8 +77,7 @@ class ConfigurationPropertiesTest {
new
Property(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_ENABLED.getKey(),
Boolean.TRUE.toString()),
new
Property(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_VERSION.getKey(),
"TLSv1.3"),
new
Property(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_CIPHER.getKey(), "ECDHE"),
- new
Property(ConfigurationPropertyKey.AGENT_PLUGINS_ENABLED.getKey(),
Boolean.TRUE.toString()),
- new
Property(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
"insensitive"));
+ new
Property(ConfigurationPropertyKey.AGENT_PLUGINS_ENABLED.getKey(),
Boolean.TRUE.toString()));
}
@Test
@@ -104,6 +102,5 @@ class ConfigurationPropertiesTest {
assertThat(actual.getValue(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_VERSION),
is("TLSv1.2,TLSv1.3"));
assertThat(actual.getValue(ConfigurationPropertyKey.PROXY_FRONTEND_SSL_CIPHER),
is(""));
assertTrue((Boolean)
actual.getValue(ConfigurationPropertyKey.AGENT_PLUGINS_ENABLED));
-
assertThat(actual.getValue(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY),
is(MetadataIdentifierCaseSensitivity.DATABASE));
}
}
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseIdentifierTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseIdentifierTest.java
index 161af16f5b8..f7ab0e0062e 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseIdentifierTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseIdentifierTest.java
@@ -19,8 +19,8 @@ package org.apache.shardingsphere.infra.metadata.database;
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.datasource.pool.props.domain.DataSourcePoolProperties;
import
org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData;
import
org.apache.shardingsphere.infra.metadata.database.resource.node.StorageNode;
@@ -119,7 +119,7 @@ class ShardingSphereDatabaseIdentifierTest {
ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema",
postgreSQLDatabaseType, Collections.singleton(table), Collections.emptyList());
ShardingSphereDatabase database =
createDatabase(postgreSQLDatabaseType, schema);
Properties props = new Properties();
-
props.setProperty(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name());
+
props.setProperty(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name());
database.refreshIdentifierContext(new ConfigurationProperties(props));
assertTrue(database.containsSchema("FOO_SCHEMA"));
assertTrue(database.getSchema("foo_schema").containsTable("FOO_TBL"));
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseTest.java
index 2bd2185dfa7..ab6594a593e 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabaseTest.java
@@ -24,8 +24,8 @@ import
org.apache.shardingsphere.database.connector.core.metadata.identifier.Loo
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import
org.apache.shardingsphere.database.connector.core.type.DatabaseTypeRegistry;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import
org.apache.shardingsphere.infra.config.rule.decorator.RuleConfigurationDecorator;
import
org.apache.shardingsphere.infra.exception.kernel.metadata.resource.storageunit.MissingRequiredStorageUnitsException;
@@ -58,8 +58,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.stream.Stream;
import java.util.Properties;
+import java.util.stream.Stream;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
@@ -213,7 +213,7 @@ class ShardingSphereDatabaseTest {
"foo_db", databaseType, new
ResourceMetaData(Collections.emptyMap(), Collections.emptyMap()), new
RuleMetaData(Collections.emptyList()), Collections.singleton(schema),
new ConfigurationProperties(new Properties()));
database.refreshIdentifierContext(new ConfigurationProperties(
- PropertiesBuilder.build(new
Property(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name()))));
+ PropertiesBuilder.build(new
Property(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name()))));
DatabaseIdentifierContext actualIdentifierContext =
getIdentifierContext(database);
assertThat(actualIdentifierContext.getRule(IdentifierScope.SCHEMA).getLookupMode(QuoteCharacter.NONE),
is(LookupMode.NORMALIZED));
assertThat(getIdentifierContext(schema), is(actualIdentifierContext));
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/DatabaseIdentifierContextFactoryTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/DatabaseIdentifierContextFactoryTest.java
index f37cee07af6..7720ba550da 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/DatabaseIdentifierContextFactoryTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/DatabaseIdentifierContextFactoryTest.java
@@ -23,12 +23,12 @@ import
org.apache.shardingsphere.database.connector.core.metadata.identifier.Ide
import
org.apache.shardingsphere.database.connector.core.metadata.identifier.LookupMode;
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
+import
org.apache.shardingsphere.infra.datasource.pool.props.domain.DataSourcePoolProperties;
import
org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData;
import
org.apache.shardingsphere.infra.metadata.database.resource.node.StorageNode;
import
org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit;
-import
org.apache.shardingsphere.infra.datasource.pool.props.domain.DataSourcePoolProperties;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.infra.util.props.PropertiesBuilder;
import org.apache.shardingsphere.infra.util.props.PropertiesBuilder.Property;
@@ -39,21 +39,21 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import javax.sql.DataSource;
-import java.lang.reflect.Proxy;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Locale;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.stream.Stream;
import java.io.PrintWriter;
+import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
import java.util.logging.Logger;
+import java.util.stream.Stream;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
@@ -496,7 +496,7 @@ class DatabaseIdentifierContextFactoryTest {
}
private static ConfigurationProperties createConfigurationProperties(final
MetadataIdentifierCaseSensitivity caseSensitivity) {
- return new ConfigurationProperties(PropertiesBuilder.build(new
Property(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
caseSensitivity.name())));
+ return new ConfigurationProperties(PropertiesBuilder.build(new
Property(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
caseSensitivity.name())));
}
private static Stream<Arguments> storageObjectScopes() {
diff --git
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolverTest.java
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolverTest.java
index bb7cf7bc03c..6532de89cfd 100644
---
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolverTest.java
+++
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/identifier/IdentifierCaseRuleResolverTest.java
@@ -23,7 +23,7 @@ import
org.apache.shardingsphere.database.connector.core.metadata.identifier.Ide
import
org.apache.shardingsphere.database.connector.core.metadata.identifier.LookupMode;
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.infra.util.props.PropertiesBuilder;
import org.apache.shardingsphere.infra.util.props.PropertiesBuilder.Property;
@@ -71,6 +71,6 @@ class IdentifierCaseRuleResolverTest {
}
private Properties createProperties(final String value) {
- return PropertiesBuilder.build(new
Property(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
value));
+ return PropertiesBuilder.build(new
Property(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
value));
}
}
diff --git
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/rule/GlobalConfigurationManager.java
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/rule/GlobalConfigurationManager.java
index d9c303787a5..d32362a165c 100644
---
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/rule/GlobalConfigurationManager.java
+++
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/rule/GlobalConfigurationManager.java
@@ -20,7 +20,6 @@ package org.apache.shardingsphere.mode.metadata.manager.rule;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationProperties;
import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
@@ -91,7 +90,7 @@ public final class GlobalConfigurationManager {
ShardingSphereMetaData newMetaData = new
ShardingSphereMetaData(metaDataContexts.getMetaData().getAllDatabases(),
metaDataContexts.getMetaData().getGlobalResourceMetaData(),
metaDataContexts.getMetaData().getGlobalRuleMetaData(),
newProps, metaDataContexts.getMetaData().getProtocolType());
- if (isMetadataIdentifierCaseSensitivityChanged(newProps)) {
+ if (isMetadataIdentifierCaseSensitivityChanged(props)) {
newMetaData.getAllDatabases().forEach(each ->
each.refreshIdentifierContext(newProps));
}
metaDataContexts.update(newMetaData, metaDataPersistFacade);
@@ -102,9 +101,9 @@ public final class GlobalConfigurationManager {
}
}
- private boolean isMetadataIdentifierCaseSensitivityChanged(final
ConfigurationProperties newProps) {
- MetadataIdentifierCaseSensitivity currentValue =
metaDataContexts.getMetaData().getProps().getValue(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
- MetadataIdentifierCaseSensitivity newValue =
newProps.getValue(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
+ private boolean isMetadataIdentifierCaseSensitivityChanged(final
Properties props) {
+ MetadataIdentifierCaseSensitivity currentValue =
metaDataContexts.getMetaData().getTemporaryProps().getValue(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
+ MetadataIdentifierCaseSensitivity newValue = new
TemporaryConfigurationProperties(props).getValue(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY);
return currentValue != newValue;
}
diff --git
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/variable/ShowDistVariablesExecutorTest.java
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/variable/ShowDistVariablesExecutorTest.java
index 8d7d425e438..02d4c8b1ead 100644
---
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/variable/ShowDistVariablesExecutorTest.java
+++
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/variable/ShowDistVariablesExecutorTest.java
@@ -64,7 +64,7 @@ class ShowDistVariablesExecutorTest {
executor.setConnectionContext(new
DistSQLConnectionContext(mock(QueryContext.class), 1,
mock(DatabaseType.class),
mock(DatabaseConnectionManager.class), mock(ExecutorStatementManager.class)));
Collection<LocalDataQueryResultRow> actual =
executor.getRows(mock(ShowDistVariablesStatement.class), contextManager);
- assertThat(actual.size(), is(23));
+ assertThat(actual.size(), is(22));
LocalDataQueryResultRow row = actual.iterator().next();
assertThat(row.getCell(1), is("agent_plugins_enabled"));
assertThat(row.getCell(2), is("false"));
@@ -111,7 +111,7 @@ class ShowDistVariablesExecutorTest {
when(contextManager.getMetaDataContexts().getMetaData().getTemporaryProps()).thenReturn(new
TemporaryConfigurationProperties(new Properties()));
ShowDistVariablesStatement sqlStatement = new
ShowDistVariablesStatement(true, null);
Collection<LocalDataQueryResultRow> actual =
executor.getRows(sqlStatement, contextManager);
- assertThat(actual.size(), is(4));
+ assertThat(actual.size(), is(5));
LocalDataQueryResultRow row = actual.iterator().next();
assertThat(row.getCell(1), is("instance_connection_enabled"));
assertThat(row.getCell(2), is("false"));
diff --git
a/test/e2e/sql/src/test/resources/cases/ral/dataset/empty_rules/show_dist_variables.xml
b/test/e2e/sql/src/test/resources/cases/ral/dataset/empty_rules/show_dist_variables.xml
index 58e2acfd24e..0bf09a8fd7a 100644
---
a/test/e2e/sql/src/test/resources/cases/ral/dataset/empty_rules/show_dist_variables.xml
+++
b/test/e2e/sql/src/test/resources/cases/ral/dataset/empty_rules/show_dist_variables.xml
@@ -29,7 +29,6 @@
<row values="load_table_metadata_batch_size| 1000" />
<row values="max_connections_size_per_query| 1" />
<row values="max_union_size_per_datasource| 2147483647" />
- <row values="metadata_identifier_case_sensitivity| DATABASE" />
<row values="proxy_backend_query_fetch_size| -1" />
<row values="proxy_default_port| 3307" />
<row values="proxy_frontend_connection_idle_timeout| 28800" />
diff --git
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
index b4e18e563f5..f030b6e0e2a 100644
---
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
+++
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
@@ -22,8 +22,8 @@ import
org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import
org.apache.shardingsphere.database.connector.core.type.DatabaseTypeRegistry;
import org.apache.shardingsphere.infra.binder.engine.SQLBindEngine;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.hint.SQLHintUtils;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
@@ -35,6 +35,8 @@ import
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSp
import
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
+import org.apache.shardingsphere.infra.util.props.PropertiesBuilder;
+import org.apache.shardingsphere.infra.util.props.PropertiesBuilder.Property;
import org.apache.shardingsphere.sql.parser.engine.api.CacheOption;
import org.apache.shardingsphere.sql.parser.engine.api.SQLParserEngine;
import
org.apache.shardingsphere.sql.parser.engine.api.SQLStatementVisitorEngine;
@@ -48,8 +50,6 @@ import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.SQLPar
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.sql.SQLCases;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.sql.type.SQLCaseType;
-import org.apache.shardingsphere.infra.util.props.PropertiesBuilder;
-import org.apache.shardingsphere.infra.util.props.PropertiesBuilder.Property;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
@@ -76,7 +76,7 @@ public abstract class SQLBinderIT {
private static final SQLParserTestCases SQL_BINDER_TEST_CASES =
SQLBinderTestCasesRegistry.getInstance().getCases();
private static final ConfigurationProperties IDENTIFIER_INSENSITIVE_PROPS
= new ConfigurationProperties(
- PropertiesBuilder.build(new
Property(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name())));
+ PropertiesBuilder.build(new
Property(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name())));
@ParameterizedTest(name = "{0} ({1}) -> {2}")
@ArgumentsSource(TestCaseArgumentsProvider.class)
diff --git
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/SQLRewriterIT.java
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/SQLRewriterIT.java
index de189820947..b1fe00c8cec 100644
---
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/SQLRewriterIT.java
+++
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/SQLRewriterIT.java
@@ -17,8 +17,8 @@
package org.apache.shardingsphere.test.it.rewriter.engine;
-import lombok.RequiredArgsConstructor;
import com.google.common.base.Preconditions;
+import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.database.connector.core.DefaultDatabase;
import
org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionProperties;
import
org.apache.shardingsphere.database.connector.core.spi.DatabaseTypedSPILoader;
@@ -32,8 +32,8 @@ import
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine;
import org.apache.shardingsphere.infra.config.database.DatabaseConfiguration;
import
org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.MetadataIdentifierCaseSensitivity;
+import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.hint.SQLHintUtils;
import org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext;
@@ -195,7 +195,7 @@ public abstract class SQLRewriterIT {
private ConfigurationProperties createConfigurationProperties(final
YamlRootConfiguration rootConfig) {
Properties result = new Properties();
result.putAll(rootConfig.getProps());
-
result.putIfAbsent(ConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name());
+
result.putIfAbsent(TemporaryConfigurationPropertyKey.METADATA_IDENTIFIER_CASE_SENSITIVITY.getKey(),
MetadataIdentifierCaseSensitivity.INSENSITIVE.name());
return new ConfigurationProperties(result);
}