Bug #47702 Error 2013: Lost connection to MySQL server during query when dumping table
Submitted: 29 Sep 2009 8:12 Modified: 3 Nov 2009 8:30
Reporter: Andreas Mller Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.86 OS:Windows (Windows 2003)
Assigned to: CPU Architecture:Any
Tags: large binary data, lost connection to server, windows 2003

[29 Sep 2009 8:12] Andreas Mller
Description:
While dumping or replicating large binary data in blob fields (some megabytes in each row) the connection to mysql server is lost and the dump or replication aborted.

How to repeat:
- MySQL 5.x (5.0,5.1,5.2) (not testet with 4.x) on Windows 2003 Server
- A table with some fields, one longblob field with some 1000 rows of "large" binary data e.g. some files from harddisk, images, videos ...
- Try to replicate this do another Windows 2003 server will fail
- mysqldump running on Windows 2003 will also fail

Than try mysqldump remote from a linux/win xp system. This will work. Also moving the database so a linux/win xp system and replicate oder dump will work. But running mysqldump on Windows 2003 with the database on linux/win xp will fail again.
[29 Sep 2009 8:16] Sveta Smirnova
Thank you for the report.

Please check if value of max_allowed_packet is larger than largest row in the dump. Also check if problem is repeatable with current version 5.0.86 or 5.1.39. If this is still the case upload cump privately as described in "Files" section.
[29 Sep 2009 8:17] Valeriy Kravchuk
Please, specify the exact (5.0.x, 5.1.y) version checked and send my.ini file content from the affected MySQL server(s).
[29 Sep 2009 8:53] Andreas Mller
-----------------------------
my.ini on Windows 2003 Server
-----------------------------
[mysqld]
port			= 3315

key_buffer		= 64M
max_allowed_packet	= 1024M
table_cache		= 128
sort_buffer_size	= 10M
net_buffer_length	= 8K
myisam_sort_buffer_size	= 16M

thread_stack = 64K

basedir = e:/replica/thj/
datadir = e:/replica/thj/data/

server-id	= 2

master-host=5.20.41.248
master-port=3306
master-user=xxx
master-password=xxx
master-connect-retry=60
slave_compressed_protocol=1
#skip-slave-start

skip-innodb
-----------------------------

-----------------------------
mysqldump call
-----------------------------
mysqldump --max_allowed_packet=1024M --user=xxx --password=xxx --port=3315 -x --all-databases --result-file=dump.sql
-----------------------------

Verified with version 5.0.86-community for Win32 on ia32.
[29 Sep 2009 9:17] Sveta Smirnova
Thank you for the feedback.

Please send us dump of the database privately.
[29 Sep 2009 9:21] Susanne Ebrecht
How much ram is the machine having?
[29 Sep 2009 10:11] Sveta Smirnova
Thank you for the feedback.

But file is broken in the end or I can not open it with bunzip2 on Mac. Please check archive on your side.
[29 Sep 2009 10:59] Andreas Mller
The current machine has 6 GB RAM (AWE Extension enabled). But the same error occurs also on 2 GB / 4 GB RAM machines.
[29 Sep 2009 11:14] MySQL Verification Team
Please upload again the file how Sveta commented the one you have uploaded is broken (I tested on Linux too). Thanks in advance.
[3 Oct 2009 8:30] Sveta Smirnova
Thank you for the file.

I can not repeat described behavior on similar box with same settings.

Please send us error log file also. Thanks in advance.
[4 Nov 2009 0:01] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".