Commit 22490a0d authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8345 STOP SLAVE should not cause an ERROR to be logged to the error log

cherry-pick from 5.7:
  commit 6b24763
  Author: Manish Kumar <manish.4.kumar@oracle.com>
  Date:   Tue Mar 27 13:10:42 2012 +0530

  BUG#12977988 - ON STOP SLAVE: ERROR READING PACKET FROM SERVER: LOST CONNECTION
                 TO MYSQL SERVER
  BUG#11761457 - ERROR 2013 + "ERROR READING RELAY LOG EVENT" ON STOP SLAVEBUG#12977988 - ON STOP SLAVE: ERROR READING PACKET FROM SERVER: LOST CONNECTION
               TO MYSQL SERVER
parent 25932708
include/master-slave.inc
[connection master]
include/stop_slave.inc
NOT FOUND /Error reading packet from server: Lost connection/ in slave_log.err
include/start_slave.inc
include/rpl_end.inc
--log-error=$MYSQLTEST_VARDIR/tmp/slave_log.err
#
# MDEV-8345 STOP SLAVE should not cause an ERROR to be logged to the error log
#
source include/have_binlog_format_mixed.inc; # don't repeat the test three times
source include/master-slave.inc;
connection master;
sync_slave_with_master;
source include/stop_slave.inc;
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/slave_log.err;
let SEARCH_PATTERN=Error reading packet from server: Lost connection;
let SEARCH_RANGE= -50000;
source include/search_pattern_in_file.inc;
source include/start_slave.inc;
source include/rpl_end.inc;
...@@ -3120,8 +3120,13 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings) ...@@ -3120,8 +3120,13 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings)
*suppress_warnings= TRUE; *suppress_warnings= TRUE;
} }
else else
sql_print_error("Error reading packet from server: %s ( server_errno=%d)", {
if (!mi->rli.abort_slave)
{
sql_print_error("Error reading packet from server: %s (server_errno=%d)",
mysql_error(mysql), mysql_errno(mysql)); mysql_error(mysql), mysql_errno(mysql));
}
}
DBUG_RETURN(packet_error); DBUG_RETURN(packet_error);
} }
......
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