summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2002-05-27 20:52:54 +0300
committerbell@sanja.is.com.ua <>2002-05-27 20:52:54 +0300
commitab36838e9b5c923972400a4848fa74c0aed0ac89 (patch)
treef2d29e3498766d84b6257c751c83ac48523317aa /sql/sql_lex.cc
parent59602212d2c2ca6d878f5241fa15b7d0628c2a34 (diff)
downloadmariadb-git-ab36838e9b5c923972400a4848fa74c0aed0ac89.tar.gz
Hiding internal pointers of SELECT_LEX structures
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 496d21b333c..008ef44d83a 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1021,18 +1021,19 @@ bool st_select_lex_unit::create_total_list_n_last_return(THD *thd, st_lex *lex,
TABLE_LIST *slave_list_first=0, **slave_list_last= &slave_list_first;
TABLE_LIST **new_table_list= *result, *aux;
SELECT_LEX *sl= (SELECT_LEX*)slave;
- for (; sl; sl= (SELECT_LEX*)sl->next)
+ for (; sl; sl= sl->next_select())
{
// check usage of ORDER BY in union
- if (sl->order_list.first && sl->next && !sl->braces)
+ if (sl->order_list.first && sl->next_select() && !sl->braces)
{
net_printf(&thd->net,ER_WRONG_USAGE,"UNION","ORDER BY");
return 1;
}
- if (sl->slave)
- if (((SELECT_LEX_UNIT *)
- sl->slave)->create_total_list_n_last_return(thd, lex,
- &slave_list_last))
+ for (SELECT_LEX_UNIT *inner= sl->first_inner_unit();
+ inner;
+ inner= inner->next_unit())
+ if (inner->create_total_list_n_last_return(thd, lex,
+ &slave_list_last))
return 1;
if ((aux= (TABLE_LIST*) sl->table_list.first))
{