Bug #52954 VARBINARY Open Value in Viewer data truncation
Submitted: 19 Apr 2010 19:06 Modified: 28 Apr 2010 14:18
Reporter: Michael LaBrot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.19 OS:Windows (XP Pro)
Assigned to: Sergei Tkachenko CPU Architecture:Any

[19 Apr 2010 19:06] Michael LaBrot
Description:
When viewing data in a VARBINARY column, the data is truncated at the first 0x00 value.

How to repeat:
Place data that includes nulls (0x00) into a VARBINARY field. Select the row in the SQL Editor. Right-click on the field and choose Open Value in Viewer. Only data up to the first null is displayed.
[20 Apr 2010 11:24] Valeriy Kravchuk
Thank you for the bug report. Verified just as described with a table defined as:

mysql> create table tbin(c1 int primary key, c2 varbinary(20));
Query OK, 0 rows affected (0.19 sec)

mysql> insert into tbin values(1, 0x21222300212223);
Query OK, 1 row affected (0.08 sec)

mysql> select * from tbin;
+----+---------+
| c1 | c2      |
+----+---------+
|  1 | !"# !"# |
+----+---------+
1 row in set (0.00 sec)
[22 Apr 2010 4:31] Alfredo Kojima
Seems the blob viewer is being passed truncated data from the recordset.
[27 Apr 2010 19:21] Johannes Taxacher
fix confirmed in repository
[28 Apr 2010 14:18] Tony Bedford
An entry has been added to the 5.2.20 changelog:

In the SQL Editor, when viewing field data of type VARBINARY using the Open Value in Viewer context-sensitive menu item, only the data up to the first null (0x00) was displayed.