summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2010-10-08 00:34:59 +0100
committerLuis Soares <luis.soares@oracle.com>2010-10-08 00:34:59 +0100
commite514a7a644f6fcb553463f7bdefb73174c112d87 (patch)
tree388dff9a4a8780ebd595f1e2a6a3f1822ed0d914 /sql/sql_yacc.yy
parent76643a469a58beee1ffff9636c87eb8c36f2177d (diff)
parentcc15d2462cf0b32576010d1810960969cba48182 (diff)
downloadmariadb-git-e514a7a644f6fcb553463f7bdefb73174c112d87.tar.gz
BUG#54144: manual merged bzr bundle from bug report.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy31
1 files changed, 12 insertions, 19 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 2fc39757511..d73dff9aaeb 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1933,35 +1933,28 @@ 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)
- {
- const char format[]= "%d seconds";
- char buf[4*sizeof(SLAVE_MAX_HEARTBEAT_PERIOD) + sizeof(format)];
- sprintf(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;
+ if (Lex->mi.heartbeat_period > SLAVE_MAX_HEARTBEAT_PERIOD ||
+ Lex->mi.heartbeat_period < 0.0)
+ {
+ const char format[]= "%d";
+ char buf[4*sizeof(SLAVE_MAX_HEARTBEAT_PERIOD) + sizeof(format)];
+ sprintf(buf, format, SLAVE_MAX_HEARTBEAT_PERIOD);
+ my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE, MYF(0), buf);
+ MYSQL_YYABORT;
}
if (Lex->mi.heartbeat_period > slave_net_timeout)
{
push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
- ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE),
- " exceeds the value of `slave_net_timeout' sec.",
- " A sensible value for the period should be"
- " less than the timeout.");
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX,
+ ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX));
}
if (Lex->mi.heartbeat_period < 0.001)
{
if (Lex->mi.heartbeat_period != 0.0)
{
push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
- ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE),
- " is less than 1 msec.",
- " The period is reset to zero which means"
- " no heartbeats will be sending");
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN,
+ ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN));
Lex->mi.heartbeat_period= 0.0;
}
Lex->mi.heartbeat_opt= LEX_MASTER_INFO::LEX_MI_DISABLE;