BINARY display format seems broken

david@dalbert.net's profile image david@dalbert.net posted 6 days ago in General Permalink

I have a BINARY column in a MySQL database. It typically stores two-bytes that represent various status bits. SQL queries seem to work correctly (bin(ps_status)). However in the table data viewer (grid and also the binary editor), the binary status 1111 is shown as 0x3135 which is the hex representation of the ASCII string representing the value of the field ("15"); the value 1101 is similarly shown as 0x3133 (ASCII bytes for string "13"). I can't imagine anyone would want to see BINARY data this way. Is there any way to get it to show BINARY data as 0x0F and 0x0D or bits or similar?

Sorry if I'm missing something obvious. I'm using HeidiSQL 12.7.0.6907 with MariaDB 8.0.37

ansgar's profile image ansgar posted 5 days ago Permalink

That's a common question, you're not the first one asking :)

There's a button in the main toolbar, with 1s and 0s on it. That button toggles hex/ascii displaying of binary data. See the help page for a screenshot.

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