summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorsvoj@may.pils.ru <>2006-06-07 19:44:43 +0500
committersvoj@may.pils.ru <>2006-06-07 19:44:43 +0500
commit036f947be7caf20a22b52b6d3b8a66f2411f24e9 (patch)
tree662f913bb43e9244442d68919ba4df6adc3bd89c /sql/mysqld.cc
parent1eee0053db0ac712394e173ca516b099034d8ddc (diff)
downloadmariadb-git-036f947be7caf20a22b52b6d3b8a66f2411f24e9.tar.gz
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.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ef2f52a33df..b862b381d2f 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -5847,7 +5847,8 @@ The minimum value for this variable is 4096.",
"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 4096.",
(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.",