All Products
Search
Document Center

DRDS error code

Last Updated: Aug 17, 2020

This topic lists the common error codes returned by DRDS and provides solutions for them.

TDDL-4006 ERR_TABLE_NOT_EXIST

TDDL-4007 ERR_CANNOT_FETCH_TABLE_META

TDDL-4100 ERR_ATOM_NOT_AVALILABLE

TDDL-4101 ERR_ATOM_GET_CONNECTION_FAILED_UNKNOWN_REASON

TDDL-4102 ERR_ATOM_GET_CONNECTION_FAILED_KNOWN_REASON

TDDL-4103 ERR_ATOM_CONNECTION_POOL_FULL

TDDL-4104 ERR_ATOM_CREATE_CONNECTION_TOO_SLOW

TDDL-4105 ERR_ATOM_ACCESS_DENIED

TDDL-4106 ERR_ATOM_DB_DOWN

TDDL-4108 ERR_VARIABLE_CAN_NOT_SET_TO_NULL_FOR_NOW

TDDL-4200 ERR_GROUP_NOT_AVALILABLE

TDDL-4201 ERR_GROUP_NO_ATOM_AVALILABLE

TDDL-4202 ERR_ SQL _QUERY_TIMEOUT

TDDL-4203 ERR_ SQL _QUERY_MERGE_TIMEOUT

TDDL-4400 ERR_SEQUENCE

TDDL-4401 ERR_MISS_SEQUENCE

TDDL-4403 ERR_MISS_SEQUENCE_TABLE_ON_DEFAULT_DB

TDDL-4404 ERR_SEQUENCE_TABLE_META

TDDL-4405 ERR_INIT_SEQUENCE_FROM_DB

TDDL-4407 ERR_OTHER_WHEN_BUILD_SEQUENCE

TDDL-4408 ERR_SEQUENCE_NEXT_VALUE

TDDL-4500 ERR_PARSER

TDDL-4501 ERR_OPTIMIZER

TDDL-4502 ERR_OPTIMIZER_MISS_ORDER_FUNCTION_IN_SELECT

TDDL-4504 ERR_OPTIMIZER_SELF_CROSS_JOIN

TDDL-4506 ERR_MODIFY_SHARD_COLUMN

TDDL-4508 ERR_OPTIMIZER_NOT_ALLOWED_SORT_MERGE_JOIN

TDDL-4509 ERR_OPTIMIZER_ERROR_HINT

TDDL-4510 ERR_CONTAINS_NO_SHARDING_KEY

TDDL-4511 ERR_INSERT_CONTAINS_NO_SHARDING_KEY

TDDL-4515 ERR_CONNECTION_CHARSET_NOT_MATCH

TDDL-4516 ERR_TRUNCATED_DOUBLE_VALUE_OVERFLOW

TDDL-4517 ERR_MODIFY_SYSTEM_TABLE

TDDL-4600 ERR_FUNCTION

TDDL-4601 ERR_EXECUTOR

TDDL-4602 ERR_CONVERTOR

TDDL-4603 ERR_ACCROSS_DB_TRANSACTION

TDDL-4604 ERR_CONCURRENT_TRANSACTION

TDDL-4606 ERR_QUERY_CANCLED

TDDL-4607 ERR_INSERT_WHEN_UPDATE

TDDL-4610 ERR_CONNECTION_CLOSED

TDDL-1305 ERR_UNKNOWN_SAVEPOINT

TDDL-1094 ERR_UNKNOWN_THREAD_ID

TDDL-4612 ERR_CHECK_ SQL _PRIV

TDDL-4613 ERR_INSERT_SELECT

TDDL-4614 ERR_EXECUTE_ON_MYSQL

TDDL-4615 ERR_CROSS_JOIN_SIZE_PROTECTION

TDDL-4616 ERR_UNKNOWN_DATABASE

TDDL-4800 ERR_SET_TXCID

TDDL-4801 ERR_TXCID_NULL

TDDL-4802 ERR_SELECT_LAST_TXCID

TDDL-4994 ERR_FLOW_CONTROL

TDDL-4998 ERR_NOT_SUPPORT

TDDL-5001 ERR_TRANS

TDDL-5002 ERR_TRANS_UNSUPPORTED

TDDL-5003 ERR_TRANS_LOG

TDDL-5004 ERR_TRANS_NOT_FOUND

TDDL-5005 ERR_TRANS_FINISHED

TDDL-5006 ERR_TRANS_COMMIT

TDDL-5007 ERR_TRANS_PARAM

TDDL-5008 ERR_TRANS_TERMINATED


TDDL-4006 ERR_TABLE_NOT_EXIST

The error message returned because the specified DRDS data table does not exist.

Example code:

  1. ERR-CODE: [TDDL-4006][ERR_TABLE_NOT_EXIST] Table '*****' doesn't exist.

This error indicates that the target DRDS table does not exist or DRDS cannot load the metadata of the table because an unknown reason exists.

If this error occurs, please contact customer service or submit a ticket.


TDDL-4007 ERR_CANNOT_FETCH_TABLE_META

DRDS cannot load the metadata of data tables.

Example code:

  1. ERR-CODE: [TDDL-4007][ERR_CANNOT_FETCH_TABLE_META] Table '*****' metadata
  2. cannot be fetched because Table '*****.*****' doesn't exist.

This error indicates that the attempt by DRDS to read the metadata information of the table failed. This error may be caused by one of the following:

  • Data table not created.

  • Table names in the database Shard are mistakenly deleted or renamed.

  • You cannot connect to apsaradb RDS for MySQL.

