Logo
SQL 错误码

SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,在 SQL 执行错误时返回给客户端。

目前内容为草稿,错误码仍可能调整。

内核异常 #

元数据 #

SQL StateVendor Code错误信息
4200010000Resource does not exist.
0800010001The URL `%s` is not recognized, please refer to the pattern `%s`.
4200010002Can not support 3-tier structure for actual data node `%s` with JDBC `%s`.
HY00410003Invalid format for actual data node `%s`.
4200010004Unsupported SQL node conversion for SQL statement `%s`.
4200010010Rule does not exist.
42S0210020Schema `%s` does not exist.
42S0210021Single table `%s` does not exist.
HY00010022Can not load table with database name `%s` and data source name `%s`.
0A00010030Can not drop schema `%s` because of contains tables.

数据 #

SQL StateVendor Code错误信息
HY00411000Invalid value `%s`.
HY00411001Unsupported conversion data type `%s` for value `%s`.
HY00411010Unsupported conversion stream charset `%s`.

语法 #

SQL StateVendor Code错误信息
4200012000You have an error in your SQL syntax: %s
4200012001Can not accept SQL type `%s`.
4200012002SQL String can not be NULL or empty.
4200012010Can not support variable `%s`.
42S0212011Can not find column label `%s`.
HV00812020Column index `%d` is out of range.
0A00012100DROP TABLE … CASCADE is not supported.

连接 #

SQL StateVendor Code错误信息
0800013000Can not register driver, reason is: %s
0100013010Circuit break open, the request has been ignored.
0800013020Can 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.
0800013030Connection has been closed.
0800013031Result set has been closed.
HY00013090Load datetime from database failed, reason: %s

事务 #

SQL StateVendor Code错误信息
2500014000Switch transaction type failed, please terminate the current transaction.
2500014100JDBC does not support operations across multiple logical databases in transaction.
2500014200Can not start new XA transaction in a active transaction.
2500014201Failed to create `%s` XA data source.

#

SQL StateVendor Code错误信息
HY00015000The table `%s` of schema `%s` is locked.
HY00015001The table `%s` of schema `%s` lock wait timeout of `%s` milliseconds exceeded.

审计 #

SQL StateVendor Code错误信息
4400016000SQL check failed, error message: %s

集群 #

SQL StateVendor Code错误信息
HY00017000Work ID assigned failed, which can not exceed 1024.
HY00017001Can not find `%s` file for datetime initialize.
HY00017002File access failed, reason is: %s
HY00017010Cluster persist repository error, reason is: %s

迁移 #

SQL StateVendor Code错误信息
4400018001Created rule already existed.
4400018002Altered rule does not exist.
HY00018020Failed to get DDL for table `%s`.
42S0118030Duplicate resource names `%s`.
42S0218031Resource names `%s` do not exist.
0A00018032Unsupported data type `%s` of unique key for pipeline job.
HY00018050Before data record is `%s`, after data record is `%s`.
0800018051Data check table `%s` failed.
0A00018052Unsupported pipeline database type `%s`.
0A00018053Unsupported CRC32 data consistency calculate algorithm with database type `%s`.
HY00018080Can not find pipeline job `%s`.
HY00018081Job has already started.
HY00018082Sharding count of job `%s` is 0.
HY00018083Can not split by range for table `%s`, reason is: %s
HY00018084Can not split by unique key `%s` for table `%s`, reason is: %s
HY00018085Target table `%s` is not empty.
0100718086Source data source lacks %s privilege(s).
HY00018087Source data source required `%s = %s`, now is `%s`.
HY00018088User `%s` does exist.
0800018089Check privileges failed on source data source, reason is: %s
0800018090Data sources can not connect, reason is: %s
HY00018091Importer job write data failed.
0800018092Get binlog position failed by job `%s`, reason is: %s
HY00018093Can not poll event because of binlog sync channel already closed.
HY00018094Task `%s` execute failed.
HY00018095Job has already finished, please run `CHECK MIGRATION %s` to start a new data consistency check job.
HY00018096Uncompleted consistency check job `%s` exists.

DistSQL #

