diff options
author | Sunanda Menon <sunanda.menon@oracle.com> | 2011-07-06 11:36:39 +0200 |
---|---|---|
committer | Sunanda Menon <sunanda.menon@oracle.com> | 2011-07-06 11:36:39 +0200 |
commit | f094b48da4041dff886cbcaa19180e48b18813e1 (patch) | |
tree | b620a0de6d93498520da98a4e463693e72de646f /sql/item_subselect.cc | |
parent | 7087c2e689fb49578ae3cac487050a05ffbf894c (diff) | |
parent | 207eb4086263afc15e2807e344f6ce6a3bd96d27 (diff) | |
download | mariadb-git-f094b48da4041dff886cbcaa19180e48b18813e1.tar.gz |
Merge from mysql-5.0.94-release
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 53bd7ff1e1e..db8d6b128a4 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -936,6 +936,14 @@ Item_in_subselect::single_value_transformer(JOIN *join, it.replace(item); } + DBUG_EXECUTE("where", + print_where(item, "rewrite with MIN/MAX");); + if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) + { + DBUG_ASSERT(select_lex->non_agg_field_used()); + select_lex->set_non_agg_field_used(false); + } + save_allow_sum_func= thd->lex->allow_sum_func; thd->lex->allow_sum_func|= 1 << thd->lex->current_select->nest_level; /* |