summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-28 06:08:17 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-28 06:08:17 +0300
commit26bb50a19b8c3a79a745d052c14f73a5a06e466e (patch)
tree41b52ce07c94e5878b59ffb52bf26ad79aa89469 /myisam/mi_open.c
parentad4fdb79cd4c6f06a1a09e0ded07cb7e8c76f07c (diff)
downloadmariadb-git-26bb50a19b8c3a79a745d052c14f73a5a06e466e.tar.gz
Add detection of in_addr_t
Add pack_bits to pack_reclength for dynamic rows. This solves buffer a possible buffer overflow on update. (This will probably solve bug #563) Fix test for available file descriptors in mysqltest Fixed core dump bug in replication tests when running without transactional table support acconfig.h: Add detection of in_addr_t acinclude.m4: Add detection of in_addr_t configure.in: Add detection of in_addr_t extra/my_print_defaults.c: Cleanup extra/resolveip.c: Add detection of in_addr_t libmysql/dll.c: Fixed C++ commments myisam/mi_dynrec.c: Add ASSERT if allocated record length is to small myisam/mi_open.c: Add pack_bits to pack_reclength for dynamic rows. This solves buffer a possible buffer overflow on update. myisam/mi_test_all.sh: Added valgrind option to make it easier to verify tests mysql-test/include/check_var_limit.inc: Fix test for available file descriptors mysql-test/r/myisam.result: More tests mysql-test/t/myisam.test: More tests mysql-test/t/query_cache_merge.test: Fix test for available file descriptors mysys/default.c: Cleanup mysys/my_pthread.c: Remove C++ comments sql/log.cc: Code cleanup Fixed core dump bug in replication tests when running without transactional table support.
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 59fae36ac33..857ca1486fd 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -595,7 +595,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)
@@ -650,6 +650,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;