Bug #15260 Restore of a mysql dump does not work.
Submitted: 26 Nov 2005 11:35 Modified: 10 Jan 2006 9:59
Reporter: Josef Bajada Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.1.5 OS:Windows (Win XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any

[26 Nov 2005 11:35] Josef Bajada
Description:
This is just a repost of Bug #14798 however for version 1.1.5, also since the effect seems slightly different since the Analysis is actually completing but its just that the restore never starts. 

The effect is that it says that 'The analyze operation was finished
successfully.' but restore is never done.

I have a normal mysql dump I had done using DBManager. I looked at it and its
just a few MyISAM tables and some inserts of data. The file is around 64Kb.

I tried the following combinations, all failed:
 - With Target Scheme 'New Schema...'
 - Creating a new schema myself and selecting it from Target Schema.
 - With or Without Ignore Errors.
 - With or Without Create Database(s) if they don't exist.
 - With Character Set UTF8 and Latin1

All the same effect.

Another strange thing I noticed is that when the Analyse process finishes the
total bytes is smaller than the processed bytes! How can that be?

When I selected Latin1 the following was the output. When UTF8 is selected the output is different.

Total number of Bytes: 64941
Number of Bytes processed: 88723

I tried it with another simpler dump of just 4KB and the effect was the same:

Total number of Bytes: 3687
Number of Bytes processed: 26354

How to repeat:
Try to restore a mysql dump.

Suggested fix:
I suppose the part where mysql administrator is reading the file is not working well.
[26 Nov 2005 12:10] Valeriy Kravchuk
Thank you for a problem report. Please, send the problematic dump. You can upload it as a private file using the File tab.
[4 Dec 2005 15:13] Valeriy Kravchuk
Thank you for a problematic dump. I tried to repeat the problem just as you described and yes, this dump is analyzed successfully (according to the message), but the restore is not performed. Verified with MySQL 5.0.15-nt and MySQL Administrator 1.1.5.

The same dump allowed to create the database without any problem in mysql client. The dump created from the same trees database by MySQL Administrator can be restored successfully. 

I do not know the exact reason why the dump you provided is treated as it is (may be, # comments are the reason).
[10 Jan 2006 9:59] Mike Lischke
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Actually, there were two problems in one. Analyzation did *not* finish successfully, only the dialog did report the wrong state and there was a problem with reading certain files. Hopefully this is now fixed, once and for all.
[24 Sep 2006 21:39] Peter Richards
Do we have a way to circumvent this problem until a fix is available. It seems to be related to editing the backup file. I just did a backup and then did an analyse on the same machine and it worked OK. I then edited the backup file to change the USE statement as the database on the remote system has a different name. I then tried analyse again and it failed. I really need to restore this backup to the other system so any clues as to the cause would be appreciated.