Commit 7ad57021 authored by unknown's avatar unknown

Another attempt to fix the valgrind warning in SHOW PROCESSLIST

(event_bugs.test)


sql/event_data_objects.cc:
  SHOW PROCESSLIST tries to read thd->query without a mutex.
  If we do not reset it, it points to free()d contents of stack variable
  sp_sql.
parent a4714bae
......@@ -1900,6 +1900,9 @@ Event_job_data::execute(THD *thd, bool drop)
thd->lex->unit.cleanup();
thd->end_statement();
thd->cleanup_after_query();
/* Avoid races with SHOW PROCESSLIST */
thd->query_length= 0;
thd->query= NULL;
DBUG_PRINT("info", ("EXECUTED %s.%s ret: %d", dbname.str, name.str, ret));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment