Skip to content

Commit 5b63a66

Browse files
committed
MDEV-11369/MDEV-12288: Reset DB_TRX_ID on the metadata record
On the hidden metadata record, if instant ALTER TABLE was executed multiple times on the same table, purge could fail to reset the DB_TRX_ID,DB_ROLL_PTR on the updated metadata record. This is only a cosmetic failure that was caught (and separately fixed) in 10.4 during the MDEV-15562 development. The problem was that occasionally, innodb.instant_alter_crash would fail with a result difference due to the DB_TRX_ID,DB_ROLL_PTR not having been reset on the metadata record. This bug should have no noticeable impact, because the metadata record is invisible to the SQL layer, and never subjected to MVCC or locking. I was unable to repeat the problem on 10.3. row_purge_parse_undo_rec(): Set node->ref for the metadata record.
1 parent d6889f2 commit 5b63a66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

storage/innobase/row/row0purge.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,10 +1147,13 @@ row_purge_parse_undo_rec(
11471147
/* Read to the partial row the fields that occur in indexes */
11481148

11491149
if (!(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
1150+
ut_ad(!(node->update->info_bits & REC_INFO_MIN_REC_FLAG));
11501151
ptr = trx_undo_rec_get_partial_row(
11511152
ptr, clust_index, node->update, &node->row,
11521153
type == TRX_UNDO_UPD_DEL_REC,
11531154
node->heap);
1155+
} else if (node->update->info_bits & REC_INFO_MIN_REC_FLAG) {
1156+
node->ref = &trx_undo_metadata;
11541157
}
11551158

11561159
return(true);

0 commit comments

Comments
 (0)