This topic describes the error codes for MySQL and Oracle tenants in OceanBase Database. You can use the error codes to quickly analyze and resolve database issues.
MySQL tenant
Format of error messages
OceanBase Database is highly compatible with MySQL. Specifically, OceanBase Database is compatible with general MySQL features, foreground and background MySQL protocols, as well as some native error codes of MySQL. Therefore, the error message format for MySQL tenants in OceanBase Database is the same as that in MySQL databases, as shown below:
ERROR <err_num> (<sql_stat>) : err_msg
err_num indicates the error code. sql_stat indicates the SQL execution status. err_msg indicates the error message.
Variables in error messages
In OceanBase Database, variables are embedded in error messages to help you troubleshoot issues. In this topic, these variables are represented by percent signs (%). Example:
ERROR 4626 (HY000) : resource pool '%s' has already been granted to a tenant
The preceding error message may appear as the following message:
ERROR 4626 (HY000) : resource pool 'pool1' has already been granted to a tenant
Error codes
The following table describes the system error codes by range.
| Error code range | Description |
|---|---|
| 0001 to 3999 | Error codes compatible with MySQL. |
| 4000 to 4499 | Common error codes. |
| 4500 to 4999 | RootService error codes. |
| 5000 to 5999 | SQL, WITH clause, and Factoring error codes. |
| 6000 to 6999 | Transaction, multi-version concurrency control (MVCC), and clog error codes. |
| 7000 to 7999 | Election module error codes. |
| 8000 to 8999 | Fatal error codes. If a client receives an error message with an error code within this range, the client must close the SQL connection. |
| 9000 to 9499 | Backup, recovery, and STORAGE 3.0 error codes. |
| 9500 to 9999 | Procedural language (PL) error codes. |
| 22998, 30926, 38104, and 38105 | BLOB and CLOB error codes. |
Oracle tenant
Format of error messages
For Oracle tenants in OceanBase Database, error messages are returned in the format of prefix+numeric code. For example, for an error that originates from a database, an error message prefixed with ORA is returned. For an error that originates from a stored procedure, an error message prefixed with PLS is returned. The error message format is the same as that in Oracle databases.
ORA-<err_num>: <err_msg>
In the format, err_num indicates an error code compatible with Oracle databases, and err_msg indicates the error information.
Variables in error messages
OceanBase Database integrates parameters into error messages to help you locate and fix errors. These parameters are displayed as percent signs (%). Example:
ORA-00910: specified length too long for column '%s' (max = %d byte)
The preceding error message may appear as the following message:
ORA-00910: specified length too long for column 'fruit' (max = 32767 byte)
About ORA-00600
In Oracle databases, ORA-00600 indicates an internal error, which is a Catchall internal error message for Oracle program exceptions. It indicates that the process encounters a low-level or unexpected error.
In Oracle tenants of OceanBase Database, for errors that are incompatible with Oracle databases, this error code is returned in the following format:
ORA-00600: internal error code, arguments: %d, %s
%d indicates an error code in OceanBase Database, and %s indicates the error message in OceanBase Database.