Starcounter's SQL supports binaries with even or odd number of hexadecimal digits, e.g.:
SELECT m FROM MyDbClass WHERE MyBinaryValue < BINARY '12AB' and MyBinaryValue > BINARY '2AB'
Many DBMS supports only binaries with even number of hexadecimal digits, i.e., BINARY '12AB' is accepted and BINARY '2AB' is syntactical error. Some DBMSs support both and, if I don't mistake, they pad 0 on the left, i.e., BINARY '2AB' is equivalent to BINARY '02AB'
The current Starcounter implementation behaves differently: BINARY '2AB' is equivalent to BINARY '2A0B'. This seems to be a bug.
Then how should the bug be fixed:
- Support only even number of hexadecimal digits
- Support both even and odd, and padding with
0 on the left.
cc @miyconst @un-tone @LarsTjernstrom @dan31 @Starcounter/sql_tf @Starcounter/qpt