From 2644e52fdbb7943a549f467b4dfd97da2592039d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 28 Apr 2020 08:42:45 +0300 Subject: [PATCH] MDEV-22384 Wrong estimate of affected BLOB columns in update of PRIMARY KEY During the UPDATE of PRIMARY KEY columns, we may miscalculate the size of the clustered index record. row_upd_clust_rec_by_insert(): Pass the total number of off-page columns, which may include such columns that were inherited from the record and not created as part of the UPDATE operation. This is based on mysql/mysql-server@490c45e8c8e07197958dbb21214fd45ed668b559 which is a follow-up to mysql/mysql-server@1fa475b85d24de4b9ce2958c0eed738c221fc82c which we filed and fixed as MDEV-21511. No test case was provided by Oracle. --- storage/innobase/row/row0upd.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 31d4d31c1f943..3cd2a1ef04fab 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2805,8 +2805,7 @@ row_upd_clust_rec_by_insert( mtr_commit(mtr); err = row_ins_clust_index_entry( - index, entry, thr, - node->upd_ext ? node->upd_ext->n_ext : 0); + index, entry, thr, dtuple_get_n_ext(entry)); node->state = UPD_NODE_INSERT_CLUSTERED; mem_heap_free(heap);