mysql version is 8.0.32 and run in docker,
docker image is mysql:8.0.32-debian@sha256:3e54e01ca605ee64672bf588cd1782a669cb387954593ccd1c9dcd551598d1df
mysql-binlog-connector-java version is
After executing SQL, I copy binlog file to local and parse , this is EventDeserializer config, other config is default
EventDeserializer eventDeserializer = new EventDeserializer();
eventDeserializer.setCompatibilityMode(
EventDeserializer.CompatibilityMode.DATE_AND_TIME_AS_LONG,
EventDeserializer.CompatibilityMode.CHAR_AND_BINARY_AS_BYTE_ARRAY
);
this is parse GEOMETRY type parse code, WKBReader is jts API
I found that the parsed result is inconsistent with the inserted,parsed result always POINT(0 0)
Further debugging after I found SELECT HEX(ST_AsBinary(ST_GeomFromText('POINT(1 1)')));
corresponding wkb byte[] is [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 63, 0, 0, 0, 0, 0, 0, -16, 63] array length is 21
but binlog resolved wkb byte[] is [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 63, 0, 0, 0, 0, 0, 0, -16, 63] array length is 25
not just GEOMETRY other filed resolved array all big 4 length relative ST_AsBinary
Is this normal?
in create table statement all field, inconsistent insertion and parsing values will occur, this is a bug or problem with my parsing method?
mysql version is 8.0.32 and run in docker, docker image is mysql:8.0.32-debian@sha256:3e54e01ca605ee64672bf588cd1782a669cb387954593ccd1c9dcd551598d1df mysql-binlog-connector-java version is
table ddl is :
insert sql is :
After executing SQL, I copy binlog file to local and parse , this is EventDeserializer config, other config is default
this is parse GEOMETRY type parse code, WKBReader is jts API
I found that the parsed result is inconsistent with the inserted,parsed result always POINT(0 0)
Further debugging after I found
SELECT HEX(ST_AsBinary(ST_GeomFromText('POINT(1 1)')));
corresponding wkb byte[] is [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 63, 0, 0, 0, 0, 0, 0, -16, 63] array length is 21
but binlog resolved wkb byte[] is [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, 63, 0, 0, 0, 0, 0, 0, -16, 63] array length is 25 not just GEOMETRY other filed resolved array all big 4 length relative ST_AsBinary Is this normal?
in create table statement all field, inconsistent insertion and parsing values will occur, this is a bug or problem with my parsing method?