Index: sql/sql_select.cc
===================================================================
--- sql/sql_select.cc	(revision 25782)
+++ sql/sql_select.cc	(revision 25783)
@@ -13817,11 +13817,11 @@
           in the order required by ORDER BY).
         */
         DBUG_ASSERT (ref_key != (int) nr);
+          bool is_covering= table->covering_keys.is_set(nr) ||
+                            (nr == table->s->primary_key &&
+                        table->file->primary_key_is_clustered()) ||
+                        test(table->file->index_flags(nr, 0, 0) & HA_CLUSTERED_INDEX);
 
-        bool is_covering= table->covering_keys.is_set(nr) ||
-                          (nr == table->s->primary_key &&
-                          table->file->primary_key_is_clustered());
-	
         /* 
           Don't use an index scan with ORDER BY without limit.
           For GROUP BY without limit always use index scan