When this error occurs, first check whether the table name exists, and then check whether the status of all RDS/MySQL backend servers of DRDS is normal.

If you confirm that a table has been deleted or renamed, you can use the data restoration feature to restore the table. If it still cannot be repaired, please contact customer service or submit a ticket to resolve this issue.


TDDL-4100 ERR_ATOM_NOT_AVALILABLE

Currently, the backend RDS or MySQL of DRDS is unavailable.

Example code:

  1. ERR-CODE: [TDDL-4100][ERR_ATOM_NOT_AVALILABLE] Atom : ***** isNotAvailable

If DRDS detects that a backend RDS or MySQL instance is in an abnormal state, access to the instance is temporarily blocked and a TDDL-4100 error is returned. If this error occurs, check whether all the backend servers of DRDS, apsaradb RDS for MySQL, are working properly, and try to recover the database.

When the RDS or MySQL instance is in the recovery state, DRDS will be automatically removed from the unavailable state to ensure normal application access.


TDDL-4101 ERR_ATOM_GET_CONNECTION_FAILED_UNKNOWN_REASON

The backend connection to DRDS fails to be obtained. The cause is unknown.

Example code:

  1. ERR-CODE: [TDDL-4101][ERR_ATOM_GET_CONNECTION_FAILED_UNKNOWN_REASON] Get
  2. connection for db '*****' from pool failed. AppName:*****, Env :*****,
  3. UnitName:null. Message from pool: wait millis 5000, active 0, maxActive 5.
  4. You should look for the following logs which contains the real reason.

When DRDS processes a request, it asynchronously creates a connection to the backend RDS or MySQL. If you cannot create an RDS or MySQL connection within this period of time, DRDS will return TDDL-4101 error to the application.

This error is usually caused by an exception in the backend RDS or MySQL database. If this error still occurs after RDS or MySQL has been rectified, please contact customer service or submit a ticket to resolve this issue.


TDDL-4102 ERR_ATOM_GET_CONNECTION_FAILED_KNOWN_REASON

Failed to obtain the backend connection to DRDS for known reasons.

Example code:

  1. ERR-CODE: [TDDL-4102][ERR_ATOM_GET_CONNECTION_FAILED_KNOWN_REASON] Get
  2. connection for db '*****' failed because wait millis 5000, active 0
  3. maxActive 5

An error occurs when DRDS obtains the connection from the backend RDS for MySQL because the error has been reported in The ERR-CODE: message.

Common reasons for a DRDS backend connection failure include:

  • Backend RDS or MySQL full connections

  • RDS or MySQL connection timeout

  • RDS or MySQL deny connection

If this error persists after RDS or MySQL troubleshooting, please contact customer service or submit a ticket to resolve this issue.


TDDL-4103 ERR_ATOM_CONNECTION_POOL_FULL

The connection pool of the backend RDS or MySQL database is full.

Example code:

  1. ERR-CODE: [TDDL-4103][ERR_ATOM_CONNECTION_POOL_FULL] Pool of DB '*****' is
  2. full. Message from pool: wait millis 5000, active 5, maxActive 5.
  3. AppName:*****, Env:*****, UnitName:null.

This error indicates that the DRDS backend connection pool is full. Common causes of TDDL-4103 errors are as follows:

  • The application SQL statement runs slowly, and the time occupied by a single connection is too long, resulting in insufficient connections.

  • The database connection is not closed by the application.

  • Many cross-database queries (such as aggregate statistics queries and queries without Database Sharding conditions) can be executed at the same time, occupying a large number of connections.

Solution suggestions:

  • We recommend that you use frameworks such as Spring JDBC and MyBatis to access databases.

  • Optimize the business SQL statements based on the RDS performance analysis report and DBA recommendations.

  • Use DRDS read/write splitting to forward cross-database queries to read-only databases.

  • Upgrade RDS instances to a higher specification to improve backend processing capabilities.

  • Contact customer service or submit a ticket adjust the number of DRDS backend connections.


TDDL-4104 ERR_ATOM_CREATE_CONNECTION_TOO_SLOW

Connection to the backend RDS or MySQL instance of DRDS is slow.

Example code:

  1. ERR-CODE: [TDDL-4104][ERR_ATOM_CREATE_CONNECTION_TOO_SLOW] Get connection
  2. for db '*****' from pool timeout. AppName:*****, Env:*****, UnitName:null.
  3. Message from pool: wait millis 5000, active 3, maxActive 5.

When DRDS asynchronously creates connections to the backend RDS or MySQL, if you need to create many connections in a short time or the connection speed of RDS or MySQL is too slow, you may encounter timeout.

This problem is usually caused by excessive load or exceptions of the backend RDS or MySQL. We recommend that you use DRDS read/write splitting, or upgrade the RDS instance to a higher specification to reduce the processing load on the backend.

If this error still occurs after RDS or MySQL has been rectified, contact customer service or submit a ticket.

If the problem is caused by creating a large number of connections for a short period of time, consider contacting customer service or submit a ticket adjust the minimum number of DRDS connections.


TDDL-4105 ERR_ATOM_ACCESS_DENIED

The backend RDS or MySQL instance in a DRDS instance rejects the connection.

Example code:

  1. ERR-CODE: [TDDL-4105][ERR_ATOM_ACCESS_DENIED] DB '*****' Access denied
  2. user '*****'@'*****'. AppName:*****, Env:*****, UnitName:null. Please
  3. contact DBA to check.

When this error occurs, access to the apsaradb RDS for MySQL instance is denied.

If the username or password automatically created by DRDS is changed in the apsaradb RDS for MySQL instance, DRDS may TDDL-4105 an error message. To fix this problem, you must manually modify the DRDS username and password. Contact customer service or submit a ticket.

