Diagnostics

The diagnostics area contains information about the error conditions which were produced by an SQL statement, as well as some information about the statement which generated them.

Title Description
Error Codes MariaDB error codes and SQLSTATE codes
DECLARE CONDITION For declaring a named error condition (SQLSTATE or error code).
DECLARE HANDLER Construct to declare how errors are handled.
Diagnostics Area A description of the diagnostics area and how it is populated.
GET DIAGNOSTICS Copy information about the diagnostics area into variables.
RESIGNAL Used to send a SIGNAL again for the previous error.
SHOW ERRORS Displays errors.
SHOW WARNINGS Displays errors, warnings and notes.
SIGNAL May be used to produce a custom error message.
SQL Error Log Plugin Records SQL-level errors to a log file.
SQLSTATE A string which identifies a condition's class and subclass
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.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/programmatic-compound-statements-diagnostics/