diff options
author | unknown <kostja@bodhi.(none)> | 2007-06-15 12:40:30 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-06-15 12:40:30 +0400 |
commit | 7ad570210d4ad20201ea916c8114fd2abf8f8531 (patch) | |
tree | 6470e9d1c5987ab8dd4db5d8d4b6b706b8d1c554 /sql/event_data_objects.cc | |
parent | a4714bae7d82e136871883ea55612c20437e4218 (diff) | |
download | mariadb-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.cc | 3 |
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)); |