diff options
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index ae596625bf7..29b6aa51c3c 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -115,7 +115,7 @@ bool select_union::flush() int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, bool tables_and_fields_initied) { - SELECT_LEX *lex_select_save= thd->lex.current_select; + SELECT_LEX *lex_select_save= thd->lex->current_select; SELECT_LEX *select_cursor,*sl; DBUG_ENTER("st_select_lex_unit::prepare"); @@ -129,7 +129,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, t_and_f= tables_and_fields_initied; bzero((char *)&tmp_table_param,sizeof(TMP_TABLE_PARAM)); - thd->lex.current_select= sl= select_cursor= first_select_in_union(); + thd->lex->current_select= sl= select_cursor= first_select_in_union(); /* Global option */ if (t_and_f) { @@ -189,7 +189,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, JOIN *join= new JOIN(thd, sl->item_list, sl->options | thd->options | SELECT_NO_UNLOCK, union_result); - thd->lex.current_select= sl; + thd->lex->current_select= sl; offset_limit_cnt= sl->offset_limit; select_limit_cnt= sl->select_limit+sl->offset_limit; if (select_limit_cnt < sl->select_limit) @@ -214,7 +214,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, } item_list.empty(); - thd->lex.current_select= lex_select_save; + thd->lex->current_select= lex_select_save; { List_iterator<Item> it(select_cursor->item_list); Field **field; @@ -229,14 +229,14 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result, DBUG_RETURN(res || thd->is_fatal_error ? 1 : 0); err: - thd->lex.current_select= lex_select_save; + thd->lex->current_select= lex_select_save; DBUG_RETURN(-1); } int st_select_lex_unit::exec() { - SELECT_LEX *lex_select_save= thd->lex.current_select; + SELECT_LEX *lex_select_save= thd->lex->current_select; SELECT_LEX *select_cursor=first_select_in_union(); ulonglong add_rows=0; DBUG_ENTER("st_select_lex_unit::exec"); @@ -256,7 +256,7 @@ int st_select_lex_unit::exec() for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) { ha_rows records_at_start= 0; - thd->lex.current_select= sl; + thd->lex->current_select= sl; if (optimized) res= sl->join->reinit(); @@ -329,13 +329,13 @@ int st_select_lex_unit::exec() offset_limit_cnt= sl->offset_limit; if (!res && union_result->flush()) { - thd->lex.current_select= lex_select_save; + thd->lex->current_select= lex_select_save; DBUG_RETURN(1); } } if (res) { - thd->lex.current_select= lex_select_save; + thd->lex->current_select= lex_select_save; DBUG_RETURN(res); } /* Needed for the following test and for records_at_start in next loop */ @@ -366,7 +366,7 @@ int st_select_lex_unit::exec() if (!thd->is_fatal_error) // Check if EOM { ulong options= thd->options; - thd->lex.current_select= fake_select_lex; + thd->lex->current_select= fake_select_lex; offset_limit_cnt= global_parameters->offset_limit; select_limit_cnt= global_parameters->select_limit + global_parameters->offset_limit; @@ -420,7 +420,7 @@ int st_select_lex_unit::exec() */ } } - thd->lex.current_select= lex_select_save; + thd->lex->current_select= lex_select_save; DBUG_RETURN(res); } |