Bug #84578 Add a SHOW WARNINGS SUMMARY function.
Submitted: 20 Jan 9:53 Modified: 21 Jan 8:00
Reporter: Jean-François Gagné Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.6 and 5.7 OS:Any
Assigned to:
Triage: Needs Triage: D5 (Feature request)

[20 Jan 9:53] Jean-François Gagné
Description:
Hi,

in [1], I presented an example of a statement that produce 50 million and twelve (50,000,012) warnings.  All those cannot be reported by SHOW WARNINSG as the maximum value of max_error_count is 64K (as a side note, I agree that it does not make sense to buffer that many warnings).  However, losing all information about those warnings is bad.  A way to keep some information about those would be useful.  This is the object of this feature request.

[1]: http://jfg-mysql.blogspot.com/2017/01/upgrading-mariadb-failed-because-ignoring-warnings.h...

I suggest adding a "SHOW WARNINGS SUMMARY" statement.  This would return a list of warning code, with their occurrence count, and with the associated generic warning message.

In the case of [1], the output of "SHOW WARNINGS SUMMARY" could be something like:

+---------+------+----------+--------------------------------------------------+
| Level   | Code | Count    | Message                                          |
+---------+------+----------+--------------------------------------------------+
| Warning | 1366 | 50000000 | Incorrect integer value: ? for column ? at row ? |
| Warning | ...  |        1 | ...                                              |
| Warning | ...  |      ... | ...                                              |
+---------+------+----------+--------------------------------------------------+

As of another feature request (Bug#84557), "SHOW WARNINGS SUMMARY" should not report warnings that have been "hidden".  So a "SHOW ALL WARNINGS SUMMARY" could also be implemented to allow to show the hidden warnings.

Many thanks,

JFG

How to repeat:
See description.

Suggested fix:
See description.
[21 Jan 8:00] Umesh Shastry
Hello Jean-François,

Thank you for the feature request!

Thanks,
Umesh