[MDEV-21150] Encoding BIT and Geometry types on binary protocol Created: 2019-11-26 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types, Protocol |
| Affects Version/s: | 10.3.20, 10.4.10 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wojtek Mach | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I noticed some problems with encoding BIT and GEOMETRY types on the binary protocol. For the query:
With `B'101'` encoded as `MYSQL_TYPE_BIT` (`0x10`) the execute statement's hexdump is:
But I'm getting a NULL value back in the response: However, if I encode bit as `MYSQL_TYPE_VAR_STRING` (`0xFD`):
I'm getting the expected result. I observed the same behaviour for `MYSQL_TYPE_GEOMETRY`. |
| Comments |
| Comment by Wojtek Mach [ 2020-11-09 ] |
|
I noticed the same behaviour on mysql 8.0.22 (but not on prior versions!) which makes me think that sending this data as `MYSQL_TYPE_VAR_STRING` was the intended usage all along. A confirmation would be very appreciated but in any case, I think this can be closed. Thanks! |