summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-10-28 23:24:32 +0100
committerunknown <serg@serg.mysql.com>2002-10-28 23:24:32 +0100
commit6f4f5a745f73a8a9188b42387a30f0cf4e85a883 (patch)
tree83b56c631da1abb0822da2d2e7fb735e22210004 /myisam/mi_open.c
parent4019551fa5cd662e7d5cf528f77be4fb0603ca47 (diff)
downloadmariadb-git-6f4f5a745f73a8a9188b42387a30f0cf4e85a883.tar.gz
fixed "huge number of packed rows in MyISAM" bug in 4.0 tree
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index e06726fcaaa..aeacf81d90a 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -569,7 +569,8 @@ byte *mi_alloc_rec_buff(MI_INFO *info, ulong length, byte **buf)
/* to simplify initial init of info->rec_buf in mi_open and mi_extra */
if (length == (ulong) -1)
- length= max(info->s->base.pack_reclength,info->s->base.max_key_length);
+ length= max(info->s->base.pack_reclength+info->s->base.pack_bits,
+ info->s->base.max_key_length);
extra= ((info->s->options & HA_OPTION_PACK_RECORD) ?
ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+