summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-12-26 17:50:07 +0200
committermonty@mashka.mysql.fi <>2002-12-26 17:50:07 +0200
commitc729c0ea05d6125aff87737208a14d201fe5e58c (patch)
treec1b4623e2e1ef2668fcc456f584989ac6dd9e9c0 /sql
parentafa028dc01775eced99a96efa3732d0d4d8d66dc (diff)
downloadmariadb-git-c729c0ea05d6125aff87737208a14d201fe5e58c.tar.gz
Safety fix to not allow one to specify too big max_alloc_packet to mysqld
Safety fix to not cause conflicts with extended packages in 4.0.
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/net_serv.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index bd17f7339a4..e2adc1a068e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2984,7 +2984,7 @@ CHANGEABLE_VAR changeable_vars[] = {
#endif
,0, 1, 0, 1 },
{ "max_allowed_packet", (long*) &max_allowed_packet,
- 1024*1024L, 80, 64*1024*1024L, MALLOC_OVERHEAD, 1024 },
+ 1024*1024L, 80, 16*1024*1024L, MALLOC_OVERHEAD, 1024 },
{ "max_binlog_cache_size", (long*) &max_binlog_cache_size,
~0L, IO_SIZE, ~0L, 0, IO_SIZE },
{ "max_binlog_size", (long*) &max_binlog_size,
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 750079b39a5..2583f0767f4 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -40,7 +40,7 @@ ulong max_allowed_packet=65536;
extern ulong net_read_timeout,net_write_timeout;
extern uint test_flags;
#else
-ulong max_allowed_packet=16*1024*1024L;
+ulong max_allowed_packet=16*1024*1024L-1;
ulong net_read_timeout= NET_READ_TIMEOUT;
ulong net_write_timeout= NET_WRITE_TIMEOUT;
#endif