summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 5035064b8e0..1156d85bf83 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -664,7 +664,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
void *create_embedded_thd(int client_flag)
{
THD * thd= new THD;
- thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
+ thd->thread_id= thd->variables.pseudo_thread_id= next_thread_id();
thd->thread_stack= (char*) &thd;
if (thd->store_globals())