Index: sql/opt_range.cc
===================================================================
--- sql/opt_range.cc	(revision 25783)
+++ sql/opt_range.cc	(revision 25784)
@@ -4497,8 +4497,20 @@
   for (idx= 0, cur_ror_scan= tree->ror_scans; idx < param->keys; idx++)
   {
     ROR_SCAN_INFO *scan;
+    uint keyno= param->real_keynr[idx];
+
     if (!tree->ror_scans_map.is_set(idx))
+    {
       continue;
+    }
+    /*
+      Ignore clustering keys.
+    */
+    if (keyno != cpk_no && test(param->table->file->index_flags(keyno,0,0) & HA_CLUSTERED_INDEX))
+    {
+      tree->n_ror_scans--;
+      continue;
+    }
     if (!(scan= make_ror_scan(param, idx, tree->keys[idx])))
       return NULL;
     if (param->real_keynr[idx] == cpk_no)
