diff options
author | gkodinov@dl145s.mysql.com <> | 2006-09-28 10:19:25 +0200 |
---|---|---|
committer | gkodinov@dl145s.mysql.com <> | 2006-09-28 10:19:25 +0200 |
commit | 55cc4fd5c621eeff161cd8da77298bab30a46261 (patch) | |
tree | 107adad7035c003c1c4f2ffd28f8e5c7547e0c89 /sql/sql_select.cc | |
parent | a039376c4359beaa89259f0b4c2eb6ecc9156432 (diff) | |
parent | 4716c99a174430b6f5bcf21c3ade9213a9a63440 (diff) | |
download | mariadb-git-55cc4fd5c621eeff161cd8da77298bab30a46261.tar.gz |
Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 02ec7ae08ed..74a9fc573c4 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -290,8 +290,6 @@ JOIN::prepare(Item ***rref_pointer_array, select_lex->having_fix_field= 0; if (having_fix_rc || thd->net.report_error) DBUG_RETURN(-1); /* purecov: inspected */ - if (having->with_sum_func) - having->split_sum_func2(thd, ref_pointer_array, all_fields, &having); } // Is it subselect @@ -306,6 +304,9 @@ JOIN::prepare(Item ***rref_pointer_array, } } + if (having && having->with_sum_func) + having->split_sum_func2(thd, ref_pointer_array, all_fields, &having); + if (setup_ftfuncs(select_lex)) /* should be after having->fix_fields */ DBUG_RETURN(-1); |