shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

pipeline migration: parse binlog error when JSON column in increment task

Open dongyun-coder opened this issue 7 months ago • 0 comments

Which version of ShardingSphere did you use?

5.5.3-SNAPSHOT

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

Binlog parser should correctly handle JSON columns containing the literal value 'null'

Actual behavior

Binlog parser throws UnsupportedSQLOperationException when encountering a MySQL JSON column containing the literal string value 'null'

Error occurs with this sequence:

CREATE TABLE reproduce_json_parse_error ( id bigint NOT NULL AUTO_INCREMENT, settlement_assets json NOT NULL, PRIMARY KEY (id) );

INSERT INTO reproduce_json_parse_error(settlement_assets) VALUES('null');

Error message: org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException: Unsupported SQL operation: 4

More

  • When the parsing error occurs, the binlog client becomes corrupted

  • Current implementation attempts to skip the error event but fails to properly skip unresolved bytes

  • This causes incorrect parsing of subsequent events

dongyun-coder avatar May 27 '25 03:05 dongyun-coder