Bug #4190 restore of a sql-file fails when one of the columns is blob
Submitted: 17 Jun 2004 16:00 Modified: 30 Jun 2004 20:38
Reporter: matthijs brouwer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.5 OS:Windows (win 2000)
Assigned to: Ulrich Bayer CPU Architecture:Any

[17 Jun 2004 16:00] matthijs brouwer
Description:
when a table contains a field of type BLOB it was not possible to backup it in version 1.0.3 of MySQL admin. (bug 3516) this seems to be fixed now in 1.0.5 but now the created SQL file can't be restored. The error message "Error while retrieving backup content" is displayed.

How to repeat:
create a MyISAM table with a blob field, insert some JPG/gif data in the table. in MySQL admin create a backup. Try any of the advanced options, they all produce the same result: the tables are succesfully stored in an SQL file. Then try "restore", select the sql file and press "start restore". The same process with a table without BLOB fields works fine.

Suggested fix:
I think it's not in the way the backup is created. I've replaced the part in the created SQL file with a little BLOB info of wich I was sure it worked, and still the restore wouldn't work (not really full-proof, but as close as I could get). So it's somewhere in the way the SQL is read or processed during the restore.
[23 Jun 2004 17:30] Ulrich Bayer
Thanks for the good description!
I have reproduced it but I still have to think how I can fix this best.
[30 Jun 2004 20:38] Ulrich Bayer
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:

When dumping tables binary data gets converted to hex. This eliminates the problem.