diff options
author | unknown <monty@tik.mysql.fi> | 2002-03-02 09:51:24 +0200 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2002-03-02 09:51:24 +0200 |
commit | ad4fcb8a01f297f914e9e75d44b04e10fd91eb97 (patch) | |
tree | 7c46a4aab7560f176209fe10d40e1ec2df488a46 /sql/opt_range.h | |
parent | ae670b76660fd66d046fd96af88be303c1d91006 (diff) | |
download | mariadb-git-ad4fcb8a01f297f914e9e75d44b04e10fd91eb97.tar.gz |
Fix sorting of NULL values (Should always be first)
Fix problem with HAVING and MAX() IS NOT NULL
Docs/manual.texi:
Changelog & NULL usage with ORDER BY
client/mysqldump.c:
Cleanup disable keys
mysql-test/r/distinct.result:
Fix results after ORDER BY with NULL fix
mysql-test/r/group_by.result:
Fix results after ORDER BY with NULL fix
mysql-test/r/having.result:
Testcase for bug with HAVING
mysql-test/t/distinct.test:
Test for DISTINCT + ORDER BY DESC bug
mysql-test/t/having.test:
Test of HAVING and MAX IS NOT NULL
sql/filesort.cc:
Fix sorting of NULL values (Should always be first)
sql/item.h:
Fix problem with HAVING and MAX() IS NOT NULL
sql/item_sum.h:
Fix problem with HAVING and MAX() IS NOT NULL
sql/opt_range.cc:
Fix problem with HAVING and MAX() IS NOT NULL
sql/opt_range.h:
Fix sorting of NULL values
sql/sql_select.cc:
Fix sorting of ORDER BY ... DESC on NULL values.
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r-- | sql/opt_range.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h index 83eb10235ea..f48a3936a17 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -77,6 +77,7 @@ public: void reset(void) { next=0; it.rewind(); } int init() { return error=file->index_init(index); } virtual int get_next(); + virtual bool reverse_sorted() { return 0; } int cmp_next(QUICK_RANGE *range); bool unique_key_range(); }; @@ -87,6 +88,7 @@ class QUICK_SELECT_DESC: public QUICK_SELECT public: QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts); int get_next(); + bool reverse_sorted() { return 1; } private: int cmp_prev(QUICK_RANGE *range); bool range_reads_after_key(QUICK_RANGE *range); @@ -96,6 +98,7 @@ private: List_iterator<QUICK_RANGE> rev_it; }; + class SQL_SELECT :public Sql_alloc { public: QUICK_SELECT *quick; // If quick-select used |