From 76c19c74deaeddfd80bcd641b07775031b7c5123 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Sep 2007 11:58:04 +0400 Subject: This patch is a part of work on bug #5731 "key_buffer_size not properly restricted to 4GB". The patch limits read_buffer_size and read_rnd_buffer_size by 2 GB on all platforms for the following reasons: - I/O code in mysys, code in mf_iocache.c and in some storage engines do not currently work with sizes > 2 GB for those buffers - even if the above had been fixed, Windows POSIX read() and write() calls are not 2GB-safe, so setting those buffer to sizes > 2GB would not work correctly on 64-bit Windows. include/my_global.h: Removed SSIZE_MAX definition because it's not neeeded anymore. sql/mysqld.cc: Limit read_buffer_size and read_rnd_buffer_size by 2 GB on all platforms. --- include/my_global.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index b91ff8a9e5b..7d34549c8b6 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -808,9 +808,6 @@ typedef SOCKET_SIZE_TYPE size_socket; #define DBL_MAX 1.79769313486231470e+308 #define FLT_MAX ((float)3.40282346638528860e+38) #endif -#ifndef SSIZE_MAX -#define SSIZE_MAX ((~((size_t) 0)) / 2) -#endif #if !defined(HAVE_ISINF) && !defined(isinf) #define isinf(X) 0 -- cgit v1.2.1