Index: sql/opt_explain.cc =================================================================== --- sql/opt_explain.cc (revision 1) +++ sql/opt_explain.cc (working copy) @@ -1057,6 +1057,11 @@ return true; fmt->entry()->col_attached_condition.set(c); } + else if (select->quick->unique_key_range()) + { + if (push_extra(ET_none)) + return true; + } else if (push_extra(ET_USING_WHERE)) return true; } @@ -1689,7 +1694,12 @@ { join_type jt; if (select && select->quick) - jt= calc_join_type(select->quick->get_type()); + { + if (select->quick->unique_key_range()) + jt= JT_CONST; + else + jt= calc_join_type(select->quick->get_type()); + } else if (key != MAX_KEY) jt= JT_INDEX_SCAN; else Index: sql/opt_explain_traditional.cc =================================================================== --- sql/opt_explain_traditional.cc (revision 1) +++ sql/opt_explain_traditional.cc (working copy) @@ -186,7 +186,11 @@ qep_row::extra *e; while ((e= it++)) { - DBUG_ASSERT(traditional_extra_tags[e->tag] != NULL); + /* when unique_key_range() is true, ET_none is set */ + //DBUG_ASSERT(traditional_extra_tags[e->tag] != NULL); + if (e->tag == ET_none) + continue; + if (buff.append(traditional_extra_tags[e->tag])) return true; if (e->data)