summaryrefslogtreecommitdiff
path: root/sql/event_data_objects.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-06-15 12:40:30 +0400
committerunknown <kostja@bodhi.(none)>2007-06-15 12:40:30 +0400
commit7ad570210d4ad20201ea916c8114fd2abf8f8531 (patch)
tree6470e9d1c5987ab8dd4db5d8d4b6b706b8d1c554 /sql/event_data_objects.cc
parenta4714bae7d82e136871883ea55612c20437e4218 (diff)
downloadmariadb-git-7ad570210d4ad20201ea916c8114fd2abf8f8531.tar.gz
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.
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r--sql/event_data_objects.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index 757cf7f93fb..77dc33e6265 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -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));