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

Method findNextUndo

src/jrd/tra.cpp:3928–3955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3926}
3927
3928Record* jrd_tra::findNextUndo(VerbAction* stopAction, jrd_rel* relation, SINT64 number)
3929/**************************************
3930 *
3931 * f i n d N e x t U n d o
3932 *
3933 **************************************
3934 *
3935 * Functional description
3936 * For given record find next undo data in stack of savepoint (if any).
3937 *
3938 **************************************/
3939{
3940 UndoItem* result = NULL;
3941
3942 for (Savepoint::Iterator iter(tra_save_point); *iter; ++iter)
3943 {
3944 VerbAction* const action = (*iter)->getAction(relation);
3945
3946 if (action == stopAction)
3947 return result ? result->setupRecord(this) : NULL;
3948
3949 if (action && action->vct_undo && action->vct_undo->locate(number))
3950 result = &(action->vct_undo->current());
3951 }
3952
3953 fb_assert(false); // verb_action disappeared from savepoint stack
3954 return NULL;
3955}
3956
3957void jrd_tra::listStayingUndo(jrd_rel* relation, SINT64 number, RecordStack &staying)
3958/**************************************

Callers 1

garbageCollectIdxLiteMethod · 0.80

Calls 4

setupRecordMethod · 0.80
getActionMethod · 0.45
locateMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected