You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL is zero-padding fixed-length binary fields [1], but is not storing
trailing zeros to the binlog. Consequently, when reading values of
fixed-length binary fields, the value must be padded with zeros up to
the specified length.
The `test_fixed_length_binary` test case exemplifies the issue.
`varbinary` columns are not padded and not affected.
This commit extends the `information_schema` query in
`__get_table_information` to fetch information about the length
limitation of the field and stores this information in the
`fixed_binary_length` attribute of `Column` instances.
Upon decoding of binary fields (which share the same binlog field type
value of `254` as strings), the value is zero padded at the end, when it
does not meet the specified length as retrieved from the information
schema.
Fixes#400.
[1] https://dev.mysql.com/doc/refman/5.7/en/binary-varbinary.html
0 commit comments