summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <tsmith@ramayana.hindu.god>2007-12-04 20:58:21 -0700
committerunknown <tsmith@ramayana.hindu.god>2007-12-04 20:58:21 -0700
commit55a420e134e2185415baa7e928b47415c1911da1 (patch)
tree0314ad5cd173e9b49968cb56e0081e21eb2fdd5f /myisam/mi_open.c
parent416e1d9d953e2b78969d018a3db4ea916320bb85 (diff)
parent7991e6a61dac3dd741e25712d51701b1c6537cc7 (diff)
downloadmariadb-git-55a420e134e2185415baa7e928b47415c1911da1.tar.gz
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50 client/mysqldump.c: Auto merged include/my_sys.h: Auto merged libmysql/CMakeLists.txt: Auto merged libmysql/Makefile.shared: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/sort.c: Auto merged mysql-test/t/cast.test: Auto merged mysql-test/t/variables.test: Auto merged sql/field.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_timefunc.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_ucs.result: Manual merge mysql-test/r/func_misc.result: Manual merge mysql-test/t/binlog_killed.test: Manual merge mysql-test/t/ctype_ucs.test: Manual merge mysql-test/t/func_misc.test: Manual merge sql/item_strfunc.h: Manual merge strings/ctype-simple.c: Manual merge
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 28258af57a2..ec169ac8785 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -675,8 +675,11 @@ 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);
+ if (info->s->options & HA_OPTION_COMPRESS_RECORD)
+ length= max(info->s->base.pack_reclength, info->s->max_pack_length);
+ else
+ length= info->s->base.pack_reclength;
+ length= max(length, info->s->base.max_key_length);
/* Avoid unnecessary realloc */
if (newptr && length == old_length)
return newptr;