You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/09/09 11:37:39 UTC
[shardingsphere] branch master updated: Add typeOffset on ShardingSphereSQLException (#20905)
This is an automated email from the ASF dual-hosted git repository.
panjuan 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 bca38fbcacf Add typeOffset on ShardingSphereSQLException (#20905)
bca38fbcacf is described below
commit bca38fbcacf31b79077a013c58760282c227d3f0
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Sep 9 19:37:28 2022 +0800
Add typeOffset on ShardingSphereSQLException (#20905)
---
.../exception/InvalidMGRGroupNameConfigurationException.java | 2 +-
.../dbdiscovery/mysql/exception/InvalidMGRModeException.java | 2 +-
.../dbdiscovery/mysql/exception/InvalidMGRPluginException.java | 2 +-
.../exception/InvalidMGRReplicationGroupMemberException.java | 2 +-
.../exception/EncryptAlgorithmInitializationException.java | 2 +-
.../encrypt/exception/EncryptColumnAlterException.java | 2 +-
.../encrypt/exception/EncryptColumnNotFoundException.java | 2 +-
.../encrypt/exception/EncryptLogicColumnNotFoundException.java | 2 +-
.../encrypt/exception/UnsupportedEncryptInsertValueException.java | 2 +-
.../encrypt/exception/UnsupportedEncryptSQLException.java | 2 +-
.../algorithm/shadow/UnsupportedShadowColumnTypeException.java | 2 +-
.../route/exception/UnsupportedShadowInsertValueException.java | 2 +-
.../ActualDataNodesMissedWithShardingTableException.java | 2 +-
.../sharding/exception/ActualTableNotFoundException.java | 2 +-
.../sharding/exception/BindingTableNotFoundException.java | 2 +-
.../sharding/exception/CursorNameNotFoundException.java | 2 +-
.../exception/DMLMultipleDataNodesWithLimitException.java | 2 +-
.../exception/DMLWithMultipleShardingTablesException.java | 2 +-
.../sharding/exception/DataNodeGenerateException.java | 2 +-
.../exception/DataSourceIntersectionNotFoundException.java | 2 +-
.../sharding/exception/DropInUsedTablesException.java | 2 +-
.../sharding/exception/DuplicatedIndexException.java | 2 +-
.../sharding/exception/EmptyShardingRouteResultException.java | 2 +-
.../shardingsphere/sharding/exception/EngagedViewException.java | 2 +-
.../sharding/exception/GenerateKeyStrategyNotFoundException.java | 2 +-
.../exception/InconsistentShardingTableMetaDataException.java | 2 +-
.../sharding/exception/IndexNotExistedException.java | 2 +-
.../sharding/exception/InsertSelectTableViolationException.java | 2 +-
.../sharding/exception/InvalidDatetimeFormatException.java | 2 +-
...atchedInlineShardingAlgorithmExpressionAndColumnException.java | 2 +-
.../MissingGenerateKeyColumnWithInsertSelectException.java | 2 +-
.../sharding/exception/NullShardingValueException.java | 2 +-
.../sharding/exception/RenamedViewWithoutSameConfigException.java | 2 +-
.../exception/ShardingAlgorithmClassImplementationException.java | 2 +-
.../sharding/exception/ShardingDDLRouteException.java | 2 +-
.../sharding/exception/ShardingRouteAlgorithmException.java | 2 +-
.../sharding/exception/ShardingRuleNotFoundException.java | 2 +-
.../sharding/exception/ShardingValueDataTypeException.java | 2 +-
.../sharding/exception/UnsupportedCreateViewException.java | 2 +-
.../UnsupportedPrepareRouteToSameDataSourceException.java | 2 +-
.../sharding/exception/UnsupportedShardingOperationException.java | 2 +-
.../exception/UnsupportedUpdatingShardingValueException.java | 2 +-
.../org/apache/shardingsphere/infra/check/SQLCheckException.java | 2 +-
.../infra/database/metadata/UnrecognizedDatabaseURLException.java | 2 +-
.../infra/exception/InvalidDataNodesFormatException.java | 2 +-
.../infra/exception/OverallConnectionNotEnoughException.java | 2 +-
.../infra/lock/exception/TableLockWaitTimeoutException.java | 2 +-
.../shardingsphere/infra/lock/exception/TableLockedException.java | 2 +-
.../exception/UnsupportedActualDataNodeStructureException.java | 2 +-
.../exception/DatetimeConfigurationFileNotFoundException.java | 2 +-
.../datetime/database/exception/DatetimeLoadingException.java | 2 +-
.../exception/UnsupportedDataTypeConversionException.java | 2 +-
.../exception/UnsupportedStreamCharsetConversionException.java | 2 +-
.../util/exception/external/sql/ShardingSphereSQLException.java | 8 ++++----
.../exception/external/sql/type/feature/FeatureSQLException.java | 2 +-
.../exception/external/sql/type/generic/GenericSQLException.java | 2 +-
.../exception/external/sql/type/generic/UnknownSQLException.java | 2 +-
.../sql/type/generic/UnsupportedSQLOperationException.java | 2 +-
.../exception/external/sql/type/kernel/KernelSQLException.java | 2 +-
.../exception/external/sql/type/wrapper/SQLWrapperException.java | 2 +-
.../org/apache/shardingsphere/driver/DriverRegisterException.java | 2 +-
.../driver/jdbc/exception/ColumnIndexOutOfRangeException.java | 2 +-
.../driver/jdbc/exception/ColumnLabelNotFoundException.java | 2 +-
.../driver/jdbc/exception/ConnectionClosedException.java | 2 +-
.../shardingsphere/driver/jdbc/exception/EmptySQLException.java | 2 +-
.../jdbc/exception/JDBCTransactionAcrossDatabasesException.java | 2 +-
.../driver/jdbc/exception/ResultSetClosedException.java | 2 +-
.../pipeline/core/exception/CreateTableSQLGenerateException.java | 2 +-
.../pipeline/core/exception/PipelineJobNotFoundException.java | 2 +-
.../singletable/exception/DropNotEmptySchemaException.java | 2 +-
.../singletable/exception/SchemaNotFoundException.java | 2 +-
.../singletable/exception/SingleTableNotFoundException.java | 2 +-
.../singletable/exception/SingleTablesLoadingException.java | 2 +-
.../exception/UnsupportedDropCascadeTableException.java | 2 +-
.../converter/exception/OptimizationSQLNodeConvertException.java | 2 +-
.../exception/UnsupportedTranslatedDatabaseException.java | 2 +-
.../exception/UnsupportedTranslatedSQLException.java | 2 +-
.../traffic/exception/EmptyTrafficExecutionUnitException.java | 2 +-
.../transaction/exception/StartNestedXATransactionException.java | 2 +-
.../transaction/exception/SwitchTypeInTransactionException.java | 2 +-
.../jta/datasource/swapper/XADataSourceInitializeException.java | 2 +-
.../registry/workerid/exception/WorkIdAssignedException.java | 2 +-
.../shardingsphere/proxy/backend/exception/FileIOException.java | 2 +-
.../proxy/backend/exception/InvalidValueException.java | 2 +-
.../proxy/backend/exception/ResourceNotExistedException.java | 2 +-
.../proxy/backend/exception/RuleNotExistedException.java | 2 +-
.../proxy/backend/exception/UnsupportedVariableException.java | 2 +-
.../proxy/frontend/exception/CircuitBreakException.java | 2 +-
.../proxy/frontend/exception/UnsupportedCommandException.java | 2 +-
.../shardingsphere/sql/parser/exception/SQLParsingException.java | 2 +-
90 files changed, 93 insertions(+), 93 deletions(-)
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRGroupNameConfigurationException.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRGroupNameConfigurationException.java
index a45e6941bf6..8b72fcdfcb1 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRGroupNameConfigurationException.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRGroupNameConfigurationException.java
@@ -28,6 +28,6 @@ public final class InvalidMGRGroupNameConfigurationException extends FeatureSQLE
private static final long serialVersionUID = -2585442998454509788L;
public InvalidMGRGroupNameConfigurationException(final String groupName, final String databaseName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23003, "Group name in MGR is not same with configured one `%s` in database `%s`", groupName, databaseName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3003, "Group name in MGR is not same with configured one `%s` in database `%s`", groupName, databaseName);
}
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRModeException.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRModeException.java
index d35437262fe..5e0222b945d 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRModeException.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRModeException.java
@@ -28,6 +28,6 @@ public final class InvalidMGRModeException extends FeatureSQLException {
private static final long serialVersionUID = -2190741601319220590L;
public InvalidMGRModeException(final String databaseName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23001, "MGR is not in single primary mode in database `%s`", databaseName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3001, "MGR is not in single primary mode in database `%s`", databaseName);
}
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRPluginException.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRPluginException.java
index 0ada353a5da..11a0549fc53 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRPluginException.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRPluginException.java
@@ -28,6 +28,6 @@ public final class InvalidMGRPluginException extends FeatureSQLException {
private static final long serialVersionUID = 1703082683321097037L;
public InvalidMGRPluginException(final String databaseName) {
- super(XOpenSQLState.GENERAL_ERROR, 23000, "MGR plugin is not active in database `%s`", databaseName);
+ super(XOpenSQLState.GENERAL_ERROR, 3000, "MGR plugin is not active in database `%s`", databaseName);
}
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRReplicationGroupMemberException.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRReplicationGroupMemberException.java
index 5cb6169f50d..8de48022113 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRReplicationGroupMemberException.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/main/java/org/apache/shardingsphere/dbdiscovery/mysql/exception/InvalidMGRReplicationGroupMemberException.java
@@ -28,6 +28,6 @@ public final class InvalidMGRReplicationGroupMemberException extends FeatureSQLE
private static final long serialVersionUID = 3766206496827463146L;
public InvalidMGRReplicationGroupMemberException(final String url, final String databaseName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23002, "`%s` is not in MGR replication group member in database `%s`", url, databaseName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3002, "`%s` is not in MGR replication group member in database `%s`", url, databaseName);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptAlgorithmInitializationException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptAlgorithmInitializationException.java
index 849cf3f4f9d..3cea5d2678e 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptAlgorithmInitializationException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptAlgorithmInitializationException.java
@@ -28,6 +28,6 @@ public final class EncryptAlgorithmInitializationException extends FeatureSQLExc
private static final long serialVersionUID = -2004166948563207100L;
public EncryptAlgorithmInitializationException(final String encryptorType, final String reason) {
- super(XOpenSQLState.GENERAL_ERROR, 27000, "Encrypt algorithm `%s` initialization failed, reason is: %s", encryptorType, reason);
+ super(XOpenSQLState.GENERAL_ERROR, 7000, "Encrypt algorithm `%s` initialization failed, reason is: %s", encryptorType, reason);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnAlterException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnAlterException.java
index 00980c4b844..6389d899cbf 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnAlterException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnAlterException.java
@@ -28,6 +28,6 @@ public final class EncryptColumnAlterException extends FeatureSQLException {
private static final long serialVersionUID = -8920381230872401155L;
public EncryptColumnAlterException(final String table, final String alteredColumn, final String previousColumn) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 27002, "Altered column `%s` must use same encrypt algorithm with previous column `%s` in table `%s`", alteredColumn, previousColumn, table);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 7002, "Altered column `%s` must use same encrypt algorithm with previous column `%s` in table `%s`", alteredColumn, previousColumn, table);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnNotFoundException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnNotFoundException.java
index 383e9261892..32d771a34ea 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptColumnNotFoundException.java
@@ -28,6 +28,6 @@ public final class EncryptColumnNotFoundException extends FeatureSQLException {
private static final long serialVersionUID = -8481487069938556675L;
public EncryptColumnNotFoundException(final String tableName, final String columnName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 27005, "Fail to find encrypt column `%s` from table `%s`", columnName, tableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 7005, "Fail to find encrypt column `%s` from table `%s`", columnName, tableName);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptLogicColumnNotFoundException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptLogicColumnNotFoundException.java
index 8349ad77a3f..06f99aade55 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptLogicColumnNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/EncryptLogicColumnNotFoundException.java
@@ -28,6 +28,6 @@ public final class EncryptLogicColumnNotFoundException extends FeatureSQLExcepti
private static final long serialVersionUID = 3934531389314348880L;
public EncryptLogicColumnNotFoundException(final String actualColumn) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 27004, "Can not find logic encrypt column by `%s`", actualColumn);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 7004, "Can not find logic encrypt column by `%s`", actualColumn);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptInsertValueException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptInsertValueException.java
index fa4e289205d..7d05f07d80f 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptInsertValueException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptInsertValueException.java
@@ -28,6 +28,6 @@ public final class UnsupportedEncryptInsertValueException extends FeatureSQLExce
private static final long serialVersionUID = 5004882561157380582L;
public UnsupportedEncryptInsertValueException(final int columnIndex) {
- super(XOpenSQLState.SYNTAX_ERROR, 27003, "Insert value of index `%s` can not support for encrypt", String.valueOf(columnIndex));
+ super(XOpenSQLState.SYNTAX_ERROR, 7003, "Insert value of index `%s` can not support for encrypt", String.valueOf(columnIndex));
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptSQLException.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptSQLException.java
index 45a7a258c73..a4aa3016f9a 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptSQLException.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/exception/UnsupportedEncryptSQLException.java
@@ -28,6 +28,6 @@ public final class UnsupportedEncryptSQLException extends FeatureSQLException {
private static final long serialVersionUID = 8391663664617661217L;
public UnsupportedEncryptSQLException(final String sqlClause) {
- super(XOpenSQLState.SYNTAX_ERROR, 27001, "The SQL clause `%s` is unsupported in encrypt rule", sqlClause);
+ super(XOpenSQLState.SYNTAX_ERROR, 7001, "The SQL clause `%s` is unsupported in encrypt rule", sqlClause);
}
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/algorithm/shadow/UnsupportedShadowColumnTypeException.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/algorithm/shadow/UnsupportedShadowColumnTypeException.java
index 2763e597390..f57e8e68a33 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/algorithm/shadow/UnsupportedShadowColumnTypeException.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/algorithm/shadow/UnsupportedShadowColumnTypeException.java
@@ -28,6 +28,6 @@ public final class UnsupportedShadowColumnTypeException extends FeatureSQLExcept
private static final long serialVersionUID = 8144277065388645946L;
public UnsupportedShadowColumnTypeException(final String tableName, final String columnName, final Class<?> type) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 28000, "Shadow column `%s` of table `%s` does not support `%s` type", columnName, tableName, type.getName());
+ super(XOpenSQLState.INVALID_DATA_TYPE, 8000, "Shadow column `%s` of table `%s` does not support `%s` type", columnName, tableName, type.getName());
}
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/exception/UnsupportedShadowInsertValueException.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/exception/UnsupportedShadowInsertValueException.java
index ae4687038c8..80e22fc9752 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/exception/UnsupportedShadowInsertValueException.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/exception/UnsupportedShadowInsertValueException.java
@@ -28,6 +28,6 @@ public final class UnsupportedShadowInsertValueException extends FeatureSQLExcep
private static final long serialVersionUID = -5987403907441367171L;
public UnsupportedShadowInsertValueException(final int columnIndex) {
- super(XOpenSQLState.SYNTAX_ERROR, 28003, "Insert value of index `%s` can not support for shadow", String.valueOf(columnIndex));
+ super(XOpenSQLState.SYNTAX_ERROR, 8003, "Insert value of index `%s` can not support for shadow", String.valueOf(columnIndex));
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java
index 3ddcb76bd02..2f8b42f57cb 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java
@@ -28,6 +28,6 @@ public final class ActualDataNodesMissedWithShardingTableException extends Featu
private static final long serialVersionUID = 1691113459377955727L;
public ActualDataNodesMissedWithShardingTableException(final String tableName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20021, "Actual data nodes must be configured for sharding table `%s`", tableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 21, "Actual data nodes must be configured for sharding table `%s`", tableName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java
index 8f617e546d4..be23a518539 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java
@@ -28,6 +28,6 @@ public final class ActualTableNotFoundException extends FeatureSQLException {
private static final long serialVersionUID = -5008645813201488531L;
public ActualTableNotFoundException(final String dataSourceName, final String tableName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20022, "Actual table `%s.%s` is not in table rule configuration", dataSourceName, tableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 22, "Actual table `%s.%s` is not in table rule configuration", dataSourceName, tableName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java
index 232eeb23120..fdef395a74f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java
@@ -28,7 +28,7 @@ public final class BindingTableNotFoundException extends FeatureSQLException {
private static final long serialVersionUID = -8845309665057958820L;
public BindingTableNotFoundException(final String dataSource, final String logicTable, final String otherActualTable) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20024,
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 24,
"Can not find binding actual table, data source is `%s`, logic table is `%s`, other actual table is `%s`", dataSource, logicTable, otherActualTable);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java
index 9f0e71448ea..3ae698ab9e3 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java
@@ -28,6 +28,6 @@ public final class CursorNameNotFoundException extends KernelSQLException {
private static final long serialVersionUID = 3124329832945598311L;
public CursorNameNotFoundException() {
- super(XOpenSQLState.INVALID_CURSOR_NAME, 10200, "Can not get cursor name from fetch statement");
+ super(XOpenSQLState.INVALID_CURSOR_NAME, 200, "Can not get cursor name from fetch statement");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java
index 106ffe913fd..fbcda2436ca 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java
@@ -28,6 +28,6 @@ public final class DMLMultipleDataNodesWithLimitException extends FeatureSQLExce
private static final long serialVersionUID = -203240151021113065L;
public DMLMultipleDataNodesWithLimitException(final String operation) {
- super(XOpenSQLState.SYNTAX_ERROR, 20016, "%s ... LIMIT can not support route to multiple data nodes", operation);
+ super(XOpenSQLState.SYNTAX_ERROR, 16, "%s ... LIMIT can not support route to multiple data nodes", operation);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java
index ffa107e9e01..6ac7983294a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java
@@ -30,6 +30,6 @@ public final class DMLWithMultipleShardingTablesException extends FeatureSQLExce
private static final long serialVersionUID = -7368310216924145478L;
public DMLWithMultipleShardingTablesException(final Collection<String> tableNames) {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 20014, "Can not support DML operation with multiple tables `%s`", tableNames.toString());
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 14, "Can not support DML operation with multiple tables `%s`", tableNames.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java
index 4a095685652..cb0edcccb8c 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java
@@ -28,6 +28,6 @@ public final class DataNodeGenerateException extends FeatureSQLException {
private static final long serialVersionUID = -1000865538051567910L;
public DataNodeGenerateException(final String dataNode) {
- super(XOpenSQLState.NOT_FOUND, 20052, "Can not find data source in sharding rule, invalid actual data node `%s`", dataNode);
+ super(XOpenSQLState.NOT_FOUND, 52, "Can not find data source in sharding rule, invalid actual data node `%s`", dataNode);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java
index e5b367241d5..61c0211b881 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java
@@ -30,6 +30,6 @@ public final class DataSourceIntersectionNotFoundException extends FeatureSQLExc
private static final long serialVersionUID = -2142571707728236489L;
public DataSourceIntersectionNotFoundException(final Collection<String> logicTables) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20023, "Can not find actual data source intersection for logic tables `%s`", logicTables);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23, "Can not find actual data source intersection for logic tables `%s`", logicTables);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java
index 5ba33e75f79..62d60a9f4b0 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java
@@ -30,6 +30,6 @@ public final class DropInUsedTablesException extends FeatureSQLException {
private static final long serialVersionUID = 8939233348292246498L;
public DropInUsedTablesException(final Collection<String> inUsedTables) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20032, "Actual tables `%s` are in use", inUsedTables.toString());
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 32, "Actual tables `%s` are in use", inUsedTables.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java
index bc4dfdccbf3..ea52786f378 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java
@@ -28,6 +28,6 @@ public final class DuplicatedIndexException extends FeatureSQLException {
private static final long serialVersionUID = 2884666477007627873L;
public DuplicatedIndexException(final String indexName) {
- super(XOpenSQLState.DUPLICATE, 20030, "Index `%s` already exists", indexName);
+ super(XOpenSQLState.DUPLICATE, 30, "Index `%s` already exists", indexName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java
index f00da266ff1..a0fd8b85dae 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java
@@ -28,6 +28,6 @@ public final class EmptyShardingRouteResultException extends FeatureSQLException
private static final long serialVersionUID = -6548076668933945656L;
public EmptyShardingRouteResultException() {
- super(XOpenSQLState.NOT_FOUND, 20002, "Can not get route result, please check your sharding rule configuration");
+ super(XOpenSQLState.NOT_FOUND, 2, "Can not get route result, please check your sharding rule configuration");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java
index c3b4a2d5422..ec37d63ef6b 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java
@@ -28,6 +28,6 @@ public final class EngagedViewException extends FeatureSQLException {
private static final long serialVersionUID = -8312969473716234951L;
public EngagedViewException(final String shardingType) {
- super(XOpenSQLState.DUPLICATE, 20033, "View name has to bind to %s tables", shardingType);
+ super(XOpenSQLState.DUPLICATE, 33, "View name has to bind to %s tables", shardingType);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java
index f5820027375..4c8c9a1fca4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java
@@ -28,6 +28,6 @@ public final class GenerateKeyStrategyNotFoundException extends FeatureSQLExcept
private static final long serialVersionUID = 7456922260524630374L;
public GenerateKeyStrategyNotFoundException(final String tableName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20050, "Can not find strategy for generate keys with table `%s`", tableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 50, "Can not find strategy for generate keys with table `%s`", tableName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java
index f6f5d3cb58c..c4bc3763571 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java
@@ -31,7 +31,7 @@ public final class InconsistentShardingTableMetaDataException extends FeatureSQL
private static final long serialVersionUID = -5450346946223396192L;
public InconsistentShardingTableMetaDataException(final String logicTableName, final Collection<TableMetaDataViolation> violations) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20001, createReason(violations), logicTableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 1, createReason(violations), logicTableName);
}
private static String createReason(final Collection<TableMetaDataViolation> violations) {
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java
index 09fd8048bc2..065e01d7891 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java
@@ -28,6 +28,6 @@ public final class IndexNotExistedException extends FeatureSQLException {
private static final long serialVersionUID = 206503570677185269L;
public IndexNotExistedException(final String indexName) {
- super(XOpenSQLState.NOT_FOUND, 20031, "Index `%s` does not exist", indexName);
+ super(XOpenSQLState.NOT_FOUND, 31, "Index `%s` does not exist", indexName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java
index 543311c70ac..996552f866d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java
@@ -28,6 +28,6 @@ public final class InsertSelectTableViolationException extends FeatureSQLExcepti
private static final long serialVersionUID = 1221612068163533037L;
public InsertSelectTableViolationException() {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20019, "The table inserted and the table selected must be the same or bind tables");
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 19, "The table inserted and the table selected must be the same or bind tables");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java
index ee3ff6b683e..e0e26b5e007 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java
@@ -28,6 +28,6 @@ public final class InvalidDatetimeFormatException extends FeatureSQLException {
private static final long serialVersionUID = 4472952142748467059L;
public InvalidDatetimeFormatException(final String dateTimeKey, final String dateTimeValue, final String dateTimePattern) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 20026, "Invalid %s, datetime pattern should be `%s`, value is `%s`", dateTimeKey, dateTimePattern, dateTimeValue);
+ super(XOpenSQLState.INVALID_DATA_TYPE, 26, "Invalid %s, datetime pattern should be `%s`, value is `%s`", dateTimeKey, dateTimePattern, dateTimeValue);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
index 05523381ee3..4c6fb18be8b 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
@@ -28,6 +28,6 @@ public final class MismatchedInlineShardingAlgorithmExpressionAndColumnException
private static final long serialVersionUID = 1306301016127278233L;
public MismatchedInlineShardingAlgorithmExpressionAndColumnException(final String algorithmExpression, final String columnName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20020, "Inline sharding algorithms expression `%s` and sharding column `%s` do not match", algorithmExpression, columnName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20, "Inline sharding algorithms expression `%s` and sharding column `%s` do not match", algorithmExpression, columnName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java
index 2d121c37345..3f15d8cf134 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java
@@ -28,6 +28,6 @@ public final class MissingGenerateKeyColumnWithInsertSelectException extends Fea
private static final long serialVersionUID = 568269722599010228L;
public MissingGenerateKeyColumnWithInsertSelectException() {
- super(XOpenSQLState.SYNTAX_ERROR, 20018, "INSERT INTO ... SELECT can not support applying key generator with absent generate key column");
+ super(XOpenSQLState.SYNTAX_ERROR, 18, "INSERT INTO ... SELECT can not support applying key generator with absent generate key column");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java
index 93ff546e7c0..7888e485a60 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java
@@ -28,6 +28,6 @@ public final class NullShardingValueException extends FeatureSQLException {
private static final long serialVersionUID = -6223086772479822057L;
public NullShardingValueException() {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20010, "Sharding value can't be null in insert statement");
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 10, "Sharding value can't be null in insert statement");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java
index c2f6b281e6e..c11029b0e90 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java
@@ -28,6 +28,6 @@ public final class RenamedViewWithoutSameConfigException extends FeatureSQLExcep
private static final long serialVersionUID = -8276278970848162458L;
public RenamedViewWithoutSameConfigException(final String originView, final String targetView) {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 20034, "Alter view rename .. to .. statement should have same config for %s and %s", originView, targetView);
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 34, "Alter view rename .. to .. statement should have same config for %s and %s", originView, targetView);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java
index 0033071ede0..ee724174e88 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java
@@ -28,6 +28,6 @@ public final class ShardingAlgorithmClassImplementationException extends Feature
private static final long serialVersionUID = 3053033454701332815L;
public ShardingAlgorithmClassImplementationException(final String shardingAlgorithmClassName, final Class<?> superShardingAlgorithmClass) {
- super(XOpenSQLState.GENERAL_ERROR, 20000, "Sharding algorithm class `%s` should be implement `%s`", shardingAlgorithmClassName, superShardingAlgorithmClass.getName());
+ super(XOpenSQLState.GENERAL_ERROR, 0, "Sharding algorithm class `%s` should be implement `%s`", shardingAlgorithmClassName, superShardingAlgorithmClass.getName());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java
index 270065d604d..c3bfd1544ce 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java
@@ -30,6 +30,6 @@ public final class ShardingDDLRouteException extends FeatureSQLException {
private static final long serialVersionUID = 1611718269096645289L;
public ShardingDDLRouteException(final String operation, final String objectType, final Collection<String> objectNames) {
- super(XOpenSQLState.GENERAL_ERROR, 20051, "`%s %s` can not route correctly for %s `%s`", operation, objectType, objectType, objectNames.toString());
+ super(XOpenSQLState.GENERAL_ERROR, 51, "`%s %s` can not route correctly for %s `%s`", operation, objectType, objectType, objectNames.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java
index 8475be00db2..f3d8d5df3cc 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java
@@ -30,6 +30,6 @@ public final class ShardingRouteAlgorithmException extends FeatureSQLException {
private static final long serialVersionUID = -1935526748399934543L;
public ShardingRouteAlgorithmException(final String routedTargetName, final Collection<String> availableTargetNames) {
- super(XOpenSQLState.GENERAL_ERROR, 20050, "Routed target `%s` does not exist, available targets are `%s`", routedTargetName, availableTargetNames.toString());
+ super(XOpenSQLState.GENERAL_ERROR, 50, "Routed target `%s` does not exist, available targets are `%s`", routedTargetName, availableTargetNames.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java
index aa1fad36e96..37af5877e84 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java
@@ -30,6 +30,6 @@ public final class ShardingRuleNotFoundException extends FeatureSQLException {
private static final long serialVersionUID = 142299282103233064L;
public ShardingRuleNotFoundException(final Collection<String> logicTables) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20003, "Can not find table rule with logic tables `%s`", logicTables.toString());
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3, "Can not find table rule with logic tables `%s`", logicTables.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java
index 55b0f6963d4..2f0dde4f341 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java
@@ -29,6 +29,6 @@ public final class ShardingValueDataTypeException extends FeatureSQLException {
private static final long serialVersionUID = -4833106947304679015L;
public ShardingValueDataTypeException(final Column column) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 20011, "Found different types for sharding value `%s`", column.toString());
+ super(XOpenSQLState.INVALID_DATA_TYPE, 11, "Found different types for sharding value `%s`", column.toString());
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java
index 789bb3a18a8..9ee3fb12f0d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java
@@ -28,6 +28,6 @@ public final class UnsupportedCreateViewException extends FeatureSQLException {
private static final long serialVersionUID = -321126834428609310L;
public UnsupportedCreateViewException() {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 20015, "The CREATE VIEW statement contains unsupported query statement");
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 15, "The CREATE VIEW statement contains unsupported query statement");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java
index 43857c6cdb0..f51131e5baf 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java
@@ -28,6 +28,6 @@ public final class UnsupportedPrepareRouteToSameDataSourceException extends Feat
private static final long serialVersionUID = -451667286925533523L;
public UnsupportedPrepareRouteToSameDataSourceException() {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20017, "PREPARE statement can not support sharding tables route to same data sources");
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 17, "PREPARE statement can not support sharding tables route to same data sources");
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java
index 89c23956710..fc2a525bee1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java
@@ -28,6 +28,6 @@ public final class UnsupportedShardingOperationException extends FeatureSQLExcep
private static final long serialVersionUID = 1009938372927671322L;
public UnsupportedShardingOperationException(final String operation, final String tableName) {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 20013, "Can not support operation `%s` with sharding table `%s`", operation, tableName);
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 13, "Can not support operation `%s` with sharding table `%s`", operation, tableName);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java
index 5620d0c682e..5655c9a8239 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java
@@ -28,6 +28,6 @@ public final class UnsupportedUpdatingShardingValueException extends FeatureSQLE
private static final long serialVersionUID = 2552228890146113383L;
public UnsupportedUpdatingShardingValueException(final String tableName) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20012, "Can not update sharding value for table `%s`", tableName);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 12, "Can not update sharding value for table `%s`", tableName);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
index cd13b9b0323..225aa7d21ba 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
@@ -28,6 +28,6 @@ public final class SQLCheckException extends KernelSQLException {
private static final long serialVersionUID = 4183020614721058122L;
public SQLCheckException(final String errorMessage) {
- super(XOpenSQLState.CHECK_OPTION_VIOLATION, 13000, "SQL check failed, error message: %s", errorMessage);
+ super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3000, "SQL check failed, error message: %s", errorMessage);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/UnrecognizedDatabaseURLException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/UnrecognizedDatabaseURLException.java
index a16e0e3c4ab..4898af3d38b 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/UnrecognizedDatabaseURLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/UnrecognizedDatabaseURLException.java
@@ -28,6 +28,6 @@ public final class UnrecognizedDatabaseURLException extends KernelSQLException {
private static final long serialVersionUID = -1551117178863766353L;
public UnrecognizedDatabaseURLException(final String url, final String pattern) {
- super(XOpenSQLState.CONNECTION_EXCEPTION, 10001, "The URL `%s` is not recognized, please refer to the pattern `%s`", url, pattern);
+ super(XOpenSQLState.CONNECTION_EXCEPTION, 1, "The URL `%s` is not recognized, please refer to the pattern `%s`", url, pattern);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/InvalidDataNodesFormatException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/InvalidDataNodesFormatException.java
index c791545db13..71b3c3c2767 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/InvalidDataNodesFormatException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/InvalidDataNodesFormatException.java
@@ -28,6 +28,6 @@ public final class InvalidDataNodesFormatException extends KernelSQLException {
private static final long serialVersionUID = 192279170808654743L;
public InvalidDataNodesFormatException(final String dataNode) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 10400, "Invalid format for actual data node `%s`", dataNode);
+ super(XOpenSQLState.INVALID_DATA_TYPE, 400, "Invalid format for actual data node `%s`", dataNode);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/OverallConnectionNotEnoughException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/OverallConnectionNotEnoughException.java
index d2b32942e05..ecc77c04abd 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/OverallConnectionNotEnoughException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/OverallConnectionNotEnoughException.java
@@ -28,7 +28,7 @@ public final class OverallConnectionNotEnoughException extends KernelSQLExceptio
private static final long serialVersionUID = -1297088138042287804L;
public OverallConnectionNotEnoughException(final int desiredSize, final int actualSize) {
- super(XOpenSQLState.CONNECTION_EXCEPTION, 10007, "Can not get %d connections one time, partition succeed connection(%d) have released. "
+ super(XOpenSQLState.CONNECTION_EXCEPTION, 7, "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", desiredSize, actualSize);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockWaitTimeoutException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockWaitTimeoutException.java
index 414b7c263ab..412de1507a8 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockWaitTimeoutException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockWaitTimeoutException.java
@@ -28,6 +28,6 @@ public final class TableLockWaitTimeoutException extends KernelSQLException {
private static final long serialVersionUID = 2599713085782288003L;
public TableLockWaitTimeoutException(final String schemaName, final String tableName, final long timeoutMilliseconds) {
- super(XOpenSQLState.GENERAL_ERROR, 14001, "The table `%s` of schema `%s` lock wait timeout of %s ms exceeded", tableName, schemaName, String.valueOf(timeoutMilliseconds));
+ super(XOpenSQLState.GENERAL_ERROR, 4001, "The table `%s` of schema `%s` lock wait timeout of %s ms exceeded", tableName, schemaName, String.valueOf(timeoutMilliseconds));
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockedException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockedException.java
index b49da067c5c..8b0490c01f6 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockedException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/lock/exception/TableLockedException.java
@@ -28,6 +28,6 @@ public final class TableLockedException extends KernelSQLException {
private static final long serialVersionUID = 2622020743612706932L;
public TableLockedException(final String databaseName, final String schemaName, final String tableNames) {
- super(XOpenSQLState.GENERAL_ERROR, 14000, "The table `%s` of schema `%s` is locked in database `%s`", tableNames, schemaName, databaseName);
+ super(XOpenSQLState.GENERAL_ERROR, 4000, "The table `%s` of schema `%s` is locked in database `%s`", tableNames, schemaName, databaseName);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/exception/UnsupportedActualDataNodeStructureException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/exception/UnsupportedActualDataNodeStructureException.java
index 8b35ab2371a..5a0db5592a2 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/exception/UnsupportedActualDataNodeStructureException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/exception/UnsupportedActualDataNodeStructureException.java
@@ -31,6 +31,6 @@ public final class UnsupportedActualDataNodeStructureException extends KernelSQL
private static final long serialVersionUID = -8921823916974492519L;
public UnsupportedActualDataNodeStructureException(final DataNode dataNode, final Collection<String> jdbcUrlPrefixes) {
- super(XOpenSQLState.SYNTAX_ERROR, 10002, "Can not support 3-tier structure for actual data node `%s` with JDBC `%s`", dataNode.format(), jdbcUrlPrefixes.toString());
+ super(XOpenSQLState.SYNTAX_ERROR, 2, "Can not support 3-tier structure for actual data node `%s` with JDBC `%s`", dataNode.format(), jdbcUrlPrefixes.toString());
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeConfigurationFileNotFoundException.java b/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeConfigurationFileNotFoundException.java
index 5b5e54a1ed8..36ecfaa85de 100644
--- a/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeConfigurationFileNotFoundException.java
+++ b/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeConfigurationFileNotFoundException.java
@@ -28,6 +28,6 @@ public final class DatetimeConfigurationFileNotFoundException extends KernelSQLE
private static final long serialVersionUID = 4820838154441059833L;
public DatetimeConfigurationFileNotFoundException(final String configurationFile) {
- super(XOpenSQLState.GENERAL_ERROR, 14010, "Can not find `%s` file for datetime initialize", configurationFile);
+ super(XOpenSQLState.GENERAL_ERROR, 4010, "Can not find `%s` file for datetime initialize", configurationFile);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeLoadingException.java b/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeLoadingException.java
index 3ece916656c..7447c4448c4 100644
--- a/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeLoadingException.java
+++ b/shardingsphere-infra/shardingsphere-infra-datetime/shardingsphere-infra-datetime-type/shardingsphere-database-datetime/src/main/java/org/apache/shardingsphere/datetime/database/exception/DatetimeLoadingException.java
@@ -30,6 +30,6 @@ public final class DatetimeLoadingException extends KernelSQLException {
private static final long serialVersionUID = 7844267165522132993L;
public DatetimeLoadingException(final SQLException cause) {
- super(XOpenSQLState.GENERAL_ERROR, 14011, "Load datetime from database failed, reason: %s", cause.getMessage());
+ super(XOpenSQLState.GENERAL_ERROR, 4011, "Load datetime from database failed, reason: %s", cause.getMessage());
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedDataTypeConversionException.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedDataTypeConversionException.java
index 718e1efce65..9a02c10e8ca 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedDataTypeConversionException.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedDataTypeConversionException.java
@@ -30,6 +30,6 @@ public final class UnsupportedDataTypeConversionException extends KernelSQLExcep
private static final long serialVersionUID = 4808672149254705863L;
public UnsupportedDataTypeConversionException(final Class<?> convertType, final Object value) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 10004, "Unsupported conversion data type `%s` for value `%s`", convertType.getName(), Objects.toString(value));
+ super(XOpenSQLState.INVALID_DATA_TYPE, 4, "Unsupported conversion data type `%s` for value `%s`", convertType.getName(), Objects.toString(value));
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedStreamCharsetConversionException.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedStreamCharsetConversionException.java
index a77eede6cf9..a16d66e20e1 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedStreamCharsetConversionException.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/UnsupportedStreamCharsetConversionException.java
@@ -28,6 +28,6 @@ public final class UnsupportedStreamCharsetConversionException extends KernelSQL
private static final long serialVersionUID = 4577091201937095156L;
public UnsupportedStreamCharsetConversionException(final String charsetType) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 10005, "Unsupported conversion stream charset `%s`", charsetType);
+ super(XOpenSQLState.INVALID_DATA_TYPE, 5, "Unsupported conversion stream charset `%s`", charsetType);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/ShardingSphereSQLException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/ShardingSphereSQLException.java
index 61d821194d9..42904c2ebb2 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/ShardingSphereSQLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/ShardingSphereSQLException.java
@@ -35,13 +35,13 @@ public abstract class ShardingSphereSQLException extends ShardingSphereExternalE
private final String reason;
- public ShardingSphereSQLException(final SQLState sqlState, final int vendorCode, final String reason, final Object... messageArguments) {
- this(sqlState.getValue(), vendorCode, reason, messageArguments);
+ public ShardingSphereSQLException(final SQLState sqlState, final int typeOffset, final int vendorCode, final String reason, final Object... messageArguments) {
+ this(sqlState.getValue(), typeOffset, vendorCode, reason, messageArguments);
}
- public ShardingSphereSQLException(final String sqlState, final int vendorCode, final String reason, final Object... messageArguments) {
+ public ShardingSphereSQLException(final String sqlState, final int typeOffset, final int vendorCode, final String reason, final Object... messageArguments) {
this.sqlState = sqlState;
- this.vendorCode = vendorCode;
+ this.vendorCode = typeOffset * 10000 + vendorCode;
this.reason = null == reason ? null : String.format(reason, messageArguments);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/feature/FeatureSQLException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/feature/FeatureSQLException.java
index 9c01098d544..df6f90742ab 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/feature/FeatureSQLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/feature/FeatureSQLException.java
@@ -28,6 +28,6 @@ public abstract class FeatureSQLException extends ShardingSphereSQLException {
private static final long serialVersionUID = -3748977692432149265L;
public FeatureSQLException(final SQLState sqlState, final int vendorCode, final String reason, final Object... messageArguments) {
- super(sqlState, vendorCode, reason, messageArguments);
+ super(sqlState, 2, vendorCode, reason, messageArguments);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/GenericSQLException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/GenericSQLException.java
index 55b44df0b93..418ec726d55 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/GenericSQLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/GenericSQLException.java
@@ -28,6 +28,6 @@ public abstract class GenericSQLException extends ShardingSphereSQLException {
private static final long serialVersionUID = 1156879276497567865L;
public GenericSQLException(final SQLState sqlState, final int vendorCode, final String reason, final Object... messageArguments) {
- super(sqlState, vendorCode, reason, messageArguments);
+ super(sqlState, 3, vendorCode, reason, messageArguments);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnknownSQLException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnknownSQLException.java
index 45bc899c406..3a3653bb148 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnknownSQLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnknownSQLException.java
@@ -27,6 +27,6 @@ public final class UnknownSQLException extends GenericSQLException {
private static final long serialVersionUID = -7357918573504734977L;
public UnknownSQLException(final Exception cause) {
- super(XOpenSQLState.GENERAL_ERROR, 30000, "Unknown exception: %s", cause.getMessage());
+ super(XOpenSQLState.GENERAL_ERROR, 0, "Unknown exception: %s", cause.getMessage());
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnsupportedSQLOperationException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnsupportedSQLOperationException.java
index a1d6477f3eb..61d2db404a1 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnsupportedSQLOperationException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/generic/UnsupportedSQLOperationException.java
@@ -27,6 +27,6 @@ public final class UnsupportedSQLOperationException extends GenericSQLException
private static final long serialVersionUID = -4387122733989386705L;
public UnsupportedSQLOperationException(final String reason) {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 30001, "Unsupported SQL operation: %s", reason);
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 1, "Unsupported SQL operation: %s", reason);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/kernel/KernelSQLException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/kernel/KernelSQLException.java
index 158007da97c..1e89e269540 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/kernel/KernelSQLException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/kernel/KernelSQLException.java
@@ -28,6 +28,6 @@ public abstract class KernelSQLException extends ShardingSphereSQLException {
private static final long serialVersionUID = -6554922589499988153L;
public KernelSQLException(final SQLState sqlState, final int vendorCode, final String reason, final Object... messageArguments) {
- super(sqlState, vendorCode, reason, messageArguments);
+ super(sqlState, 1, vendorCode, reason, messageArguments);
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/wrapper/SQLWrapperException.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/wrapper/SQLWrapperException.java
index 7b1d8aa2d92..3731ce0659b 100644
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/wrapper/SQLWrapperException.java
+++ b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/external/sql/type/wrapper/SQLWrapperException.java
@@ -29,6 +29,6 @@ public final class SQLWrapperException extends ShardingSphereSQLException {
private static final long serialVersionUID = 8983736995662464009L;
public SQLWrapperException(final SQLException cause) {
- super(cause.getSQLState(), cause.getErrorCode(), cause.getMessage());
+ super(cause.getSQLState(), 0, cause.getErrorCode(), cause.getMessage());
}
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
index cc3d3781b00..d257b9fd464 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
@@ -30,6 +30,6 @@ public final class DriverRegisterException extends KernelSQLException {
private static final long serialVersionUID = -8091239932993280564L;
public DriverRegisterException(final SQLException cause) {
- super(XOpenSQLState.GENERAL_ERROR, 10100, "Can not register driver, reason is: %s", cause.getMessage());
+ super(XOpenSQLState.GENERAL_ERROR, 100, "Can not register driver, reason is: %s", cause.getMessage());
}
}
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/ColumnIndexOutOfRangeException.java
index 72a5021bd18..07a3d049a4f 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/ColumnIndexOutOfRangeException.java
@@ -28,6 +28,6 @@ public final class ColumnIndexOutOfRangeException extends KernelSQLException {
private static final long serialVersionUID = 3599337605134702447L;
public ColumnIndexOutOfRangeException(final int columnIndex) {
- super(XOpenSQLState.INVALID_COLUMN_NUMBER, 10302, "Column index `%d` is out of range", columnIndex);
+ super(XOpenSQLState.INVALID_COLUMN_NUMBER, 302, "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/ColumnLabelNotFoundException.java
index f47c365f06c..04617cfde51 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/ColumnLabelNotFoundException.java
@@ -28,6 +28,6 @@ public final class ColumnLabelNotFoundException extends KernelSQLException {
private static final long serialVersionUID = -4634399403612501335L;
public ColumnLabelNotFoundException(final String columnLabel) {
- super(XOpenSQLState.NOT_FOUND, 10303, "Can not find column label `%s`", columnLabel);
+ super(XOpenSQLState.NOT_FOUND, 303, "Can not find column label `%s`", columnLabel);
}
}
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/ConnectionClosedException.java
index 346b065d2a2..eae50d4a0f6 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/ConnectionClosedException.java
@@ -28,6 +28,6 @@ public final class ConnectionClosedException extends KernelSQLException {
private static final long serialVersionUID = 8667898851939815681L;
public ConnectionClosedException() {
- super(XOpenSQLState.CONNECTION_EXCEPTION, 10500, "Connection has been closed");
+ super(XOpenSQLState.CONNECTION_EXCEPTION, 500, "Connection has been closed");
}
}
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/EmptySQLException.java
index 983d551fcf5..f3a4538492e 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/EmptySQLException.java
@@ -28,6 +28,6 @@ public final class EmptySQLException extends KernelSQLException {
private static final long serialVersionUID = -5723825491720138339L;
public EmptySQLException() {
- super(XOpenSQLState.GENERAL_ERROR, 10006, "SQL String can not be NULL or empty");
+ super(XOpenSQLState.GENERAL_ERROR, 6, "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/JDBCTransactionAcrossDatabasesException.java
index 672dee48607..4746667eb4f 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/JDBCTransactionAcrossDatabasesException.java
@@ -28,6 +28,6 @@ public final class JDBCTransactionAcrossDatabasesException extends KernelSQLExce
private static final long serialVersionUID = 3294968323117604702L;
public JDBCTransactionAcrossDatabasesException() {
- super(XOpenSQLState.INVALID_TRANSACTION_STATE, 11321, "JDBC does not support operations across multiple logical databases in transaction");
+ super(XOpenSQLState.INVALID_TRANSACTION_STATE, 1321, "JDBC does not support operations across multiple logical databases in transaction");
}
}
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/ResultSetClosedException.java
index c3b81ea730d..e75a3a6c604 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/ResultSetClosedException.java
@@ -28,6 +28,6 @@ public final class ResultSetClosedException extends KernelSQLException {
private static final long serialVersionUID = 3931974854134322934L;
public ResultSetClosedException() {
- super(XOpenSQLState.CONNECTION_EXCEPTION, 10501, "Result set has been closed");
+ super(XOpenSQLState.CONNECTION_EXCEPTION, 501, "Result set has been closed");
}
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/CreateTableSQLGenerateException.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/CreateTableSQLGenerateException.java
index e95b557a222..50f0c0a9290 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/CreateTableSQLGenerateException.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/CreateTableSQLGenerateException.java
@@ -28,6 +28,6 @@ public final class CreateTableSQLGenerateException extends KernelSQLException {
private static final long serialVersionUID = -219467568498936298L;
public CreateTableSQLGenerateException(final String tableName) {
- super(XOpenSQLState.GENERAL_ERROR, 16001, "Failed to get DDL for table `%s`", tableName);
+ super(XOpenSQLState.GENERAL_ERROR, 6001, "Failed to get DDL for table `%s`", tableName);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/PipelineJobNotFoundException.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/PipelineJobNotFoundException.java
index a4fa1873e04..5954c2ec030 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/PipelineJobNotFoundException.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/exception/PipelineJobNotFoundException.java
@@ -28,6 +28,6 @@ public final class PipelineJobNotFoundException extends KernelSQLException {
private static final long serialVersionUID = -903289953649758722L;
public PipelineJobNotFoundException(final String jobId) {
- super(XOpenSQLState.GENERAL_ERROR, 16000, "Can not find pipeline job `%s`", jobId);
+ super(XOpenSQLState.GENERAL_ERROR, 6000, "Can not find pipeline job `%s`", jobId);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/DropNotEmptySchemaException.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/DropNotEmptySchemaException.java
index 6dc5e2e2d41..d0acc8ff46e 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/DropNotEmptySchemaException.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/DropNotEmptySchemaException.java
@@ -28,6 +28,6 @@ public final class DropNotEmptySchemaException extends KernelSQLException {
private static final long serialVersionUID = 5285619119572894557L;
public DropNotEmptySchemaException(final String schemaName) {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 17003, "Can not drop schema `%s` because of contains tables", schemaName);
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 7003, "Can not drop schema `%s` because of contains tables", schemaName);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SchemaNotFoundException.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SchemaNotFoundException.java
index 468ee5ce65b..86efd89808d 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SchemaNotFoundException.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SchemaNotFoundException.java
@@ -28,6 +28,6 @@ public final class SchemaNotFoundException extends KernelSQLException {
private static final long serialVersionUID = 2722045034640737328L;
public SchemaNotFoundException(final String schemaName) {
- super(XOpenSQLState.NOT_FOUND, 17001, "Schema `%s` does not exist", schemaName);
+ super(XOpenSQLState.NOT_FOUND, 7001, "Schema `%s` does not exist", schemaName);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTableNotFoundException.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTableNotFoundException.java
index 6d0e83e823d..056df55e54a 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTableNotFoundException.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTableNotFoundException.java
@@ -28,6 +28,6 @@ public final class SingleTableNotFoundException extends KernelSQLException {
private static final long serialVersionUID = 3498790429190415298L;
public SingleTableNotFoundException(final String tableName) {
- super(XOpenSQLState.NOT_FOUND, 17000, "Single table `%s` does not exist", tableName);
+ super(XOpenSQLState.NOT_FOUND, 7000, "Single table `%s` does not exist", tableName);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTablesLoadingException.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTablesLoadingException.java
index ae68c59910c..f1c10b7e0c1 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTablesLoadingException.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/main/java/org/apache/shardingsphere/singletable/exception/SingleTablesLoadingException.java
@@ -30,6 +30,6 @@ public final class SingleTablesLoadingException extends KernelSQLException {
private static final long serialVersionUID = 698261896187918188L;
public SingleTablesLoadingException(final String databaseName, final String dataSourceName, final SQLException cause) {
- super(XOpenSQLState.GENERAL_ERROR, 17002, "Can not load table with database name `%s` and data source name `%s`, reason is: %s", databaseName, dataSourceName, cause.getMessage());
+ super(XOpenSQLState.GENERAL_ERROR, 7002, "Can not load table with database name `%s` and data source name `%s`, reason is: %s", databaseName, dataSourceName, cause.getMessage());
}
}
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 700e15258eb..dc61e696ab6 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 KernelSQLExcepti
private static final long serialVersionUID = -5995575055241171117L;
public UnsupportedDropCascadeTableException() {
- super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 17010, "DROP TABLE ... CASCADE is not supported");
+ super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 7010, "DROP TABLE ... CASCADE is not supported");
}
}
diff --git a/shardingsphere-kernel/shardingsphere-sql-federation/shardingsphere-sql-federation-optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/exception/OptimizationSQLNodeConvertException.java b/shardingsphere-kernel/shardingsphere-sql-federation/shardingsphere-sql-federation-optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/exception/OptimizationSQLNodeConvertException.java
index 673dd4f90cf..892a58ed479 100644
--- a/shardingsphere-kernel/shardingsphere-sql-federation/shardingsphere-sql-federation-optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/exception/OptimizationSQLNodeConvertException.java
+++ b/shardingsphere-kernel/shardingsphere-sql-federation/shardingsphere-sql-federation-optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/converter/exception/OptimizationSQLNodeConvertException.java
@@ -29,6 +29,6 @@ public final class OptimizationSQLNodeConvertException extends KernelSQLExceptio
private static final long serialVersionUID = -5486229929620713984L;
public OptimizationSQLNodeConvertException(final SQLStatement statement) {
- super(XOpenSQLState.SYNTAX_ERROR, 10003, "Unsupported SQL node conversion for SQL statement `%s`", statement.toString());
+ super(XOpenSQLState.SYNTAX_ERROR, 3, "Unsupported SQL node conversion for SQL statement `%s`", statement.toString());
}
}
diff --git a/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedDatabaseException.java b/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedDatabaseException.java
index 44d32279204..79dd8e7d892 100644
--- a/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedDatabaseException.java
+++ b/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedDatabaseException.java
@@ -27,6 +27,6 @@ public final class UnsupportedTranslatedDatabaseException extends SQLTranslation
private static final long serialVersionUID = -8311552562051028033L;
public UnsupportedTranslatedDatabaseException(final DatabaseType databaseType) {
- super(11200, "Can not support database `%s` in SQL translation", databaseType.getType());
+ super(1200, "Can not support database `%s` in SQL translation", databaseType.getType());
}
}
diff --git a/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedSQLException.java b/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedSQLException.java
index 52401d85bd5..224a39b30da 100644
--- a/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedSQLException.java
+++ b/shardingsphere-kernel/shardingsphere-sql-translator/shardingsphere-sql-translator-api/src/main/java/org/apache/shardingsphere/sqltranslator/exception/UnsupportedTranslatedSQLException.java
@@ -25,6 +25,6 @@ public final class UnsupportedTranslatedSQLException extends SQLTranslationExcep
private static final long serialVersionUID = -1419778194546662319L;
public UnsupportedTranslatedSQLException(final String sql) {
- super(11201, "Translation error, SQL is: %s", sql);
+ super(1201, "Translation error, SQL is: %s", sql);
}
}
diff --git a/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/main/java/org/apache/shardingsphere/traffic/exception/EmptyTrafficExecutionUnitException.java b/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/main/java/org/apache/shardingsphere/traffic/exception/EmptyTrafficExecutionUnitException.java
index d37b27bf9d1..73d3a19ef7e 100644
--- a/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/main/java/org/apache/shardingsphere/traffic/exception/EmptyTrafficExecutionUnitException.java
+++ b/shardingsphere-kernel/shardingsphere-traffic/shardingsphere-traffic-core/src/main/java/org/apache/shardingsphere/traffic/exception/EmptyTrafficExecutionUnitException.java
@@ -28,6 +28,6 @@ public final class EmptyTrafficExecutionUnitException extends KernelSQLException
private static final long serialVersionUID = 1871625745475813160L;
public EmptyTrafficExecutionUnitException() {
- super(XOpenSQLState.NOT_FOUND, 11400, "Can not get traffic execution unit");
+ super(XOpenSQLState.NOT_FOUND, 1400, "Can not get traffic execution unit");
}
}
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/StartNestedXATransactionException.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/StartNestedXATransactionException.java
index 1f68375d7c1..00f1f19ae4d 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/StartNestedXATransactionException.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/StartNestedXATransactionException.java
@@ -28,6 +28,6 @@ public final class StartNestedXATransactionException extends KernelSQLException
private static final long serialVersionUID = 7761100591709104351L;
public StartNestedXATransactionException() {
- super(XOpenSQLState.INVALID_TRANSACTION_STATE, 11323, "Can not start new XA transaction in a active transaction");
+ super(XOpenSQLState.INVALID_TRANSACTION_STATE, 1323, "Can not start new XA transaction in a active transaction");
}
}
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/SwitchTypeInTransactionException.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/SwitchTypeInTransactionException.java
index 10e0fce604c..fe5a3a2c54a 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/SwitchTypeInTransactionException.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/exception/SwitchTypeInTransactionException.java
@@ -28,6 +28,6 @@ public final class SwitchTypeInTransactionException extends KernelSQLException {
private static final long serialVersionUID = 5333976223578960845L;
public SwitchTypeInTransactionException() {
- super(XOpenSQLState.INVALID_TRANSACTION_STATE, 11320, "Switch transaction type failed, please terminate the current transaction");
+ super(XOpenSQLState.INVALID_TRANSACTION_STATE, 1320, "Switch transaction type failed, please terminate the current transaction");
}
}
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/XADataSourceInitializeException.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/s [...]
index df1c951f161..6dfcb2c145c 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/XADataSourceInitializeException.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/XADataSourceInitializeException.java
@@ -29,6 +29,6 @@ public final class XADataSourceInitializeException extends KernelSQLException {
private static final long serialVersionUID = -4515239569528215614L;
public XADataSourceInitializeException(final XADataSourceDefinition xaDataSourceDefinition) {
- super(XOpenSQLState.INVALID_TRANSACTION_STATE, 11322, "Failed to create `%s` XA data source", xaDataSourceDefinition.getType());
+ super(XOpenSQLState.INVALID_TRANSACTION_STATE, 1322, "Failed to create `%s` XA data source", xaDataSourceDefinition.getType());
}
}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/exception/WorkIdAssignedException.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/exception/WorkIdAssignedException.java
index b9ece56ae53..c3021839cf2 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/exception/WorkIdAssignedException.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/exception/WorkIdAssignedException.java
@@ -28,6 +28,6 @@ public final class WorkIdAssignedException extends KernelSQLException {
private static final long serialVersionUID = 4782736481041926266L;
public WorkIdAssignedException() {
- super(XOpenSQLState.GENERAL_ERROR, 15000, "Work ID assigned failed, which can not exceed 1024");
+ super(XOpenSQLState.GENERAL_ERROR, 5000, "Work ID assigned failed, which can not exceed 1024");
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/FileIOException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/FileIOException.java
index 06ab6d88825..2596dbfd5d6 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/FileIOException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/FileIOException.java
@@ -30,6 +30,6 @@ public final class FileIOException extends KernelSQLException {
private static final long serialVersionUID = 1104839422339487793L;
public FileIOException(final IOException cause) {
- super(XOpenSQLState.GENERAL_ERROR, 11004, "File access failed, reason is: %s", cause.getMessage());
+ super(XOpenSQLState.GENERAL_ERROR, 1004, "File access failed, reason is: %s", cause.getMessage());
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/InvalidValueException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/InvalidValueException.java
index 3f9b5341c31..970a6583307 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/InvalidValueException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/InvalidValueException.java
@@ -28,6 +28,6 @@ public final class InvalidValueException extends KernelSQLException {
private static final long serialVersionUID = 1840341880422454371L;
public InvalidValueException(final String value) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 10301, "Invalid value `%s`", value);
+ super(XOpenSQLState.INVALID_DATA_TYPE, 301, "Invalid value `%s`", value);
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ResourceNotExistedException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ResourceNotExistedException.java
index 466912f8eb5..2acac9fc32a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ResourceNotExistedException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ResourceNotExistedException.java
@@ -28,6 +28,6 @@ public final class ResourceNotExistedException extends KernelSQLException {
private static final long serialVersionUID = 4146100333670404924L;
public ResourceNotExistedException() {
- super(XOpenSQLState.SYNTAX_ERROR, 11002, "Resource does not exist");
+ super(XOpenSQLState.SYNTAX_ERROR, 1002, "Resource does not exist");
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/RuleNotExistedException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/RuleNotExistedException.java
index df111121001..22f323288f1 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/RuleNotExistedException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/RuleNotExistedException.java
@@ -28,6 +28,6 @@ public final class RuleNotExistedException extends KernelSQLException {
private static final long serialVersionUID = -4150905802300104824L;
public RuleNotExistedException() {
- super(XOpenSQLState.SYNTAX_ERROR, 11003, "Rule does not exist");
+ super(XOpenSQLState.SYNTAX_ERROR, 1003, "Rule does not exist");
}
}
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 fc45126b46a..e2c8cd3ae9a 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 KernelSQLException {
private static final long serialVersionUID = 1955281568807066737L;
public UnsupportedVariableException(final String variable) {
- super(XOpenSQLState.GENERAL_ERROR, 10301, "Could not support variable `%s`", variable);
+ super(XOpenSQLState.GENERAL_ERROR, 301, "Could not support variable `%s`", variable);
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
index dcc762f2e93..985c8c947ad 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
@@ -28,6 +28,6 @@ public final class CircuitBreakException extends KernelSQLException {
private static final long serialVersionUID = 6339672680026286798L;
public CircuitBreakException() {
- super(XOpenSQLState.GENERAL_WARNING, 10000, "Circuit break open, the request has been ignored");
+ super(XOpenSQLState.GENERAL_WARNING, 0, "Circuit break open, the request has been ignored");
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/UnsupportedCommandException.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/UnsupportedCommandException.java
index cf3e4a2e0bf..b0c0837b8aa 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/UnsupportedCommandException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/UnsupportedCommandException.java
@@ -28,6 +28,6 @@ public final class UnsupportedCommandException extends KernelSQLException {
private static final long serialVersionUID = 8010680371699936338L;
public UnsupportedCommandException(final String commandType) {
- super(XOpenSQLState.SYNTAX_ERROR, 12000, "Unsupported command: %s", commandType);
+ super(XOpenSQLState.SYNTAX_ERROR, 2000, "Unsupported command: %s", commandType);
}
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java
index 12e0f406873..d6dd33a678b 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java
@@ -28,6 +28,6 @@ public final class SQLParsingException extends KernelSQLException {
private static final long serialVersionUID = -6408790652103666096L;
public SQLParsingException(final String sql) {
- super(XOpenSQLState.SYNTAX_ERROR, 11000, "You have an error in your SQL syntax: %s", sql);
+ super(XOpenSQLState.SYNTAX_ERROR, 1000, "You have an error in your SQL syntax: %s", sql);
}
}