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.
This commit is contained in:
unknown 2007-06-15 12:40:30 +04:00
parent a4714bae7d
commit 7ad570210d

View File

@ -1900,6 +1900,9 @@ end:
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));