memsql / memsql-python

This repository holds some python libraries and plugins designed to be used with MemSQL.
MIT License
62 stars 33 forks source link

`_bytes_to_utf8` crashes with `BINARY` type columns #21

Closed tomasz-at-nira closed 2 years ago

tomasz-at-nira commented 2 years ago

Per https://www.singlestore.com/forum/t/best-uuid-data-type/182/3 UUID should be stored as BINARY(16) in SingleStore.

If you actually do that and try to read the data with the lib it'll crash in _bytes_to_utf8 because decoding to UTF8 is impossible.

https://github.com/memsql/memsql-python/blob/master/memsql/common/conversions.py#L10