In addition, when a backend RDS instance has an overdue payment or expires, all access requests are rejected, which also causes DRDS to generate TDDL-4105 errors. If this happens, renew the RDS instance in a timely manner.


TDDL-4106 ERR_ATOM_DB_DOWN

You cannot connect to the backend RDS or MySQL instance of a DRDS instance.

Example code:

  1. ERR-CODE: [TDDL-4106][ERR_ATOM_DB_DOWN] DB '*****' cannot be connected.
  2. AppName:*****, Env:*****, UnitName:null. It seems a very real possibility
  3. that this DB IS DOWN. Please contact DBA to check.

This error indicates that the connection establishment between DRDS and the backend RDS or MySQL has timed out or no response is received. The common cause of the error is an RDS or MySQL failure. Contact customer service or submit a ticket.


TDDL-4108 ERR_VARIABLE_CAN_NOT_SET_TO_NULL_FOR_NOW

variable is not allowed to be set NULL.

Example code:

  1. ERR-CODE: [TDDL-4108][ERR_VARIABLE_CAN_NOT_SET_TO_NULL_FOR_NOW] System
  2. variable ***** can''t set to null for now;

Some MySQL variables are not allowed SET var = x statement NULL value. DRDS reports a TDDL-4108 error.

If this error occurs, check the variable value and make corrections based on the MySQL official documentation.


TDDL-4200 ERR_GROUP_NOT_AVALILABLE

The DRDS database shard is temporarily unavailable.

Example code:

  1. ERR-CODE: [TDDL-4200][ERR_GROUP_NOT_AVALILABLE] The TDDL Group ***** is
  2. running in fail-fast status, caused by this SQL :***** which threw a fatal
  3. exception *****.

If an apsaradb RDS for MySQL instance cannot be accessed in a database Shard and there are no other available instances in the database Shard, DRDS places the database Shard in the fail-fast state and returns a TDDL-4200 error.

This error is usually caused by RDS/MySQL failure. Locate and solve the problem based on the instance exception information. When the failed RDS or MySQL instance is recovered, DRDS automatically cancels the fail-fast status.

If the TDDL-4200 error still occurs after the RDS or MySQL fault is resolved, contact customer service or submit a ticket.


TDDL-4201 ERR_GROUP_NO_ATOM_AVALILABLE

Currently, no RDS or MySQL instance is available in the DRDS sub-database.

Example code:

  1. ERR-CODE: [TDDL-4201][ERR_GROUP_NO_ATOM_AVALILABLE] All weights of DBs in
  2. Group '*****' is 0. Weights is: *****.

If RDS or MySQL instances in the database Shard are unavailable or the instance is in the fail-fast status, DRDS reports a TDDL-4201 error.

This error is usually caused by RDS/MySQL failure. Check the status of the backend RDS or MySQL instance to locate and solve the problem. If the TDDL-4201 error still occurs after the failure is resolved, please contact customer service or submit a ticket.


TDDL-4202 ERR_ SQL _QUERY_TIMEOUT

The DRDS query times out.

Example code:

  1. ERR-CODE: [TDDL-4202][ERR_ SQL _QUERY_TIMEOUT] Slow query leads to a timeout
  2. exception, please contact DBA to check slow SQL. SocketTimout:*** ms
  3. Atom:*****, Group:*****, AppName:*****, Env:*****, UnitName:null.

This error indicates that the SQL statement takes longer than the socketTimeout parameter specified in the DRDS instance to run on the backend RDS or MySQL instance. The default DRDS timeout setting is 900 seconds.

We recommend that you optimize SQL statements and create suitable indexes for the apsaradb RDS for MySQL database to improve the execution performance.

If your optimized SQL statements are still slow, you can temporarily set the DRDS timeout period by using the following DRDS Hint syntax:

  1. /*TDDL:SOCKET_TIMEOUT=900000*/ SELECT * FROM dual;

Where SOCKET_TIMEOUT the unit of the setting is milliseconds.

If you need to permanently adjust the DRDS timeout setting (socketTimeout), contact customer service or submit a ticket.


TDDL-4203 ERR_ SQL _QUERY_MERGE_TIMEOUT

The distributed query timeout.

Example code:

  1. ERR-CODE: [TDDL-4203][ERR_ SQL _QUERY_MERGE_TIMEOUT] Slow SQL query leads
  2. a timeout exception during merging results, please optimize the slow SQL.
  3. The the default timeout is *** ms. DB is *****

This error indicates that DRDS timed out executing the distributed query, and the default timeout is 900 seconds.

A TDDL-4203 error indicates that the SQL statement scans the data of multiple sub-databases and the execution time exceeds 900 seconds. We recommend that you optimize:

  • Try to add a Sharding key condition in the WHERE condition to optimize an SQL statement for single-database execution.

  • Check whether appropriate indexes can be created on the backend RDS or MySQL to improve the performance of scanning data in various shards.

  • Try to eliminate time-consuming operations such as cross-database JOIN and data reordering in distributed queries and reduce the consumption in the DRDS data merging phase.

If your optimized SQL statements are still slow, you can temporarily set the DRDS timeout period by using the following DRDS Hint syntax.

  1. /*TDDL:SOCKET_TIMEOUT=900000*/ SELECT * FROM dual;

Where SOCKET_TIMEOUT the unit of the setting is milliseconds.

If TDDL-4203 error still occurs, please contact customer service or submit a ticket.


TDDL-4400 ERR_SEQUENCE

Failed to process the Sequence (globally unique Sequence).

