summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorram@gw.mysql.r18.ru <>2004-12-02 15:06:15 +0400
committerram@gw.mysql.r18.ru <>2004-12-02 15:06:15 +0400
commit3b111a9b42de301b3389f3d124f746ef4b6c4888 (patch)
tree0abdb88691a13b1e98fb80390bdf9a8d804f4853 /heap
parent980bd4a37cb38cc108e42f915ec0ef4d21fd3046 (diff)
downloadmariadb-git-3b111a9b42de301b3389f3d124f746ef4b6c4888.tar.gz
A fix (bug #6878: Crash with engine=memory).
Diffstat (limited to 'heap')
-rw-r--r--heap/hp_create.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c
index d1783118c0d..fdfe78a1e09 100644
--- a/heap/hp_create.c
+++ b/heap/hp_create.c
@@ -41,6 +41,13 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
{
HP_KEYDEF *keyinfo;
DBUG_PRINT("info",("Initializing new table"));
+
+ /*
+ 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, keyinfo= keydef; i < keys; i++, keyinfo++)
{
bzero((char*) &keyinfo->block,sizeof(keyinfo->block));