diff options
author | gkodinov@dl145s.mysql.com <> | 2006-10-19 15:04:12 +0200 |
---|---|---|
committer | gkodinov@dl145s.mysql.com <> | 2006-10-19 15:04:12 +0200 |
commit | c77fae407b0ed423daace82044fc034f3c6c43ff (patch) | |
tree | 3b1cae348369aff41bc05399edc6b42f12f1d6dc /sql/sql_select.cc | |
parent | 892495acaffb5a773b72fce40d7d98f27ee6a0ae (diff) | |
parent | 1dacdd4c85685a144615b22374b1dbb86ac1ead9 (diff) | |
download | mariadb-git-c77fae407b0ed423daace82044fc034f3c6c43ff.tar.gz |
Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index cb1c393457e..f86e9a13d53 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -14156,12 +14156,17 @@ bool JOIN::rollup_init() while ((item= it++)) { ORDER *group_tmp; + bool found_in_group= 0; + for (group_tmp= group_list; group_tmp; group_tmp= group_tmp->next) { if (*group_tmp->item == item) + { item->maybe_null= 1; + found_in_group= 1; + } } - if (item->type() == Item::FUNC_ITEM) + if (item->type() == Item::FUNC_ITEM && !found_in_group) { bool changed= FALSE; if (change_group_ref(thd, (Item_func *) item, group_list, &changed)) |