From 8a9374fbb9e1fa8f758e948cef2e274a045cbf8c Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Wed, 5 Jan 2022 12:51:52 +0300 Subject: [PATCH] Fixed the assertion to please EXECUTE PROCEDURE with SUSPENDs inside --- src/jrd/exe.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index d82bf63607..8425597760 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -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)