summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-13 01:27:23 +0300
committerMonty <monty@mariadb.org>2015-08-13 01:27:23 +0300
commitafa9cb7519fcb73d546bba45d3baa7b157926084 (patch)
treee207ab7924f79ce56c822cf2f6b76f2ff9fe925a /include/my_sys.h
parent0403790722e3941779ccea26e85fcd818e2320b5 (diff)
downloadmariadb-git-afa9cb7519fcb73d546bba45d3baa7b157926084.tar.gz
Fixed overrun in key cache if one tried to allocate a key cache
of more than 45G with a key_cache_block_size of 1024 or less. The problem was that some of the arguments to my_multi_malloc() got to be more than 4G. Fix: - Inntroduced my_multi_malloc_large() that can handle big regions. - Changed MyISAM and Aria key caches to use my_multi_malloc_large(). I didn't change the default my_multi_malloc() as this would be a too big patch and we don't allocate 4G blocks anywhere else.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 9913ee8c79b..741116a1dd5 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -168,6 +168,7 @@ extern void set_malloc_size_cb(MALLOC_SIZE_CB func);
/* defines when allocating data */
extern void *my_malloc(size_t Size,myf MyFlags);
extern void *my_multi_malloc(myf MyFlags, ...);
+extern void *my_multi_malloc_large(myf MyFlags, ...);
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
extern void my_free(void *ptr);
extern void *my_memdup(const void *from,size_t length,myf MyFlags);