13.7.7.17 SHOW ERRORS Statement语句

SHOW ERRORS [LIMIT [offset,] row_count]
SHOW COUNT(*) ERRORS

SHOW ERRORS is a diagnostic statement that is similar to SHOW WARNINGS, except that it displays information only for errors, rather than for errors, warnings, and notes.是一个类似于SHOW WARNINGS的诊断语句,只是它只显示错误的信息,而不是错误、警告和注释的信息。

The LIMIT clause has the same syntax as for the SELECT statement. See Section 13.2.10, “SELECT Statement”.LIMIT子句的语法与SELECT语句的语法相同。参见第13.2.10节,“SELECT语句”

The SHOW COUNT(*) ERRORS statement displays the number of errors. SHOW COUNT(*) ERRORS语句显示错误数。You can also retrieve this number from the error_count variable:您也可以从error_count变量中检索此数字:

SHOW COUNT(*) ERRORS;
SELECT @@error_count;

SHOW ERRORS and error_count apply only to errors, not warnings or notes. SHOW ERRORSerror_count仅适用于错误,而不适用于警告或注释。In other respects, they are similar to SHOW WARNINGS and warning_count. 在其他方面,它们类似于SHOW WARNINGSwarning_countIn particular, SHOW ERRORS cannot display information for more than max_error_count messages, and error_count can exceed the value of max_error_count if the number of errors exceeds max_error_count.特别是,SHOW ERRORS不能显示超过max_error_count消息的信息,如果错误数超过max_eerror_count,则error_count可能超过max_error_count的值。

For more information, see Section 13.7.7.42, “SHOW WARNINGS Statement”.有关更多信息,请参阅第13.7.7.42节,“SHOW WARNINGS语句”