Below is the list of changes that have just been committed into a local
4.1 repository of elkin. When elkin does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-07-10 00:26:26+03:00, aelkin@stripped
+1 -0
BUG#20919 temp tables closing fails when binlog is off
closing temp tables through end_thread
had a flaw in binlog-off branch of close_temporary_tables where
next table to close was reset via table->next
for (table= thd->temporary_tables; table; table= table->next)
which was wrong since the current table instance got destoyed at
close_temporary(table, 1);
The fix adapts binlog-on branch method to engage the loop's internal 'next' variable
which holds table->next prior table's destoying.
sql/sql_base.cc@stripped, 2006-07-10 00:26:24+03:00,
aelkin@stripped +5 -3
no-binlog branch is fixed: scanning across temporary_tables must be careful to save
next table since the current is being destroyed inside of close_temporary.
binlog-is-open case is ok.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: aelkin
# Host: dsl-hkigw8-feb1fb00-100.dhcp.inet.fi
# Root: /usr_rh9/home/elkin.rh9/MySQL/TEAM/FIXES/4.1/20919_temp_nlog
--- 1.271/sql/sql_base.cc 2006-07-10 00:26:30 +03:00
+++ 1.272/sql/sql_base.cc 2006-07-10 00:26:30 +03:00
@@ -496,11 +496,13 @@
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 @@
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
| Thread |
|---|
| • bk commit into 4.1 tree (aelkin:1.2513) BUG#20919 | Andrei Elkin | 9 Jul |