Bug #27724 mysqldump --hex-blob -T doesn't work
Submitted: 9 Apr 2007 23:35 Modified: 11 May 2008 0:33
Reporter: Peter Gulutzan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[9 Apr 2007 23:35] Peter Gulutzan
Description:
For mysqldump --hex-blob -T, 
I expect that there will be no escaping of the
output for a BLOB column. But if my BLOB contains
0x00 or 0x5c, the output is not exactly what I was
trying to dump.

How to repeat:
In mysql client:
 
CREATE TABLE `test_blob` (
a` blob
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
insert into test_blob values(0xDD00);
 
On shell:
 
linux:/tmp # /usr/local/mysql/bin/mysqldump --hex-blob m -T /tmp
linux:/tmp # hexdump test_blob.txt
0000000 5cee 0a30
0000004
linux:/tmp #

This happens when 0x00 is in the BLOB. It also
happens when 0x5c is in the BLOB, and that should
be fixed too.
[20 Apr 2007 18:58] Peter Gulutzan
I made some mistakes in the description.

The default database should be 'm'.
The mysql instructions should be:
"
CREATE TABLE `test_blob` (
`a` blob
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
insert into test_blob values(0xDD00);
"
And the hexdump is: 5cdd 0a30.
[3 Dec 2007 8:31] MySQL Verification Team
this looks like a server issue with select ... into outfile.
[3 Dec 2007 8:32] MySQL Verification Team
actually...  mysqldump could try using SELECT .. INTO DUMPFILE which then creates the file as expected.
[3 Dec 2007 19:50] Sergei Golubchik
please re-verify when bug#32533 is fixed
[11 May 2008 0:33] MySQL Verification Team
The bug http://bugs.mysql.com/bug.php?id=32533 is already closed and the
results are the same.