Bug #117086 | replace into can cause 1062 error | ||
---|---|---|---|
Submitted: | 31 Dec 2024 9:52 | Modified: | 2 Jan 1:51 |
Reporter: | dakun li | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 8.0.25 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[31 Dec 2024 9:52]
dakun li
[31 Dec 2024 9:55]
dakun li
CREATE TABLE `tb` ( `c1` bigint unsigned NOT NULL AUTO_INCREMENT , `c2` bigint unsigned NOT NULL DEFAULT '0', `c3` bigint unsigned NOT NULL DEFAULT '0' , `c4` bigint unsigned NOT NULL DEFAULT '0' , `c5` bigint unsigned NOT NULL DEFAULT '0', `c6` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' , `c7` tinyint unsigned NOT NULL DEFAULT '0' , `c8` bigint unsigned NOT NULL DEFAULT '0' COMMENT , `c9` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT, `c10` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , `c11` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' , PRIMARY KEY (`id`), UNIQUE KEY `uk_idx` (`c4`,`c6`,`c7`,`c8`), KEY `idx_up` (`last_update_time`), KEY `idx_bizId` (`biz_id`) ) ENGINE=InnoDB AUTO_INCREMENT=105927153 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
[31 Dec 2024 9:57]
dakun li
the table schema as this,sorry; CREATE TABLE `tb` ( `c1` bigint unsigned NOT NULL AUTO_INCREMENT , `c2` bigint unsigned NOT NULL DEFAULT '0', `c3` bigint unsigned NOT NULL DEFAULT '0' , `c4` bigint unsigned NOT NULL DEFAULT '0' , `c5` bigint unsigned NOT NULL DEFAULT '0', `c6` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' , `c7` tinyint unsigned NOT NULL DEFAULT '0' , `c8` bigint unsigned NOT NULL DEFAULT '0' , `c9` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP , `c10` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , `c11` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' , PRIMARY KEY (`c1`), UNIQUE KEY `uk_idx` (`c4`,`c6`,`c7`,`c8`), KEY `idx_up` (`last_update_time`), KEY `idx_bizId` (`biz_id`) ) ENGINE=InnoDB AUTO_INCREMENT=105927153 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
[31 Dec 2024 12:00]
MySQL Verification Team
Hello dakun li, Thank you for the report and feedback. I tried to reproduce in 8.0.40 but not seeing any issues. Could you please check in 8.0.40? Thank you. regards, Umesh
[2 Jan 1:51]
dakun li
in 8.0.40 ,have not repeat,because the last commit as follow: last_committed=0 sequence_number=1 last_committed=1 sequence_number=2 last_committed=2 sequence_number=3 last_committed=3 sequence_number=4 in 8.0.26 https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-26.html we have see this descripe: Replication: Replication could stop on a multithreaded replica if a unique secondary key was omitted from the writeset hashes used to compute transaction dependencies, leading to errors when executing the transactions on the multithreaded replica. Write set hashes now always include unique secondary keys even if they are not included in the read set and write set. (Bug #31636339) so ,i think ,MySQL have repair this bug in 8.0.26!!!