summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-06-13 20:19:32 +0200
committerSergei Golubchik <sergii@pisem.net>2013-06-13 20:19:32 +0200
commit85a8de31b1105f3b42eb7f67106850425894b26a (patch)
tree65a8bde57416aa990134061ae86461fe203700ef /sql/sql_parse.cc
parent1fb33e4a67918009e015967a41da6dbd65760ffa (diff)
downloadmariadb-git-85a8de31b1105f3b42eb7f67106850425894b26a.tar.gz
MDEV-4578 information_schema.processlist reports incorrect value for Time (2147483647)
SHOW PROCESSLIST might see a thread that started executing a query *after* processlist has started. Don't show a negative or huge wrapped-around query execution time.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 05957197817..57969b60858 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -914,6 +914,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->enable_slow_log= TRUE;
thd->query_plan_flags= QPLAN_INIT;
thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
+
+ DEBUG_SYNC(thd,"dispatch_command_before_set_time");
+
thd->set_time();
thd->set_query_id(get_query_id());
if (!(server_command_flags[command] & CF_SKIP_QUERY_ID))