From eb41aaa8d598a41e203df281e5cf76ae6661a9d9 Mon Sep 17 00:00:00 2001 From: hvlad Date: Thu, 16 Jun 2011 08:58:13 +0000 Subject: [PATCH] Fixed bug CORE-3525 : Autonomous transactions should not inherit run-time flags of "parent" transaction --- src/jrd/tra.cpp | 2 +- src/jrd/tra.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jrd/tra.cpp b/src/jrd/tra.cpp index 9858799ef9..98183cc99b 100644 --- a/src/jrd/tra.cpp +++ b/src/jrd/tra.cpp @@ -1600,7 +1600,7 @@ jrd_tra* TRA_start(thread_db* tdbb, ULONG flags, SSHORT lock_timeout, Jrd::jrd_t Jrd::ContextPoolHolder context(tdbb, pool); jrd_tra* const temp = jrd_tra::create(pool, attachment, outer); - temp->tra_flags = flags; + temp->tra_flags = flags & TRA_OPTIONS_MASK; temp->tra_lock_timeout = lock_timeout; jrd_tra* transaction = NULL; diff --git a/src/jrd/tra.h b/src/jrd/tra.h index 07dde0758a..a815c7ff18 100644 --- a/src/jrd/tra.h +++ b/src/jrd/tra.h @@ -359,6 +359,10 @@ const ULONG TRA_cancel_request = 0x10000L; // cancel active request, if any const ULONG TRA_precommitted = 0x20000L; // transaction committed at startup const ULONG TRA_own_interface = 0x40000L; // tra_interface was created for internal needs +// flags derived from TPB, see also transaction_options() at tra.cpp +const ULONG TRA_OPTIONS_MASK = (TRA_degree3 | TRA_readonly | TRA_ignore_limbo | TRA_read_committed | + TRA_autocommit | TRA_rec_version | TRA_no_auto_undo | TRA_restart_requests); + const int TRA_MASK = 3; //const int TRA_BITS_PER_TRANS = 2; //const int TRA_TRANS_PER_BYTE = 4;