[BUG] Export from Query-Result not properly escaped

[expired user #9519]'s profile image [expired user #9519] posted 8 years ago in Import/Export Permalink

Text is not properly escaped if you export data from a query-result to SQL.

This bug still exists in version: 9.3.0.5038

ansgar's profile image ansgar posted 8 years ago Permalink

Which character(s) exactly are not escaped? Just made a quick test with single quotes, which are escaped here.

[expired user #9519]'s profile image [expired user #9519] posted 8 years ago Permalink

I find out it's not character related, the whole syntax is broken.

If you show BLOB data as text, then it will export something like this:

INSERT ... VALUES (16624, 3108, 0, 0, 0, '', 0, '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>\n<T3FlexForms>\n ... </T3FlexForms>', 13635, a:21:{s:5:"CType";s:4:"list";s:6: ...

ansgar's profile image ansgar posted 8 years ago Permalink

I see some serialized code which is not quoted, starting with a:21... Do you mean that? What's the data type of that column, and are we talking about MySQL, MSSQL or PostgreSQL?

[expired user #9519]'s profile image [expired user #9519] posted 8 years ago Permalink

Yes. MySQL. The data type is BLOB.

Code modification/commit from ansgarbecker, 8 years ago, revision 9.3.0.5039
Escape and quote binary strings in grid export if "View binary data as text" button is active. See http://www.heidisql.com/forum.php?t=20320
ansgar's profile image ansgar posted 8 years ago Permalink

Confirmed! And fixed in r5039.

Please login to leave a reply, or register at first.