Bug #22144 EXPLAIN returns wrong information
Submitted: 9 Sep 2006 5:07 Modified: 7 Jan 2014 15:25
Reporter: Georg Richter Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.2 OS:Any
Assigned to: CPU Architecture:Any
Tags: cwp

[9 Sep 2006 5:07] Georg Richter
Description:
 EXPLAIN returns invalid/wrong information for simple SELECT:

How to repeat:
create table t2 (a int, b int, c int, d int, primary key(a)) engine=Jstar;
insert into t2 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),(7,7,7,7),(8,8,8,8);
explain select distinct(a) from t2;

Output:
+----+-------------+-------+------+---------------+------+---------+------+------+-----------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+---------------+------+---------+------+------+-----------------+
| 1 | SIMPLE | t2 | ALL | NULL | NULL | NULL | NULL | 1000 | Using temporary |
+----+-------------+-------+------+---------------+------+---------+------+------+-----------------+
[18 Sep 2007 5:25] Hakan Küçükyılmaz
Test case is falcon_bug_22144.test.
[19 Oct 2007 16:27] Kevin Lewis
Calvin,  The EXPLAIN feature is not under the control of Falcon.
[7 Jan 2014 15:25] Erlend Dahl
We don't support Jstar, and the query works correctly on InnoDB.