Below is the list of changes that have just been committed into a local
5.1 repository of andrei. When andrei 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@stripped, 2008-02-20 15:12:47+02:00, aelkin@stripped +2 -0
Bug #34686 change master w/o explict master_heartbeat_period dont reset period to
default
There appeared failures on 5.1-telco-6.3 tree after mtr started using
bigger value to init @@global.slave_net.timeout.
Whereas the very first default setting was correct to follow
hb=slave_net_timeout/2 rule
rule, the following CHANGE master w/o the keyword failed.
Fixed with enforcing logics in change_master() to reset the heartbeat period
to the specified slave_net_timeout/2 when the option is not passed to
CHANGE master command.
mysql-test/suite/rpl/t/rpl_heartbeat.test@stripped, 2008-02-20 15:12:45+02:00,
aelkin@stripped +10 -1
Bug #34686 change master w/o explict master_heartbeat_period dont reset period to
default
There apeared failures on 5.1-telco-6.3 tree after mtr started using bigger
value to init @@global.slave_net.timeout.
Fixed with enforcing logics in change_master() to reset the heartbeat period
to the specified slave_net_timeout/2 when the option is not passed to
the CHANGE master statement.
sql/sql_repl.cc@stripped, 2008-02-20 15:12:45+02:00, aelkin@stripped +3 -0
ensuring hb repiod gets reset to the specified default.
diff -Nrup a/mysql-test/suite/rpl/t/rpl_heartbeat.test
b/mysql-test/suite/rpl/t/rpl_heartbeat.test
--- a/mysql-test/suite/rpl/t/rpl_heartbeat.test 2007-10-13 23:41:06 +03:00
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test 2008-02-20 15:12:45 +02:00
@@ -16,8 +16,17 @@ connection master;
reset master;
connection slave;
-set @@global.slave_net_timeout= 10;
+# there can be a warning if mtr set the global init value bigger than
+# the following assignment. The warning is a grace for the user
+# to warn her that the new value of the global var is bigger than
+# the current value of the hb period, i.e the sanity condition
+# 0 < hb < slave_net_timeout does not hold.
+# The warning has to be disabled as mtr can change the init value
+# for slave_net_timeout
+--disable_warnings
+set @@global.slave_net_timeout= 10;
+--enable_warnings
###
### Checking the range
###
diff -Nrup a/sql/sql_repl.cc b/sql/sql_repl.cc
--- a/sql/sql_repl.cc 2007-10-15 12:38:17 +03:00
+++ b/sql/sql_repl.cc 2008-02-20 15:12:45 +02:00
@@ -1257,6 +1257,9 @@ bool change_master(THD* thd, MASTER_INFO
mi->connect_retry = lex_mi->connect_retry;
if (lex_mi->heartbeat_opt != LEX_MASTER_INFO::LEX_MI_UNCHANGED)
mi->heartbeat_period = lex_mi->heartbeat_period;
+ else
+ mi->heartbeat_period= (float) min(SLAVE_MAX_HEARTBEAT_PERIOD,
+ (slave_net_timeout/2.0));
mi->received_heartbeats= LL(0); // counter lives until master is CHANGEd
if (lex_mi->ssl != LEX_MASTER_INFO::LEX_MI_UNCHANGED)
mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::LEX_MI_ENABLE);
| Thread |
|---|
| • bk commit into 5.1 tree (aelkin:1.2609) BUG#34686 | Andrei Elkin | 20 Feb |