summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorpem@mysql.com <>2003-10-22 16:10:22 +0200
committerpem@mysql.com <>2003-10-22 16:10:22 +0200
commit337238b78ac9f131b3082f987c812216e6247dad (patch)
tree162a59c221392dfbcde183e7fdd33da1159e8bd9 /sql/sql_union.cc
parent2918e5d529502f0c10c720f1360ab39d6d83bb48 (diff)
parent70ea50366231ac471a894ab4e91f2322cdacb796 (diff)
downloadmariadb-git-337238b78ac9f131b3082f987c812216e6247dad.tar.gz
Merging 4.1->5.0
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 3a903d2e896..934cda3b1a8 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)
{
@@ -192,7 +192,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)
@@ -217,7 +217,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;
@@ -232,14 +232,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");
@@ -259,7 +259,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();
@@ -331,13 +331,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 */
@@ -368,7 +368,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;
@@ -422,7 +422,7 @@ int st_select_lex_unit::exec()
*/
}
}
- thd->lex.current_select= lex_select_save;
+ thd->lex->current_select= lex_select_save;
DBUG_RETURN(res);
}