Bug #24849 mysql administrator 1.2.6rc, backup of BLOB fails
Submitted: 6 Dec 2006 10:11 Modified: 12 Dec 2006 13:23
Reporter: jan iversen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S1 (Critical)
Version:1.2.6 rc OS:Windows (windowsXP)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Backup, BLOB, mysql administrator

[6 Dec 2006 10:11] jan iversen
Description:
Doing a backup from mysql administrator of tables containing binary BLOB fields generates a faulty sql file.

the file can be restored but the BLOB content is often not identical !!

How to repeat:
Generate a table with a BLOB field, insert a binary sequence e.g. from hex 00 to hex ff (256 bytes).

Make a backup with administrator.

Make a restore with administrator.

the BLOB does not contain hex 00 to hex ff anymore.

Suggested fix:
Dump of BLOB and VARBINARY should be made in hex (--hex in sqldump) instead of
as now, where the binary information is written directly to the sql file.
[6 Dec 2006 11:42] MySQL Verification Team
Thank you for the bug report. Yes could you please provide your test case
script. Thanks in advance.
[11 Dec 2006 8:15] jan iversen
Hi. 

The zip file, contains 4 files to help you debug the problem.

dump_original.sql is a mysqldump of the original database
backup_admin.sql is a admin tool backup of original database

The backup is done on a german installed XP.
The restore is done on a danish installed XP.

Please try to restore each of the files, and you will see that the table
container_recv has different content.

The following files are made after restore of backup_admin.sql
backup_II_admin.sql, dump_after_restore.sql.

I have analyzed the backup files generated by the admin tool, and the problem
is clearly that varbinary and blob are written as values and not as 0xXX

Feel free to contact me again if you have further problems.

Rgds
Jan I.
[11 Dec 2006 14:52] MySQL Verification Team
Thank you for the feedback.
[12 Dec 2006 13:23] 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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html