diff options
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 7929257d608..c0257e08537 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3400,7 +3400,8 @@ int ha_partition::common_first_last(byte *buf) if ((error= partition_scan_set_up(buf, FALSE))) return error; - if (!m_ordered_scan_ongoing) + if (!m_ordered_scan_ongoing && + m_index_scan_type != partition_index_last) return handle_unordered_scan_next_partition(buf); return handle_ordered_index_scan(buf); } |