Bug #53955 Error 2013 + "Error reading relay log event" on STOP SLAVE in Windows
Submitted: 25 May 2010 1:22 Modified: 20 Jul 2012 13:47
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1.47 OS:Microsoft Windows
Assigned to: Luis Soares CPU Architecture:Any
Triage: Needs Triage: D4 (Minor) / R6 (Needs Assessment) / E6 (Needs Assessment)

[25 May 2010 1:22] Roel Van de Paar
Description:
100510 19:00:02 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
100510 19:00:02 [Note] Slave I/O thread killed while reading event
100510 19:00:02 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000059', position 703012042
100510 19:00:02 [Note] Error reading relay log event: slave SQL thread was killed

Error 2013 shows when STOP SLAVE (IO_THREAD) is issued on Windows. Error does not show on Linux.

How to repeat:
"STOP SLAVE IO_THREAD" on Windows based install, check error log.

log_warnings setting has no effect.

Suggested fix:
Remove error
[25 May 2010 1:26] Roel Van de Paar
This also causes an event in Windows:

Event Type:	Error
Event Source:	MySQL
Event Category:	None
Event ID:	100
Date:		5/13/2010
Time:		9:30:00 PM
User:		N/A
Computer:	MySQLSRV
Description:
The description for Event ID ( 100 ) in Source ( MySQL ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013).
[25 May 2010 4:27] Roel Van de Paar
Verifying as D4.

100525 14:25:43 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
100525 14:25:43 [Note] Slave I/O thread killed while reading event
100525 14:25:43 [Note] Slave I/O thread exiting, read up to log 'log-bin.000001', position 194
100525 14:25:43 [Note] Error reading relay log event: slave SQL thread was killed
[22 Jun 2010 23:01] Roel Van de Paar
Actually, there are two issues:

mysql> STOP SLAVE IO_THREAD;
Query OK, 0 rows affected (0.01 sec)

=== Result
100623  8:58:07 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
100623  8:58:07 [Note] Slave I/O thread killed while reading event
100623  8:58:07 [Note] Slave I/O thread exiting, read up to log 'log-bin.000005', position 183
===

mysql> STOP SLAVE SQL_THREAD;
Query OK, 0 rows affected (0.00 sec)

=== Result
100623  8:57:39 [Note] Error reading relay log event: slave SQL thread was killed
===

A normal full STOP SLAVE produces both:

mysql> STOP SLAVE;
Query OK, 0 rows affected (0.01 sec)

=== Result
100623  8:59:58 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
100623  8:59:58 [Note] Slave I/O thread killed while reading event
100623  8:59:58 [Note] Slave I/O thread exiting, read up to log 'log-bin.000005', position 183
100623  8:59:58 [Note] Error reading relay log event: slave SQL thread was killed
===
[28 Oct 2010 9:13] Luis Soares
Related: BUG#5588.
[8 Feb 2012 6:44] Meiji KIMURA
Related? : Bug#61275
[20 Jul 2012 13:47] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[20 Jul 2012 13:48] Jon Stephens
The fix for this bug is scheduled to appear in the next major version, currently expected to be 5.7.0.

Closed.