osheroff / mysql-binlog-connector-java

MySQL Binary Log connector
680 stars 167 forks source link

hot fix optional metadata Extraction #136

Closed sean-k1 closed 1 month ago

sean-k1 commented 12 months ago

resolve #134 without Break we can not go this Block

remainingBytes -= fieldLength;

So InputStream goes wrong position.

@Naros @osheroff I think we need hotfix?

reproduce this Issue Step

CREATE TABLE `enum_test` (
  `int_column` int NOT NULL AUTO_INCREMENT,
  `smallint_column` int NOT NULL,
  `enum_column` enum('a','b','c') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `datetime_column` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
  PRIMARY KEY (`int_column`)
) ENGINE=InnoDB AUTO_INCREMENT=864 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

INSERT INTO `enum_test` (`smallint_column`, `enum_column`, `datetime_column`) 
VALUES 
(10, 'a', '2023-12-01 08:30:00'),
(20, 'b', '2023-12-01 09:45:00'),
(15, 'c', '2023-12-01 10:15:00');

alter table enum_test add column `userType` enum('INACTIVE','TERMINATED','ACTIVENONLICENSED','ACTIVE')  NOT NULL;

INSERT INTO `enum_test` (`smallint_column`, `enum_column`, `datetime_column`, `userType`) 
VALUES 
(30, 'a', '2023-12-01 12:00:00', 'INACTIVE'),
(25, 'c', '2023-12-01 13:30:00', 'ACTIVE'),
(35, 'b', '2023-12-01 14:45:00', 'TERMINATED'); <!--- error step----!>
Naros commented 12 months ago

I definitely agree, maybe Ben can cut a 0.29.1. if he does, I'll update the client in Debezium before we ship Beta1.

sean-k1 commented 10 months ago

@osheroff It's been a while :(

sean-k1 commented 1 month ago

@osheroff ptal