MySQL Workbench将结果显示为BLOB [英] MySQL Workbench shows results as BLOB

查看:775
本文介绍了MySQL Workbench将结果显示为BLOB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直发现MySQL Workbench将查询结果显示为BLOB.例如: SELECT INET_NTOA(167773449)-> BLOB

如果我选择查看值",则可以确定文本值为"10.0.5.9",但是当我选择多行并希望浏览内容时,这会很烦人.

有没有解决的办法,或者这是工具的局限性?

解决方案

背景: 当结果中返回二进制字符串值(BINARY/VARBINARY类型)时,会发生此问题.二进制字符串包含零字节,由于某种原因(显然是安全性),默认情况下未显示.有关二进制字符串的更多详细信息,请参见此处.

即使在报告的示例SELECT INET_NTOA(167773449)中,该函数也会返回二进制字符串.检查以供参考.

解决方案: 从MySQL Workbench v5.2.22开始,可以通过首选项设置是显示还是隐藏这样的值.

  1. 在MySQL Workbench中,转到:编辑->首选项...-> SQL查询" 编辑->首选项...- > SQL编辑器-> SQL执行" (取决于您所使用的Workbench版本).
  2. 选中将BINARY/VARBINARY作为非二进制字符串处理"选项以显示实际值.

参考: 已经报告了原始问题,并在修复程序此处予以解决.

I keep finding that MySQL Workbench shows query results as BLOB. e.g: SELECT INET_NTOA(167773449) --> BLOB

If I select to 'view value' I can determine the text value is '10.0.5.9' but it's pretty irritating when I SELECT multiple rows and want to glance at the contents.

Is there a way around this or is it a limitation of the tool?

解决方案

Background: This problem occurs when the binary string values (BINARY/VARBINARY type) are returned in the results. The binary strings contain the zero bytes and for some reason, apparently security, have not been shown by default. More details about binary strings here.

Even in the reported example SELECT INET_NTOA(167773449), the function returns binary string. Check this for reference.

Solution: Since MySQL Workbench v5.2.22, it can be set through preferences whether to SHOW or HIDE such values.

  1. In MySQL Workbench, go to: "Edit -> Preferences... -> SQL Queries" OR "Edit -> Preferences... -> SQL Editor -> SQL Execution" (depending upon what version of Workbench you have).
  2. Check the option 'Treat BINARY/VARBINARY as nonbinary character string' to show the actual value.

Reference: The original issue has been reported and answered with fix here.

这篇关于MySQL Workbench将结果显示为BLOB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