mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
A fix (bug #6878: Crash with engine=memory).
heap/hp_open.c: A fix (bug #6878: Crash with engine=memory). Record length should be >= sizeof(byte*).
This commit is contained in:
parent
352ad8156c
commit
a845e882fd
3 changed files with 27 additions and 0 deletions
|
|
@ -41,6 +41,13 @@ HP_INFO *heap_open(const char *name, int mode, uint keys, HP_KEYDEF *keydef,
|
|||
{
|
||||
DBUG_PRINT("info",("Initializing new table"));
|
||||
implicit_emptied= 1;
|
||||
|
||||
/*
|
||||
We have to store sometimes byte* del_link in records,
|
||||
so the record length should be at least sizeof(byte*)
|
||||
*/
|
||||
set_if_bigger(reclength, sizeof (byte*));
|
||||
|
||||
for (i=key_segs=max_length=0 ; i < keys ; i++)
|
||||
{
|
||||
key_segs+= keydef[i].keysegs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue