summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
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/mysql_priv.h
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/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 6e35291b1c7..15cf8729a54 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1970,7 +1970,8 @@ extern ulong slow_launch_threads, slow_launch_time;
extern ulong table_cache_size, table_def_size;
extern MYSQL_PLUGIN_IMPORT ulong max_connections;
extern ulong max_connect_errors, connect_timeout;
-extern ulong slave_net_timeout, slave_trans_retries;
+extern ulong slave_trans_retries;
+extern uint slave_net_timeout;
extern ulong what_to_log,flush_time;
extern ulong query_buff_size;
extern ulong max_prepared_stmt_count, prepared_stmt_count;