diff options
-rw-r--r-- | sql/item_create.cc | 1 | ||||
-rw-r--r-- | sql/item_func.cc | 1 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 3713fc9e380..561613032bc 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -72,7 +72,6 @@ Item *create_func_connection_id(void) { THD *thd= current_thd; thd->lex->safe_to_cache_query= 0; - thd->thread_specific_used= TRUE; return new Item_func_connection_id(); } diff --git a/sql/item_func.cc b/sql/item_func.cc index 4b32281b457..c70cfa1ce2a 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -649,6 +649,7 @@ bool Item_func_connection_id::fix_fields(THD *thd, Item **ref) { if (Item_int_func::fix_fields(thd, ref)) return TRUE; + thd->thread_specific_used= TRUE; value= thd->variables.pseudo_thread_id; return FALSE; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7d723d3cd5b..25ead88ac53 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5847,6 +5847,7 @@ void mysql_reset_thd_for_next_command(THD *thd) SERVER_QUERY_NO_GOOD_INDEX_USED); DBUG_ASSERT(thd->security_ctx== &thd->main_security_ctx); thd->tmp_table_used= 0; + thd->thread_specific_used= FALSE; if (!thd->in_sub_stmt) { if (opt_bin_log) |