Commit 2644e52f authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 547cb280
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment