distal-attribute
distal-attribute
distal-attribute
distal-attribute

Displaying BINARY data

User, date Message
Written by wtask
2 years ago
Category: General
29 posts since Mon, 22 Feb 10
When Heidi displays the datagrid with BINARY-column, it uses MySQL HEX() function to convert BINARY-data to hex-string.
But in datagrid Heidi makes conversion again, now into real hex number by adding '0x' before result of HEX(column).

And if we will copy this value to use in custom query, it is necessary to remove 0x to write something like:
... where HEX(column) = 'copied_hex_without_0x'.

I think, Heidi should not convert hex-strings to real hex-numbers and must keep return type of MySQL HEX() call.

http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_hex
Written by kalvaro
2 years ago
597 posts since Thu, 29 Nov 07
You don't need to use HEX() to compare with binary data, this works just fine:

WHERE column=0x47494638



0x... is valid official syntax for hexadecimal literals:

http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html
 

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