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

fixed bug of derived table in subselect

fixed bug in error handling
This commit is contained in:
bell@sanja.is.com.ua
2002-11-13 11:59:03 +02:00
parent e3d78f0bd4
commit d8f1d74fe5
6 changed files with 36 additions and 16 deletions

View File

@@ -1334,17 +1334,20 @@ mysql_execute_command(THD *thd)
*/
if (lex->derived_tables)
{
for (TABLE_LIST *cursor= tables;
cursor;
cursor= cursor->next)
if (cursor->derived && (res=mysql_derived(thd, lex,
(SELECT_LEX_UNIT *)cursor->derived,
cursor)))
{
if (res < 0)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0);
DBUG_VOID_RETURN;
}
for (SELECT_LEX *sl= &lex->select_lex; sl; sl= sl->next_select_in_list())
if (sl->linkage != DERIVED_TABLE_TYPE)
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,
cursor)))
{
if (res < 0)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0);
DBUG_VOID_RETURN;
}
}
if ((lex->select_lex.next_select_in_list() &&
lex->unit.create_total_list(thd, lex, &tables)) ||