1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fixed cleanup bug

mysql-test/r/subselect.result:
  test of cleanup bug
mysql-test/t/subselect.test:
  test of cleanup bug
sql/sql_select.cc:
  fixed cleanup
This commit is contained in:
unknown
2003-03-10 22:25:52 +02:00
parent 395714aa45
commit fc5832de08
3 changed files with 92 additions and 1 deletions

View File

@ -1263,7 +1263,20 @@ JOIN::cleanup(THD *thd)
select_lex->join= 0;
if (tmp_join)
memcpy(this, tmp_join, sizeof(tmp_join));
{
if (join_tab != tmp_join->join_tab)
{
JOIN_TAB *tab, *end;
for (tab= join_tab, end= tab+tables ; tab != end ; tab++)
{
delete tab->select;
delete tab->quick;
x_free(tab->cache.buff);
}
}
tmp_join->tmp_join= 0;
return tmp_join->cleanup(thd);
}
lock=0; // It's faster to unlock later