summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_base.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6e0472cd149..213cd9f74dd 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1530,12 +1530,13 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
ha_open_options,
tmp_table))
{
+ my_free((gptr) tmp_table,MYF(0));
DBUG_RETURN(0);
}
tmp_table->file->extra(HA_EXTRA_NO_READCHECK); // Not needed in SQL
tmp_table->reginfo.lock_type=TL_WRITE; // Simulate locked
- tmp_table->tmp_table = (tmp_table->file->has_transactions() ?
+ tmp_table->tmp_table = (tmp_table->file->has_transactions() ?
TRANSACTIONAL_TMP_TABLE : TMP_TABLE);
tmp_table->table_cache_key=(char*) (tmp_table+1);
tmp_table->key_length= (uint) (strmov((tmp_table->real_name=