5

Is there a way to make the mysql error log less chatty with certain warnings? I just threw in the replicate-ignore-table option in my.cnf so our health check table doesn't get replicated. However now I'm getting a couple warnings every minute telling me something that I specifically want to happen... and it's annoying, not to mention that the log will grow at a much faster rate now.

I thought adding slave-skip-errors=1237 would fix it, but it's not an actual error that's stopping replication.

Any ideas?

2015-07-16 21:51:02 31210 [Warning] Error log throttle: 4 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:51:02 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:53:01 31210 [Warning] Error log throttle: 3 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:53:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:54:01 31210 [Warning] Error log throttle: 2 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:54:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:55:01 31210 [Warning] Error log throttle: 3 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:55:01 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237
2015-07-16 21:56:02 31210 [Warning] Error log throttle: 2 time(s) Error_code: 1237 "Slave SQL thread ignored the query because of replicate-*-table rules" got suppressed.
2015-07-16 21:56:02 31210 [Warning] Slave SQL: Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237    

2 Answers 2

4

Maybe a bit late, but since mysql v 8.0.13 there is a new parameter: log_error_suppression_list: https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_log_error_suppression_list

You could use SET @@GLOBAL.log_error_suppression_list = "1237"; ... a comma separated list of error codes to suppress when writing to the error-log.

This variable was newly introduced and works in combination with the more general log_warnings which is mentioned above and also works for older mysql servers.

1

You can:

Set global log_warnings=0;
7
  • This will stop the warnings to the err log hence the answer . What user asked but that will affect other warnings too... hence wanted if user us OK to use it.
    – mysql_user
    Commented Jul 17, 2015 at 8:55
  • You should add some flesh to your answer - like what you've stated in your comment. Commented Jul 17, 2015 at 9:29
  • Kind of, yes. But I don't want to globally turn off logging. I just want to suppress that one warning so it doesn't continually spam the error log.
    – awdboxer
    Commented Jul 17, 2015 at 14:13
  • Did you see this bug report or rather a feature request? --> bugs.mysql.com/bug.php?id=73292
    – mysql_user
    Commented Jul 18, 2015 at 5:13
  • 1
    I doubt you have any other option than that... as such you might want to get fency by letting the health_check table replicate and making it blackhole... should that be ok for you?
    – mysql_user
    Commented Jul 18, 2015 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.