From cd323e29d4f52dfc3f52aa541b7cfab01bf84188 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Jun 2006 19:44:43 +0500 Subject: BUG#12982 - LOAD DATA fails without any error for big files with big read buffer Setting read buffer to values greater than SSIZE_MAX results in unexpected behavior. According to read(2) manual: If count is greater than SSIZE_MAX, the result is unspecified. Set upper limit for read_buffer_size and read_rnd_buffer_size to SSIZE_MAX. include/my_global.h: Define SSIZE_MAX if not defined. sql/mysqld.cc: Set upper limit for read_buffer_size and read_rnd_buffer_size to SSIZE_MAX. --- include/my_global.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 7adf4845984..0458d9dcf2c 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -736,6 +736,9 @@ 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 (ssize_t)((~((size_t) 0)) / 2) +#endif #if !defined(HAVE_ISINF) && !defined(isinf) #define isinf(X) 0 -- cgit v1.2.1