Truncating strings even in strict mode

(Ported from memsql-public-chat Slack channel)

mpskovvang [9:38 PM]
I just realized MemSQL truncates strings (e.g. varchar(200)) exceeding max length even in strict mode. Does MemSQL not support strict modes like MySQL or should this behavior be configured otherwise? I would perfer an error in case of too long strings.

robbie [10:15 PM]
If you set data_conversion_compatibility_level='6.5'; you will get errors on truncation for varchar and integer types. In subsequent versions we’re planning on supporting strict conversions for more types and this will controlled by setting the version level.

mpskovvang [10:19 PM]
Thanks @robbie, it works. :+1:

1 Like