diff options
author | unknown <bell@sanja.is.com.ua> | 2004-11-21 20:08:12 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-11-21 20:08:12 +0200 |
commit | 5a00a868b74ffb6b220eb72c87ec38696ce9406c (patch) | |
tree | 76a673d7a9b20f184988993cc14ce455b1d73f70 /sql/opt_sum.cc | |
parent | 436c7714dd6df991f2e968b313906d4b1e70db97 (diff) | |
parent | c9497e2365461fb2547a8cfceb33b68a99d7fe0b (diff) | |
download | mariadb-git-5a00a868b74ffb6b220eb72c87ec38696ce9406c.tar.gz |
merge
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index f9a51a8348f..55efcce1c19 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) || table->schema_table) |