diff options
author | unknown <monty@hundin.mysql.fi> | 2001-06-29 04:04:29 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-06-29 04:04:29 +0300 |
commit | b59fcb04c7c8bbf8cb3a15e99fc7b8d5232c4651 (patch) | |
tree | e36d1c9f5564d83137f90df9c8699610b2bc9241 /sql/opt_range.h | |
parent | 05e9925ada524fb99222087d4be3c70ab02e2047 (diff) | |
download | mariadb-git-b59fcb04c7c8bbf8cb3a15e99fc7b8d5232c4651.tar.gz |
Fix ORDER BY ... DESC optimization
Docs/manual.texi:
Update with changes from old version of the 4.0 manual.
mysql-test/r/order_by.result:
New tests for ORDER BY ... DESC
mysql-test/t/order_by.test:
New tests for ORDER BY ... DESC
sql/sql_delete.cc:
Removed DEBUG code
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r-- | sql/opt_range.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h index 0c8dcf7fed3..50215b94be0 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -54,9 +54,10 @@ class QUICK_RANGE :public Sql_alloc { {} }; + class QUICK_SELECT { public: - bool next; + bool next,dont_free; int error; uint index,max_used_key_length; TABLE *head; @@ -80,16 +81,17 @@ public: bool unique_key_range(); }; + class QUICK_SELECT_DESC: public QUICK_SELECT { public: - QUICK_SELECT_DESC(QUICK_SELECT *q); + QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts); int get_next(); private: int cmp_prev(QUICK_RANGE *range); bool range_reads_after_key(QUICK_RANGE *range); - - QUICK_SELECT *quick; + bool test_if_null_range(QUICK_RANGE *range, uint used_key_parts); + void reset(void) { next=0; rev_it.rewind(); } List<QUICK_RANGE> rev_ranges; List_iterator<QUICK_RANGE> rev_it; }; |