Fix of LP BUG#872775.

The problem was that merged views has its own nest_level numbering =>
when we compare nest levels we should take into considiration basis (i.e. 0 level),
if it is different then nest levels are not comparable.
This commit is contained in:
unknown 2011-11-01 17:42:52 +02:00
commit b40bc2b3e3
9 changed files with 84 additions and 4 deletions

View file

@ -5917,6 +5917,7 @@ mysql_new_select(LEX *lex, bool move_down)
DBUG_RETURN(1);
}
select_lex->nest_level= lex->nest_level;
select_lex->nest_level_base= &thd->lex->unit;
if (move_down)
{
SELECT_LEX_UNIT *unit;