Commit 6dd90cc9 authored by Michael Widenius's avatar Michael Widenius

Fixed bug #49474 Replication from 4.0 to 5.1 broken

Reviewer: knielsens


sql/slave.cc:
  For 4.0 server (with no time_zone variable), don't stop replication but give a warning
parent 17a7debb
......@@ -1117,18 +1117,27 @@ be equal for the Statement-format replication to work";
goto err;
}
}
else if (is_network_error(mysql_errno(mysql)))
else if (is_network_error(err_code= mysql_errno(mysql)))
{
mi->report(WARNING_LEVEL, mysql_errno(mysql),
"Get master TIME_ZONE failed with error: %s", mysql_error(mysql));
mi->report(ERROR_LEVEL, err_code,
"Get master TIME_ZONE failed with error: %s",
mysql_error(mysql));
goto network_err;
}
else if (err_code == ER_UNKNOWN_SYSTEM_VARIABLE)
{
/* We use ERROR_LEVEL to get the error logged to file */
mi->report(ERROR_LEVEL, err_code,
"MySQL master doesn't have a TIME_ZONE variable. Note that"
"if your timezone is not same between master and slave, your "
"slave may get wrong data into timestamp columns");
}
else
{
/* Fatal error */
errmsg= "The slave I/O thread stops because a fatal error is encountered \
when it try to get the value of TIME_ZONE global variable from master.";
err_code= mysql_errno(mysql);
sprintf(err_buff, "%s Error: %s", errmsg, mysql_error(mysql));
goto err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment