diff options
Diffstat (limited to 'sql/opt_subselect.h')
-rw-r--r-- | sql/opt_subselect.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index a12e0c11620..7b8f3142851 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -146,7 +146,9 @@ public: void add_keyuse(table_map remaining_tables, KEYUSE *keyuse) { - if (try_loosescan && keyuse->sj_pred_no != UINT_MAX) + if (try_loosescan && keyuse->sj_pred_no != UINT_MAX && + (keyuse->table->file->index_flags(keyuse->key, 0, 1 ) & HA_READ_ORDER)) + { if (!(remaining_tables & keyuse->used_tables)) { |