summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
committermonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
commit77a70a0a24ce658a3ee55248cb2e76f84afc1b88 (patch)
treeaeb2314adbd714c7e2b032209bfd7914e3cfda3d /myisam/mi_open.c
parent6cad89775b4ed78c02c2fa9f3e49181f63b7fb65 (diff)
parent5e04e2370f05bc42437f8be476eba9e204888b65 (diff)
downloadmariadb-git-77a70a0a24ce658a3ee55248cb2e76f84afc1b88.tar.gz
merge with 4.0.15
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 5d8f384a5af..e2f0d023ff4 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -633,7 +633,7 @@ 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.pack_bits,
+ length= max(info->s->base.pack_reclength,
info->s->base.max_key_length);
/* Avoid unnecessary realloc */
if (newptr && length == old_length)
@@ -688,6 +688,8 @@ void mi_setup_functions(register MYISAM_SHARE *share)
share->compare_unique=_mi_cmp_dynamic_unique;
share->calc_checksum= mi_checksum;
+ /* add bits used to pack data to pack_reclength for faster allocation */
+ share->base.pack_reclength+= share->base.pack_bits;
if (share->base.blobs)
{
share->update_record=_mi_update_blob_record;