diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-12-16 09:49:16 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-12-16 09:49:16 +0100 |
commit | fdd269ad94943253fc59dcb7b34886292e10b447 (patch) | |
tree | b2d3e2437e6035344c65d7b33d31455bc8ebfb28 /sql/sql_class.cc | |
parent | 4bd3686f967daff6dd6b44aab86bdb5cc6048f16 (diff) | |
parent | b3d99069077cd24e1cf4bb07857fdb12aee895a0 (diff) | |
download | mariadb-git-fdd269ad94943253fc59dcb7b34886292e10b447.tar.gz |
Merge to latest mysql-next-mr
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index e48f2c42db0..ff573c67627 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -385,6 +385,8 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length, str.append(proc_info); } + pthread_mutex_lock(&thd->LOCK_thd_data); + if (thd->query()) { if (max_query_len < 1) @@ -394,6 +396,9 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length, str.append('\n'); str.append(thd->query(), len); } + + pthread_mutex_unlock(&thd->LOCK_thd_data); + if (str.c_ptr_safe() == buffer) return buffer; |