summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 4fe143bb9ed..d262fbefbe7 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4429,7 +4429,8 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
This can only read record to table->record[0], as it was set when
the table was being opened. We have to memcpy data ourselves.
*/
- error= file->read_range_first(&m_start_key, end_range, eq_range, TRUE);
+ error= file->read_range_first(m_start_key.key? &m_start_key: NULL,
+ end_range, eq_range, TRUE);
memcpy(rec_buf_ptr, table->record[0], m_rec_length);
reverse_order= FALSE;
break;