1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

bug: ha_heap was unilaterally increasing reclength

proper fix replacing the hack from b80fa4000d

don't confuse length of the data area (reclength) with the
offset to the "deleted" mark.
This commit is contained in:
Sergei Golubchik
2018-01-25 14:25:48 +01:00
parent 7a63ffab71
commit 7c6cf7fefe
9 changed files with 15 additions and 21 deletions

View File

@@ -54,7 +54,7 @@ int heap_write(HP_INFO *info, const uchar *record)
}
memcpy(pos,record,(size_t) share->reclength);
pos[share->reclength]=1; /* Mark record as not deleted */
pos[share->visible]= 1; /* Mark record as not deleted */
if (++share->records == share->blength)
share->blength+= share->blength;
info->s->key_version++;
@@ -92,7 +92,7 @@ err:
share->deleted++;
*((uchar**) pos)=share->del_link;
share->del_link=pos;
pos[share->reclength]=0; /* Record deleted */
pos[share->visible]= 0; /* Record deleted */
DBUG_RETURN(my_errno);
} /* heap_write */