This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 2e5c11b618a Remove ShardingSphereVendorError.UNSUPPORTED_SQL (#20196)
2e5c11b618a is described below
commit 2e5c11b618a66c1ab0cca8b5ab1e20b257251c4e
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Aug 15 19:14:09 2022 +0800
Remove ShardingSphereVendorError.UNSUPPORTED_SQL (#20196)
---
.../java/org/apache/shardingsphere/error/SQLExceptionHandler.java | 4 ----
.../infra/util/exception/sql/vendor/ShardingSphereVendorError.java | 4 +---
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git
a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java
b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java
index 9182477f40d..4348e510461 100644
---
a/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java
+++
b/shardingsphere-error/shardingsphere-common-error/src/main/java/org/apache/shardingsphere/error/SQLExceptionHandler.java
@@ -21,7 +21,6 @@ import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.error.dialect.SQLDialectException;
import org.apache.shardingsphere.error.mapper.SQLDialectExceptionMapperFactory;
-import
org.apache.shardingsphere.infra.config.exception.ShardingSphereConfigurationException;
import
org.apache.shardingsphere.infra.util.exception.ShardingSphereInsideException;
import
org.apache.shardingsphere.infra.util.exception.sql.ShardingSphereSQLException;
import
org.apache.shardingsphere.infra.util.exception.sql.vendor.ShardingSphereVendorError;
@@ -49,9 +48,6 @@ public final class SQLExceptionHandler {
if (insideException instanceof ShardingSphereSQLException) {
return ((ShardingSphereSQLException)
insideException).toSQLException();
}
- if (insideException instanceof ShardingSphereConfigurationException) {
- return toSQLException(ShardingSphereVendorError.UNSUPPORTED_SQL,
insideException);
- }
return toSQLException(ShardingSphereVendorError.UNKNOWN_EXCEPTION,
insideException);
}
diff --git
a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
index ea6f032b17f..4cdc511ac6f 100644
---
a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
+++
b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
@@ -29,9 +29,7 @@ import
org.apache.shardingsphere.infra.util.exception.sql.sqlstate.XOpenSQLState
@Getter
public enum ShardingSphereVendorError implements VendorError {
- UNKNOWN_EXCEPTION(XOpenSQLState.SYNTAX_ERROR, 1999, "Unknown exception:
%s"),
-
- UNSUPPORTED_SQL(XOpenSQLState.SYNTAX_ERROR, 1235, "Unsupported SQL: %s");
+ UNKNOWN_EXCEPTION(XOpenSQLState.SYNTAX_ERROR, 1999, "Unknown exception:
%s");
private final SQLState sqlState;