Example code:

  1. ERR-CODE: [TDDL-4400][ERR_SEQUENCE] Sequence : All dataSource faild to get
  2. value!

An error occurs during the processing of the DRDS Sequence. The error message is displayed sequence: given in.

Common Cause of TDDL-4400 is that the RDS or MySQL instance fails and the Sequence-related data table cannot be accessed. We recommend that you check the status of the backend RDS or MySQL database first. If the error persists after RDS/MySQL troubleshooting, contact customer service or submit a ticket.


TDDL-4401 ERR_MISS_SEQUENCE

The Sequence does not exist.

Example code:

  1. ERR-CODE: [TDDL-4401][ERR_MISS_SEQUENCE] Sequence '*****' is not found

The Sequence name used in the command does not exist. Recommended SHOW SEQUENCES command to check the names of all the created sequences on DRDS and use them correctly.

If the used Sequence does not exist, you can use it. CREATE SEQUENCE syntax creation:

  1. CREATE SEQUENCE <sequence name> [ START WITH <numeric value>]
  2. [INCREMENT BY <numeric value> ] [ MAXVALUE <numeric value>]
  3. [CYCLE | NOCYCLE ]'

If the Sequence used exists but TDDL-4401 error still occurs, contact customer service or submit a ticket.


TDDL-4403 ERR_MISS_SEQUENCE_TABLE_ON_DEFAULT_DB

The table used by the Sequence does not exist.

Example code:

  1. ERR-CODE: [TDDL-4403][ERR_MISS_SEQUENCE_TABLE_ON_DEFAULT_DB] Sequence table
  2. is not in default db.

Cannot be accessed in the DRDS backend database. Name: sequence or sequence_opt data table. Please contact customer service or submit a ticket resolve this issue.


TDDL-4404 ERR_SEQUENCE_TABLE_META

The structure of the Sequence data table is invalid.

Example code:

  1. ERR-CODE: [TDDL-4404][ERR_SEQUENCE_TABLE_META] the meta of sequence table
  2. is error, some columns missed

Sequence related data tables ( sequence or sequence_opt) is missing the corresponding field. Please contact customer service or submit a ticket resolve this issue.


TDDL-4405 ERR_INIT_SEQUENCE_FROM_DB

An error occurred while initializing the Sequence.

Example code:

  1. ERR-CODE: [TDDL-4405][ERR_INIT_SEQUENCE_FROM_DB] init sequence manager
  2. error: *****

An error occurs when initializing the Sequence that needs to be accessed. The error message is displayed in init sequence manager error: given later.

We recommend that you check the status of the Distributed Relational Database Service (DRDS) instance in the backend RDS or MySQL database first. If the TDDL-4405 error still appears after troubleshooting RDS or MySQL, contact customer service or submit a ticket.


TDDL-4407 ERR_OTHER_WHEN_BUILD_SEQUENCE

An error occurred while accessing the Sequence data table.

Example code:

  1. ERR-CODE: [TDDL-4407][ERR_OTHER_WHEN_BUILD_SEQUENCE] error when build
  2. sequence: *****

In the access Sequence related data table ( sequence or sequence_opt an error occurred while). The error message is in error when build sequence: given later.

We recommend that you check the status of the Distributed Relational Database Service (DRDS) instance in the backend RDS or MySQL database first. If the TDDL-4407 error still appears after troubleshooting RDS or MySQL, contact customer service or submit a ticket.


TDDL-4408 ERR_SEQUENCE_NEXT_VALUE

An error occurred while obtaining the Sequence value.

Example code:

  1. ERR-CODE: [TDDL-4408][ERR_SEQUENCE_NEXT_VALUE] error when get sequence's
  2. next value, sequence is: *****, error: *****

Use the DRDS auto-increment primary key column, or use <sequence name>.NEXTVAL an error occurred while syntax was being used to get the globally unique ID manually. The error reason is error: given after the hint.

Typically, TDDL-4408 errors occur because of backend RDS or MySQL failures. We recommend that you check the status of backend DRDS databases, RDS for MySQL databases, and access pressure on the database. If the TDDL-4408 error still appears after troubleshooting RDS or MySQL, contact customer service or submit a ticket.


TDDL-4500 ERR_PARSER

Failed to parse the SQL statement.

Example code:

  1. ERR-CODE: [TDDL-4500][ERR_PARSER] not support statement: '*****'

DRDS supports SQL-92-standard SQL syntax and MySQL-supported syntax extensions and functions. Check whether the SQL statements comply with the SQL standards of DRDS and MySQL specifications:

For more information about the standard SQL syntax, see SQL Syntax - W3Schools.

For MySQL 5.6 SQL syntax, see sql-syntax.

If your SQL statement complies with the above syntax and TDDL-4500 error is still prompted, contact customer service or submit a ticket.


TDDL-4501 ERR_OPTIMIZER

The Optimizer failed to convert the SQL statement.

Example code:

  1. ERR-CODE: [TDDL-4501][ERR_OPTIMIZER] optimize error by: Unknown column
  2. '*****' in 'order clause'

The job of the DRDS Optimizer is to convert SQL statements to the internal syntax tree. If there is a logic error in the SQL statement, the optimizer fails to convert the SQL statement and a TDDL-4501 error occurs.

Recommended as per optimize error: you are prompted to check and adjust your SQL statements. If the TDDL-4501 error still occurs after you modify the SQL statement, contact customer service or submit a ticket.


TDDL-4502 ERR_OPTIMIZER_MISS_ORDER_FUNCTION_IN_SELECT

The column of the function included in ORDER BY does not exist in the SELECT clause.

