summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2010-02-28 19:31:46 +0200
committerAndrei Elkin <aelkin@mysql.com>2010-02-28 19:31:46 +0200
commit1faafbb0475c538b1348789a86cd6455ee24d37d (patch)
treea1279a0a8e675f90f12da9b7a12452d5dbb16767 /sql/mysqld.cc
parent827a0d7cb4e825c7b7af6e0be7f0c82c4741ee6a (diff)
downloadmariadb-git-1faafbb0475c538b1348789a86cd6455ee24d37d.tar.gz
Bug #50296 Slave reconnects earlier than the prescribed slave_net_timeout value
There was auto-reconnecting by slave earlier than a prescribed by slave_net_timeout value. The issue happened on 64bit solaris that spotted rather incorrect casting of the ulong slave_net_timeout into the uint of mysql.options.read_timeout. Notice, that there is no reason for slave_net_timeout to be of type of ulong. Since it's primarily passed as arg to mysql_options the type can be made as uint to avoid all conversion hassles. That's what the fixes are made. A "side" effect of the patch is a new value for the max of slave_net_timeout to be the max of the unsigned int type (therefore to vary across platforms). Note, a regression test can't be made to run reliably without making it to last over some 20 secs. That's why it is placed in suite/large_tests. mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result: the new test results. mysql-test/suite/large_tests/t/rpl_slave_net_timeout-slave.opt: Initialization of the option that yields slave_net_timeout's default. sql/mysql_priv.h: changing type for slave_net_timeout from ulong to uint sql/mysqld.cc: changing type for slave_net_timeout from ulong to uint sql/sys_vars.cc: Refining the max value for slave_net_timeout to be as the max for uint type.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 05442643e23..45648536f4c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -453,7 +453,8 @@ ulong table_cache_size, table_def_size;
ulong what_to_log;
ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
ulong open_files_limit, max_binlog_size, max_relay_log_size;
-ulong slave_net_timeout, slave_trans_retries;
+ulong slave_trans_retries;
+uint slave_net_timeout;
uint slave_exec_mode_options;
ulonglong slave_type_conversions_options;
ulong thread_cache_size=0, thread_pool_size= 0;