Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > media > main-testing-src > by-pkgid > adf83d37405e61716c565e6e16f370ea > files > 27

mysql-5.0.45-7.3mdv2008.0.src.rpm

From: Alexey KopytovDate: September 7 2007 9:58am
Subject: bk commit into 5.0 tree (kaa:1.2404) BUG#5731

Below is the list of changes that have just been committed into a local
5.0 repository of kaa. When kaa does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-09-07 11:58:04+04:00, kaa@polly.(none) +2 -0
  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@stripped, 2007-09-07 11:57:48+04:00, kaa@polly.(none) +0 -3
    Removed SSIZE_MAX definition because it's not neeeded anymore.

  sql/mysqld.cc@stripped, 2007-09-07 11:57:48+04:00, kaa@polly.(none) +3 -3
    Limit read_buffer_size and read_rnd_buffer_size by 2 GB on all platforms.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kaa
# Host:	polly.(none)
# Root:	/home/kaa/src/maint/bug5731.old/my50-bug5731-read_buffer_size

--- 1.596/sql/mysqld.cc	2007-02-06 16:43:58 +03:00
+++ 1.597/sql/mysqld.cc	2007-09-07 11:57:48 +04:00
@@ -5948,7 +5948,7 @@ The minimum value for this variable is 4
    "Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
    (gptr*) &global_system_variables.read_buff_size,
    (gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
-   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE,
+   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE,
    0},
   {"read_only", OPT_READONLY,
    "Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege",
@@ -5960,12 +5960,12 @@ The minimum value for this variable is 4
    (gptr*) &global_system_variables.read_rnd_buff_size,
    (gptr*) &max_system_variables.read_rnd_buff_size, 0,
    GET_ULONG, REQUIRED_ARG, 256*1024L, IO_SIZE*2+MALLOC_OVERHEAD,
-   SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
+   INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0},
   {"record_buffer", OPT_RECORD_BUFFER,
    "Alias for read_buffer_size",
    (gptr*) &global_system_variables.read_buff_size,
    (gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
-   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
+   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0},
 #ifdef HAVE_REPLICATION
   {"relay_log_purge", OPT_RELAY_LOG_PURGE,
    "0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.",

--- 1.134/include/my_global.h	2007-02-01 11:27:33 +03:00
+++ 1.135/include/my_global.h	2007-09-07 11:57:48 +04:00
@@ -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