summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2004-12-08 16:28:25 +0100
committerunknown <ingo@mysql.com>2004-12-08 16:28:25 +0100
commit5baec239f58ff56644b64b6e5acbf5a80e2ad769 (patch)
tree820d956b3caa7f2cac3937b803c015eee05efd00
parent1b965522c45c71848b7aa4ae82d0d8902d4b908d (diff)
downloadmariadb-git-5baec239f58ff56644b64b6e5acbf5a80e2ad769.tar.gz
A fix for a crash in sp.test with -debug-max.
When the joins were not cleaned up before the tables were closed, a JOIN_TAB still held a pointer to a meanwhile closed table and tried to close it again during item cleanup...
-rw-r--r--sql/sp_head.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 114ff0d451a..31c6075b590 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -681,6 +681,8 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
nctx->set_oindex(i, static_cast<Item_splocal *>(it)->get_offset());
}
}
+ // Clean up the joins before closing the tables.
+ thd->lex->unit.cleanup();
// Close tables opened for subselect in argument list
close_thread_tables(thd);