Bug #54032 Workbench needs option to dislay any potentially CHAR column as text (or other)
Submitted: 27 May 2010 13:33 Modified: 27 May 2010 13:59
Reporter: Andrew Feren Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version:5.2.21 Beta OS:Any
Assigned to: CPU Architecture:Any

[27 May 2010 13:33] Andrew Feren
Description:
Currently columns that aren't explicitly CHAR fields display "[BLOB]".

The two options to see the text are cumbersome.

1) right clicking each field to "Open Value in Viewer"
2) cast each column as CHAR

Even functions, like INET_NTOA that are build to display formatted text display "[BLOB]".  A special case for INET_NTOA, for example, won't fix my problem as I have several UDF functions with the same issue.

How to repeat:
SELECT INET_NTOA(INET_ATON('10.1.15.1')) AS da_blob, CAST(INET_NTOA(INET_ATON('10.1.15.1')) AS CHAR) AS wanted;

Suggested fix:
I'll take any option that makes the process of viewing text less cumbersome.

My thought was global option to attempt to attempt to display byte fields as text.

I'm told Control Center had a similar option.  Query Browser which is what I have been using behaves as if such an option were always set.
[27 May 2010 13:59] Valeriy Kravchuk
Essentially this is a duplicate of bug #53920. The problem is that Workbench (wrongly, IMHO) displays VAR_STRING data with BINARY flag set and binary collation as BLOB.

valeriy-kravchuks-macbook-pro:5.1 openxs$ bin/mysql --column-type-info -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.1.48-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SELECT INET_NTOA(INET_ATON('10.1.15.1')) AS da_blob,
    -> CAST(INET_NTOA(INET_ATON('10.1.15.1')) AS CHAR) AS wanted;
Field   1:  `da_blob`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       VAR_STRING
Collation:  binary (63)
Length:     31
Max_length: 9
Decimals:   0
Flags:      BINARY 

Field   2:  `wanted`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       VAR_STRING
Collation:  latin1_swedish_ci (8)
Length:     31
Max_length: 9
Decimals:   31
Flags:      

+-----------+-----------+
| da_blob   | wanted    |
+-----------+-----------+
| 10.1.15.1 | 10.1.15.1 |
+-----------+-----------+
1 row in set (0.00 sec)