From f9ca873c65bfe810c75d4362acef49c91d58ee57 Mon Sep 17 00:00:00 2001 From: hvlad Date: Wed, 12 Apr 2017 18:25:02 +0300 Subject: [PATCH] Fixed error. Correct comments: cursor stability -> read consistency --- src/jrd/req.h | 2 +- src/jrd/tra.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jrd/req.h b/src/jrd/req.h index 112cc75586..505d116ed9 100644 --- a/src/jrd/req.h +++ b/src/jrd/req.h @@ -288,7 +288,7 @@ public: USHORT charSetId; // "client" character set of the request TriggerAction req_trigger_action; // action that caused trigger to fire - // Fields to support READ COMMITTED cursor stability + // Fields to support read consistency in READ COMMITTED transactions jrd_req* req_snapshot_owner; SnapshotHandle req_snapshot_handle; CommitNumber req_snapshot_number; diff --git a/src/jrd/tra.cpp b/src/jrd/tra.cpp index ff8cc76b77..76fae07ee7 100644 --- a/src/jrd/tra.cpp +++ b/src/jrd/tra.cpp @@ -133,7 +133,7 @@ CommitNumber ActiveSnapshots::getSnapshotForVersion(CommitNumber version_cn) void TRA_setup_request_snapshot(Jrd::thread_db* tdbb, Jrd::jrd_req* request) { // This function is called whenever request is started in a transaction. - // Setup context to preserve cursor stability in READ COMMITTED transactions. + // Setup context to preserve read consistency in READ COMMITTED transactions. Jrd::jrd_tra* transaction = request->req_transaction; @@ -179,7 +179,7 @@ void TRA_setup_request_snapshot(Jrd::thread_db* tdbb, Jrd::jrd_req* request) } // If we are a top-level request or caller is executed in a different transaction, - // we need to set up statement snapshot for cursor stability and own it + // we need to set up statement snapshot for read consistency and own it request->req_snapshot_owner = request; @@ -1592,7 +1592,7 @@ int TRA_snapshot_state(thread_db* tdbb, jrd_tra* trans, TraNumber number, Commit default: state = tra_committed; if (snapshot) - *snapshot = trans->tra_active_snapshots.getSnapshotForVersion(CN_PREHISTORIC); + *snapshot = trans->tra_active_snapshots.getSnapshotForVersion(stateCn); break; } } @@ -3375,8 +3375,8 @@ static void transaction_start(thread_db* tdbb, jrd_tra* trans) // If the transaction is read-only and read committed, it can be // precommitted because it can't modify any records. - // 2014-08-26 NS XXX: with latest changes in TIP cache semantics and cursors - // stability changes precommitted transactions offer almost no benefit, but + // 2014-08-26 NS XXX: with latest changes in TIP cache semantics and read + // consistency changes precommitted transactions offer almost no benefit, but // complicate implementation considerably. It might make sense to remove // precommitted transactions logic completely.