diff --git a/src/jrd/execute_statement.cpp b/src/jrd/execute_statement.cpp index 5be7f6525f..1bdf4739c3 100644 --- a/src/jrd/execute_statement.cpp +++ b/src/jrd/execute_statement.cpp @@ -299,7 +299,9 @@ void ExecuteStatement::Close(thread_db* tdbb) delete[] p; Sqlda = 0; if (Transaction) { + THREAD_EXIT(); WHY_cleanup_transaction(WHY_translate_handle(Transaction)); + THREAD_ENTER(); } WHY_free_handle(Transaction); Transaction = 0;