Bug #42030 Cannot restore blob data from SQL-script
Submitted: 11 Jan 2009 15:23 Modified: 12 Jan 2009 10:47
Reporter: Christian Velin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.1.22 OS:Linux (SME server)
Assigned to: CPU Architecture:Any

[11 Jan 2009 15:23] Christian Velin
Description:
I am trying to import some structure and data through an SQL-script, but it always fails with the same error: "SQL Error: Unknown column '0x' in 'field list'"

I isolated the part of the script that doesn't work and I have included it as an attachment. The original backup file was created with HeidiSQL, but I have tried using regular mysqldump as well with the same results.

I have checked the max_allowed_packet and it is set to 128M and the script execution time stops well within the limit (1.610 seconds) of the timeouts. 

How to repeat:
Create a new db called t_con and then try running the included script.
[11 Jan 2009 15:25] Christian Velin
A backup which cannot be imported

Attachment: t_con.sql (application/octet-stream, text), 7.84 KiB.

[12 Jan 2009 8:48] MySQL Verification Team
the sql statements created are invalid.  Here's an example of what you're trying to restore:

create table t1(a blob);
replace into t1 values (0x);

will not work.  Please show us a part of the *mysqldump* generated file, and also the exact options passed to mysqldump to create it.

thanks,
[12 Jan 2009 10:46] Christian Velin
After re-checking it I see the problem, the blob data was not properly exported. After re-exporting it imports work fine.

You can close this issue!
[12 Jan 2009 10:47] Christian Velin
The export options were incorrect and resulted in a bad export.