Bug #6301 mysqldump let mysql server crash while backing up InnoDB tables
Submitted: 28 Oct 2004 11:23 Modified: 30 Oct 2004 7:28
Reporter: Harm van Tilborg Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.21-standard OS:Linux (Debian GNU/Linux Woody 3.0)
Assigned to: CPU Architecture:Any

[28 Oct 2004 11:23] Harm van Tilborg
Description:
After I have made backups of about 600 databases in the 3.23.59 version (http://bugs.mysql.com/bug.php?id=6250) it was time to upgrade one of our SQL servers to 4.0.21. The dumps were about 400MB, and created with the following keywords: opt, quote-names, force and of course all databases. Restoring them on the new 4.0.21 server went smoothly. We were all satisfied and thought everything was allright.

Untill this night, normally we back the databases up around 5:00am in the morning. That happened also this morning, however, the backup was about 70MB, so time to check the error logs. The error logs can be found at the file section of this report. The 'show create table `loggedtraffic`' string is an InnoDB table, the first table of all the databases located at the server. When we took a look at the backup file everything was ok untill it was supposed to dump one of the InnoDB tables. When I run the backup script by hand I get errors like:

[zeromove] ~/mysqlbackup# /usr/local/mysql/bin/mysqldump -ppass -f harm > backup-harm.sql
/usr/local/mysql/bin/mysqldump: Can't get CREATE TABLE for table `client` (Lost connection to MySQL server during query)
[zeromove] ~/mysqlbackup#
Number of processes running now: 0
041028 13:18:16  mysqld restarted

Where harm was a small test database at a non-production MySQL server and client a InnoDB table. The error of the mysql server itself can be found at the file section.

How to repeat:
I've setup a small database with one InnoDB table, and when I try to mysqldump it the server just crashes with the message located in the file attached to this report. At the shell you'll also see some 'standard' error messages that the server has gone away:

/usr/local/mysql/bin/mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) when selecting the database

Suggested fix:
I really don't have a clue whether it's located in the InnoDB engine or perhaps in the mysqldump program.
[28 Oct 2004 11:24] Harm van Tilborg
mysql error file ({hostname}.err)

Attachment: mysql.err.txt (text/plain), 3.01 KiB.

[28 Oct 2004 11:25] Harm van Tilborg
A small note, when using the mysql-4.0.20 server and the mysqldump program it does not crash!
[28 Oct 2004 12:16] Marko Mäkelä
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

This is a duplicate of bug #5538. The bug may have been fixed in an updated Debian release of 4.0.21 (see the discussion of #5538), and it will be fixed in 4.0.22, which will be released very soon.
[28 Oct 2004 13:02] Harm van Tilborg
Hello Marko,

I did have searched through the database, word: 'innodb' and version: '4.0'. I did not found it there. But I'm sorry to duplicate this bug report.

I was however not using the Debian release of MySQL, but the standard binary version.
[28 Oct 2004 13:17] Marko Mäkelä
Harm,
It is MySQL who should be apologizing: the search function could be better.
I believe that version 4.0.22 (including the bug fix) will be released within a week.
Marko
[28 Oct 2004 13:42] Harm van Tilborg
Then I'll wait for that release, because I have good experiences with the precompiled version.
[30 Oct 2004 7:28] Heikki Tuuri
Fixed in 4.0.22.