Example code:

  1. ERR-CODE: [TDDL-4502][ERR_OPTIMIZER_MISS_ORDER_FUNCTION_IN_SELECT] Syntax
  2. Error: orderBy/GroupBy Column ***** is not existed in select clause'

When the ORDER BY clause in the SQL statement contains function columns such as RAND(), DRDS requires that the same function column also appear in the SELECT clause. Otherwise, a TDDL-4502 error is returned.

We recommend that you add the corresponding function columns to the SELECT clause.


TDDL-4504 ERR_OPTIMIZER_SELF_CROSS_JOIN

The conditions for joining the same table are not enough.

Example code:

  1. ERR-CODE: [TDDL-4504][ERR_OPTIMIZER_SELF_CROSS_JOIN] self cross join case
  2. add shard column filter on right table

DRDS runs a JOIN statement on the same table. If the WHERE clause contains only one sharded column in the left or right table, a TDDL-4504 error message is displayed.

We recommend that you adjust the SQL statement to complete the split field conditions in the WHERE clause when joining the left or right table.


TDDL-4506 ERR_MODIFY_SHARD_COLUMN

Prohibit updates of split keys.

Example code:

  1. ERR-CODE: [TDDL-4506][ERR_MODIFY_SHARD_COLUMN] Column '*****' is a sharding
  2. key of table '*****', which is forbidden to be modified.

DRDS prohibits using UPDATE statements to modify the sharding key value. This operation may change the shards where data is stored. DRDS cannot guarantee the atomicity of operations and data consistency.

We recommend that you modify the corresponding UPDATE statement to an INSERT + DELETE statement with the same effect.


TDDL-4508 ERR_OPTIMIZER_NOT_ALLOWED_SORT_MERGE_JOIN

Cannot perform merge sort JOIN.

Example code:

  1. ERR-CODE: [TDDL-4508][ERR_OPTIMIZER_NOT_ALLOWED_SORT_MERGE_JOIN] sort merge
  2. join is not allowed when missing equivalent filter

If you need to JOIN SQL statements with tables from different RDS or MySQL instances, DRDS uses the Sort-merge Join algorithm as the JOIN statement. The JOIN operation requires that the conditions in the left and right tables must be the same as those in the JOIN operation. Otherwise, DRDS returns a TDDL-4508 error.

We recommend that you adjust the SQL statements to include JOIN conditions in the JOIN or WHERE clauses.


TDDL-4509 ERR_OPTIMIZER_ERROR_HINT

The Hint syntax is invalid.

Example code:

  1. ERR-CODE: [TDDL-4509][ERR_OPTIMIZER_ERROR_HINT] Hint Syntax Error:
  2. unexpected operation: *****.

This error indicates that the Hint syntax in SQL statements cannot be parsed by DRDS.


TDDL-4510 ERR_CONTAINS_NO_SHARDING_KEY

The sharding key condition is missing.

Example code:

  1. ERR-CODE: [TDDL-4510][ERR_CONTAINS_NO_SHARDING_KEY] Your SQL contains NO
  2. SHARDING KEY '*****' for table '*****', which is not allowed in DEFAULT.

If the full-table scan feature is disabled for a DRDS split table, you must include a split key condition in the WHERE clause when accessing the table. Otherwise, DRDS reports a TDDL-4510 error.

By default, the full table scan feature is enabled when DRDS creates a table. If you manually disable full table scan, we recommend that you confirm that all SQL statements related to the table have been added with split key conditions.


TDDL-4511 ERR_INSERT_CONTAINS_NO_SHARDING_KEY

The Shard key is missing in an INSERT statement.

Example code:

  1. ERR-CODE: [TDDL-4511][ERR_INSERT_CONTAINS_NO_SHARDING_KEY] Your INSERT SQL
  2. contains NO SHARDING KEY '*****' for table '*****'.

If the target of INSERT statement is a DRDS split table, the inserted data must contain the value of the split key (a split key is an exception). Otherwise, DRDS reports a TDDL-4511 error.

If this error occurs, we recommend that you modify the INSERT statement to specify the missing split key.


TDDL-4515 ERR_CONNECTION_CHARSET_NOT_MATCH

The input character sets do not match.

Example code:

  1. ERR-CODE: [TDDL-4515][ERR_CONNECTION_CHARSET_NOT_MATCH] Caused by MySQL's
  2. character_set_connection doesn't match your input charset. Partition DDL can
  3. only take ASCII or chinese column name. If you want use chinese table or
  4. column name, Make sure MySQL connection's charset support chinese character.
  5. Use "set names xxx" to set correct charset.

DRDS supports table and field names using Chinese characters. When executing an SQL statement containing Chinese characters, if the character set of the database connection is set ( character_set_connection) does not support Chinese characters (for example latin1), the TDDL-4515 error will be prompted.

You can use SHOW VARIABLES LIKE 'character_set_connection' query the current character set of the MySQL client, using SET NAMES x command to modify the current connected character set. If you connect to a DRDS instance through JDBC, set the database connection parameters. characterEncoding.


TDDL-4516 ERR_TRUNCATED_DOUBLE_VALUE_OVERFLOW

Floating point number to integer overflow.

Example code:

  1. ERR-CODE: [TDDL-4616][ERR_TRUNCATED_DOUBLE_VALUE_OVERFLOW] Truncated
  2. incorrect DOUBLE value '*****' over column[*****]'s value range.

DRDS converts floating-point numbers to integers that are beyond the value range of the integer type. We recommend that you check the field types and input parameters in the SQL statements.


TDDL-4517 ERR_MODIFY_SYSTEM_TABLE

Modification of the system table is not allowed.

