MariaDB Error Code Reference (original) (raw)
NOTE: Error codes from 4195 on have been shifted!
MariaDB shares error codes with MySQL, as well as adding a number of new error codes specific to MariaDB.
An example of an error code is as follows:
SELECT * FROM x; ERROR 1046 (3D000): No database selected
Contents
There are three pieces of information returned in an error:
- A numeric error code, in this case
1046
. Error codes from 1900 and up are specific to MariaDB, while error codes from 1000 to 1800 are shared by MySQL and MariaDB. - An SQLSTATE value, consisting of five characters, in this case
3D000
. These codes are standard to ODBC and ANSI SQL. When MariaDB cannot allocate a standard SQLSTATE code, a genericHY000
, or general error, is used. - A string describing the error, in this case
No database selected
.
New error codes are being continually being added as new features are added. For a definitive list, see the file sql/share/errmsg-utf8.txt
, as well as include/mysqld_error.h
in the build directory, generated by the comp_err
tool. Also, the perror tool can be used to get the error message which is associated with a given error code.
MariaDB-specific error codes
Comments
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.