Loading sql/ha_partition.cc +16 −1 Original line number Diff line number Diff line Loading @@ -3663,7 +3663,10 @@ int ha_partition::read_range_first(const key_range *start_key, if (!start_key) // Read first record { if (m_ordered) m_index_scan_type= partition_index_first; else m_index_scan_type= partition_index_first_unordered; error= common_first_last(m_rec0); } else Loading Loading @@ -3877,6 +3880,18 @@ int ha_partition::handle_unordered_scan_next_partition(byte * buf) DBUG_PRINT("info", ("index_first on partition %d", i)); error= file->index_first(buf); break; case partition_index_first_unordered: /* We perform a scan without sorting and this means that we should not use the index_first since not all handlers support it and it is also unnecessary to restrict sort order. */ DBUG_PRINT("info", ("read_range_first on partition %d", i)); table->record[0]= buf; error= file->read_range_first(0, end_range, eq_range, 0); table->record[0]= m_rec0; break; default: DBUG_ASSERT(FALSE); DBUG_RETURN(1); Loading sql/ha_partition.h +4 −3 Original line number Diff line number Diff line Loading @@ -45,9 +45,10 @@ class ha_partition :public handler { partition_index_read= 0, partition_index_first= 1, partition_index_last= 2, partition_index_read_last= 3, partition_no_index_scan= 4 partition_index_first_unordered= 2, partition_index_last= 3, partition_index_read_last= 4, partition_no_index_scan= 5 }; /* Data for the partition handler */ int m_mode; // Open mode Loading Loading
sql/ha_partition.cc +16 −1 Original line number Diff line number Diff line Loading @@ -3663,7 +3663,10 @@ int ha_partition::read_range_first(const key_range *start_key, if (!start_key) // Read first record { if (m_ordered) m_index_scan_type= partition_index_first; else m_index_scan_type= partition_index_first_unordered; error= common_first_last(m_rec0); } else Loading Loading @@ -3877,6 +3880,18 @@ int ha_partition::handle_unordered_scan_next_partition(byte * buf) DBUG_PRINT("info", ("index_first on partition %d", i)); error= file->index_first(buf); break; case partition_index_first_unordered: /* We perform a scan without sorting and this means that we should not use the index_first since not all handlers support it and it is also unnecessary to restrict sort order. */ DBUG_PRINT("info", ("read_range_first on partition %d", i)); table->record[0]= buf; error= file->read_range_first(0, end_range, eq_range, 0); table->record[0]= m_rec0; break; default: DBUG_ASSERT(FALSE); DBUG_RETURN(1); Loading
sql/ha_partition.h +4 −3 Original line number Diff line number Diff line Loading @@ -45,9 +45,10 @@ class ha_partition :public handler { partition_index_read= 0, partition_index_first= 1, partition_index_last= 2, partition_index_read_last= 3, partition_no_index_scan= 4 partition_index_first_unordered= 2, partition_index_last= 3, partition_index_read_last= 4, partition_no_index_scan= 5 }; /* Data for the partition handler */ int m_mode; // Open mode Loading