summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-05-19 13:59:43 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-05-20 08:41:20 +0300
commit65e1399e64a306f1ce1d920e66206954f8630da8 (patch)
treea3c22c1f76d15721e982f34e1ac9e6b828e711a2 /sql/opt_sum.cc
parent13a350ac29eeb43153c7bca65b73b5dfa9f8ffb5 (diff)
parent335c4ab790254462753ba4ed8b074c5847b2708f (diff)
downloadmariadb-git-65e1399e64a306f1ce1d920e66206954f8630da8.tar.gz
Merge 10.0 into 10.1
Significantly reduce the amount of InnoDB, XtraDB and Mariabackup code changes by defining pfs_os_file_t as something that is transparently compatible with os_file_t.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index e7d7c81b638..5d5132e7fee 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -254,6 +254,8 @@ int opt_sum_query(THD *thd,
int error= 0;
DBUG_ENTER("opt_sum_query");
+ thd->lex->current_select->min_max_opt_list.empty();
+
if (conds)
where_tables= conds->used_tables();
@@ -447,7 +449,14 @@ int opt_sum_query(THD *thd,
item_sum->aggregator_clear();
}
else
+ {
item_sum->reset_and_add();
+ /*
+ Save a reference to the item for possible rollback
+ of the min/max optimizations for this select
+ */
+ thd->lex->current_select->min_max_opt_list.push_back(item_sum);
+ }
item_sum->make_const();
recalc_const_item= 1;
break;