summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 60b092652aa..4748e857276 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -156,12 +156,12 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
{
int res;
register SELECT_LEX *select_lex = &lex->select_lex;
- if (select_lex->link_next)
+ if (select_lex->next_select_in_list())
{
/* Fix tables 'to-be-unioned-from' list to point at opened tables */
for (SELECT_LEX *sl= select_lex;
sl;
- sl= (SELECT_LEX*)sl->link_next)
+ sl= sl->next_select_in_list())
{
for (TABLE_LIST *cursor= (TABLE_LIST *)sl->table_list.first;
cursor;
@@ -169,7 +169,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
cursor->table= cursor->table_list->table;
}
}
- if (select_lex->next)
+ if (select_lex->next_select())
res=mysql_union(thd,lex,result);
else
res=mysql_select(thd,(TABLE_LIST*) select_lex->table_list.first,
@@ -7275,7 +7275,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
result->send_error(0,NullS);
}
}
- if (!join->thd->lex.select->next)
+ if (!join->thd->lex.select->next_select())
{
save_lock=thd->lock;
thd->lock=(MYSQL_LOCK *)0;