Bug #27681 log-queries-not-using-indexes runtime changes don't affect logging
Submitted: 6 Apr 2007 7:21 Modified: 21 Dec 2007 11:40
Reporter: Sveta Smirnova Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.0, 5.1, 5.2 OS:Linux
Assigned to: Davi Arnaut CPU Architecture:Any

[6 Apr 2007 7:21] Sveta Smirnova
log-queries-not-using-indexes listed as dynamic variable at http://dev.mysql.com/doc/refman/5.0/en/dynamic-system-variables.html, but runtime changes of its value don't affect logging.

How to repeat:
drop table if exists t1;

create table t1 (f1 int);

insert into t1 values(1), (2), (3);

show global variables like 'log_queries_not_using_indexes';

select * from t1;

--exec cat $MYSQLTEST_VARDIR/log/bug.log

set @@global.log_queries_not_using_indexes = 0;

connect (addconroot, localhost, root,,);
connection addconroot;

show global variables like 'log_queries_not_using_indexes';

select f1 from t1;

--exec cat $MYSQLTEST_VARDIR/log/bug.log

--log-slow-queries=$MYSQLTEST_VARDIR/log/bug.log --log-queries-not-using-indexes
[21 Dec 2007 11:40] Davi Arnaut
Seems to be fixed by the patch for Bug#28808. In the given example the queries are logged successfully -- 5.0-runtime.
[21 Dec 2007 12:15] Konstantin Osipov
Davi, please check if there is a test case for this bug, if not, please add.