You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by to...@apache.org on 2022/09/11 06:34:59 UTC

[shardingsphere] branch master updated: Add category for sql error code document (#20919)

This is an automated email from the ASF dual-hosted git repository.

totalo 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 89e45c5dc3c Add category for sql error code document (#20919)
89e45c5dc3c is described below

commit 89e45c5dc3cbeb875bddab534a384a99d162ca3a
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Sep 11 14:34:51 2022 +0800

    Add category for sql error code document (#20919)
---
 .../user-manual/error-code/sql-error-code.cn.md    | 81 ++++++++++++++++++++++
 .../user-manual/error-code/sql-error-code.en.md    | 81 ++++++++++++++++++++++
 2 files changed, 162 insertions(+)

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 a4b2e18f946..9920786bdfb 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
@@ -8,6 +8,10 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 
 **目前内容为草稿,错误码仍可能调整。**
 
+## 内核异常
+
+### 元数据
+
 | SQL State | Vendor Code | 错误信息 |
 | --------- | ----------- | ------ |
 | 08000     | 10001       | The URL \`%s\` is not recognized, please refer to the pattern \`%s\` |
@@ -20,33 +24,80 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 | 42S02     | 10021       | Schema \`%s\` does not exist |
 | HY000     | 10022       | Can not load table with database name \`%s\` and data source name \`%s\` |
 | 0A000     | 10023       | Can not drop schema \`%s\` because of contains tables |
+
+### 数据
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY004     | 11001       | Invalid value \`%s\` |
 | HY004     | 11005       | Unsupported conversion stream charset \`%s\` |
 | HY004     | 11006       | Unsupported conversion data type \`%s\` for value \`%s\` |
+
+### 语法
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 42000     | 12000       | You have an error in your SQL syntax: %s |
 | 42000     | 12001       | SQL String can not be NULL or empty |
 | 42000     | 12002       | Could not support variable \`%s\` |
 | 0A000     | 12003       | DROP TABLE ... CASCADE is not supported |
 | 42S02     | 12004       | Can not find column label \`%s\` |
 | HV008     | 12005       | Column index \`%d\` is out of range |
+
+### 连接
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 01000     | 13000       | Circuit break open, the request has been ignored |
 | 08000     | 13001       | Can not get %d connections one time, partition succeed connection(%d) have released. Please consider increasing the \`maxPoolSize\` of the data sources or decreasing the \`max-connections-size-per-query\` in properties |
 | 08000     | 13002       | Connection has been closed |
 | 08000     | 13003       | Result set has been closed |
 | HY000     | 13004       | Load datetime from database failed, reason: %s |
 | HY004     | 13010       | Can not register driver, reason is: %s |
+
+### 事务
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 25000     | 14000       | Switch transaction type failed, please terminate the current transaction |
 | 25000     | 14001       | Can not start new XA transaction in a active transaction |
 | 25000     | 14002       | Failed to create \`%s\` XA data source |
 | 25000     | 14003       | JDBC does not support operations across multiple logical databases in transaction |
+
+### 锁
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY000     | 15000       | The table \`%s\` of schema \`%s\` is locked |
 | HY000     | 15001       | The table \`%s\` of schema \`%s\` lock wait timeout of \`%s\` milliseconds exceeded |
+
+### 审计
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 44000     | 16000       | SQL check failed, error message: %s |
+
+### 集群
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY000     | 17000       | Work ID assigned failed, which can not exceed 1024 |
 | HY000     | 17001       | Can not find \`%s\` file for datetime initialize |
 | HY000     | 17002       | File access failed, reason is: %s |
+
+### 迁移
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY000     | 18000       | Can not find pipeline job \`%s\` |
 | HY000     | 18001       | Failed to get DDL for table \`%s\` |
+
+## 功能异常
+
+### 数据分片
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY000     | 20000       | Sharding algorithm class \`%s\` should be implement \`%s\` |
 | 44000     | 20001       | Can not get uniformed table structure for logic table \`%s\`, it has different meta data of actual tables are as follows: %s |
 | 42S02     | 20002       | Can not get route result, please check your sharding rule configuration |
@@ -77,21 +128,51 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 | HY000     | 20051       | \`%s %s\` can not route correctly for %s \`%s\` |
 | 42S02     | 20052       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
 | 34000     | 20053       | Can not get cursor name from fetch statement |
+
+### 数据库高可用
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY000     | 23000       | MGR plugin is not active in database \`%s\` |
 | 44000     | 23001       | MGR is not in single primary mode in database \`%s\` |
 | 44000     | 23002       | \`%s\` is not in MGR replication group member in database \`%s\` |
 | 44000     | 23003       | Group name in MGR is not same with configured one \`%s\` in database \`%s\` |
+
+### SQL 方言转换
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 42000     | 24000       | Can not support database \`%s\` in SQL translation |
 | 42000     | 24001       | Translation error, SQL is: %s |
+
+### 流量治理
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | 42S02     | 25000       | Can not get traffic execution unit |
+
+### 数据加密
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY004     | 27000       | Encrypt algorithm \`%s\` initialize failed, reason is: %s |
 | 0A000     | 27001       | The SQL clause \`%s\` is unsupported in encrypt rule |
 | 44000     | 27002       | Altered column \`%s\` must use same encrypt algorithm with previous column \`%s\` in table \`%s\` |
 | 42000     | 27003       | Insert value of index \`%s\` can not support for encrypt |
 | 44000     | 27004       | Can not find logic encrypt column by \`%s\` |
 | 44000     | 27005       | Fail to find encrypt column \`%s\` from table \`%s\` |
+
+### 影子库
+
+| 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 |
+
+## 其他异常
+
+| SQL State | Vendor Code | 错误信息 |
+| --------- | ----------- | ------ |
 | HY004     | 30000       | Unknown exception: %s |
 | 0A000     | 30001       | Unsupported operation: %s |
 | 42000     | 30002       | Unsupported command: %s |
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 33796cba170..a3c62d21e8b 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
@@ -8,6 +8,10 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
 
 **the error codes are draft, still need to be adjusted.**
 
+## Kernel Exception
+
+### Meta data
+
 | SQL State | Vendor Code | Reason |
 | --------- | ----------- | ------ |
 | 08000     | 10001       | The URL \`%s\` is not recognized, please refer to the pattern \`%s\` |
@@ -20,33 +24,80 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
 | 42S02     | 10021       | Schema \`%s\` does not exist |
 | HY000     | 10022       | Can not load table with database name \`%s\` and data source name \`%s\` |
 | 0A000     | 10023       | Can not drop schema \`%s\` because of contains tables |
+
+### Data
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY004     | 11001       | Invalid value \`%s\` |
 | HY004     | 11005       | Unsupported conversion stream charset \`%s\` |
 | HY004     | 11006       | Unsupported conversion data type \`%s\` for value \`%s\` |
+
+### Syntax
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 42000     | 12000       | You have an error in your SQL syntax: %s |
 | 42000     | 12001       | SQL String can not be NULL or empty |
 | 42000     | 12002       | Could not support variable \`%s\` |
 | 0A000     | 12003       | DROP TABLE ... CASCADE is not supported |
 | 42S02     | 12004       | Can not find column label \`%s\` |
 | HV008     | 12005       | Column index \`%d\` is out of range |
+
+### Connection
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 01000     | 13000       | Circuit break open, the request has been ignored |
 | 08000     | 13001       | Can not get %d connections one time, partition succeed connection(%d) have released. Please consider increasing the \`maxPoolSize\` of the data sources or decreasing the \`max-connections-size-per-query\` in properties |
 | 08000     | 13002       | Connection has been closed |
 | 08000     | 13003       | Result set has been closed |
 | HY000     | 13004       | Load datetime from database failed, reason: %s |
 | HY004     | 13010       | Can not register driver, reason is: %s |
+
+### Transaction
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 25000     | 14000       | Switch transaction type failed, please terminate the current transaction |
 | 25000     | 14001       | Can not start new XA transaction in a active transaction |
 | 25000     | 14002       | Failed to create \`%s\` XA data source |
 | 25000     | 14003       | JDBC does not support operations across multiple logical databases in transaction |
+
+### Lock
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY000     | 15000       | The table \`%s\` of schema \`%s\` is locked |
 | HY000     | 15001       | The table \`%s\` of schema \`%s\` lock wait timeout of \`%s\` milliseconds exceeded |
+
+### Audit
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 44000     | 16000       | SQL check failed, error message: %s |
+
+### Cluster
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY000     | 17000       | Work ID assigned failed, which can not exceed 1024 |
 | HY000     | 17001       | Can not find \`%s\` file for datetime initialize |
 | HY000     | 17002       | File access failed, reason is: %s |
+
+### Migration
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY000     | 18000       | Can not find pipeline job \`%s\` |
 | HY000     | 18001       | Failed to get DDL for table \`%s\` |
+
+## Feature Exception
+
+### Data Sharding
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY000     | 20000       | Sharding algorithm class \`%s\` should be implement \`%s\` |
 | 44000     | 20001       | Can not get uniformed table structure for logic table \`%s\`, it has different meta data of actual tables are as follows: %s |
 | 42S02     | 20002       | Can not get route result, please check your sharding rule configuration |
@@ -77,21 +128,51 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
 | HY000     | 20051       | \`%s %s\` can not route correctly for %s \`%s\` |
 | 42S02     | 20052       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
 | 34000     | 20053       | Can not get cursor name from fetch statement |
+
+### Database HA
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY000     | 23000       | MGR plugin is not active in database \`%s\` |
 | 44000     | 23001       | MGR is not in single primary mode in database \`%s\` |
 | 44000     | 23002       | \`%s\` is not in MGR replication group member in database \`%s\` |
 | 44000     | 23003       | Group name in MGR is not same with configured one \`%s\` in database \`%s\` |
+
+### SQL Dialect Translator
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 42000     | 24000       | Can not support database \`%s\` in SQL translation |
 | 42000     | 24001       | Translation error, SQL is: %s |
+
+### Traffic Management
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | 42S02     | 25000       | Can not get traffic execution unit |
+
+### Data Encrypt
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY004     | 27000       | Encrypt algorithm \`%s\` initialize failed, reason is: %s |
 | 0A000     | 27001       | The SQL clause \`%s\` is unsupported in encrypt rule |
 | 44000     | 27002       | Altered column \`%s\` must use same encrypt algorithm with previous column \`%s\` in table \`%s\` |
 | 42000     | 27003       | Insert value of index \`%s\` can not support for encrypt |
 | 44000     | 27004       | Can not find logic encrypt column by \`%s\` |
 | 44000     | 27005       | Fail to find encrypt column \`%s\` from table \`%s\` |
+
+### Shadow Database
+
+| 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 |
+
+## Other Exception
+
+| SQL State | Vendor Code | Reason |
+| --------- | ----------- | ------ |
 | HY004     | 30000       | Unknown exception: %s |
 | 0A000     | 30001       | Unsupported operation: %s |
 | 42000     | 30002       | Unsupported command: %s |