summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-06-27 08:13:59 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-06-27 08:13:59 +0300
commit43c77bb937cbd2fff10b980047b9926a5711a8b3 (patch)
tree8316d8bedbd005283a09fb49259ef02155a31869 /sql/sql_lex.cc
parented61fddf241e2e7e1b3b4db8e60fd1f939568bdd (diff)
parent29624ea304b5893d3bc81670807285a89fce1a33 (diff)
downloadmariadb-git-43c77bb937cbd2fff10b980047b9926a5711a8b3.tar.gz
Merge 10.2 into bb-10.2-ext
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 3469ffcdbfe..e982d857854 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -6901,8 +6901,9 @@ void st_select_lex::collect_grouping_fields(THD *thd)
from cond.
*/
-void st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
- Item_processor check_processor)
+void
+st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
+ TABLE_LIST *derived)
{
cond->clear_extraction_flag();
if (cond->type() == Item::COND_ITEM)
@@ -6915,7 +6916,7 @@ void st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
Item *item;
while ((item=li++))
{
- check_cond_extraction_for_grouping_fields(item, check_processor);
+ check_cond_extraction_for_grouping_fields(item, derived);
if (item->get_extraction_flag() != NO_EXTRACTION_FL)
{
count++;
@@ -6936,10 +6937,12 @@ void st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
item->clear_extraction_flag();
}
}
- else
- cond->set_extraction_flag(cond->walk(check_processor,
- 0, (uchar *) this) ?
- NO_EXTRACTION_FL : FULL_EXTRACTION_FL);
+ else
+ {
+ int fl= cond->excl_dep_on_grouping_fields(this) ?
+ FULL_EXTRACTION_FL : NO_EXTRACTION_FL;
+ cond->set_extraction_flag(fl);
+ }
}