This topic describes the error information of MySQL and Oracle compatible modes for OceanBase Database tenants. For more information, see Error codes.
MySQL error codes
OceanBase Database is highly compatible with MySQL, not only in terms of common MySQL features and protocols, but also in its native error messages, which are designed to be compatible with MySQL. Therefore, the error information format for MySQL compatible mode tenants of OceanBase Database is consistent with that of MySQL.
The error information format 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.
Oracle error codes
In the Oracle compatible mode tenants of OceanBase Database, the error information is returned in the format of "prefix + numeric code".
Like Oracle Database, if the error originates from the database, the error message starts with ORA. If the error originates from a stored procedure, the error message starts with PLS.
The error information format is as follows:
OBE-<err_num>: <err_msg>
PLS-<err_num>: <err_msg>
The parameters are described as follows:
err_num: the error code compatible with Oracle Database.err_msg: the error message.