Bug #54156 Model Inserts Truncate Binary Data
Submitted: 1 Jun 2010 17:52 Modified: 15 Jun 2010 16:25
Reporter: Michael LaBrot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.21, 5.2.22 OS:Windows (XP Pro)
Assigned to: Sergei Tkachenko CPU Architecture:Any

[1 Jun 2010 17:52] Michael LaBrot
Description:
When entering binary data into the Inserts tab for a table, the data is truncated at the first 0x00.

How to repeat:
In a model, edit a table with a VARBINARY column. Right-click on a cell for the VARBINARY column and select "Load Value From File". Choose a binary file that contains a 0x00 in the middle of the data and click the "Open" button. Click on the "Apply changes to data" button in the toolbar. The data is truncated.
[5 Jun 2010 2:33] MySQL Verification Team
Could you please try version 5.2.22.Thanks in advance.
[5 Jun 2010 14:46] Michael LaBrot
Still a problem in 5.2.22.
[9 Jun 2010 9:50] Sveta Smirnova
Thank you for the feedback.

Verified as described. Really query "INSERT INTO t1(f1) VALUES('foo\0bar')" is enough. after select in "Text" output I can only see "foo", although "Binary" ouptut shows value 'foo\0bar' has been inserted.
[9 Jun 2010 11:48] Alfredo Kojima
There are 2 problems being described here:
- Load Data from File truncates the data that's being loaded
- View BLOB as Text doesn't show data containing \0. This is not necessarily a bug as we can only safely display ASCII and UTF8 data in this pane. There are indeed improvements that can be made here, but that is something else.
[9 Jun 2010 16:09] Alfredo Kojima
I can't repeat the reported issue. Loading Data form File will load the whole block of data into the table.
Viewing the record as binary data shows the whole thing and same for as image. Viewing as text is truncating the text data, which is expected and not a bug. Converting the binary data to a text-like format would be a new feature.
[9 Jun 2010 16:33] Michael LaBrot
This is a problem with adding a row to the Inserts tab of a table in a model for later generation into a forward engineering script. I can Load Value from File just fine when editing a table in an existing database through the SQL Editor.
[9 Jun 2010 16:56] Alfredo Kojima
I was able to repeat in INSERTs editor for a table. Thanks for clarification
[14 Jun 2010 21:46] Johannes Taxacher
fix confirmed in repository
[15 Jun 2010 16:25] Tony Bedford
An entry has been added to the 5.2.23 changelog:

When entering binary data into the Inserts tab for a table, the data was truncated at the first null byte (0x00).