pbxt.basic_index_lookup and pbxt.basic_pkey_index_reverse_scan don't always use index

Bug #641035 reported by Stewart Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Paul McCullagh
7.0
Fix Released
Medium
Paul McCullagh

Bug Description

This may be "not a bug". The first query below you'd expect to do an in order index scan instead of reverting to filesort.

pbxt.basic_index_lookup [ fail ]
--- /home/stewart/drizzle/working/tests/../plugin/pbxt/tests/r/basic_index_lookup.result 2010-09-17 05:14:16.089326346 +0300
+++ /home/stewart/drizzle/working/tests/../plugin/pbxt/tests/r/basic_index_lookup.reject 2010-09-17 07:51:22.989347122 +0300
@@ -3,7 +3,7 @@
 insert into t1 values (1),(2),(3),(4),(100),(200);
 explain select * from t1 order by a;
 id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 6 Using index
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort
 select * from t1 order by a;
 a
 1
@@ -14,14 +14,14 @@
 200
 explain select * from t1 where a>4;
 id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 6 Using where
 select * from t1 where a>4;
 a
 100
 200
 explain select * from t1 where a<4;
 id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 6 Using where
 select * from t1 where a<4;
 a
 1
@@ -29,7 +29,7 @@
 3
 explain select * from t1 where a=4;
 id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
 select * from t1 where a=4;
 a
 4

Related branches

Revision history for this message
Stewart Smith (stewart) wrote :

also:

pbxt.basic_pkey_index_reverse_scan [ fail ]
--- /home/stewart/drizzle/working/tests/../plugin/pbxt/tests/r/basic_pkey_index_reverse_scan.result 2010-09-17 05:14:16.099317742 +0300
+++ /home/stewart/drizzle/working/tests/../plugin/pbxt/tests/r/basic_pkey_index_reverse_scan.reject 2010-09-17 07:55:34.969350595 +0300
@@ -3,7 +3,7 @@
 insert into t1 values (1),(2),(3);
 explain select * from t1 order by a desc;
 id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 3 Using index
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
 select * from t1 order by a desc;
 a
 3

drizzletest: Result length mismatch

summary: - pbxt.basic_index_lookup doesn't always use index
+ pbxt.basic_index_lookup and pbxt.basic_pkey_index_reverse_scan don't
+ always use index
Changed in drizzle:
importance: Undecided → Medium
assignee: nobody → Paul McCullagh (paul-mccullagh)
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.