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

Function replace_record

src/jrd/vio.cpp:6566–6605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6564
6565
6566static void replace_record(thread_db* tdbb,
6567 record_param* rpb,
6568 PageStack* stack,
6569 const jrd_tra* transaction)
6570{
6571/**************************************
6572 *
6573 * r e p l a c e _ r e c o r d
6574 *
6575 **************************************
6576 *
6577 * Functional description
6578 * Replace a record and get rid of the old tail, if any. If requested,
6579 * fetch data for the record on the way out.
6580 *
6581 **************************************/
6582 SET_TDBB(tdbb);
6583
6584#ifdef VIO_DEBUG
6585 jrd_rel* relation = rpb->rpb_relation;
6586 VIO_trace(DEBUG_TRACE_ALL,
6587 "replace_record (rel_id %u, record_param %" QUADFORMAT"d, transaction %" SQUADFORMAT")\n",
6588 relation->rel_id, rpb->rpb_number.getValue(), transaction ? transaction->tra_number : 0);
6589
6590 VIO_trace(DEBUG_TRACE_ALL_INFO,
6591 " record %" SLONGFORMAT":%d, rpb_trans %" SQUADFORMAT
6592 ", flags %d, back %" SLONGFORMAT":%d, fragment %" SLONGFORMAT
6593 ":%d, prior %p\n",
6594 rpb->rpb_page, rpb->rpb_line, rpb->rpb_transaction_nr,
6595 rpb->rpb_flags, rpb->rpb_b_page, rpb->rpb_b_line,
6596 rpb->rpb_f_page, rpb->rpb_f_line, (void*) rpb->rpb_prior);
6597#endif
6598
6599 record_param temp = *rpb;
6600 DPM_update(tdbb, rpb, stack, transaction);
6601 delete_tail(tdbb, &temp, rpb->rpb_page);
6602
6603 if ((rpb->rpb_flags & rpb_delta) && !rpb->rpb_prior)
6604 rpb->rpb_prior = rpb->rpb_record;
6605}
6606
6607
6608static void refresh_changed_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb,

Callers 5

VIO_backoutFunction · 0.85
VIO_eraseFunction · 0.85
VIO_modifyFunction · 0.85
VIO_writelockFunction · 0.85
VIO_update_in_placeFunction · 0.85

Calls 4

SET_TDBBFunction · 0.85
VIO_traceFunction · 0.85
delete_tailFunction · 0.85
getValueMethod · 0.45

Tested by

no test coverage detected