mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.0' into 10.1
This commit is contained in:
@ -691,12 +691,6 @@ extern "C"
|
||||
@param buffer pointer to preferred result buffer
|
||||
@param length length of buffer
|
||||
@param max_query_len how many chars of query to copy (0 for all)
|
||||
|
||||
@req LOCK_thread_count
|
||||
|
||||
@note LOCK_thread_count mutex is not necessary when the function is invoked on
|
||||
the currently running thread (current_thd) or if the caller in some other
|
||||
way guarantees that access to thd->query is serialized.
|
||||
|
||||
@return Pointer to string
|
||||
*/
|
||||
@ -710,6 +704,9 @@ char *thd_get_error_context_description(THD *thd, char *buffer,
|
||||
const Security_context *sctx= &thd->main_security_ctx;
|
||||
char header[256];
|
||||
int len;
|
||||
|
||||
mysql_mutex_lock(&LOCK_thread_count);
|
||||
|
||||
/*
|
||||
The pointers thd->query and thd->proc_info might change since they are
|
||||
being modified concurrently. This is acceptable for proc_info since its
|
||||
@ -765,6 +762,7 @@ char *thd_get_error_context_description(THD *thd, char *buffer,
|
||||
}
|
||||
mysql_mutex_unlock(&thd->LOCK_thd_data);
|
||||
}
|
||||
mysql_mutex_unlock(&LOCK_thread_count);
|
||||
|
||||
if (str.c_ptr_safe() == buffer)
|
||||
return buffer;
|
||||
|
Reference in New Issue
Block a user