Bug #36571 Restore hangs for database size of 33K and more
Submitted: 7 May 2008 16:38 Modified: 9 Jun 2008 12:20
Reporter: Hema Sridharan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup OS:Linux (SUSE 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[7 May 2008 16:38] Hema Sridharan
Description:
1) I created a Database of size 33K.
2) I backed up the database and it got completed in just microseconds.
3) Then I dropped the Database.
4) I performed the RESTORE, it goes on and on for hours and never
completes.

Note:To my surprise the Restore of 32K is done within few microseconds
and if the size is 33K, Restore hangs!. I don't know the specific
reason.

How to repeat:
Database is backed up for size 32K
ndbdev@ndb16:/tmp> ls -lh
total 504K
-rw-rw----  1 ndbdev ndbdev  32K May  7 16:58 b2

Now perform Restore of 32K and it will be done in microseconds.

mysql> restore from '/tmp/b2';
+-----------+
| backup_id |
+-----------+
| 3         |
+-----------+
1 row in set (0.22 sec)

Now database backed up for size of 33K

ndbdev@ndb16:/tmp> ls -lh
total 508K
-rw-rw----  1 ndbdev ndbdev  33K May  7 16:59 b2

mysql> restore from '/tmp/b2';

Restore hangs!
[12 May 2008 20:48] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with test data. Could you please provide dump of problem database?
[12 May 2008 21:30] Hema Sridharan
I created the script that is attached to generate bigger database. Need to change the relevant socket path in $sock_path and can also change the values of $bid and 
$i as required to create huge database.
Once the test is run, perform Restore manually in mysql prompt like 
Restore from '/tmp/b2';
[13 May 2008 5:41] Rafal Somla
I'm reasonably sure that this problem is caused by issues reported in BUG#36624 and BUG#36586. In that case it is a duplicate of BUG#34701.
[14 May 2008 4:35] Hema Sridharan
I don't think its duplicate of the bug mentioned.
[15 May 2008 19:01] Sveta Smirnova
Thank you for the feedback.

Verified as described. Bug is only repeatable on 64-bit machine.
[6 Jun 2008 9:55] Øystein Grøvlen
If I apply the fix outlined in BUG#36586, I no longer get a hang.  Instead, I get:ERROR 1698 (HY000): Error when reading summary section of backup image.
[9 Jun 2008 12:20] Øystein Grøvlen
I have verified that the proposed fix for bug#36624 fixes fixes this.