diff options
author | unknown <ram@gw.mysql.r18.ru> | 2004-12-02 14:34:53 +0400 |
---|---|---|
committer | unknown <ram@gw.mysql.r18.ru> | 2004-12-02 14:34:53 +0400 |
commit | 53fd2fda07df107f75a52e4be26efe2f3c0ba7b9 (patch) | |
tree | 2ed178727531457e5fd3bac01e6b654c761b978c /heap | |
parent | fff5c910e59f91f81ca14e756c21f22c186a331c (diff) | |
download | mariadb-git-53fd2fda07df107f75a52e4be26efe2f3c0ba7b9.tar.gz |
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*).
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_open.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/heap/hp_open.c b/heap/hp_open.c index 3bf2881667a..9cb087e3bad 100644 --- a/heap/hp_open.c +++ b/heap/hp_open.c @@ -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; |