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

prevent using expernal fields in derived tables

This commit is contained in:
bell@sanja.is.com.ua
2002-11-11 10:49:41 +02:00
parent 46a74ce73b
commit 063ffd2d67
4 changed files with 29 additions and 10 deletions

View File

@ -94,13 +94,17 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
unit->select_limit_cnt= HA_POS_ERROR;
if (unit->select_limit_cnt == HA_POS_ERROR)
sl->options&= ~OPTION_FOUND_ROWS;
SELECT_LEX_NODE *save_current_select= lex->current_select;
lex->current_select= sl;
res= mysql_select(thd, tables, sl->item_list,
sl->where, (ORDER *) sl->order_list.first,
(ORDER*) sl->group_list.first,
sl->having, (ORDER*) NULL,
sl->options | thd->options | SELECT_NO_UNLOCK,
derived_result, unit, sl, 0);
lex->current_select= save_current_select;
if (!res)
{
// Here we entirely fix both TABLE_LIST and list of SELECT's as there were no derived tables