Example code:

  1. ERR-CODE: [TDDL-4617][ERR_MODIFY_SYSTEM_TABLE] Table '*****' is DRDS SYSTEM
  2. TABLE, which is forbidden to be modified.

DRDS internally maintains some system tables. TDDL-4517 errors occur when you use SQL statements to update the data in these system tables.

System tables of restrictions include: sequence, sequence_opt, txc_undo_log, __DRDS__SYSTEM__LOCK__, avoid using these table names in your business or database design.


TDDL-4600 ERR_FUNCTION

Incorrect function call.

Example code:

  1. ERR-CODE: [TDDL-4600][ERR_FUNCTION] function compute error by Incorrect
  2. parameter count in the call to native function '*****'

This error indicates that the wrong syntax or parameter was used in the SQL statement to call the function. We recommend that you check function invocation carefully in SQL statements and call functions with the correct number and types of parameters.


TDDL-4601 ERR_EXECUTOR

An error occurred during SQL execution.

Example code:

  1. ERR-CODE: [TDDL-4601][ERR_EXECUTOR] only one column is supported in
  2. distinct aggregate

This error indicates that an unexpected error occurred during the execution of the SQL statement by DRDS. This type of error is usually related to the backend RDS/MySQL exception. It is recommended to check the backend RDS/MySQL first. If the error persists after RDS/MySQL troubleshooting, contact customer service submit a ticket.


TDDL-4602 ERR_CONVERTOR

Incorrect type conversion.

Example code:

  1. ERR-CODE: [TDDL-4602][ERR_CONVERTOR] convertor error by Unsupported convert:
  2. [Manage bandwidth packages *]

This error indicates that data type conversion failed when DRDS executes SQL statements. You must check whether the SQL statement contains data that requires implicit conversion. If not, use the same data type for comparison and computing.


TDDL-4603 ERR_ACCROSS_DB_TRANSACTION

Cross-database transaction failed.

Example code:

  1. ERR-CODE: [TDDL-4603][ERR_ACCROSS_DB_TRANSACTION] Transaction accross db is
  2. not supported in current transaction policy, transaction node is: {0},
  3. this SQL execute on: *****.

By default, DRDS only supports single-database transactions. That is, all SQL statements in transactions must be forwarded to the same RDS or MySQL sub-database for execution according to the corresponding rules. Otherwise, a TDDL-4603 error will be prompted.


TDDL-4604 ERR_CONCURRENT_TRANSACTION

Nested transaction failed.

Example code:

  1. ERR-CODE: [TDDL-4604][ERR_CONCURRENT_TRANSACTION] Concurrent query is not
  2. supported on transaction group, transaction group is: {0}.

DRDS does not support nested transactions. If you attempt to start more than two transactions at the same time in the same database connection, a TDDL-4604 error message is displayed.

We recommend that you avoid using nested transactions when developing applications or use the application-layer transaction framework to prevent the generation of nested transactions.


TDDL-4606 ERR_QUERY_CANCLED

The current SQL statement is canceled.

Example code:

  1. ERR-CODE: [TDDL-4606][ERR_QUERY_CANCLED] Getting connection is not allowed
  2. when query has been cancled, group is *****

Use KILL x when you cancel the execution of an SQL statement, this error code is returned for the SQL statement that is canceled. If this situation occurs frequently, check whether a client or program is executing KILL command.


TDDL-4607 ERR_INSERT_WHEN_UPDATE

An error occurred while executing the UPDATE statement in INSERT DELETE mode.

Example code:

  1. ERR-CODE: [TDDL-4607][ERR_INSERT_WHEN_UPDATE] Insert new values error
  2. table is: *****, old Values: *****, new Values: *****

After you enable the UPDATE Sharding key feature, DRDS can execute SQL statements using the INSERT + DELETE method to UPDATE Sharding keys. If the execution fails, the TDDL-4607 error message is displayed.

This error is usually caused by a backend RDS or MySQL fault. We recommend that you check the RDS or MySQL status first. If the RDS or MySQL error persists after troubleshooting, contact customer service or submit a ticket.


TDDL-4610 ERR_CONNECTION_CLOSED

The connection has been closed.

Example code:

  1. ERR-CODE: [TDDL-4610][ERR_CONNECTION_CLOSED] connection has been closed

When an SQL statement in the transaction fails or KILL after the command is canceled, the TDDL-4610 error occurs when you repeatedly use the same database connection to execute other SQL statements.

We recommend that you close the connection in this situation and obtain a new database connection.


TDDL-1305 ERR_UNKNOWN_SAVEPOINT

The SAVEPOINT with the specified name does not exist.

Example code:

  1. ERR-CODE: [TDDL-1305][ERR_UNKNOWN_SAVEPOINT] SAVEPOINT ***** does not exist

Run the following command on DRDS: ROLLBACK TO SAVEPOINT x or RELEASE SAVEPOINT x command, if the specified SAVEPOINT name does not exist, a TDDL-1305 error message is displayed.

Recommended check SAVEPOINT whether the name returned by the command is the same as the name used.


TDDL-1094 ERR_UNKNOWN_THREAD_ID

The session id specified by the KILL command does not exist.

Example code:

  1. ERR-CODE: [TDDL-1094][ERR_UNKNOWN_THREAD_ID] Unknown thread id: *****

Run the following command on DRDS: KILL x command to cancel the execution of an SQL statement. If the specified session id does not exist or the execution of the corresponding SQL statement has ended, a TDDL-1094 error message is displayed.

We recommend that you use SHOW PROCESSLIST command to check the session id of the SQL statement being executed and use only the returned ID to execute the KILL operation.


