diff options
author | igor@rurik.mysql.com <> | 2006-04-05 14:00:54 -0700 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2006-04-05 14:00:54 -0700 |
commit | 58ad55937d43682a5ea9780ca68fca06fb9571de (patch) | |
tree | 5478f3804bd93ddefb8eb77c1029c4f84fe48570 /sql/opt_sum.cc | |
parent | d590331d3ca1d8766bdc0335cdf5ae0672b9f278 (diff) | |
parent | f48512596878ba723ab0bde4976337824d2bffaf (diff) | |
download | mariadb-git-58ad55937d43682a5ea9780ca68fca06fb9571de.tar.gz |
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 4158031b9a9..aac47707d1b 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -96,8 +96,14 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) */ for (TABLE_LIST *tl= tables; tl; tl= tl->next_leaf) { + TABLE_LIST *embedded; + for (embedded= tl ; embedded; embedded= embedded->embedding) + { + if (embedded->on_expr) + break; + } + if (embedded) /* Don't replace expression on a table that is part of an outer join */ - if (tl->on_expr) { outer_tables|= tl->table->map; |