SQL StateVendor Code错误信息
4400019000Can not process invalid resources, error message is: %s
4400019001Resources `%s` do not exist in database `%s`.
4400019002There is no resource in the database `%s`.
4400019003Resource `%s` is still used by `%s`.
4400019004Duplicate resource names `%s`.
4400019100Invalid `%s` rule `%s`, error message is: %s
4400019101%s rules `%s` do not exist in database `%s`.
4400019102%s rules `%s` in database `%s` are still in used.
4400019103%s rule `%s` has been enabled in database `%s`.
4400019104%s rule `%s` has been disabled in database `%s`.
4400019105Duplicate %s rule names `%s` in database `%s`.
4400019150Invalid %s algorithm(s) `%s`.
4400019151%s algorithm(s) `%s` do not exist in database `%s`.
4400019152%s algorithms `%s` in database `%s` are still in used.
4400019153Duplicate %s algorithms `%s` in database `%s`.

功能异常 #

数据分片 #

SQL StateVendor Code错误信息
4400020000Can not find table rule with logic tables `%s`.
4400020001Can not get uniformed table structure for logic table `%s`, it has different meta data of actual tables are as follows: %s
42S0220002Can not find data source in sharding rule, invalid actual data node `%s`.
4400020003Data nodes must be configured for sharding table `%s`.
4400020004Actual table `%s.%s` is not in table rule configuration.
4400020005Can not find binding actual table, data source is `%s`, logic table is `%s`, other actual table is `%s`.
4400020006Actual tables `%s` are in use.
42S0120007Index `%s` already exists.
42S0220008Index `%s` does not exist.
42S0120009View name has to bind to %s tables.
4400020020Sharding value can’t be null in insert statement.
HY00420021Found different types for sharding value `%s`.
HY00420022Invalid %s, datetime pattern should be `%s`, value is `%s`.
0A00020040Can not support operation `%s` with sharding table `%s`.
4400020041Can not update sharding value for table `%s`.
0A00020042The CREATE VIEW statement contains unsupported query statement.
4400020043PREPARE statement can not support sharding tables route to same data sources.
4400020044The table inserted and the table selected must be the same or bind tables.
0A00020045Can not support DML operation with multiple tables `%s`.
4200020046%s … LIMIT can not support route to multiple data nodes.
4400020047Can not find actual data source intersection for logic tables `%s`.
4200020048INSERT INTO … SELECT can not support applying key generator with absent generate key column.
0A00020049Alter view rename .. to .. statement should have same config for `%s` and `%s`.
HY00020060`%s %s` can not route correctly for %s `%s`.
42S0220061Can not get route result, please check your sharding rule configuration.
3400020062Can not get cursor name from fetch statement.
HY00020080Sharding algorithm class `%s` should be implement `%s`.
HY00020081Routed target `%s` does not exist, available targets are `%s`.
4400020082Inline sharding algorithms expression `%s` and sharding column `%s` do not match.
4400020090Can not find strategy for generate keys with table `%s`.
HY00020099Sharding plugin error, reason is: %s

读写分离 #

SQL StateVendor Code错误信息
HY00420280Invalid read database weight `%s`.

数据库高可用 #

SQL StateVendor Code错误信息
HY00020380MGR plugin is not active in database `%s`.
4400020381MGR is not in single primary mode in database `%s`.
4400020382`%s` is not in MGR replication group member in database `%s`.
4400020383Group name in MGR is not same with configured one `%s` in database `%s`.

SQL 方言转换 #

SQL StateVendor Code错误信息
4200020440Can not support database `%s` in SQL translation.
4200020441Translation error, SQL is: %s

流量治理 #

SQL StateVendor Code错误信息
42S0220500Can not get traffic execution unit.

数据加密 #

SQL StateVendor Code错误信息
4400020700Can not find logic encrypt column by `%s`.
4400020701Fail to find encrypt column `%s` from table `%s`.
4400020702Altered column `%s` must use same encrypt algorithm with previous column `%s` in table `%s`.
4200020740Insert value of index `%s` can not support for encrypt.
0A00020741The SQL clause `%s` is unsupported in encrypt rule.
HY00420780Encrypt algorithm `%s` initialization failed, reason is: %s

影子库 #

SQL StateVendor Code错误信息
HY00420820Shadow column `%s` of table `%s` does not support `%s` type.
4200020840Insert value of index `%s` can not support for shadow.

其他异常 #

SQL StateVendor Code错误信息
HY00430000Unknown exception: %s
0A00030001Unsupported SQL operation: %s
0A00030002Database protocol exception: %s
0A00030003Unsupported command: %s