diff options
author | unknown <evgen@moonbone.local> | 2005-07-12 23:22:08 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-07-12 23:22:08 +0400 |
commit | 4c741718c378dc3259e1f0c2cdf7fcdbc421d7a7 (patch) | |
tree | e48307d4039b3e35acd9a776216c88ccf251253a /sql/item.h | |
parent | 6f525722264325019c527cb3f924d5948de04d68 (diff) | |
download | mariadb-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.h | 1 |
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; }; |