Syntax:
SHOW WARNINGS [LIMIT [offset,] row_count]
SHOW COUNT(*) WARNINGS

SHOW WARNINGS shows the error, warning, and note messages that resulted
from the last statement that generated messages in the current session.
It shows nothing if the last statement used a table and generated no
messages. (That is, a statement that uses a table but generates no
messages clears the message list.) Statements that do not use tables
and do not generate messages have no effect on the message list.

Warnings are generated for DML statements such as INSERT, UPDATE, and
LOAD DATA INFILE as well as DDL statements such as CREATE TABLE and
ALTER TABLE.

A related statement, SHOW ERRORS, shows only the errors. See [HELP SHOW
ERRORS].

The SHOW COUNT(*) WARNINGS statement displays the total number of
errors, warnings, and notes. You can also retrieve this number from the
warning_count variable:

SHOW COUNT(*) WARNINGS;
SELECT @@warning_count;

The value of warning_count might be greater than the number of messages
displayed by SHOW WARNINGS if the max_error_count system variable is
set so low that not all messages are stored. An example shown later in
this section demonstrates how this can happen.

The LIMIT clause has the same syntax as for the SELECT statement. See
http://dev.mysql.com/doc/refman/5.1/en/select.html.

URL: http://dev.mysql.com/doc/refman/5.1/en/show-warnings.html

