diff --git a/src/jrd/SysFunction.cpp b/src/jrd/SysFunction.cpp index f1a84e5a8f..a81e3396ae 100644 --- a/src/jrd/SysFunction.cpp +++ b/src/jrd/SysFunction.cpp @@ -1176,7 +1176,7 @@ static dsc* evlCharToUuid(Jrd::thread_db* tdbb, const SysFunction* function, Jrd { fb_assert(args->nod_count == 1); - jrd_req* request = tdbb->tdbb_request; + jrd_req* request = tdbb->getRequest(); request->req_flags &= ~req_null; const dsc* value = EVL_expr(tdbb, args->nod_arg[0]); @@ -2835,7 +2835,7 @@ static dsc* evlUuidToChar(Jrd::thread_db* tdbb, SysFunction* function, Jrd::jrd_ { fb_assert(args->nod_count == 1); - jrd_req* request = tdbb->tdbb_request; + jrd_req* request = tdbb->getRequest(); request->req_flags &= ~req_null; const dsc* value = EVL_expr(tdbb, args->nod_arg[0]); diff --git a/src/jrd/blb.cpp b/src/jrd/blb.cpp index 6e582bdf09..be613a36f8 100644 --- a/src/jrd/blb.cpp +++ b/src/jrd/blb.cpp @@ -212,7 +212,7 @@ void BLB_close(thread_db* tdbb, class blb* blob) if (blob->blb_level == 0) { - Database* dbb = tdbb->tdbb_database; + Database* dbb = tdbb->getDatabase(); blob->blb_temp_size = dbb->dbb_page_size - blob->blb_space_remaining; diff --git a/src/jrd/dyn.epp b/src/jrd/dyn.epp index 091338e477..b1787b276b 100644 --- a/src/jrd/dyn.epp +++ b/src/jrd/dyn.epp @@ -2204,14 +2204,14 @@ static void dyn_user(Global* gbl, const UCHAR** ptr) Firebird::status_exception::raise(isc_wish_list, isc_arg_end); #else thread_db* tdbb = JRD_get_thread_data(); - Database* dbb = tdbb->tdbb_database; + Database* dbb = tdbb->getDatabase(); char securityDatabaseName[MAXPATHLEN]; SecurityDatabase::getPath(securityDatabaseName); Firebird::ClumpletWriter dpb(Firebird::ClumpletReader::Tagged, MAX_DPB_SIZE, isc_dpb_version1); dpb.insertByte(isc_dpb_gsec_attach, TRUE); - dpb.insertString(isc_dpb_trusted_auth, tdbb->tdbb_attachment->att_user->usr_user_name); + dpb.insertString(isc_dpb_trusted_auth, tdbb->getAttachment()->att_user->usr_user_name); isc_db_handle securityDatabase = 0; ISC_STATUS_ARRAY status; diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 59949717fb..f83fc52cff 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -2707,14 +2707,15 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) case nod_auto_trans: if (request->req_operation == jrd_req::req_evaluate) { - fb_assert(tdbb->tdbb_transaction == request->req_transaction); + fb_assert(tdbb->getTransaction() == request->req_transaction); request->req_auto_trans.push(request->req_transaction); - tdbb->tdbb_transaction = request->req_transaction = TRA_start(tdbb, + request->req_transaction = TRA_start(tdbb, request->req_transaction->tra_flags, request->req_transaction->tra_lock_timeout); + tdbb->setTransaction(request->req_transaction)l - if (!(tdbb->tdbb_attachment->att_flags & ATT_no_db_triggers)) + if (!(tdbb->getAttachment()->att_flags & ATT_no_db_triggers)) { // run ON TRANSACTION START triggers EXE_execute_db_triggers(tdbb, request->req_transaction, jrd_req::req_trigger_trans_start); @@ -2727,7 +2728,7 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) switch (request->req_operation) { case jrd_req::req_return: - if (!(tdbb->tdbb_attachment->att_flags & ATT_no_db_triggers)) + if (!(tdbb->getAttachment()->att_flags & ATT_no_db_triggers)) { // run ON TRANSACTION COMMIT triggers EXE_execute_db_triggers(tdbb, request->req_transaction, jrd_req::req_trigger_trans_commit); @@ -2740,7 +2741,7 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) { try { - if (!(tdbb->tdbb_attachment->att_flags & ATT_no_db_triggers)) + if (!(tdbb->getAttachment()->att_flags & ATT_no_db_triggers)) { // run ON TRANSACTION COMMIT triggers EXE_execute_db_triggers(tdbb, request->req_transaction, jrd_req::req_trigger_trans_commit); @@ -2759,7 +2760,7 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) ISC_STATUS_ARRAY temp_status = {0}; tdbb->tdbb_status_vector = temp_status; - if (!(tdbb->tdbb_attachment->att_flags & ATT_no_db_triggers)) + if (!(tdbb->getAttachment()->att_flags & ATT_no_db_triggers)) { try { @@ -2768,7 +2769,7 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) } catch (const Firebird::Exception&) { - if (tdbb->tdbb_database->dbb_flags & DBB_bugcheck) + if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck) { tdbb->tdbb_status_vector = save_status; throw; @@ -2782,7 +2783,7 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) } catch (const Firebird::Exception&) { - if (tdbb->tdbb_database->dbb_flags & DBB_bugcheck) + if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck) { tdbb->tdbb_status_vector = save_status; throw; @@ -2797,7 +2798,8 @@ static jrd_nod* looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node) fb_assert(false); } - tdbb->tdbb_transaction = request->req_transaction = request->req_auto_trans.pop(); + request->req_transaction = request->req_auto_trans.pop(); + tdbb->setTransaction(request->req_transaction); node = node->nod_parent; break;