mysql-binlog-connector-java icon indicating copy to clipboard operation
mysql-binlog-connector-java copied to clipboard

TransactionPayloadEventDataDeserializer may lost the CompatibilityMode settings from parent EventDeserializer

Open ZzzCrazyPig opened this issue 2 years ago • 1 comments

According to the implement code of TransactionPayloadEventDataDeserializer:

// Read and store events from decompressed byte array into input stream
        ArrayList<Event> decompressedEvents = new ArrayList<>();
        //  may lost the CompatibilityMode settings from parent EventDeserializer
        EventDeserializer transactionPayloadEventDeserializer = new EventDeserializer();
        ByteArrayInputStream destinationInputStream = new ByteArrayInputStream(dst);

        Event internalEvent = transactionPayloadEventDeserializer.nextEvent(destinationInputStream);
        while(internalEvent != null) {
            decompressedEvents.add(internalEvent);
            internalEvent = transactionPayloadEventDeserializer.nextEvent(destinationInputStream);
        }

we are sure that it create the default EventDeserializer to deserialize internal uncompressed event , it will lost the CompatibilityMode settings from parent EventDeserializer

ZzzCrazyPig avatar Oct 25 '23 09:10 ZzzCrazyPig

@osheroff Please confirm ?

ZzzCrazyPig avatar Oct 26 '23 00:10 ZzzCrazyPig