1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Fixed that derived tables are properly droped

mysys/my_init.c:
  Move my_once_free() up to not get warnings for this from safemalloc.
sql/item_row.cc:
  Removed compiler warnings
sql/sql_select.cc:
  split fix_tables_pointer() into two functions to be able to reuse code
sql/sql_select.h:
  split fix_tables_pointer() into two functions to be able to reuse code
This commit is contained in:
unknown
2003-01-07 11:45:06 +02:00
parent ef62b4c948
commit 64dc734dee
10 changed files with 117 additions and 66 deletions

View File

@@ -1390,7 +1390,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
send_error(thd, ER_UNKNOWN_COM_ERROR);
break;
}
if (thd->lock || thd->open_tables)
if (thd->lock || thd->open_tables || thd->derived_tables)
{
thd->proc_info="closing tables";
close_thread_tables(thd); /* Free tables */
@@ -1534,9 +1534,11 @@ mysql_execute_command(THD *thd)
for (SELECT_LEX *sl= lex->all_selects_list;
sl;
sl= sl->next_select_in_list())
{
for (TABLE_LIST *cursor= sl->get_table_list();
cursor;
cursor= cursor->next)
{
if (cursor->derived && (res=mysql_derived(thd, lex,
(SELECT_LEX_UNIT *)
cursor->derived,
@@ -1546,6 +1548,8 @@ mysql_execute_command(THD *thd)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0);
DBUG_VOID_RETURN;
}
}
}
}
if ((&lex->select_lex != lex->all_selects_list &&
lex->unit.create_total_list(thd, lex, &tables)) ||