Bug #90571 Don't generate warnings about successful actions (dragnet filter rules)
Submitted: 23 Apr 2018 12:11 Modified: 12 Jun 2018 17:36
Reporter: Simon Mudd (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[23 Apr 2018 12:11] Simon Mudd
Description:
I created this setup in 8.0.11 due to some noisy logging:

2018-04-23T12:04:54.429688Z 11233 [Note] [MY-010927] [Server] Access denied for user 'some-user'@'some-host'. Account is locked.
2018-04-23T12:04:56.533306Z 11234 [Note] [MY-010927] [Server] Access denied for user 'some-user'@'some-host'. Account is locked.

[ This user is used to determine if access to the server from application is allowed so the situation can be quite normal and we don't care about it. ]

I configured 8.0.11 to fix (ignore) this:

root@myhost [(none)]> INSTALL COMPONENT 'file://component_log_filter_dragnet';
Query OK, 0 rows affected (0.00 sec)

root@myhost [(none)]> SET GLOBAL log_error_services = 'log_filter_dragnet; log_sink_internal';
Query OK, 0 rows affected (0.00 sec)

root@myhost [(none)]> SET GLOBAL dragnet.log_error_filter_rules = 'IF err_code == 10927 then drop.';
Query OK, 0 rows affected, 1 warning (0.00 sec)

root@myhost [(none)]> show warnings;
+-------+------+-------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                     |
+-------+------+-------------------------------------------------------------------------------------------------------------+
| Note  | 3703 | filter configuration accepted: SET @@global.dragnet.log_error_filter_rules='IF err_code==10927 THEN drop.'; |
+-------+------+-------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

A warning should be given about something that is wrong or did not go as expected.
So why create a warning here when the statement was accepted?

How to repeat:
see above.

Suggested fix:
Remove the warning as the statement was accepted. I want to get warnings when things are not as expected.
[23 Apr 2018 13:57] MySQL Verification Team
Thank you for the bug report. Verified as described.
[12 Jun 2018 17:36] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

Previously, successful assignments to the
dragnet.log_error_filter_rules system variable resulted in a Note and
a nonzero warning count. To avoid generating a diagnostic for a
successful operation, this Note is no longer generated. Instead, the
dragnet.Status status variable can be consulted to determine the
result of the most recent assignment to
dragnet.log_error_filter_rules.