summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-07-12 23:22:08 +0400
committerunknown <evgen@moonbone.local>2005-07-12 23:22:08 +0400
commit4c741718c378dc3259e1f0c2cdf7fcdbc421d7a7 (patch)
treee48307d4039b3e35acd9a776216c88ccf251253a /sql/item.h
parent6f525722264325019c527cb3f924d5948de04d68 (diff)
downloadmariadb-git-4c741718c378dc3259e1f0c2cdf7fcdbc421d7a7.tar.gz
Fix bug#11709 View was ordered by wrong column.
When searching column to sort on, item was compared to field under view column, but not the column itself. Because names of view column and underlaid field may differ, it leads to possibly choosing wrong column for sorting on. This patch makes Item_direct_view_ref::eq(Item *item,...) compare item's name with it's own name proir to comparing to *ref item. sql/item.cc: Fix bug #11709 View was ordered by wrong column sql/item.h: Fix bug #11709 View was ordered by wrong column mysql-test/t/view.test: Test case for bug #11709 View was ordered by wrong column. mysql-test/r/view.result: Test case for bug #11709 View was ordered by wrong column.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 560f1124fb4..f748286b2f7 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1516,6 +1516,7 @@ public:
:Item_direct_ref(thd, item) {}
bool fix_fields(THD *, Item **);
+ bool eq(const Item *item, bool binary_cmp) const;
};