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

Fixed the assertion to please EXECUTE PROCEDURE with SUSPENDs inside

This commit is contained in:
Dmitry Yemanov 2022-01-05 12:51:52 +03:00
parent 82da31ccfd
commit 8a9374fbb9

View File

@ -1087,10 +1087,11 @@ static void execute_looper(thread_db* tdbb,
if (savNumber)
{
// There should be no other savepoint but the one started by ourselves.
// But just in case it suddenly happened, cleanup them all.
fb_assert(transaction->tra_save_point &&
transaction->tra_save_point->getNumber() == savNumber);
// Unless the looper returns after SUSPEND (this preserves existing savepoints),
// there should be no other savepoint but the one started by ourselves.
fb_assert((request->req_flags & req_stall) ||
(transaction->tra_save_point &&
transaction->tra_save_point->getNumber() == savNumber));
while (transaction->tra_save_point &&
transaction->tra_save_point->getNumber() >= savNumber)