Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
5.5.33
-
None
-
None
Description
static void emb_free_embedded_thd(MYSQL *mysql)
{
THD thd= (THD)mysql->thd;
thd->clear_data_list();
thread_count--;
thd->store_globals();
thd->unlink();
delete thd;
my_pthread_setspecific_ptr(THR_THD, 0);
mysql->thd=0;
}
thread_count is global but it is modified without protection. In a multi-core env this will lead to lost updates or at least, race conditions.