summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore2
-rw-r--r--sql/sql_table.cc8
2 files changed, 9 insertions, 1 deletions
diff --git a/.bzrignore b/.bzrignore
index 4a707ae05df..5b35d1f6611 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -331,3 +331,5 @@ bdb/dist/autom4te.cache/traces.0
innobase/autom4te.cache/output.0
innobase/autom4te.cache/requests
innobase/autom4te.cache/traces.0
+innobase/stamp-h1
+stamp-h1
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0a09b6232e8..ec866b927e6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1528,8 +1528,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
/* We changed a temporary table */
if (error)
{
+ /*
+ * The following function call will also free a
+ * new_table pointer.
+ * Therefore, here new_table pointer is not free'd as it is
+ * free'd in close_temporary() which is called by by the
+ * close_temporary_table() function.
+ */
close_temporary_table(thd,new_db,tmp_name);
- my_free((gptr) new_table,MYF(0));
goto err;
}
/* Close lock if this is a transactional table */