Displaying BINARY data

[expired user #4720]'s profile image [expired user #4720] posted 11 years ago in General Permalink
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
kalvaro's profile image kalvaro posted 11 years ago Permalink
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.