TDDL-4612 ERR_CHECK_ SQL _PRIV

The SQL statement cannot be executed due to insufficient permissions.

Example code:

  1. ERR-CODE: [TDDL-4612][ERR_CHECK_ SQL _PRIV] check user ***** on db ***** SQL
  2. privileges failed.

The new version of DRDS supports accounts and authorization. Similar to the MySQL account permission system, only accounts with the corresponding permissions can execute this SQL statement. If the account has insufficient permissions, DRDS reports a TDDL-4612 error.

We recommend that you check your DRDS permissions. If you have insufficient permissions, you can set the permissions on the DRDS console.

For DRDS account and permission settings, see DRDS database account and permission system.


TDDL-4613 ERR_INSERT_SELECT

Execution INSERT... SELECT statement error.

Example code:

  1. ERR-CODE: [TDDL-4613][ERR_INSERT_SELECT] insert error, table is: *****,
  2. values: *****

DRDS supports using the cross-Database INSERT... SELECT statement into separate SELECT and INSERT statements for batch execution. If the execution fails, the TDDL-4613 error message is displayed.

This error is usually caused by a backend RDS or MySQL fault. We recommend that you check the RDS or MySQL status first. If the RDS or MySQL error persists after troubleshooting, contact customer service or submit a ticket.


TDDL-4614 ERR_EXECUTE_ON_MYSQL

An error is reported when the SQL statement is executed on the RDS/MySQL instance.

Example code:

  1. ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on
  2. GROUP '*****': Duplicate entry '*****' for key 'PRIMARY'

An error is reported when DRDS executes an SQL statement on the backend RDS/MySQL database, with the original error message returned from RDS/MySQL included at the end. For example:

  1. Duplicate entry '*****' for key 'PRIMARY'

It indicates that a primary key conflict occurred when writing to the RDS/MySQL data table.

  1. The table '*****' is full

The temporary table used by RDS/MySQL is full and you need to adjust the temporary tablespace or optimize SQL statements.

  1. Deadlock found when trying to get lock;

Deadlocks are experienced in apsaradb RDS for MySQL. These deadlocks are usually caused by conflicting transactions that write data to the database.

We recommend that you read the original error message provided by TDDL-4614 to troubleshoot the issue. For more information, see MySQL 5.6 Reference Manual.

If the TDDL-4614 error still occurs after troubleshooting the application or RDS or MySQL, contact customer service or submit a ticket.


TDDL-4615 ERR_CROSS_JOIN_SIZE_PROTECTION

The number of rows returned by a distributed JOIN statement exceeds the limit.

Example code:

  1. ERR-CODE: [TDDL-4615][ERR_CROSS_JOIN_SIZE_PROTECTION] across join table
  2. size protection, check your SQL or enlarge the limination size.

When DRDS executes distributed JOIN statements in the Nested-loop mode, if a large amount of data is returned from the right table, DRDS occupies a large amount of memory, which affects the stability of DRDS. Therefore, we limit the number of returned rows to a maximum of 5,000 in this case. If the maximum number is exceeded, DRDS reports an TDDL-4615 error.

We recommend that you optimize SQL statements to avoid returning a large amount of data from the right table, or enable DRDS to use a better algorithm to perform distributed JOIN, such as Sort-merge.

To adjust this value for a specific SQL statement, follow these principles:

  • If a single record exceeds 100 kB, we recommend that you do not adjust the value.
  • If a single record does not exceed 100 kB, it can be adjusted as appropriate. We recommend that you do not set a value that is too large. Otherwise, the memory may burst.

If a single record is 100 kB, the memory used for distributed JOIN computing is 100K * 5000=500MB. If multiple connections are running the SQL statement, the system can easily burst memory. For example, if five connections are running the SQL statement, 500M * 5=2500M = 2.5G is required.

If you do need to adjust the SQL statement, add a HINT. For example, you can change the SQL statement to 5100: /*! TDDL:MAX_ROW_RETURN_FROM_RIGHT_INDEX_NESTED_LOOP=5100*/ SQL

To globally modify this limit, contact customer service or submit a ticket.


TDDL-4616 ERR_UNKNOWN_DATABASE

The error message returned because the specified database is invalid.

Example code:

  1. ERR-CODE: [TDDL-4616][ERR_UNKNOWN_DATABASE] Unknown database '*****'

DRDS allows you to specify database names in DDL statements. If the specified database name is different from the database name provided by DRDS, TDDL-4616 error is returned.

We recommend that you modify the database name in the DDL statement to make sure that it is the same as the DRDS database name.


TDDL-4617 ERR_SUBQUERY_LIMIT_PROTECTION

The number of rows returned by a subquery exceeds the limit.

Example code:

  1. ERR-CODE: [TDDL-4617][ERR_SUBQUERY_LIMIT_PROTECTION] The number of rows
  2. returned by the subquery exceeds the maximum number of 20000.

When DRDS executes SQL statements that include Sub-queries, if the subquery returns a large amount of data, DRDS occupies a large amount of memory, which negatively impacts the stability of DRDS. Therefore, the number of rows returned by a subquery cannot exceed 20,000. If the limit is exceeded, DRDS returns TDDL-4617 error.

We recommend that you optimize subqueries in SQL statements to avoid returning a large amount of data. Alternatively, try to rewrite the subquery into the JOIN form so that DRDS can execute it using better algorithms (for example, Sort-merge Join).

If you need to modify this limit, you can contact customer service or submit a ticket.


TDDL-4800 ERR_SET_TXCID

Execution SET TXC_XID xcommand failed.

