CLASS CLRLogRec

#include <logrec.h>

CLRLogRec is the compensation log record. It is created whenever updates are rolled back. CLRLogRec is a subclass of logRecord (in log.h).


Fields


struct CLRLogData{

};

CLRLogData is how the buffer beginning at data_ptr for a log record is structured. There are no actual fields, it is just how the byte array can be casted into this struct.


Methods

lsn_t GetPrevLSN ( )

Returns prevlsn field (the LSN of the action taken before by this transaction).

lsn_t GetUndoNextLSN ( )

Returns undonextlsn field

int Getxid ( )

Returns xid field (the transaction id or transaction number, e.g. - 1 for T1)

PageID GetPageID ( )

Returns page_id field (the page being affected)

int GetOffset ( )

Returns offset field (the byte position on the page where the data is being written)

int GetSize ( )

Returns size field (the size of the Redo data)

char* GetRedo ( )

Returns a pointer to where the Redo data should be stored on the log record. This is the data the CLR is undoing.

RecErr SetPrevLSN ( lsn_t newlsn )

Sets the prevlsn field

RecErr SetUndoNxtLSN ( lsn_t newundonextlsn )

Sets the undonextlsn field

RecErr Setxid ( int newxid )

Sets the xid field

RecErr SetPageID ( int newpgid )

Sets the page_id field

RecErr SetOffset ( int newoffset )

Sets the offset field

RecErr SetSize ( int newsize )

Sets the size field (the size of the Undo data)