summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2003-04-26 15:12:14 +0300
committerSinisa@sinisa.nasamreza.org <>2003-04-26 15:12:14 +0300
commit3ca1a152ebd5eaa0bf5c714404633444d69be5e4 (patch)
tree2b95575b4286f33a9be8c889def65f21ec7b0aea /sql/sql_union.cc
parentadb52cfc70b8624dfbf4d36fa966fc20b3b0452d (diff)
downloadmariadb-git-3ca1a152ebd5eaa0bf5c714404633444d69be5e4.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