Skip to content

Implementation of binlog::misc::my_{datetime/time}_packed_from_binary functions do not match MySql implementation  #145

Closed
@vassili-zarouba

Description

@vassili-zarouba

We are trying to read json opaque values for temporal types from the binlog, and discovered the binlog::misc::* functions which are meant to read the binary into i64, do not return correct result. After looking into the MySql source code for the same operation, it turned out the binlog::misc::* functions implementation is different from MySql, though the functions binlog::misc::{datetime_from_packed, time_from_packed} do match the MySql implementation.
All worked, after we replaced the binlog::misc::{my_datetime_packed_from_binary, my_time_packed_from_binary} with a simple code which matches the MySql implementation.

Here is the MySql source code GitHub URL:
https://github.com/mysql/mysql-server/blob/mysql-8.0.39/sql-common/json_dom.cc#L721

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions