diff options
author | Michael Widenius <monty@askmonty.org> | 2014-01-05 15:21:58 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2014-01-05 15:21:58 +0200 |
commit | 4e9a2d5469cd3baebcd3cce33db9b39d6ec9b67c (patch) | |
tree | 6acb27cb5fabdee61ac0e58407eb4b8ca34831c3 | |
parent | c050b5fdf9564e5ffd98ff381c61504efdf69f99 (diff) | |
download | mariadb-git-4e9a2d5469cd3baebcd3cce33db9b39d6ec9b67c.tar.gz |
Don't writing entries to slave log about binlog_checksum not existing on master if log_warnings is <=1.
This solves the issue of getting a lot of unnecessary errors logged on the slave when connecting to MySQL or an old MariaDB version.
sql/slave.cc:
Don't write that binlog_checksum doesn't exists on the master if log_warnings <= 1
-rw-r--r-- | sql/slave.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index afaca619a69..3c17f102a7f 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1670,10 +1670,14 @@ when it try to get the value of TIME_ZONE global variable from master."; if (mysql_errno(mysql) == ER_UNKNOWN_SYSTEM_VARIABLE) { - // this is tolerable as OM -> NS is supported - mi->report(WARNING_LEVEL, mysql_errno(mysql), - "Notifying master by %s failed with " - "error: %s", query, mysql_error(mysql)); + /* Ignore this expected error if not a high error level */ + if (global_system_variables.log_warnings > 1) + { + // this is tolerable as OM -> NS is supported + mi->report(WARNING_LEVEL, mysql_errno(mysql), + "Notifying master by %s failed with " + "error: %s", query, mysql_error(mysql)); + } } else { |