summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-09-20 19:56:05 -0700
committerIgor Babaev <igor@askmonty.org>2016-09-20 19:56:05 -0700
commit10aa3936a794184229229ae43eee51ae3b3f5681 (patch)
treec43485b0bc01d90c6989718b8fe49d0d68328c3f /sql/sql_window.cc
parent3da077a6ec67c12154b18104f6e841d5874117f6 (diff)
downloadmariadb-git-10aa3936a794184229229ae43eee51ae3b3f5681.tar.gz
Fixed bug mdev-10842.
In some cases the function compare_order_elements() erroneously returned CMP_EQ for not equal elements.
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r--sql/sql_window.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index e720c39eb8f..4705fdce896 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -238,7 +238,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
static
int compare_order_elements(ORDER *ord1, ORDER *ord2)
{
- if (*ord1->item == *ord2->item)
+ if (*ord1->item == *ord2->item && ord1->direction == ord2->direction)
return CMP_EQ;
Item *item1= (*ord1->item)->real_item();
Item *item2= (*ord2->item)->real_item();