summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-01-29 14:45:24 +0200
committerGeorgi Kodinov <joro@sun.com>2009-01-29 14:45:24 +0200
commitb367d2fd1f081ddf3d6f678b76b45fafd128b03f (patch)
treeb9c027c3654ffa1026dfb19f3e7f8eb07ba423b7 /sql
parent334e249f914359864996adaf54508ed7b40971e2 (diff)
parent37e88536e36bfd1145ef62e71a246d895dbafae3 (diff)
downloadmariadb-git-b367d2fd1f081ddf3d6f678b76b45fafd128b03f.tar.gz
merged 35396 to 5.0-bugteam
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 91c5cacc4d0..1d3632fd468 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2333,8 +2333,9 @@ void log_slow_statement(THD *thd)
{
thd->proc_info="logging slow query";
- if ((ulong) (thd->start_time - thd->time_after_lock) >
- thd->variables.long_query_time ||
+ if ((thd->start_time > thd->time_after_lock &&
+ (ulong) (thd->start_time - thd->time_after_lock) >
+ thd->variables.long_query_time) ||
(thd->server_status &
(SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) &&
opt_log_queries_not_using_indexes &&