Skip to content

Commit

Permalink
Revert "Fixes a problem with heap when scanning and insert rows at th…
Browse files Browse the repository at this point in the history
…e same time"

This reverts commit 262927a.
  • Loading branch information
vuvova committed Aug 20, 2019
1 parent 4438ff0 commit 1ad70bf
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions storage/heap/hp_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,22 @@ int heap_scan(register HP_INFO *info, uchar *record)
DBUG_ENTER("heap_scan");

pos= ++info->current_record;
if (pos >= share->records+share->deleted)
{
info->update= 0; /* No active row */
DBUG_RETURN(my_errno= HA_ERR_END_OF_FILE);
}

if (pos < info->next_block)
{
info->current_ptr+=share->block.recbuffer;
}
else
{
info->next_block+=share->block.records_in_block;
if (info->next_block >= share->records+share->deleted)
{
info->next_block= share->records+share->deleted;
if (pos >= info->next_block)
{
info->update= 0;
DBUG_RETURN(my_errno= HA_ERR_END_OF_FILE);
}
}
hp_find_record(info, pos);
}
if (!info->current_ptr[share->visible])
Expand Down

0 comments on commit 1ad70bf

Please sign in to comment.