[MDEV-11852] Add a SHOW WARNINGS SUMMARY function. Created: 2017-01-20  Updated: 2018-06-20

Status: Open
Project: MariaDB Server
Component/s: Server
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Jean-François Gagné Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 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.html

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 (MDEV-11834), "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



 Comments   
Comment by Jean-François Gagné [ 2017-01-20 ]

Upstream Bug#84578.
http://bugs.mysql.com/bug.php?id=84578

Comment by Jean-François Gagné [ 2017-01-23 ]

It looks like upstream is going P_S for that, maybe it makes sense to do the same ([1]).

[1]: http://mysqlserverteam.com/mysql-8-0-performance-schema-instrumentation-of-server-errors/

Comment by Claudio Nanni [ 2017-06-12 ]

I'd like to add an idea for the implementation of this feature.
A table in the information_schema(or performance_schema?) with all warnings since last startup could be a handy implementation, the table could be:

ID TIMESTAMP COMMAND WARNING

It would allow easy querying, search, statistics etc

Generated at Thu Feb 08 07:53:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.