diff --git a/src/jrd/Database.cpp b/src/jrd/Database.cpp index 79515118db..1616efbd80 100644 --- a/src/jrd/Database.cpp +++ b/src/jrd/Database.cpp @@ -65,15 +65,15 @@ namespace Jrd return dbb_tip_cache->generateTransactionId(); } - /*void Database::assignLatestTransactionId(TraNumber number) { - fb_assert(dbb_tip_cache); - dbb_tip_cache->assignLatestTransactionId(number); - } +// void Database::assignLatestTransactionId(TraNumber number) { +// fb_assert(dbb_tip_cache); +// dbb_tip_cache->assignLatestTransactionId(number); +// } void Database::assignLatestAttachmentId(SLONG number) { - fb_assert(dbb_tip_cache); - dbb_tip_cache->assignLatestAttachmentId(number); - }*/ + if (dbb_tip_cache) + dbb_tip_cache->assignLatestAttachmentId(number); + } SLONG Database::generateStatementId() { if (!dbb_tip_cache) return 0; diff --git a/src/jrd/Database.h b/src/jrd/Database.h index 59baa2de4c..4a7322cfe9 100644 --- a/src/jrd/Database.h +++ b/src/jrd/Database.h @@ -492,8 +492,8 @@ public: SLONG generateAttachmentId(); TraNumber generateTransactionId(); SLONG generateStatementId(); - /*void assignLatestTransactionId(TraNumber number); - void assignLatestAttachmentId(SLONG number);*/ +// void assignLatestTransactionId(TraNumber number); + void assignLatestAttachmentId(SLONG number); USHORT getMaxIndexKeyLength() const diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index c06d791b18..f414040ad4 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -869,7 +869,7 @@ SLONG PAG_attachment_id(thread_db* tdbb) header_page* header = (header_page*) CCH_FETCH(tdbb, &window, LCK_write, pag_header); CCH_MARK(tdbb, &window); attachment->att_attachment_id = ++header->hdr_attachment_id; - //dbb->assignLatestAttachmentId(attachment->att_attachment_id); + dbb->assignLatestAttachmentId(attachment->att_attachment_id); CCH_RELEASE(tdbb, &window); } diff --git a/src/jrd/tpc.cpp b/src/jrd/tpc.cpp index c61d79520f..7077dabea4 100644 --- a/src/jrd/tpc.cpp +++ b/src/jrd/tpc.cpp @@ -852,15 +852,15 @@ SLONG TipCache::generateStatementId() { return statement_id; } -/*void TipCache::assignLatestTransactionId(TraNumber number) { - // XXX: there is no paired acquire because value assigned here is not really used for now - atomic_int_store_release(&m_tpcHeader->getHeader()->latest_transaction_id, number); -} +//void TipCache::assignLatestTransactionId(TraNumber number) { +// // XXX: there is no paired acquire because value assigned here is not really used for now +// atomic_int_store_release(&m_tpcHeader->getHeader()->latest_transaction_id, number); +//} void TipCache::assignLatestAttachmentId(SLONG number) { // XXX: there is no paired acquire because value assigned here is not really used for now atomic_int_store_release(&m_tpcHeader->getHeader()->latest_attachment_id, number); -}*/ +} int TPC_snapshot_state(thread_db* tdbb, TraNumber number) { diff --git a/src/jrd/tpc_proto.h b/src/jrd/tpc_proto.h index ab3efcc942..996332e5ee 100644 --- a/src/jrd/tpc_proto.h +++ b/src/jrd/tpc_proto.h @@ -134,8 +134,8 @@ public: TraNumber generateTransactionId(); SLONG generateAttachmentId(); SLONG generateStatementId(); - /*void assignLatestTransactionId(TraNumber number); - void assignLatestAttachmentId(SLONG number);*/ + //void assignLatestTransactionId(TraNumber number); + void assignLatestAttachmentId(SLONG number); private: class GlobalTpcHeader : public Firebird::MemoryHeader {