mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -2207,7 +2207,7 @@ void log_slow_statement(THD *thd)
|
||||
thd->variables.long_query_time ||
|
||||
(thd->server_status &
|
||||
(SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) &&
|
||||
(specialflag & SPECIAL_LOG_QUERIES_NOT_USING_INDEXES) &&
|
||||
opt_log_queries_not_using_indexes &&
|
||||
/* == SQLCOM_END unless this is a SHOW command */
|
||||
thd->lex->orig_sql_command == SQLCOM_END)
|
||||
{
|
||||
|
Reference in New Issue
Block a user