mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 04:05:32 +02:00
MDEV-5131 create_embedded_thd is not thread safe, libmysqld.
LOCK_thread_count locked when we do threads.append().
This commit is contained in:
parent
508d40fbdb
commit
e37639e934
1 changed files with 2 additions and 0 deletions
|
|
@ -683,8 +683,10 @@ void *create_embedded_thd(int client_flag)
|
|||
thd->data_tail= &thd->first_data;
|
||||
bzero((char*) &thd->net, sizeof(thd->net));
|
||||
|
||||
mysql_mutex_lock(&LOCK_thread_count);
|
||||
thread_count++;
|
||||
threads.append(thd);
|
||||
mysql_mutex_unlock(&LOCK_thread_count);
|
||||
thd->mysys_var= 0;
|
||||
return thd;
|
||||
err:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue