diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 5dd987a31c4..3a17ab803ad 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -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 2 UNION t1 ref b b 5 const 1 Using where drop table t1,t2; ->>>>>>> diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1e4b2d41275..f0c04688a6b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3275,7 +3275,6 @@ mysql_new_select(LEX *lex, bool move_down) select_lex->include_neighbour(lex->current_select); 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); lex->current_select= select_lex; return 0; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e093a822303..8a45f7a3406 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4744,10 +4744,10 @@ optional_order_or_limit: LEX *lex= &thd->lex; DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); SELECT_LEX *sel= lex->current_select->select_lex(); - sel->master_unit()->global_parameters= - sel->master_unit(); - lex->current_select= sel->master_unit(); - lex->current_select->no_table_names_allowed= 1; + SELECT_LEX_UNIT *unit= sel->master_unit(); + unit->global_parameters= unit; + unit->no_table_names_allowed= 1; + lex->current_select= unit; thd->where= "global ORDER clause"; } order_or_limit