MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / invalidate_cursor_records

Function invalidate_cursor_records

src/jrd/vio.cpp:5641–5675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5639
5640
5641static void invalidate_cursor_records(jrd_tra* transaction, record_param* mod_rpb)
5642{
5643/**************************************
5644 *
5645 * i n v a l i d a t e _ c u r s o r _ r e c o r d s
5646 *
5647 **************************************
5648 *
5649 * Functional description
5650 * Post a refetch request to the records currently fetched
5651 * by active cursors of our transaction, because those records
5652 * have just been updated or deleted.
5653 *
5654 **************************************/
5655 fb_assert(mod_rpb && mod_rpb->rpb_relation);
5656
5657 for (Request* request = transaction->tra_requests; request; request = request->req_tra_next)
5658 {
5659 if (request->req_flags & req_active)
5660 {
5661 for (FB_SIZE_T i = 0; i < request->req_rpb.getCount(); i++)
5662 {
5663 record_param* const org_rpb = &request->req_rpb[i];
5664
5665 if (org_rpb != mod_rpb &&
5666 org_rpb->rpb_relation && org_rpb->rpb_number.isValid() &&
5667 org_rpb->rpb_relation->rel_id == mod_rpb->rpb_relation->rel_id &&
5668 org_rpb->rpb_number == mod_rpb->rpb_number)
5669 {
5670 org_rpb->rpb_runtime_flags |= RPB_refetch;
5671 }
5672 }
5673 }
5674 }
5675}
5676
5677
5678static void list_staying_fast(thread_db* tdbb, record_param* rpb, RecordStack& staying,

Callers 3

VIO_eraseFunction · 0.85
VIO_modifyFunction · 0.85
VIO_writelockFunction · 0.85

Calls 2

getCountMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected