~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/trx0rec.ic

  • Committer: Monty Taylor
  • Date: 2008-11-07 04:45:58 UTC
  • mfrom: (574.3.4 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: monty@inaugust.com-20081107044558-2me2c70ksfr3qs9i
Merged from Lee (and from trunk by proxy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        return(mach_dulint_read_much_compressed(ptr));
64
64
}
65
65
 
 
66
/**************************************************************************
 
67
Returns the start of the undo record data area. */
 
68
UNIV_INLINE
 
69
byte*
 
70
trx_undo_rec_get_ptr(
 
71
/*=================*/
 
72
                                        /* out: compiler info */
 
73
        trx_undo_rec_t* undo_rec,       /* in: undo log record */
 
74
        dulint          undo_no)        /* in: undo no read from node */
 
75
{
 
76
        return (((byte*) undo_rec) + 3
 
77
                + mach_dulint_get_much_compressed_size(undo_no));
 
78
}
 
79
 
66
80
/***************************************************************************
67
81
Copies the undo record to the heap. */
68
82
UNIV_INLINE
76
90
        ulint           len;
77
91
        trx_undo_rec_t* rec_copy;
78
92
 
79
 
        len = mach_read_from_2(undo_rec) + buf_frame_align(undo_rec)
80
 
                - undo_rec;
 
93
        len = mach_read_from_2(undo_rec)
 
94
                - ut_align_offset(undo_rec, UNIV_PAGE_SIZE);
81
95
        rec_copy = mem_heap_alloc(heap, len);
82
96
 
83
97
        ut_memcpy(rec_copy, undo_rec, len);