Perhaps the sql_notes variable will help you in solving this problem. Quote from manpage:
The sql_notes system variable manages note messages increment warning_count and whether the server saves them. From default, sql_notes is 1, but if set to 0, the notes do not increase warning_count and the server does not save them:
mysql> SET sql_notes = 1; mysql> DROP TABLE IF EXISTS test.no_such_table; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SHOW WARNINGS; +-------+------+------------------------------------+ | Level | Code | Message | +-------+------+------------------------------------+ | Note | 1051 | Unknown table 'test.no_such_table' | +-------+------+------------------------------------+ 1 row in set (0.00 sec) mysql> SET sql_notes = 0; mysql> DROP TABLE IF EXISTS test.no_such_table; Query OK, 0 rows affected (0.00 sec) mysql> SHOW WARNINGS; Empty set (0.00 sec)
Olli Dec 23 '14 at 8:28 2014-12-23 08:28
source share