summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-04-26 15:12:14 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-04-26 15:12:14 +0300
commit18a321adce6f07c62fae971bf022316cc649cfba (patch)
tree2b95575b4286f33a9be8c889def65f21ec7b0aea /sql/sql_union.cc
parent8078280c7664a385bccdf394f4927474ef738d98 (diff)
downloadmariadb-git-18a321adce6f07c62fae971bf022316cc649cfba.tar.gz
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM. This involved moving things around in include files. All tests, including the ones with Valgrind passed.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 48f536c68cf..fe4ca49da14 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -82,7 +82,7 @@ bool select_union::send_data(List<Item> &values)
if (thd->net.last_errno == ER_RECORD_FILE_FULL)
{
thd->clear_error(); // do not report user about table overflow
- if (create_myisam_from_heap(thd, table, tmp_table_param,
+ if (create_myisam_from_heap(thd, table, &tmp_table_param,
info.last_errno, 0))
return 1;
}
@@ -186,8 +186,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result,
goto err;
union_result->not_describe=1;
- if (!(union_result->tmp_table_param=(TMP_TABLE_PARAM *)thd->memdup((char *)&tmp_table_param, sizeof(TMP_TABLE_PARAM))))
- goto err;
+ union_result->tmp_table_param=tmp_table_param;
/*
The following piece of code is placed here solely for the purpose of