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 2c9018a1c040a..bea2e001140dd 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 @@ -58,9 +58,9 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供, | 42000 | 12001 | Can not accept SQL type '%s'. | | 42000 | 12002 | SQL String can not be NULL or empty. | | 42000 | 12010 | Can not support variable '%s'. | -| 42S02 | 12011 | Can not find column label '%s'. | | HV008 | 12020 | Column index '%d' is out of range. | -| HY000 | 12021 | Column '%s' in %s is ambiguous. | +| 42S02 | 12021 | Can not find column label '%s'. | +| HY000 | 12022 | Column '%s' in %s is ambiguous. | | 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. | ### 连接 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 6408d98809ea8..3aae7c4bbb842 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 @@ -58,9 +58,9 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi | 42000 | 12001 | Can not accept SQL type '%s'. | | 42000 | 12002 | SQL String can not be NULL or empty. | | 42000 | 12010 | Can not support variable '%s'. | -| 42S02 | 12011 | Can not find column label '%s'. | | HV008 | 12020 | Column index '%d' is out of range. | -| HY000 | 12021 | Column '%s' in %s is ambiguous. | +| 42S02 | 12021 | Can not find column label '%s'. | +| HY000 | 12022 | Column '%s' in %s is ambiguous. | | 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. | ### Connection diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/AmbiguousColumnException.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/AmbiguousColumnException.java index 9fa47dcc33d09..803c202369f14 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/AmbiguousColumnException.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/AmbiguousColumnException.java @@ -28,6 +28,6 @@ public final class AmbiguousColumnException extends SyntaxSQLException { private static final long serialVersionUID = -9002743483594729164L; public AmbiguousColumnException(final String columnExpression, final String segmentTypeMessage) { - super(XOpenSQLState.GENERAL_ERROR, 21, "Column '%s' in %s is ambiguous.", columnExpression, segmentTypeMessage); + super(XOpenSQLState.GENERAL_ERROR, 22, "Column '%s' in %s is ambiguous.", columnExpression, segmentTypeMessage); } } diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/ColumnLabelNotFoundException.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/ColumnLabelNotFoundException.java index 9f031f2f53df7..95d8a6781872d 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/ColumnLabelNotFoundException.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/ColumnLabelNotFoundException.java @@ -28,6 +28,6 @@ public final class ColumnLabelNotFoundException extends SyntaxSQLException { private static final long serialVersionUID = -4634399403612501335L; public ColumnLabelNotFoundException(final String columnLabel) { - super(XOpenSQLState.NOT_FOUND, 11, "Can not find column label '%s'.", columnLabel); + super(XOpenSQLState.NOT_FOUND, 21, "Can not find column label '%s'.", columnLabel); } } diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/UnsupportedVariableException.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/UnsupportedVariableException.java index 26aa579485b44..91a63460a5441 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/UnsupportedVariableException.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/UnsupportedVariableException.java @@ -28,6 +28,6 @@ public final class UnsupportedVariableException extends SyntaxSQLException { private static final long serialVersionUID = 1955281568807066737L; public UnsupportedVariableException(final String variable) { - super(XOpenSQLState.CHECK_OPTION_VIOLATION, 14, "Can not support variable '%s'.", variable); + super(XOpenSQLState.CHECK_OPTION_VIOLATION, 10, "Can not support variable '%s'.", variable); } }