Overview

2024-06-28 05:30:29  Updated

This topic describes the error messages for MySQL tenants in OceanBase Database.

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, and 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.

The format of error messages is as follows:

ERROR <err_num> (<sql_stat>): err_msg

The parameters are described as follows:

  • err_num: the error code.

  • sql_stat: the SQL state.

  • err_msg: 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 (%).

Here is an 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 code description

The following table describes the system error codes by range.

Error code range Note
0001 to 3999 Error codes compatible with MySQL.
  • For more information about the error codes on MySQL servers, see Server Error Message Reference.
  • For more information about the error codes on MySQL clients, see Client Error Message Reference.
  • 4000 to 4499 Common error codes.
    4500 to 4999 The 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, restore, and STORAGE 3.0 error codes.
    9500 to 9999 Procedural language (PL) error codes.
    22998, 30926, 38104, and 38105 BLOB and CLOB error codes.

    Contact Us