diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-02-14 15:43:33 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2023-02-14 15:43:33 +0530 |
commit | 951d81d92ebe442a639d29bcc71ca43a95e09368 (patch) | |
tree | 3a655efd59b519b4b6b203272185ee26b1ea194f /storage/innobase/rem | |
parent | c7fba948e133b20ca2e24aa30e59e80ae190bc45 (diff) | |
download | mariadb-git-951d81d92ebe442a639d29bcc71ca43a95e09368.tar.gz |
MDEV-30426 Assertion !rec_offs_nth_extern(offsets2, n) during bulk insert
- cmp_rec_rec_simple() fails to detect duplicate key error for
bulk insert operation
Diffstat (limited to 'storage/innobase/rem')
-rw-r--r-- | storage/innobase/rem/rem0cmp.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/innobase/rem/rem0cmp.cc b/storage/innobase/rem/rem0cmp.cc index a77ddafd568..c2b2bc7120d 100644 --- a/storage/innobase/rem/rem0cmp.cc +++ b/storage/innobase/rem/rem0cmp.cc @@ -725,9 +725,12 @@ cmp_rec_rec_simple( /* If we ran out of fields, the ordering columns of rec1 were equal to rec2. Issue a duplicate key error if needed. */ - if (!null_eq && table && dict_index_is_unique(index)) { - /* Report erroneous row using new version of table. */ - innobase_rec_to_mysql(table, rec1, index, offsets1); + if (!null_eq && index->is_unique()) { + if (table) { + /* Report erroneous row using new version + of table. */ + innobase_rec_to_mysql(table, rec1, index, offsets1); + } return(0); } |