Skip to content

valid data length for mysql timestamp binary encoding #59

@MichaelScofield

Description

@MichaelScofield

In decode.rs:

https://github.com/datafuselabs/opensrv/blob/68aa6a05c7d31b292592d73fa87d994bdde36042/mysql/src/value/decode.rs#L236-L239

The code asserts that v must have length of either 7 or 11.

However, it seems that 0 and 4 are also valid:

image

from https://mariadb.com/kb/en/resultset-row/#timestamp-binary-encoding

Any specific considerations why this assertion only makes 7 and 11 valid here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions