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

Fixed CORE-3137: Partial rollback is possible for a selectable procedure modifying data.

This commit is contained in:
dimitr 2010-09-18 06:52:12 +00:00
parent 6afe4b4e38
commit b6c0bee335

View File

@ -2128,19 +2128,21 @@ void VIO_merge_proc_sav_points(thread_db* tdbb,
return;
}
// one by one go on putting all savepoints in the sav_point_list on
// top of transaction save points and call VIO_verb_cleanup()
// Merge all savepoints in the sav_point_list at the top
// of transaction save points and call VIO_verb_cleanup()
for (Savepoint* sav_point = *sav_point_list; sav_point;
sav_point = sav_point->sav_next)
Savepoint* const org_save_point = transaction->tra_save_point;
transaction->tra_save_point = *sav_point_list;
for (Savepoint* sav_point = *sav_point_list; sav_point; sav_point = sav_point->sav_next)
{
Savepoint* const sav_next = sav_point->sav_next;
const SLONG sav_number = sav_point->sav_number;
// add it to the front
sav_point->sav_next = transaction->tra_save_point;
transaction->tra_save_point = sav_point;
if (!sav_point->sav_next)
{
sav_point->sav_next = org_save_point;
}
VIO_verb_cleanup(tdbb, transaction);
@ -2155,6 +2157,8 @@ void VIO_merge_proc_sav_points(thread_db* tdbb,
*sav_point_list = sav_point;
sav_point_list = &sav_point->sav_next;
}
fb_assert(org_save_point == transaction->tra_save_point);
}