summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-07-13 13:10:59 -0400
committerunknown <cmiller@zippy.(none)>2006-07-13 13:10:59 -0400
commitf098cab93eb14cd470bcc229387c635077d38107 (patch)
tree27007df8844eccbf24ee83b291017873c25c4b22
parenta69bd72d4deb562e1ec86da45e29174e0d13a60a (diff)
parent10b13a8eebff41bf70d2e4cd0e91223a6c9a8608 (diff)
downloadmariadb-git-f098cab93eb14cd470bcc229387c635077d38107.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into zippy.(none):/home/cmiller/work/mysql/m41-maint--07AB5
-rw-r--r--sql/item_func.h5
-rw-r--r--sql/sql_base.cc8
2 files changed, 9 insertions, 4 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 51f9d3fb36f..f4a1258a02c 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -138,7 +138,10 @@ public:
{
return (null_value=args[0]->get_time(ltime));
}
- bool is_null() { (void) val_int(); return null_value; }
+ bool is_null() {
+ (void) val_int(); /* Discard result. It sets null_value as side-effect. */
+ return null_value;
+ }
friend class udf_handler;
Field *tmp_table_field() { return result_field; }
Field *tmp_table_field(TABLE *t_arg);
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