Skip to content

Commit d14e103

Browse files
author
Tor Didriksen
committed
Bug#28629175 WRONG ARGUMENTS TO IB::ERROR(ER_IB_MSG_720)
ER_IB_MSG_720 expects two unsigned longs. However: the checksums involved are uint32_t, so we may get unexpected results. The fix is to compute checksums at 32bit entities, then cast to unsigned long for error logging. Change-Id: I0b4cf8b54fbc3cf41ef990081b2c646c2bac28a5
1 parent 6ca7675 commit d14e103

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storage/innobase/log/log0recv.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,9 +3156,11 @@ bool meb_scan_log_recs(
31563156
}
31573157

31583158
if (!log_block_checksum_is_ok(log_block)) {
3159+
uint32_t checksum1 = log_block_get_checksum(log_block);
3160+
uint32_t checksum2 = log_block_calc_checksum(log_block);
31593161
ib::error(ER_IB_MSG_720, no, scanned_lsn,
3160-
log_block_get_checksum(log_block),
3161-
log_block_calc_checksum(log_block));
3162+
static_cast<unsigned long>(checksum1),
3163+
static_cast<unsigned long>(checksum2));
31623164

31633165
/* Garbage or an incompletely written log block.
31643166

0 commit comments

Comments
 (0)