diff --git a/src/gausskernel/storage/access/ustore/undo/knl_uundotxn.cpp b/src/gausskernel/storage/access/ustore/undo/knl_uundotxn.cpp index 82c886d0e..9e22de84d 100644 --- a/src/gausskernel/storage/access/ustore/undo/knl_uundotxn.cpp +++ b/src/gausskernel/storage/access/ustore/undo/knl_uundotxn.cpp @@ -321,9 +321,9 @@ UndoSlotPtr GetNextSlotPtr(UndoSlotPtr slotPtr) UndoSlotOffset blkOffset = slotOffset % BLCKSZ; UndoSlotOffset offset = blkOffset + MAXALIGN(sizeof(undo::TransactionSlot)); if (BLCKSZ - offset < MAXALIGN(sizeof(undo::TransactionSlot))) { - offset = (block + 1) * BLCKSZ + UNDO_LOG_BLOCK_HEADER_SIZE; + offset = (UndoSlotOffset)(block + 1) * BLCKSZ + UNDO_LOG_BLOCK_HEADER_SIZE; } else { - offset += block * BLCKSZ; + offset += (UndoSlotOffset)block * BLCKSZ; } Assert (offset <= UNDO_LOG_MAX_SIZE); return MAKE_UNDO_PTR(UNDO_PTR_GET_ZONE_ID(slotPtr), offset);