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 3fab3946abe Redefine ShadowSQLException's vendor codes (#20921)
3fab3946abe is described below
commit 3fab3946abec7c2792e5b8b963167c6230ac2dc3
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Sep 11 17:36:45 2022 +0800
Redefine ShadowSQLException's vendor codes (#20921)
---
docs/document/content/user-manual/error-code/sql-error-code.cn.md | 4 ++--
docs/document/content/user-manual/error-code/sql-error-code.en.md | 4 ++--
.../shadow/exception/UnsupportedShadowColumnTypeException.java | 2 +-
.../shadow/exception/UnsupportedShadowInsertValueException.java | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
index 9854c387900..274263f7a6d 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
@@ -166,8 +166,8 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
| SQL State | Vendor Code | 错误信息 |
| --------- | ----------- | ------ |
-| HY004 | 28000 | Shadow column \`%s\` of table \`%s\` does not
support \`%s\` type |
-| 42000 | 28001 | Insert value of index \`%s\` can not support for
shadow |
+| HY004 | 28010 | Shadow column \`%s\` of table \`%s\` does not
support \`%s\` type |
+| 42000 | 28020 | Insert value of index \`%s\` can not support for
shadow |
## 其他异常
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md
b/docs/document/content/user-manual/error-code/sql-error-code.en.md
index aeea770ebb5..9c4dbfc8a59 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.en.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md
@@ -166,8 +166,8 @@ SQL error codes provide by standard `SQL State`, `Vendor
Code` and `Reason`, whi
| SQL State | Vendor Code | Reason |
| --------- | ----------- | ------ |
-| HY004 | 28000 | Shadow column \`%s\` of table \`%s\` does not
support \`%s\` type |
-| 42000 | 28001 | Insert value of index \`%s\` can not support for
shadow |
+| HY004 | 28010 | Shadow column \`%s\` of table \`%s\` does not
support \`%s\` type |
+| 42000 | 28020 | Insert value of index \`%s\` can not support for
shadow |
## Other Exception
diff --git
a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowColumnTypeException.java
b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowColumnTypeException.java
index 75291cca467..4905c0906da 100644
---
a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowColumnTypeException.java
+++
b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowColumnTypeException.java
@@ -27,6 +27,6 @@ public final class UnsupportedShadowColumnTypeException
extends ShadowSQLExcepti
private static final long serialVersionUID = 8144277065388645946L;
public UnsupportedShadowColumnTypeException(final String tableName, final
String columnName, final Class<?> type) {
- super(XOpenSQLState.INVALID_DATA_TYPE, 0, "Shadow column `%s` of table
`%s` does not support `%s` type", columnName, tableName, type.getName());
+ super(XOpenSQLState.INVALID_DATA_TYPE, 10, "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/exception/UnsupportedShadowInsertValueException.java
b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowInsertValueException.java
index faccb9e922b..dd3df60f8d2 100644
---
a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowInsertValueException.java
+++
b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/exception/UnsupportedShadowInsertValueException.java
@@ -27,6 +27,6 @@ public final class UnsupportedShadowInsertValueException
extends ShadowSQLExcept
private static final long serialVersionUID = -5987403907441367171L;
public UnsupportedShadowInsertValueException(final int columnIndex) {
- super(XOpenSQLState.SYNTAX_ERROR, 1, "Insert value of index `%s` can
not support for shadow", String.valueOf(columnIndex));
+ super(XOpenSQLState.SYNTAX_ERROR, 20, "Insert value of index `%s` can
not support for shadow", String.valueOf(columnIndex));
}
}