[MDEV-724] LP:695918 - Wrong recommendation for parameter slow_query_log in warning during startup Created: 2010-12-31  Updated: 2014-03-03  Resolved: 2014-03-03

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: shinguz (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: Launchpad, upstream

Attachments: XML File LPexportBug695918.xml     File LPexportBug695918_patch_1.diff    

 Description   

When I start the database with

slow_query_log = 0

I get the following warning:

101231  8:15:06 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set

This is a wrong recommendation. log_slow_queries is deprecated slow_query_log should be used instead in the error message.

sql/mysqld.cc
   9244   if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes ||
   9245        opt_log_slow_slave_statements) &&
   9246       !opt_slow_log)
   9247     sql_print_warning("options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set");

What further comes into my mind in this relation is if it makes sense at all to print this warning if I have explicitly mentioned slow_query_log = 0. Because then I have expressed my wish to disable the slow query log and should not be warned about.
Can we distinguish between "set to zero" and "not set at all" in the opt_slow_log variable? Then we could make the if in line 9244 a bit more sophisticated.
For example: ... && (opt_slow_log == NULL)



 Comments   
Comment by shinguz (Inactive) [ 2010-12-31 ]

Re: Wrong recommendation for parameter slow_query_log in warning during startup

Comment by shinguz (Inactive) [ 2010-12-31 ]

Fix for this bug report
LPexportBug695918_patch_1.diff

Comment by Rasmus Johansson (Inactive) [ 2011-06-28 ]

Launchpad bug id: 695918

Comment by Walter Heck (Inactive) [ 2011-06-28 ]

Re: Wrong recommendation for parameter slow_query_log in warning during startup
These warnings are very confusing.
When using log_slow_queries, I get the following message:

<pre>110526 11:37:49 [Warning] The syntax '-log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use 'slow_query_log'/'-log-slow-file' instead.</pre>

But if I follow that recommendation and change to slow_query_log, I get this warning. Not sure which combination is best/correct

<pre>110628 10:50:26 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set</pre>

Comment by Elena Stepanova [ 2013-03-27 ]

The upstream bug was fixed in 5.6 and 5.7 only

Generated at Thu Feb 08 06:30:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.