1
/******************************************************
2
Transaction undo log record
6
Created 3/26/1996 Heikki Tuuri
7
*******************************************************/
9
/**************************************************************************
10
Reads from an undo log record the record type. */
13
trx_undo_rec_get_type(
14
/*==================*/
15
/* out: record type */
16
trx_undo_rec_t* undo_rec) /* in: undo log record */
18
return(mach_read_from_1(undo_rec + 2) & (TRX_UNDO_CMPL_INFO_MULT - 1));
21
/**************************************************************************
22
Reads from an undo log record the record compiler info. */
25
trx_undo_rec_get_cmpl_info(
26
/*=======================*/
27
/* out: compiler info */
28
trx_undo_rec_t* undo_rec) /* in: undo log record */
30
return(mach_read_from_1(undo_rec + 2) / TRX_UNDO_CMPL_INFO_MULT);
33
/**************************************************************************
34
Returns TRUE if an undo log record contains an extern storage field. */
37
trx_undo_rec_get_extern_storage(
38
/*============================*/
39
/* out: TRUE if extern */
40
trx_undo_rec_t* undo_rec) /* in: undo log record */
42
if (mach_read_from_1(undo_rec + 2) & TRX_UNDO_UPD_EXTERN) {
50
/**************************************************************************
51
Reads the undo log record number. */
54
trx_undo_rec_get_undo_no(
55
/*=====================*/
57
trx_undo_rec_t* undo_rec) /* in: undo log record */
63
return(mach_dulint_read_much_compressed(ptr));
66
/***************************************************************************
67
Copies the undo record to the heap. */
72
/* out, own: copy of undo log record */
73
trx_undo_rec_t* undo_rec, /* in: undo log record */
74
mem_heap_t* heap) /* in: heap where copied */
77
trx_undo_rec_t* rec_copy;
79
len = mach_read_from_2(undo_rec) + buf_frame_align(undo_rec)
81
rec_copy = mem_heap_alloc(heap, len);
83
ut_memcpy(rec_copy, undo_rec, len);