Bug #55134 Date displayed as a BLOB in WB v5.2.25
Submitted: 9 Jul 2010 18:39 Modified: 14 Jul 2010 9:04
Reporter: Gerry Narvaja Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.25 OS:Linux (Ubuntu 10.04)
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: blobs, dates, workbench
Triage: Needs Triage: D2 (Serious)

[9 Jul 2010 18:39] Gerry Narvaja
When executing the query below in WB SQL Editor the result is displayed as 'BLOB'.

SELECT (date_format(NOW(),'%Y-%m-%d %H:00:00.0') - INTERVAL 1 HOUR);

The same query in the MySQL CLI gives the following result:

| (date_format(NOW(),'%Y-%m-%d %H:00:00.0') - INTERVAL 1 HOUR) |
| 2010-07-09 17:00:00                                          |

How to repeat:
Execute the query as specified in the report in WB's SQL Editor and the MySQL CLI.

Suggested fix:
[9 Jul 2010 19:36] Miguel Solorzano
Thank you for the bug report.
[14 Jul 2010 9:04] Sergei Tkachenko
The result column is a binary string, which is treated as BLOB by default for safety reasons (see bug #52954). If you want to change this, you can either:
1) use cast, e.g.: SELECT cast((date_format(NOW(),'%Y-%m-%d %H:00:00.0') - INTERVAL 1 HOUR) as char).
2) set global WB option "Treat BINARY/VARBINARY as nonbinary character string" in WB Preferences on SQL Editor page. This needs WB restart to take effect.