summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2021-08-09 16:26:21 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2021-08-18 14:19:23 +0530
commitd6f19555cc9bcf6a01cbf71d2ee4c2fdae93c839 (patch)
tree4e5e19d36d943c0af9bd84a39e26765f7696262e /sql/slave.cc
parentc949772680447b510eb42a5053e1da407019381a (diff)
downloadmariadb-git-bb-10.7-sujatha.tar.gz
MDEV-23372: rpl.rpl_skip_replication still fails in buildbot with an extrabb-10.7-sujatha
warning Problem: ======== [Warning] Aborted connection 18 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets) [Note] Start binlog_dump to slave_server(2), pos(, 4), using_gtid(0), gtid('') [Warning] Aborted connection 17 to db: 'unconnected' user: 'root' host: 'localhost' (A slave with the same server_uuid/server_id as this slave has co) [Warning] Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process theml Analysis: ========= Issue is similar MDEV-14203. MDEV-14203 fix addressed network write error issue now the same needs to be implemented for network read error. Fix: === Upon network read error donot attempt reconnect, proceed to master-slave handshake. This ensures that master is aware of slave's capability to use checksums.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index e7aa0d4a510..9e5ddf4aec9 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3606,8 +3606,16 @@ static int request_dump(THD *thd, MYSQL* mysql, Master_info* mi,
now we just fill up the error log :-)
*/
if (mysql_errno(mysql) == ER_NET_READ_INTERRUPTED ||
- mysql_errno(mysql) == ER_NET_ERROR_ON_WRITE)
- *suppress_warnings= TRUE; // Suppress reconnect warning
+ mysql_errno(mysql) == ER_NET_ERROR_ON_WRITE ||
+ mysql_errno(mysql) == ER_NET_READ_ERROR)
+ {
+ *suppress_warnings= TRUE; // Suppress reconnect warning on slave
+
+ if (global_system_variables.log_warnings > 2)
+ sql_print_error("Error on COM_BINLOG_DUMP: %d %s, will retry in %d secs",
+ mysql_errno(mysql), mysql_error(mysql),
+ mi->connect_retry);
+ }
else
sql_print_error("Error on COM_BINLOG_DUMP: %d %s, will retry in %d secs",
mysql_errno(mysql), mysql_error(mysql),