summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-06-29 04:04:29 +0300
committermonty@hundin.mysql.fi <>2001-06-29 04:04:29 +0300
commitf0dc18922798ee21ca1b89c517ea5d0a08fccdb6 (patch)
treee36d1c9f5564d83137f90df9c8699610b2bc9241 /sql/opt_range.h
parent545e596ef7d06f0de5366397a4e9387669b0c8d9 (diff)
downloadmariadb-git-f0dc18922798ee21ca1b89c517ea5d0a08fccdb6.tar.gz
Fix ORDER BY ... DESC optimization
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h10
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;
};