Commit be4cfe50 authored by unknown's avatar unknown

After-merge fixup.

  - THD::tmp_table_used removed, THD::thread_specific_used used instead.

parent d4ba395a
......@@ -2861,6 +2861,7 @@ Item*
Create_func_connection_id::create(THD *thd)
{
thd->lex->safe_to_cache_query= 0;
thd->thread_specific_used= TRUE;
return new (thd->mem_root) Item_func_connection_id();
}
......
......@@ -1479,8 +1479,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
ulong query_length, bool using_trans,
bool suppress_use, THD::killed_state killed_status_arg)
:Log_event(thd_arg,
((thd_arg->tmp_table_used || thd_arg->thread_specific_used) ?
LOG_EVENT_THREAD_SPECIFIC_F : 0) |
(thd_arg->thread_specific_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0) |
(suppress_use ? LOG_EVENT_SUPPRESS_USE_F : 0),
using_trans),
data_buf(0), query(query_arg), catalog(thd_arg->catalog),
......@@ -2914,8 +2913,7 @@ Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex,
enum enum_duplicates handle_dup,
bool ignore, bool using_trans)
:Log_event(thd_arg,
(thd_arg->tmp_table_used || thd_arg->thread_specific_used) ?
LOG_EVENT_THREAD_SPECIFIC_F : 0,
thd_arg->thread_specific_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0,
using_trans),
thread_id(thd_arg->thread_id),
slave_proxy_id(thd_arg->variables.pseudo_thread_id),
......
......@@ -2277,7 +2277,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
}
table->query_id= thd->query_id;
table->clear_query_id= 1;
thd->tmp_table_used= 1;
thd->thread_specific_used= TRUE;
DBUG_PRINT("info",("Using temporary table"));
goto reset;
}
......
......@@ -394,7 +394,7 @@ THD::THD()
count_cuted_fields= CHECK_FIELD_IGNORE;
killed= NOT_KILLED;
db_length= col_access=0;
query_error= tmp_table_used= thread_specific_used= 0;
query_error= thread_specific_used= FALSE;
hash_clear(&handler_tables_hash);
tmp_table=0;
used_tables=0;
......
......@@ -1405,7 +1405,6 @@ class THD :public Statement,
bool substitute_null_with_insert_id;
bool in_lock_tables;
bool query_error, bootstrap, cleanup_done;
bool tmp_table_used;
/** is set if some thread specific value(s) used in a statement. */
bool thread_specific_used;
......
......@@ -5150,7 +5150,7 @@ void mysql_reset_thd_for_next_command(THD *thd)
thd->no_trans_update.all= FALSE;
}
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)
......
......@@ -1656,7 +1656,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
on the table name.
*/
pthread_mutex_unlock(&LOCK_open);
thd->tmp_table_used= tmp_table_deleted;
thd->thread_specific_used|= tmp_table_deleted;
error= 0;
if (wrong_tables.length())
{
......@@ -3408,7 +3408,7 @@ bool mysql_create_table_no_lock(THD *thd,
(void) rm_temporary_table(create_info->db_type, path);
goto unlock_and_end;
}
thd->tmp_table_used= 1;
thd->thread_specific_used= TRUE;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment