Commit 7e704a23 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Fixed 32bit version SELECT nesting depth.

parent 9183f66f
......@@ -3052,7 +3052,7 @@ struct LEX: public Query_tables_list
required a local context, the parser pops the top-most context.
*/
List<Name_resolution_context> context_stack;
SELECT_LEX *select_stack[MAX_SELECT_NESTING];
SELECT_LEX *select_stack[MAX_SELECT_NESTING + 1];
uint select_stack_top;
SQL_I_List<ORDER> proc_list;
......@@ -3444,7 +3444,7 @@ struct LEX: public Query_tables_list
select_stack_head()->select_number :
0),
select_lex, select_lex->select_number));
if (unlikely(select_stack_top == MAX_SELECT_NESTING))
if (unlikely(select_stack_top > MAX_SELECT_NESTING))
{
my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT, MYF(0));
DBUG_RETURN(TRUE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment