summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-05-23 21:15:01 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-05-23 21:17:18 +0300
commit99cd5a962c53e35620cdeeca35dfab4ab4b3bb4c (patch)
treefeeed1a8f97c3ebbb85af707a3662d0f930944bd /sql/sql_update.cc
parent9c9747fed3e1c1a7838e45c71983a3c4bbd3160d (diff)
downloadmariadb-git-99cd5a962c53e35620cdeeca35dfab4ab4b3bb4c.tar.gz
MDEV-8989: ORDER BY optimizer ignores equality propagation
Variant #4 of the fix. Make ORDER BY optimization functions take into account multiple equalities. This is done in several places: - remove_const() checks whether we can sort the first table in the join, or we need to put rows into temp.table and then sort. - test_if_order_by_key() checks whether there are indexes that can be used to produce the required ordering - make_unireg_sortorder() constructs sort criteria for filesort.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 3c0827bb164..4221025da28 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -567,7 +567,7 @@ int mysql_update(THD *thd,
Filesort_tracker *fs_tracker=
thd->lex->explain->get_upd_del_plan()->filesort_tracker;
- if (!(sortorder=make_unireg_sortorder(thd, order, &length, NULL)) ||
+ if (!(sortorder=make_unireg_sortorder(thd, NULL, 0, order, &length, NULL)) ||
(table->sort.found_records= filesort(thd, table, sortorder, length,
select, limit,
true,