mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
move file->position() down, to make sure it's executed only when
previous file->index_next (or other file->... index access method) succeeded
This commit is contained in:
parent
cb0a661cd7
commit
413113dad6
1 changed files with 7 additions and 6 deletions
|
@ -5765,12 +5765,6 @@ int ha_partition::handle_ordered_next(uchar *buf, bool is_next_same)
|
|||
error= file->ha_index_next_same(rec_buf, m_start_key.key,
|
||||
m_start_key.length);
|
||||
|
||||
if (!m_using_extended_keys)
|
||||
{
|
||||
file->position(rec_buf);
|
||||
memcpy(rec_buf + m_rec_length, file->ref, file->ref_length);
|
||||
}
|
||||
|
||||
if (error)
|
||||
{
|
||||
if (error == HA_ERR_END_OF_FILE)
|
||||
|
@ -5788,6 +5782,13 @@ int ha_partition::handle_ordered_next(uchar *buf, bool is_next_same)
|
|||
}
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
if (!m_using_extended_keys)
|
||||
{
|
||||
file->position(rec_buf);
|
||||
memcpy(rec_buf + m_rec_length, file->ref, file->ref_length);
|
||||
}
|
||||
|
||||
queue_replace_top(&m_queue);
|
||||
return_top_record(buf);
|
||||
DBUG_PRINT("info", ("Record returned from partition %u", m_top_entry));
|
||||
|
|
Loading…
Reference in a new issue