maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01695
bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2780) Bug#49474
#At lp:maria based on revid:monty@xxxxxxxxxxxx-20091206172612-zemnptoycsg283y3
2780 Michael Widenius 2009-12-06
Fixed bug #49474 Replication from 4.0 to 5.1 broken
Reviewer: knielsens
modified:
sql/slave.cc
per-file messages:
sql/slave.cc
For 4.0 server (with no time_zone variable), don't stop replication but give a warning
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-12-03 11:19:05 +0000
+++ b/sql/slave.cc 2009-12-06 17:51:48 +0000
@@ -1117,18 +1117,27 @@ be equal for the Statement-format replic
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;
}