Error codes for database cluster groups for Aurora
The routing endpoint of a database cluster group for Aurora returns MySQL error numbers. One code covers several causes. For example, Aurora MySQL error 1235 means that the routing layer refused the statement, for one of many reasons. For how to use an error code to find its fix, see Using error codes to troubleshoot.
The routing layer returns the message texts that the pages in this section show. Handle the error code, not the message text, because message texts can change between versions. An error that a member cluster returns for a statement that the routing layer sent to it also reaches your client through the routing endpoint, with the member cluster's code and text.
Finding an error
To find an error, look up its code in the following table and open the page for its family. Each page has one row per error, with the Aurora MySQL error number and SQLSTATE.
| Error family | Aurora MySQL codes | Page |
|---|---|---|
| Connection and sign-in | 1040, 1045, 1524, 1862, 3118, 2061 (client), 2013 (client), 3159, 1227, 1396 | Connection and sign-in errors |
| Routing and data mappings | 1235, 1526, 64004, 64021, 64043, 64060, 64062, 64080, 1105, 1429, 1053, 9501, 1205, 1146, 1049, 1412, 63928, 1243, 4163, 1064, 1227, 3168 | Routing and data mapping errors |
| Scaleout tables and routing functions | 1064, 1066, 1113, 1179, 1235, 1305, 1480, 1481, 1488, 1491, 1493, 1495, 1517, 1582, 1654, 1697, 64000, 64001, 64003, 64005, 64020, 64022, 64024, 64025, 64040, 64042, 64061, 64065, 64066, 3168 | Scaleout table and routing function errors |
| Data movement and group limits | 1227, 1064, 1179, 1221, 1525, 1297, 1305, 63927, 3168, 3170, and no code for a job failure, which the job records as text in move_info |
Data movement errors |
| Sessions, pins, and transactions | 1179, 1231, 1049, 64004, 1192, 1228, 1429, 3170, 1162, 1146, 63927, 1927, 1094, 1399, 1235 | Session and transaction errors |
For causes and fixes by symptom, see Troubleshooting database cluster groups for Aurora. For which statements the routing layer runs, see Statement compatibility. For the filters that the dbclustergroup_sys tables accept, see System tables for database cluster groups for Aurora.
Aurora MySQL error numbers 64000–64099 (SQLSTATE 42000) are metadata errors of database cluster groups for Aurora. The routing layer returns one of these numbers for a condition of a database cluster group that has no engine equivalent, such as an object that doesn't exist or already exists. For other refusals it returns an engine error number, such as 1235, 1305, or 1582. The error number field is unsigned, and the audit and slow-query logs record the number as sent, for example 64022. Some drivers, PyMySQL for example, report a number above 32767 as a negative number, for example 64062 as -1474.
The following table lists metadata error numbers that the routing layer returns, and the statements that return them. It doesn't list every number in the 64000–64099 range.
| Aurora MySQL code | Condition | Statements |
|---|---|---|
| 64000 | A member table has no data mapping. | CREATE SCALEOUT TABLE, ALTER SCALEOUT TABLE ... ADD MEMBER, ALTER SCALEOUT TABLE ... DROP MEMBER |
| 64001 | The scaleout table doesn't exist. | DROP SCALEOUT TABLE, CREATE SCALEOUT TABLE ... USING ROUTING FUNCTION OF, ALTER SCALEOUT TABLE (any action on a table that doesn't exist, or ... USING ROUTING FUNCTION OF a missing parent table) |
| 64003 | The routing function doesn't exist. | DROP SCALEOUT ROUTING FUNCTION, CREATE SCALEOUT TABLE ... USING ROUTING FUNCTION, ALTER SCALEOUT TABLE ... USING ROUTING FUNCTION, ALTER SCALEOUT TABLE ... ADD ROUTING FUNCTION |
| 64004 | The member cluster alias doesn't exist. | INSERT or UPDATE on dbclustergroup_sys.data_mappings (including a WHERE member_cluster_alias = ... filter), SET SESSION router_cluster_pin |
| 64005 | No data mapping declares a target collocation. | CREATE SCALEOUT ROUTING FUNCTION |
| 64020 | The scaleout table already exists. | CREATE SCALEOUT TABLE, ALTER SCALEOUT TABLE ... RENAME TO |
| 64021 | The router name already has a data mapping. | INSERT or UPDATE (a rename onto a router name that is already mapped) on dbclustergroup_sys.data_mappings |
| 64022 | The routing function already exists. | CREATE SCALEOUT ROUTING FUNCTION |
| 64024 | The collocation already holds a member table of the scaleout table. | ALTER SCALEOUT TABLE ... ADD MEMBER, UPDATE on dbclustergroup_sys.data_mappings |
| 64025 | The name is already used by a data mapping or a scaleout table. | CREATE SCALEOUT TABLE, ALTER SCALEOUT TABLE ... RENAME TO, INSERT or UPDATE on dbclustergroup_sys.data_mappings (a router_table_name equal to a scaleout table name) |
| 64040 | The member table already belongs to a scaleout table. | CREATE SCALEOUT TABLE, ALTER SCALEOUT TABLE ... ADD MEMBER |
| 64042 | A scaleout table uses the routing function. | DROP SCALEOUT ROUTING FUNCTION |
| 64043 | The member cluster of one data mapping can't change, because the member cluster belongs to the mapping's collocation. | UPDATE on dbclustergroup_sys.data_mappings |
| 64060 | The router database already has a data mapping at another level. | INSERT, UPDATE on dbclustergroup_sys.data_mappings |
| 64061 | The parent table doesn't define its own routing function, or is the table itself. | CREATE SCALEOUT TABLE ... USING ROUTING FUNCTION OF, ALTER SCALEOUT TABLE ... USING ROUTING FUNCTION OF |
| 64062 | The collocation isn't on the member cluster that the data mapping names. | INSERT, UPDATE on dbclustergroup_sys.data_mappings |
| 64063 | The statement leaves out a column that the change needs, such as member_cluster_alias with router_collocation_group. |
UPDATE on dbclustergroup_sys.data_mappings |
| 64065 | Two member tables of one scaleout table are in the same collocation. | CREATE SCALEOUT TABLE, UPDATE on dbclustergroup_sys.data_mappings |
| 64066 | The scaleout table would have no member table in a collocation that its routing function targets. | CREATE SCALEOUT TABLE, ALTER SCALEOUT TABLE ... DROP MEMBER, ALTER SCALEOUT TABLE ... USING ROUTING FUNCTION, UPDATE on dbclustergroup_sys.data_mappings |
| 64080 | The name is reserved. | Statements that use a reserved name, such as a common table expression (CTE) named _data_mappings |