Bug #116502 | Duplicate Detection Flaw for NULL Values in UK During DDL Rollback Operations | ||
---|---|---|---|
Submitted: | 30 Oct 2024 4:31 | Modified: | 31 Oct 2024 7:12 |
Reporter: | Yichang SONG (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 8.0.40 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[30 Oct 2024 4:31]
Yichang SONG
[30 Oct 2024 4:31]
Yichang SONG
testcase and bugfix
Attachment: changes.patch (application/octet-stream, text), 3.86 KiB.
[31 Oct 2024 7:12]
MySQL Verification Team
Hello Yichang Song, Thank you for the report and test case. regards, Umesh
[31 Oct 2024 7:13]
MySQL Verification Team
Thank you very much for your patch contribution, we appreciate it! In order for us to continue the process of reviewing your contribution to MySQL, please send us a signed copy of the Oracle Contributor Agreement (OCA) as outlined in https://oca.opensource.oracle.com Signing an OCA needs to be done only once and it's valid for all other Oracle governed Open Source projects as well. Getting a signed/approved OCA on file will help us facilitate your contribution - this one, and others in the future. Please let me know, if you have any questions. Thank you for your interest in MySQL.
[4 Nov 2024 14:32]
huahua xu
Hi, all: It may be a better solution to fix the bug: diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index e44d60cb0b7..eadeea2682f 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -668,8 +668,9 @@ try_again: << " at: " << rec_index_print(btr_cur_get_rec(btr_cur), index); } - if (btr_cur->up_match >= dict_index_get_n_unique(index) || - btr_cur->low_match >= dict_index_get_n_unique(index)) { + if ((btr_cur->up_match >= dict_index_get_n_unique(index) || + btr_cur->low_match >= dict_index_get_n_unique(index)) && + (!index->n_nullable || index->nulls_equal || !dtuple_contains_null(entry))) { if (index->is_committed()) { ib::warn(ER_IB_MSG_1040) << "Record in index " << index->name << " was not found on rollback, and"
[4 Nov 2024 14:43]
Yichang SONG
Testcase and bugfix (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: changes.patch (application/octet-stream, text), 3.86 KiB.