mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 11:45:32 +02:00
A fix for a bug with derived tables within subselect
within derived tables within ......
This commit is contained in:
parent
a14db06bfc
commit
ae729f9315
3 changed files with 16 additions and 8 deletions
|
|
@ -50,15 +50,19 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
|
|||
if (res)
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
for (TABLE_LIST *cursor= (TABLE_LIST *)tables;
|
||||
cursor;
|
||||
cursor=cursor->next)
|
||||
for (SELECT_LEX *ssl= sl; ssl; ssl= ssl->next_select_in_list())
|
||||
{
|
||||
if (cursor->derived)
|
||||
TABLE_LIST *t_tables= (TABLE_LIST *)ssl->table_list.first;
|
||||
for (TABLE_LIST *cursor= (TABLE_LIST *)t_tables;
|
||||
cursor;
|
||||
cursor=cursor->next)
|
||||
{
|
||||
res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived,
|
||||
cursor);
|
||||
if (res) DBUG_RETURN(res);
|
||||
if (cursor->derived)
|
||||
{
|
||||
res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived,
|
||||
cursor);
|
||||
if (res) DBUG_RETURN(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
Item *item;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue