8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00

Bugfix for #7015: Applier may crash if replication block contain no savepoint operations

This commit is contained in:
Dmitry Yemanov 2021-10-20 20:19:24 +03:00
parent 35ee143b65
commit 99bc7a7a5a

View File

@ -533,15 +533,16 @@ void Applier::insertRecord(thread_db* tdbb, TraNumber traNum,
fb_utils::init_status(tdbb->tdbb_status_vector);
// Undo this particular insert (without involving a savepoint)
VerbAction* const action = transaction->tra_save_point->getAction(relation);
VIO_backout(tdbb, &rpb, transaction);
if (action && action->vct_records)
if (transaction->tra_save_point)
{
const SINT64 recno = rpb.rpb_number.getValue();
if (action->vct_records->test(recno))
const auto action = transaction->tra_save_point->getAction(relation);
if (action && action->vct_records)
{
const auto recno = rpb.rpb_number.getValue();
fb_assert(action->vct_records->test(recno));
fb_assert(!action->vct_undo || !action->vct_undo->locate(recno));
VIO_backout(tdbb, &rpb, transaction);
action->vct_records->clear(recno);
}
}