Example code:

  1. ERR-CODE: [TDDL-4800][ERR_SET_TXCID] set txc_id failed: *****

TDDL-4801 ERR_TXCID_NULL

Execution SELECT LAST_TXC_ID command returns null.

Example code:

  1. ERR-CODE: [TDDL-4801][ERR_TXCID_NULL] txc_xid is null: *****

TDDL-4802 ERR_SELECT_LAST_TXCID

Execution SELECT LAST_TXC_ID command failed.

Example code:

  1. ERR-CODE: [TDDL-4802][ERR_SELECT_LAST_TXCID] select last_txc_xid failed:
  2. configure static website hosting * * * * *

TDDL-4994 ERR_FLOW_CONTROL

Bandwidth throttling.

Example code:

  1. ERR-CODE: [TDDL-4994][ERR_FLOW_CONTROL] [*****] flow control *****

This error indicates that DRDS has reached the internal traffic limit for processing SQL requests, and the current request is denied.

We recommend that you check whether there is a peak SQL request. If you still receive a large number of error messages after the number of SQL request TDDL-4994 has decreased, contact customer service or submit a ticket.


TDDL-4998 ERR_NOT_SUPPORT

Unsupported feature.

Example code:

  1. ERR-CODE: [TDDL-4998][ERR_NOT_SUPPORT] ***** not support yet!

This error indicates that the SQL syntax used or the DRDS feature is not supported.

If these SQL syntax or functions are important to you, contact customer service or submit a ticket give suggestions.


TDDL-5001 ERR_TRANS

General transaction error.

Example code:

  1. ERR-CODE: [TDDL-5001][ERR_TRANS] Too many lines updated in statement.

See error handling. For example:

  1. Too many lines updated in statement

The number of rows updated by an UPDATE statement in a transaction exceeds 1,000. We recommend that you check the WHERE condition of the UPDATE statement. To update a large amount of data within a transaction, you can use DRDS hints: /*TDDL:UNDO_LOG_LIMIT={number} */ adjust the limit value.

  1. Deferred execution is only supported in Flexible or XA Transaction

The post execution function is only available under the flexible transaction and XA transaction policies. DRDS Hint /*TDDL:DEFER */ before submitting the post execution statement, use SET drds_transaction_policy = *** command to change the transaction policy of DRDS.

For other error messages, please contact customer service or submit a ticket.


TDDL-5002 ERR_TRANS_UNSUPPORTED

The syntax or feature in the transaction is not yet supported.

Example code:

  1. ERR-CODE: [TDDL-5002][ERR_TRANS_UNSUPPORTED] Table without primary keys is not
  2. supported.

This function is not yet supported in DRDS transactions.

If this function is very important, please contact customer service or submit a ticket give us advice.


TDDL-5003 ERR_TRANS_LOG

Unable to access transaction log.

Example code:

  1. ERR-CODE: [TDDL-5003][ERR_TRANS_LOG] Failed to update transaction state: *****

To ensure the atomicity of distributed transactions, DRDS accesses the transaction logs on the back-end RDS or MySQL during each transaction. If DRDS returns an error when reading or writing the transaction log, it returns TDDL-5003 error.

The TDDL-5003 error usually results from a backend RDS or MySQL failure. We recommend that you check the status of DRDS backend RDS or MySQL and access pressure. If the TDDL-5003 error still occurs after RDS/MySQL problems are eliminated, contact customer service or submit a ticket.


TDDL-5004 ERR_TRANS_NOT_FOUND

The error message returned when the specified disk ID does not exist.

Example code:

  1. ERR-CODE: [TDDL-5004][ERR_TRANS_NOT_FOUND] Transaction not found.

In KILL TRANS <txid> or RECOVER <txid> the transaction ID specified in the command does not exist.


TDDL-5005 ERR_TRANS_FINISHED

The transaction has ended.

Example code:

  1. ERR-CODE: [TDDL-5005][ERR_TRANS_FINISHED] Operation not allowed. Transaction
  2. finished.

In KILL TRANS <txid> or RECOVER <txid> the transaction ID specified in the command has ended commit or rolled back and cannot continue with the management operation.


TDDL-5006 ERR_TRANS_COMMIT

Error During transaction commit.

Example code:

  1. ERR-CODE: [TDDL-5006][ERR_TRANS_COMMIT] Failed to commit primary group *****:
  2. timescaledb *, TRANS_ID = timescaledb * * * * *

DRDS encountered an error when submitting the transaction branch, TRANS_ID the corresponding transaction is automatically rolled back.

The TDDL-5006 error usually results from a backend RDS or MySQL failure. We recommend that you check the status of DRDS backend RDS or MySQL and access pressure. If the TDDL-5006 error still occurs after RDS/MySQL problems are eliminated, contact customer service or submit a ticket.


TDDL-5007 ERR_TRANS_PARAM

The error message returned because the time parameters are invalid.

Example code:

  1. ERR-CODE: [TDDL-5007][ERR_TRANS_PARAM] Illegal timeout value: *****

The DRDS transaction parameters specified in the command are incorrect.

For example: SET drds_transaction_timeout = *** the specified parameter value is negative.


TDDL-5008 ERR_TRANS_TERMINATED

The transaction has been killed or timed out.

Example code:

  1. ERR-CODE: [TDDL-5008][ERR_TRANS_TERMINATED] Current transaction was killed
  2. or timeout. You may need to set a longer timeout value.

When a DRDS transaction is killed or times out drds_transaction_timeout value), the error occurs.

If an error is caused by the transaction timeout, we recommend that you use SET drds_transaction_timeout = *** command to change the maximum execution time of a DRDS transaction, in milliseconds.