| 6564 | |
| 6565 | |
| 6566 | static 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 | |
| 6608 | static void refresh_changed_fields(thread_db* tdbb, Record* old_rec, record_param* cur_rpb, |
no test coverage detected