An interim code cleanup.

Major re-write of code yet has to be done, to circumvent
assigning of UNIT to current select and to deal better with 
offset, limit.
parent 57ed8b11
No related merge requests found
...@@ -267,4 +267,3 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -267,4 +267,3 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
2 UNION t1 ref b b 5 const 1 Using where 2 UNION t1 ref b b 5 const 1 Using where
drop table t1,t2; drop table t1,t2;
>>>>>>>
...@@ -3275,7 +3275,6 @@ mysql_new_select(LEX *lex, bool move_down) ...@@ -3275,7 +3275,6 @@ mysql_new_select(LEX *lex, bool move_down)
select_lex->include_neighbour(lex->current_select); select_lex->include_neighbour(lex->current_select);
select_lex->master_unit()->global_parameters= select_lex; select_lex->master_unit()->global_parameters= select_lex;
DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
select_lex->include_global((st_select_lex_node**)&lex->all_selects_list); select_lex->include_global((st_select_lex_node**)&lex->all_selects_list);
lex->current_select= select_lex; lex->current_select= select_lex;
return 0; return 0;
......
...@@ -4744,10 +4744,10 @@ optional_order_or_limit: ...@@ -4744,10 +4744,10 @@ optional_order_or_limit:
LEX *lex= &thd->lex; LEX *lex= &thd->lex;
DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
SELECT_LEX *sel= lex->current_select->select_lex(); SELECT_LEX *sel= lex->current_select->select_lex();
sel->master_unit()->global_parameters= SELECT_LEX_UNIT *unit= sel->master_unit();
sel->master_unit(); unit->global_parameters= unit;
lex->current_select= sel->master_unit(); unit->no_table_names_allowed= 1;
lex->current_select->no_table_names_allowed= 1; lex->current_select= unit;
thd->where= "global ORDER clause"; thd->where= "global ORDER clause";
} }
order_or_limit order_or_limit
......
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