List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:June 7 2006 2:44pm
Subject:bk commit into 5.0 tree (svoj:1.2132) BUG#12982
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj 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
  1.2132 06/06/07 19:44:43 svoj@stripped +2 -0
  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.

  sql/mysqld.cc
    1.547 06/06/07 19:44:38 svoj@stripped +4 -3
    Set upper limit for read_buffer_size and read_rnd_buffer_size to
    SSIZE_MAX.

  include/my_global.h
    1.118 06/06/07 19:44:37 svoj@stripped +3 -0
    Define SSIZE_MAX if not defined.

# 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:	svoj
# Host:	may.pils.ru
# Root:	/home/svoj/devel/mysql/BUG12982/mysql-5.0-engines

--- 1.546/sql/mysqld.cc	2006-05-08 20:09:02 +05:00
+++ 1.547/sql/mysqld.cc	2006-06-07 19:44:38 +05:00
@@ -5847,7 +5847,8 @@ 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, ~0L, MALLOC_OVERHEAD, IO_SIZE, 0},
+   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, 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",
    (gptr*) &opt_readonly,
@@ -5858,12 +5859,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,
-   ~0L, MALLOC_OVERHEAD, IO_SIZE, 0},
+   SSIZE_MAX, 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, ~0L, MALLOC_OVERHEAD, IO_SIZE, 0},
+   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, 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.117/include/my_global.h	2006-04-07 15:46:44 +05:00
+++ 1.118/include/my_global.h	2006-06-07 19:44:37 +05:00
@@ -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
Thread
bk commit into 5.0 tree (svoj:1.2132) BUG#12982Sergey Vojtovich7 Jun