summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-10-04 23:26:42 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-10-04 23:26:42 +0500
commitc0364263d9dcc9f122529804576f65640587acd4 (patch)
tree4abdd475e13ff4def7440bf8517e499dae105852 /sql/records.cc
parentcef86787db60becc1d15abd6aa7ff06a1da947de (diff)
downloadmariadb-git-c0364263d9dcc9f122529804576f65640587acd4.tar.gz
patch fixing after review on patch-fixing of
Bug #5492 "set @@session.read_rnd_buffer_size=33554432" crashes server on query 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms 3. shorten warning comments in init_rr_cache in sql/records.cc include/config-win.h: 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms include/my_global.h: 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms sql/records.cc: shorten warning comments for my_malloc_lock in init_rr_cache
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/records.cc b/sql/records.cc
index a2c6eb0a040..7cbb1ab3205 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -249,12 +249,7 @@ static int init_rr_cache(READ_RECORD *info)
rec_cache_size=info->cache_records*info->reclength;
info->rec_cache_size=info->cache_records*info->ref_length;
- /*
- We are going to read the last three bytes of the buffer via uint3korr
- This macro reads actually 4 bytes (for speed)
- So, we have to allocate one more byte at the end of the buffer
- to avoid memory assertion fault
- */
+ // We have to allocate one more byte to use uint3korr (see comments for it)
if (info->cache_records <= 2 ||
!(info->cache=(byte*) my_malloc_lock(rec_cache_size+info->cache_records*
info->struct_length+1,