Hi Andrei,
According to our discussion, since it seems that there is no evidence
on the bug I am approving this patch. Hopefully, we will get more
details on the bug itself (PB should output some helpful information).
Regards,
Luís
Andrei Elkin wrote:
> #At file:///home/andrei/MySQL/BZR/FIXES/6.0-bt-bug37714-rpl_heartbeat_dup_39077/
> based on revid:gshchepa@stripped
>
> 2807 Andrei Elkin 2008-12-12
> Bug #37714 rpl.rpl_heartbeat fails sporadically in pushbuild due to timeout
>
> The reason of the failure on windows platform was not detected. Still, a piece
> of heartbeat code
> had a flaw fixed with Bug #39077.
> It's probable that the patch for the latter bug, which is going to be pushed to
> 6.0 main,
> can help with the current.
>
> Attempted to fix with patch for Bug #39077.
> modified:
> mysql-test/suite/rpl/r/rpl_heartbeat.result
> mysql-test/suite/rpl/t/disabled.def
> sql/sql_yacc.yy
>
> per-file messages:
> mysql-test/suite/rpl/r/rpl_heartbeat.result
> results changed due to error codes shift.
> mysql-test/suite/rpl/t/disabled.def
> restoring rpl_heartbeat for execution.
> sql/sql_yacc.yy
> correcting the size of an array to have capacity slightly bigger than the
> possible maximum.
> === modified file 'mysql-test/suite/rpl/r/rpl_heartbeat.result'
> --- a/mysql-test/suite/rpl/r/rpl_heartbeat.result 2008-06-04 08:40:49 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result 2008-12-12 17:36:43 +0000
> @@ -11,13 +11,13 @@ Variable_name Slave_heartbeat_period
> Value 5.000
> change master to master_host='127.0.0.1',master_port=MASTER_PORT,
> master_user='root', master_heartbeat_period= 0.0009999;
> Warnings:
> -Warning 1671 The requested value for the heartbeat period is less than 1 msec. The
> period is reset to zero which means no heartbeats will be sending
> +Warning 1678 The requested value for the heartbeat period is less than 1 msec. The
> period is reset to zero which means no heartbeats will be sending
> show status like 'Slave_heartbeat_period';;
> Variable_name Slave_heartbeat_period
> Value 0.000
> change master to master_host='127.0.0.1',master_port=MASTER_PORT,
> master_user='root', master_heartbeat_period= 4294967;
> Warnings:
> -Warning 1671 The requested value for the heartbeat period exceeds the value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the
> timeout.
> +Warning 1678 The requested value for the heartbeat period exceeds the value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the
> timeout.
> show status like 'Slave_heartbeat_period';;
> Variable_name Slave_heartbeat_period
> Value 4294967.000
> @@ -29,7 +29,7 @@ reset slave;
> set @@global.slave_net_timeout= 5;
> change master to master_host='127.0.0.1',master_port=MASTER_PORT,
> master_user='root', master_heartbeat_period= 5.001;
> Warnings:
> -Warning 1671 The requested value for the heartbeat period exceeds the value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the
> timeout.
> +Warning 1678 The requested value for the heartbeat period exceeds the value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the
> timeout.
> show status like 'Slave_heartbeat_period';;
> Variable_name Slave_heartbeat_period
> Value 5.001
> @@ -41,7 +41,7 @@ Variable_name Slave_heartbeat_period
> Value 4.000
> set @@global.slave_net_timeout= 3 /* must be a warning */;
> Warnings:
> -Warning 1671 The currect value for master_heartbeat_period exceeds the new value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
> +Warning 1678 The currect value for master_heartbeat_period exceeds the new value of
> `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
> reset slave;
> drop table if exists t1;
> set @@global.slave_net_timeout= 10;
>
> === modified file 'mysql-test/suite/rpl/t/disabled.def'
> --- a/mysql-test/suite/rpl/t/disabled.def 2008-11-06 16:18:25 +0000
> +++ b/mysql-test/suite/rpl/t/disabled.def 2008-12-12 17:36:43 +0000
> @@ -25,7 +25,6 @@ rpl_ssl : Bug#32217 r
> rpl_row_until : Bug#28772 rpl_row_until fails in pushbuild
> rpl_log_pos : Bug#8693 Test 'rpl_log_pos' fails sometimes
> rpl_row_basic_7ndb : BUG#33360 2007-12-19 mats rpl_ndb_idempotent fails due
> to null field for table on slave side
> -rpl_heartbeat : Bug#37714 2008-07-14 alik Disabled to make 6.0 greaner
> (the test fails too often)
> rpl_idempotency : Bug#37767 2008-07-14 alik Disabled to make 6.0 greaner
> (the test fails too often)
>
> rpl_locktrans_innodb : Bug#37712 2008-07-17 alik Disabled to make 6.0 greaner
> (the test fails too often)
>
> === modified file 'sql/sql_yacc.yy'
> --- a/sql/sql_yacc.yy 2008-11-17 09:57:51 +0000
> +++ b/sql/sql_yacc.yy 2008-12-12 17:36:43 +0000
> @@ -1743,14 +1743,15 @@ master_def:
> | MASTER_HEARTBEAT_PERIOD_SYM EQ NUM_literal
> {
> Lex->mi.heartbeat_period= (float) $3->val_real();
> - if (Lex->mi.heartbeat_period > SLAVE_MAX_HEARTBEAT_PERIOD ||
> - Lex->mi.heartbeat_period < 0.0)
> - {
> - char buf[sizeof(SLAVE_MAX_HEARTBEAT_PERIOD*4)];
> - my_sprintf(buf, (buf, "%d seconds", SLAVE_MAX_HEARTBEAT_PERIOD));
> - my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> - MYF(0),
> - " is negative or exceeds the maximum ",
> + if (Lex->mi.heartbeat_period > SLAVE_MAX_HEARTBEAT_PERIOD ||
> + Lex->mi.heartbeat_period < 0.0)
> + {
> + const char format[]= "%d seconds";
> + char buf[4*sizeof(SLAVE_MAX_HEARTBEAT_PERIOD) + sizeof(format)];
> + my_sprintf(buf, (buf, format, SLAVE_MAX_HEARTBEAT_PERIOD));
> + my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
> + MYF(0),
> + " is negative or exceeds the maximum ",
> buf);
> MYSQL_YYABORT;
> }
>
>