diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 5 | ||||
-rw-r--r-- | sql/sql_connect.cc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d5336f5dd9c..b4ea09597a8 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4355,6 +4355,11 @@ static void create_new_thread(THD *thd) DBUG_VOID_RETURN; } pthread_mutex_lock(&LOCK_thread_count); + /* + The initialization of thread_id is done in create_embedded_thd() for + the embedded library. + TODO: refactor this to avoid code duplication there + */ thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; /* Start a new thread to handle connection */ diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 03b9908c1ad..6bb0f62d843 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1008,6 +1008,11 @@ void prepare_new_connection_state(THD* thd) if (thd->client_capabilities & CLIENT_COMPRESS) thd->net.compress=1; // Use compression + /* + Much of this is duplicated in create_embedded_thd() for the + embedded server library. + TODO: refactor this to avoid code duplication there + */ thd->version= refresh_version; thd->proc_info= 0; thd->command= COM_SLEEP; |