summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-09-14 19:28:29 +0300
committerbell@sanja.is.com.ua <>2004-09-14 19:28:29 +0300
commitf797298fc564c70accf5b227fcfe72f12869762b (patch)
tree44ca229eb83d0543674b391c46f4d3a77539bfb7 /sql/opt_sum.cc
parent31379fbebe149392550d3d3e2387785d55a230d5 (diff)
downloadmariadb-git-f797298fc564c70accf5b227fcfe72f12869762b.tar.gz
fixed merged view fields names (BUG#5147)
support of merged VIEW over several tables added (WL#1809)
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 314decb7041..56d20b58072 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -59,9 +59,9 @@ static int maxmin_in_range(bool max_fl, Field* field, COND *cond);
SYNOPSIS
opt_sum_query()
- tables Tables in query
- all_fields All fields to be returned
- conds WHERE clause
+ tables list of leaves of join table tree
+ all_fields All fields to be returned
+ conds WHERE clause
NOTE:
This function is only called for queries with sum functions and no
@@ -89,7 +89,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
where_tables= conds->used_tables();
/* Don't replace expression on a table that is part of an outer join */
- for (TABLE_LIST *tl= tables; tl; tl= tl->next_local)
+ for (TABLE_LIST *tl= tables; tl; tl= tl->next_leaf)
{
if (tl->on_expr)
{
@@ -128,7 +128,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
{
longlong count= 1;
TABLE_LIST *table;
- for (table= tables; table; table= table->next_local)
+ for (table= tables; table; table= table->next_leaf)
{
if (outer_tables || (table->table->file->table_flags() &
HA_NOT_EXACT_COUNT))