Description:
Instead of just showing the word BLOB for a BINARY field, it would be useful to display the field bytes in HEXADECIMAL.
That is, an editor option that would do the equivalent of HEX(mybinary) for display.
With this option, a BINARY(16) would automatically display with 32 hex characters:
1234567890abcdef1234567890abcdef
or if you prefer
0x1234567890abcdef1234567890abcdef
The benefit is that the default query would show the field; e.g.
SELECT * FROM mytable;
Otherwise, to see all the fields, I have to explicitly HEX() each binary:
SELECT ID, Name, HEX(MyBinary), ... FROM mytable;
Especially useful for:
Seeing the value of a 128-bit GUID or MD5 checksum.
How to repeat:
CREATE TABLE `mytable` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) DEFAULT NULL,
`MyBinary` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
PRIMARY KEY (`ID`),
) ENGINE=InnoDB AUTO_INCREMENT=472 DEFAULT CHARSET=latin1;
Suggested fix:
menu Edit > Preferences > SQL Editor > SQL Execution
under existing option:
[] Treat BINARY/VARBINARY as nonbinary character string
add a new option:
[] Display BINARY/VARBINARY as HEX string
NOTE: These would be *mutually exclusive* options -- don't allow both to be checked at same time.
NOTE: HEX string requires two characters to display each BINARY byte.