VARBINARY

[expired user #10228]'s profile image [expired user #10228] posted 8 years ago in General Permalink

Hi,

after updating from 9.2 to 9.4 the content of varbinary(16) fields that we use to save GUIDs are not displayed as hexadecimal values anymore. That was one of the reasons I preferred HeidiSQL to the MySQL products. Could you please change it back to the old style? Thanks in advance.

Kind regards, Martin

1 attachment(s):
  • 2016-10-21-11_32_05-varbinary_-HeidiSQL-9.4.0.5125
kalvaro's profile image kalvaro posted 8 years ago Permalink

Please unclick the "View binary data as text" button in main toolbar.

[expired user #10228]'s profile image [expired user #10228] posted 8 years ago Permalink

Thanks for this idea. Unfortunately this only changes the appearance in the data view, but it does not change anything if the varbinary was used in a SELECT in a query tab.

ansgar's profile image ansgar posted 7 years ago Permalink

Could you please post the value as hex string here so I can check that:

SELECT HEX(`GGUID`) FROM yourtable
[expired user #10228]'s profile image [expired user #10228] posted 7 years ago Permalink

Actually it's with any of my tables that have this GUID field.

Example GUIDs: CCCF462D20A64DE583A4592FCB710D6A 42F9836056774F85BD575B47165717CF E70D766F5A5E4BAA94CBF6D02F64670F 5FACCE1873634CE78310C35FC95296AC F6EE84E0289B47B28C5291ADDC8C3560

BTW: I am running MySQL 5.7.16. The field in the table is a binary(16).

kalvaro's profile image kalvaro posted 7 years ago Permalink

I no longer have an old version to compare but it's very easy to reproduce in 9.4:

create table foo (
    gguid binary(16) not null primary key
);
insert into foo (gguid) values (unhex('CCCF462D20A64DE583A4592FCB710D6A'));
select * from foo;

The "View binary data as text" button works as expected in "Data" tabs but is ignored in regular "Query" ones.

ansgar's profile image ansgar posted 7 years ago Permalink

Yes, can confirm that. And I suspect r5106 to cause that issue.

Code modification/commit 1e03f4b from ansgarbecker, 7 years ago, revision 9.4.0.5127
Remove quirky logic from TMySQLQuery.Execute when distinguishing between text and binary data types. See http://www.heidisql.com/forum.php?t=22441
ansgar's profile image ansgar posted 7 years ago Permalink

r5127 now removes a superold workaround for distinguishing between text and binary columns. Fixes the issue for me. I'll keep an eye on other text and binary columns and whether they keep getting detected correctly.

[expired user #7236]'s profile image [expired user #7236] posted 7 years ago Permalink

oooo r5127 detected chinese error, in edit VIEW mode.

ansgar's profile image ansgar posted 7 years ago Permalink

Can you please post some more details please.

Please login to leave a reply, or register at first.