diff --git a/sql/partitioning/partition_handler.cc b/sql/partitioning/partition_handler.cc index 74b7d32..39f95ee 100644 --- a/sql/partitioning/partition_handler.cc +++ b/sql/partitioning/partition_handler.cc @@ -3073,7 +3073,7 @@ int Partition_helper::handle_unordered_next(uchar *buf, bool is_next_same) partition_read_range is_next_same are always local constants */ - if (m_index_scan_type == PARTITION_READ_RANGE) + if (m_index_scan_type == PARTITION_READ_RANGE && !is_next_same) { DBUG_ASSERT(buf == m_table->record[0]); error= read_range_next_in_part(m_part_spec.start_part, NULL); @@ -3560,7 +3560,7 @@ int Partition_helper::handle_ordered_next(uchar *buf, bool is_next_same) read_buf= rec_buf; - if (m_index_scan_type == PARTITION_READ_RANGE) + if (m_index_scan_type == PARTITION_READ_RANGE && !is_next_same) { error= read_range_next_in_part(part_id, read_buf == m_table->record[0]