mirror of
https://github.com/MariaDB/server.git
synced 2025-11-24 06:01:25 +03:00
Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored
Problem: logging queries not using indexes we check a special flag which is set only at the server startup and is not changing with a corresponding server variable together. Fix: check the variable value instead of the flag. mysql-test/r/show_check.result: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - test result. mysql-test/t/show_check.test: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - test case. sql/mysqld.cc: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - SPECIAL_LOG_QUERIES_NOT_USING_INDEXES is not used anymore. sql/sql_parse.cc: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - check opt_log_queries_not_using_indexes instead of SPECIAL_LOG_QUERIES_NOT_USING_INDEXES flag. sql/unireg.h: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - SPECIAL_LOG_QUERIES_NOT_USING_INDEXES is not used anymore.
This commit is contained in:
@@ -1088,4 +1088,34 @@ DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP FUNCTION f1;
|
||||
flush status;
|
||||
show variables like "log_queries_not_using_indexes";
|
||||
Variable_name Value
|
||||
log_queries_not_using_indexes ON
|
||||
select 1 from information_schema.tables limit 1;
|
||||
1
|
||||
1
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 1
|
||||
set global log_queries_not_using_indexes=OFF;
|
||||
show variables like "log_queries_not_using_indexes";
|
||||
Variable_name Value
|
||||
log_queries_not_using_indexes OFF
|
||||
select 1 from information_schema.tables limit 1;
|
||||
1
|
||||
1
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 1
|
||||
set global log_queries_not_using_indexes=ON;
|
||||
show variables like "log_queries_not_using_indexes";
|
||||
Variable_name Value
|
||||
log_queries_not_using_indexes ON
|
||||
select 1 from information_schema.tables limit 1;
|
||||
1
|
||||
1
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 2
|
||||
End of 5.0 tests
|
||||
|
||||
Reference in New Issue
Block a user