Spec-Zone .ru
спецификации, руководства, описания, API
|
There are several sources of error information in MySQL:
Each SQL statement executed results in an error code, an SQLSTATE value, and an error message, as described in Section C.2, "Types of Error Values". These errors are returned from the server side; see Section C.3, "Server Error Codes and Messages".
Errors can occur on the client side, usually involving problems communicating with the server; see Section C.4, "Client Error Codes and Messages".
SQL statement warning and error information is available through the SHOW WARNINGS
and SHOW ERRORS
statements. The warning_count
system variable indicates the number of errors, warnings,
and notes. The error_count
system variable indicates the number of errors. Its value
excludes warnings and notes.
The GET
DIAGNOSTICS
statement may be used to inspect the diagnostic information in the diagnostics
area. See Section 13.6.7.3, "GET
DIAGNOSTICS
Syntax".
SHOW SLAVE
STATUS
statement output includes information about replication errors occurring on the slave
side.
SHOW ENGINE INNODB
STATUS
statement output includes information about the most recent foreign key error if a CREATE TABLE
statement for an InnoDB
table fails.
The perror program provides information from the command line about error numbers. See Section 4.8.1, "perror — Explain Error Codes".
Descriptions of server and client errors are provided later in this Appendix. For information about errors
related to InnoDB
, see Section
14.2.3.14, "InnoDB
Error Handling".