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

Method PushRpb

src/jrd/rpb_chain.cpp:36–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34// rpb_chain.h includes req.h => struct record_param.
35
36int traRpbList::PushRpb(record_param* value)
37{
38 if (value->rpb_relation->rel_view_rse || // this is view
39 value->rpb_relation->rel_file || // this is external file
40 value->rpb_relation->isVirtual() || // this is virtual table
41 value->rpb_number.isBof()) // recno is a BOF marker
42 {
43 return -1;
44 }
45 int pos = add(traRpbListElement(value, ~0));
46 int level = -1;
47 if (pos-- > 0)
48 {
49 traRpbListElement& prev = (*this)[pos];
50 if (prev.lr_rpb->rpb_relation->rel_id == value->rpb_relation->rel_id &&
51 prev.lr_rpb->rpb_number == value->rpb_number)
52 {
53 // we got the same record once more - mark for refetch
54 level = prev.level;
55 fb_assert(pos >= level);
56 fb_assert((*this)[pos - level].level == 0);
57 prev.lr_rpb->rpb_runtime_flags |= RPB_refetch;
58 }
59 }
60 (*this)[++pos].level = ++level;
61 return level;
62}
63
64bool traRpbList::PopRpb(record_param* value, int Level)
65{

Callers 1

preModifyEraseTriggersFunction · 0.80

Calls 4

traRpbListElementClass · 0.85
isVirtualMethod · 0.80
addFunction · 0.50
isBofMethod · 0.45

Tested by

no test coverage detected