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-17 11:26:57 +0530
commit4d313df25a496a927dcc19c0a8bd931fe20e9115 (patch)
tree428ec90e66000cb74ed26896efce89b9736a3f14 /sql/slave.cc
parentdc58303cf8a7d0884d44cac54772b0aa506b6e6a (diff)
downloadmariadb-git-bb-10.4-sujatha.tar.gz
MDEV-23372: rpl.rpl_skip_replication still fails in buildbot with an extrabb-10.4-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 31bd9372a14..dd9009fc7f0 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3532,8 +3532,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),