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
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.
my_datetime_packed_from_binary and my_time_packed_from_binary are for reading on-disk binary representation (see here and here). They are used to read binlog values of types MYSQL_TYPE_DATETIME2 and MYSQL_TYPE_TIME2.
Hi, @blackbeam
So that, the API was meant to read the binary content which has nothing to do with the JSON opaque blocks ...
Look like we misused it ...
Thank you for the explanation!
Regards
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
The text was updated successfully, but these errors were encountered: