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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user