diff options
author | unknown <mkindahl@dl145k.mysql.com> | 2006-07-12 10:04:40 +0200 |
---|---|---|
committer | unknown <mkindahl@dl145k.mysql.com> | 2006-07-12 10:04:40 +0200 |
commit | 10b13a8eebff41bf70d2e4cd0e91223a6c9a8608 (patch) | |
tree | d2203617fdb2508f19e7dc0d8173ac38bad8863a | |
parent | d6982f18e62a34acf6ea54d7ddd59bc6629c0322 (diff) | |
parent | 259ab34263357bcb752f90aa8515a868ac296f4a (diff) | |
download | mariadb-git-10b13a8eebff41bf70d2e4cd0e91223a6c9a8608.tar.gz |
Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-4.1
into dl145k.mysql.com:/data0/mkindahl/bk/mysql-4.1-rpl
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 98e4346eafc..0a9529d6067 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -496,11 +496,13 @@ void close_temporary_tables(THD *thd) TABLE *table; if (!thd->temporary_tables) return; - + if (!mysql_bin_log.is_open()) { - for (table= thd->temporary_tables; table; table= table->next) + TABLE *next; + for (table= thd->temporary_tables; table; table= next) { + next= table->next; close_temporary(table, 1); } thd->temporary_tables= 0; @@ -518,7 +520,7 @@ void close_temporary_tables(THD *thd) String s_query= String(buf, sizeof(buf), system_charset_info); bool found_user_tables= false; LINT_INIT(next); - + /* insertion sort of temp tables by pseudo_thread_id to build ordered list of sublists of equal pseudo_thread_id |