diff options
author | kostja@vajra.(none) <> | 2007-05-16 15:35:18 +0400 |
---|---|---|
committer | kostja@vajra.(none) <> | 2007-05-16 15:35:18 +0400 |
commit | 37843864da1a67c737c3a0f1fd8219c5b52b851f (patch) | |
tree | 084c6a6a16209ddc42119d2e6e4168aaa827c406 /sql/event_data_objects.cc | |
parent | 1683d65a4b5dba9fe267696a0f1c8d6506c545bf (diff) | |
download | mariadb-git-37843864da1a67c737c3a0f1fd8219c5b52b851f.tar.gz |
Make a stab at events_bugs.test failure under valgrind (no
open bug report, reproduced in the runtime team tree).
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r-- | sql/event_data_objects.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 4b788a8f7d8..41f2f89db24 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1913,6 +1913,11 @@ Event_job_data::execute(THD *thd, bool drop) thd->variables.sql_mode= sql_mode; thd->variables.time_zone= time_zone; + /* + Peculiar initialization order is a clutch to avoid races in SHOW + PROCESSLIST which reads thd->{query/query_length} without a mutex. + */ + thd->query_length= 0; thd->query= sp_sql.c_ptr_safe(); thd->query_length= sp_sql.length(); @@ -1968,6 +1973,11 @@ end: ret= 1; else { + /* + Peculiar initialization order is a clutch to avoid races in SHOW + PROCESSLIST which reads thd->{query/query_length} without a mutex. + */ + thd->query_length= 0; thd->query= sp_sql.c_ptr_safe(); thd->query_length= sp_sql.length(); if (Events::drop_event(thd, dbname, name, FALSE)) |