diff options
author | Luis Soares <luis.soares@sun.com> | 2010-03-08 23:57:26 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2010-03-08 23:57:26 +0000 |
commit | 888a354bb897d7dc1d30d48e6beefb5dc7b8cfea (patch) | |
tree | 1a5be5b9fe22e7839203ca8cd96e9fa5fba347a9 /sql/sql_base.cc | |
parent | 0e2cc47c0c0665735d7b5f18b59261c0921c1309 (diff) | |
parent | 24f7afe7bcb1befec02f7c6efe884229bda3ff39 (diff) | |
download | mariadb-git-888a354bb897d7dc1d30d48e6beefb5dc7b8cfea.tar.gz |
Automerge BUG 51226 bzr bundle from bug report --> myqsl-5.1-bugteam.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f75a73c15a8..0e70eb93725 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1515,6 +1515,7 @@ void close_temporary_tables(THD *thd) { if (is_user_table(table)) { + bool save_thread_specific_used= thd->thread_specific_used; my_thread_id save_pseudo_thread_id= thd->variables.pseudo_thread_id; /* Set pseudo_thread_id to be that of the processed table */ thd->variables.pseudo_thread_id= tmpkeyval(thd, table); @@ -1544,6 +1545,7 @@ void close_temporary_tables(THD *thd) thd->clear_error(); CHARSET_INFO *cs_save= thd->variables.character_set_client; thd->variables.character_set_client= system_charset_info; + thd->thread_specific_used= TRUE; Query_log_event qinfo(thd, s_query.ptr(), s_query.length() - 1 /* to remove trailing ',' */, 0, FALSE, 0); @@ -1556,6 +1558,7 @@ void close_temporary_tables(THD *thd) "Failed to write the DROP statement for temporary tables to binary log"); } thd->variables.pseudo_thread_id= save_pseudo_thread_id; + thd->thread_specific_used= save_thread_specific_used; } else { |