From c52965332687826bfa4e14bfa7329573a43116c8 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Sun, 11 Sep 2022 14:07:58 +0800 Subject: [PATCH] Redefine SyntaxSQLException's vendor codes (#20917) --- .../user-manual/error-code/sql-error-code.cn.md | 10 +++++----- .../user-manual/error-code/sql-error-code.en.md | 10 +++++----- .../jdbc/core/connection/ShardingSphereConnection.java | 2 +- .../jdbc/core/resultset/DatabaseMetaDataResultSet.java | 6 +++--- .../resultset/ShardingSphereResultSetMetaData.java | 2 +- .../statement/ShardingSpherePreparedStatement.java | 2 +- .../jdbc/core/statement/ShardingSphereStatement.java | 4 ++-- .../{ => connection}/ConnectionClosedException.java | 2 +- .../{ => connection}/ResultSetClosedException.java | 2 +- .../{ => syntax}/ColumnIndexOutOfRangeException.java | 4 ++-- .../{ => syntax}/ColumnLabelNotFoundException.java | 4 ++-- .../jdbc/exception/{ => syntax}/EmptySQLException.java | 4 ++-- .../JDBCTransactionAcrossDatabasesException.java | 2 +- .../UnsupportedDropCascadeTableException.java | 2 +- .../exception/UnsupportedVariableException.java | 2 +- 15 files changed, 29 insertions(+), 29 deletions(-) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => connection}/ConnectionClosedException.java (95%) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => connection}/ResultSetClosedException.java (95%) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => syntax}/ColumnIndexOutOfRangeException.java (90%) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => syntax}/ColumnLabelNotFoundException.java (90%) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => syntax}/EmptySQLException.java (88%) rename shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/{ => transaction}/JDBCTransactionAcrossDatabasesException.java (95%) diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md b/docs/document/content/user-manual/error-code/sql-error-code.cn.md index e2d72cc48f368..a4b2e18f946d8 100644 --- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md +++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md @@ -24,11 +24,11 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供, | HY004 | 11005 | Unsupported conversion stream charset \`%s\` | | HY004 | 11006 | Unsupported conversion data type \`%s\` for value \`%s\` | | 42000 | 12000 | You have an error in your SQL syntax: %s | -| HV008 | 12002 | Column index \`%d\` is out of range | -| 42S02 | 12003 | Can not find column label \`%s\` | -| 0A000 | 12004 | DROP TABLE ... CASCADE is not supported | -| HY000 | 12005 | Could not support variable \`%s\` | -| HY004 | 12010 | SQL String can not be NULL or empty | +| 42000 | 12001 | SQL String can not be NULL or empty | +| 42000 | 12002 | Could not support variable \`%s\` | +| 0A000 | 12003 | DROP TABLE ... CASCADE is not supported | +| 42S02 | 12004 | Can not find column label \`%s\` | +| HV008 | 12005 | Column index \`%d\` is out of range | | 01000 | 13000 | Circuit break open, the request has been ignored | | 08000 | 13001 | Can not get %d connections one time, partition succeed connection(%d) have released. Please consider increasing the \`maxPoolSize\` of the data sources or decreasing the \`max-connections-size-per-query\` in properties | | 08000 | 13002 | Connection has been closed | diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md b/docs/document/content/user-manual/error-code/sql-error-code.en.md index a930668bacf76..33796cba17068 100644 --- a/docs/document/content/user-manual/error-code/sql-error-code.en.md +++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md @@ -24,11 +24,11 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi | HY004 | 11005 | Unsupported conversion stream charset \`%s\` | | HY004 | 11006 | Unsupported conversion data type \`%s\` for value \`%s\` | | 42000 | 12000 | You have an error in your SQL syntax: %s | -| HV008 | 12002 | Column index \`%d\` is out of range | -| 42S02 | 12003 | Can not find column label \`%s\` | -| 0A000 | 12004 | DROP TABLE ... CASCADE is not supported | -| HY000 | 12005 | Could not support variable \`%s\` | -| HY004 | 12010 | SQL String can not be NULL or empty | +| 42000 | 12001 | SQL String can not be NULL or empty | +| 42000 | 12002 | Could not support variable \`%s\` | +| 0A000 | 12003 | DROP TABLE ... CASCADE is not supported | +| 42S02 | 12004 | Can not find column label \`%s\` | +| HV008 | 12005 | Column index \`%d\` is out of range | | 01000 | 13000 | Circuit break open, the request has been ignored | | 08000 | 13001 | Can not get %d connections one time, partition succeed connection(%d) have released. Please consider increasing the \`maxPoolSize\` of the data sources or decreasing the \`max-connections-size-per-query\` in properties | | 08000 | 13002 | Connection has been closed | diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java index a2581e94dd89b..4bccfb296aecd 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.driver.jdbc.core.datasource.metadata.ShardingSphereDatabaseMetaData; import org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement; import org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement; -import org.apache.shardingsphere.driver.jdbc.exception.ConnectionClosedException; +import org.apache.shardingsphere.driver.jdbc.exception.connection.ConnectionClosedException; import org.apache.shardingsphere.infra.context.ConnectionContext; import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions; import org.apache.shardingsphere.mode.manager.ContextManager; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java index f357a0c3c551c..af91285f3b81b 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java @@ -18,9 +18,9 @@ package org.apache.shardingsphere.driver.jdbc.core.resultset; import lombok.EqualsAndHashCode; -import org.apache.shardingsphere.driver.jdbc.exception.ColumnIndexOutOfRangeException; -import org.apache.shardingsphere.driver.jdbc.exception.ColumnLabelNotFoundException; -import org.apache.shardingsphere.driver.jdbc.exception.ResultSetClosedException; +import org.apache.shardingsphere.driver.jdbc.exception.syntax.ColumnIndexOutOfRangeException; +import org.apache.shardingsphere.driver.jdbc.exception.syntax.ColumnLabelNotFoundException; +import org.apache.shardingsphere.driver.jdbc.exception.connection.ResultSetClosedException; import org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedDatabaseMetaDataResultSet; import org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.util.ResultSetUtil; import org.apache.shardingsphere.infra.rule.ShardingSphereRule; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetMetaData.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetMetaData.java index 7ef86e8f9f662..625d6303cf1fb 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetMetaData.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetMetaData.java @@ -19,7 +19,7 @@ import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.driver.jdbc.adapter.WrapperAdapter; -import org.apache.shardingsphere.driver.jdbc.exception.ColumnIndexOutOfRangeException; +import org.apache.shardingsphere.driver.jdbc.exception.syntax.ColumnIndexOutOfRangeException; import org.apache.shardingsphere.infra.binder.segment.select.projection.DerivedColumn; import org.apache.shardingsphere.infra.binder.segment.select.projection.Projection; import org.apache.shardingsphere.infra.binder.segment.select.projection.impl.AggregationDistinctProjection; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java index b3dd3d0a4e3bf..39ae6a0fe0b5d 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java @@ -31,7 +31,7 @@ import org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet; import org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSetUtil; import org.apache.shardingsphere.driver.jdbc.core.statement.metadata.ShardingSphereParameterMetaData; -import org.apache.shardingsphere.driver.jdbc.exception.EmptySQLException; +import org.apache.shardingsphere.driver.jdbc.exception.syntax.EmptySQLException; import org.apache.shardingsphere.infra.binder.QueryContext; import org.apache.shardingsphere.infra.binder.SQLStatementContextFactory; import org.apache.shardingsphere.infra.binder.aware.ParameterAware; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java index c1592d7bb576a..f8799cff5a07a 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java @@ -29,8 +29,8 @@ import org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection; import org.apache.shardingsphere.driver.jdbc.core.resultset.GeneratedKeysResultSet; import org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet; -import org.apache.shardingsphere.driver.jdbc.exception.EmptySQLException; -import org.apache.shardingsphere.driver.jdbc.exception.JDBCTransactionAcrossDatabasesException; +import org.apache.shardingsphere.driver.jdbc.exception.syntax.EmptySQLException; +import org.apache.shardingsphere.driver.jdbc.exception.transaction.JDBCTransactionAcrossDatabasesException; import org.apache.shardingsphere.infra.binder.QueryContext; import org.apache.shardingsphere.infra.binder.SQLStatementContextFactory; import org.apache.shardingsphere.infra.binder.decider.context.SQLFederationDeciderContext; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ConnectionClosedException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java similarity index 95% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ConnectionClosedException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java index 803dc65dd8a2b..5e90e43b4de01 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ConnectionClosedException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.connection; import org.apache.shardingsphere.infra.exception.ConnectionSQLException; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ResultSetClosedException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java similarity index 95% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ResultSetClosedException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java index 997f5b9590a94..5e2933feb1e58 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ResultSetClosedException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.connection; import org.apache.shardingsphere.infra.exception.ConnectionSQLException; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnIndexOutOfRangeException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnIndexOutOfRangeException.java similarity index 90% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnIndexOutOfRangeException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnIndexOutOfRangeException.java index 41617a78b7a64..a8668bc770433 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnIndexOutOfRangeException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnIndexOutOfRangeException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.syntax; import org.apache.shardingsphere.infra.exception.SyntaxSQLException; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; @@ -28,6 +28,6 @@ public final class ColumnIndexOutOfRangeException extends SyntaxSQLException { private static final long serialVersionUID = 3599337605134702447L; public ColumnIndexOutOfRangeException(final int columnIndex) { - super(XOpenSQLState.INVALID_COLUMN_NUMBER, 2, "Column index `%d` is out of range", columnIndex); + super(XOpenSQLState.INVALID_COLUMN_NUMBER, 5, "Column index `%d` is out of range", columnIndex); } } diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnLabelNotFoundException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnLabelNotFoundException.java similarity index 90% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnLabelNotFoundException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnLabelNotFoundException.java index c2ea9a6180431..47468e8f5a297 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/ColumnLabelNotFoundException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/ColumnLabelNotFoundException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.syntax; import org.apache.shardingsphere.infra.exception.SyntaxSQLException; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; @@ -28,6 +28,6 @@ public final class ColumnLabelNotFoundException extends SyntaxSQLException { private static final long serialVersionUID = -4634399403612501335L; public ColumnLabelNotFoundException(final String columnLabel) { - super(XOpenSQLState.NOT_FOUND, 3, "Can not find column label `%s`", columnLabel); + super(XOpenSQLState.NOT_FOUND, 4, "Can not find column label `%s`", columnLabel); } } diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/EmptySQLException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/EmptySQLException.java similarity index 88% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/EmptySQLException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/EmptySQLException.java index 986c033432503..f1ee32ddc9d44 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/EmptySQLException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/syntax/EmptySQLException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.syntax; import org.apache.shardingsphere.infra.exception.SyntaxSQLException; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; @@ -28,6 +28,6 @@ public final class EmptySQLException extends SyntaxSQLException { private static final long serialVersionUID = -5723825491720138339L; public EmptySQLException() { - super(XOpenSQLState.GENERAL_ERROR, 10, "SQL String can not be NULL or empty"); + super(XOpenSQLState.SYNTAX_ERROR, 1, "SQL String can not be NULL or empty"); } } diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/JDBCTransactionAcrossDatabasesException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/transaction/JDBCTransactionAcrossDatabasesException.java similarity index 95% rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/JDBCTransactionAcrossDatabasesException.java rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/transaction/JDBCTransactionAcrossDatabasesException.java index 24a80a061d165..10e2acfb8a189 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/JDBCTransactionAcrossDatabasesException.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/transaction/JDBCTransactionAcrossDatabasesException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.driver.jdbc.exception; +package org.apache.shardingsphere.driver.jdbc.exception.transaction; import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState; import org.apache.shardingsphere.transaction.exception.TransactionSQLException; diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/UnsupportedDropCascadeTableException.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/UnsupportedDropCascadeTableException.java index 9b0803f188ada..1f5940c06c7a9 100644 --- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/UnsupportedDropCascadeTableException.java +++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/UnsupportedDropCascadeTableException.java @@ -28,6 +28,6 @@ public final class UnsupportedDropCascadeTableException extends SyntaxSQLExcepti private static final long serialVersionUID = -5995575055241171117L; public UnsupportedDropCascadeTableException() { - super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 4, "DROP TABLE ... CASCADE is not supported"); + super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 3, "DROP TABLE ... CASCADE is not supported"); } } diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnsupportedVariableException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnsupportedVariableException.java index c0b543304ad8f..83f5f7fe6cce5 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnsupportedVariableException.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnsupportedVariableException.java @@ -28,6 +28,6 @@ public final class UnsupportedVariableException extends SyntaxSQLException { private static final long serialVersionUID = 1955281568807066737L; public UnsupportedVariableException(final String variable) { - super(XOpenSQLState.GENERAL_ERROR, 5, "Could not support variable `%s`", variable); + super(XOpenSQLState.SYNTAX_ERROR, 2, "Could not support variable `%s`", variable); } }