2001-02-17 13:19:19 +01:00
|
|
|
/******************************************************
|
|
|
|
Transaction undo log record
|
|
|
|
|
|
|
|
(c) 1996 Innobase Oy
|
|
|
|
|
|
|
|
Created 3/26/1996 Heikki Tuuri
|
|
|
|
*******************************************************/
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Reads from an undo log record the record type. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
trx_undo_rec_get_type(
|
|
|
|
/*==================*/
|
|
|
|
/* out: record type */
|
|
|
|
trx_undo_rec_t* undo_rec) /* in: undo log record */
|
|
|
|
{
|
|
|
|
return(mach_read_from_1(undo_rec + 2) & (TRX_UNDO_CMPL_INFO_MULT - 1));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Reads from an undo log record the record compiler info. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
trx_undo_rec_get_cmpl_info(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: compiler info */
|
|
|
|
trx_undo_rec_t* undo_rec) /* in: undo log record */
|
|
|
|
{
|
|
|
|
return(mach_read_from_1(undo_rec + 2) / TRX_UNDO_CMPL_INFO_MULT);
|
|
|
|
}
|
|
|
|
|
srv0srv.h Support raw disk partitions as data files
srv0start.c Support raw disk partitions as data files
srv0srv.c Support raw disk partitions as data files
row0purge.c < 4 GB rows, doublewrite, hang fixes
row0row.c < 4 GB rows, doublewrite, hang fixes
row0sel.c < 4 GB rows, doublewrite, hang fixes
row0uins.c < 4 GB rows, doublewrite, hang fixes
row0umod.c < 4 GB rows, doublewrite, hang fixes
row0undo.c < 4 GB rows, doublewrite, hang fixes
row0upd.c < 4 GB rows, doublewrite, hang fixes
srv0srv.c < 4 GB rows, doublewrite, hang fixes
srv0start.c < 4 GB rows, doublewrite, hang fixes
sync0rw.c < 4 GB rows, doublewrite, hang fixes
sync0sync.c < 4 GB rows, doublewrite, hang fixes
trx0purge.c < 4 GB rows, doublewrite, hang fixes
trx0rec.c < 4 GB rows, doublewrite, hang fixes
trx0sys.c < 4 GB rows, doublewrite, hang fixes
btr0btr.c < 4 GB rows, doublewrite, hang fixes
btr0cur.c < 4 GB rows, doublewrite, hang fixes
buf0buf.c < 4 GB rows, doublewrite, hang fixes
buf0flu.c < 4 GB rows, doublewrite, hang fixes
buf0rea.c < 4 GB rows, doublewrite, hang fixes
data0data.c < 4 GB rows, doublewrite, hang fixes
fil0fil.c < 4 GB rows, doublewrite, hang fixes
fsp0fsp.c < 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c < 4 GB rows, doublewrite, hang fixes
lock0lock.c < 4 GB rows, doublewrite, hang fixes
log0log.c < 4 GB rows, doublewrite, hang fixes
log0recv.c < 4 GB rows, doublewrite, hang fixes
os0file.c < 4 GB rows, doublewrite, hang fixes
page0cur.c < 4 GB rows, doublewrite, hang fixes
pars0pars.c < 4 GB rows, doublewrite, hang fixes
rem0cmp.c < 4 GB rows, doublewrite, hang fixes
rem0rec.c < 4 GB rows, doublewrite, hang fixes
row0ins.c < 4 GB rows, doublewrite, hang fixes
row0mysql.c < 4 GB rows, doublewrite, hang fixes
univ.i < 4 GB rows, doublewrite, hang fixes
data0data.ic < 4 GB rows, doublewrite, hang fixes
mach0data.ic < 4 GB rows, doublewrite, hang fixes
rem0rec.ic < 4 GB rows, doublewrite, hang fixes
row0upd.ic < 4 GB rows, doublewrite, hang fixes
trx0rec.ic < 4 GB rows, doublewrite, hang fixes
rem0cmp.h < 4 GB rows, doublewrite, hang fixes
rem0rec.h < 4 GB rows, doublewrite, hang fixes
row0ins.h < 4 GB rows, doublewrite, hang fixes
row0mysql.h < 4 GB rows, doublewrite, hang fixes
row0row.h < 4 GB rows, doublewrite, hang fixes
row0upd.h < 4 GB rows, doublewrite, hang fixes
srv0srv.h < 4 GB rows, doublewrite, hang fixes
sync0sync.h < 4 GB rows, doublewrite, hang fixes
trx0rec.h < 4 GB rows, doublewrite, hang fixes
trx0sys.h < 4 GB rows, doublewrite, hang fixes
trx0types.h < 4 GB rows, doublewrite, hang fixes
trx0undo.h < 4 GB rows, doublewrite, hang fixes
ut0dbg.h < 4 GB rows, doublewrite, hang fixes
ut0ut.h < 4 GB rows, doublewrite, hang fixes
btr0btr.h < 4 GB rows, doublewrite, hang fixes
btr0cur.h < 4 GB rows, doublewrite, hang fixes
buf0buf.h < 4 GB rows, doublewrite, hang fixes
buf0flu.h < 4 GB rows, doublewrite, hang fixes
data0data.h < 4 GB rows, doublewrite, hang fixes
dict0mem.h < 4 GB rows, doublewrite, hang fixes
fil0fil.h < 4 GB rows, doublewrite, hang fixes
fsp0fsp.h < 4 GB rows, doublewrite, hang fixes
os0file.h < 4 GB rows, doublewrite, hang fixes
2001-08-04 18:36:14 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Returns TRUE if an undo log record contains an extern storage field. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ibool
|
|
|
|
trx_undo_rec_get_extern_storage(
|
|
|
|
/*============================*/
|
|
|
|
/* out: TRUE if extern */
|
|
|
|
trx_undo_rec_t* undo_rec) /* in: undo log record */
|
|
|
|
{
|
|
|
|
if (mach_read_from_1(undo_rec + 2) & TRX_UNDO_UPD_EXTERN) {
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
/**************************************************************************
|
|
|
|
Reads the undo log record number. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dulint
|
|
|
|
trx_undo_rec_get_undo_no(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: undo no */
|
|
|
|
trx_undo_rec_t* undo_rec) /* in: undo log record */
|
|
|
|
{
|
|
|
|
byte* ptr;
|
|
|
|
|
|
|
|
ptr = undo_rec + 3;
|
|
|
|
|
|
|
|
return(mach_dulint_read_much_compressed(ptr));
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
Copies the undo record to the heap. */
|
|
|
|
UNIV_INLINE
|
|
|
|
trx_undo_rec_t*
|
|
|
|
trx_undo_rec_copy(
|
|
|
|
/*==============*/
|
|
|
|
/* out, own: copy of undo log record */
|
|
|
|
trx_undo_rec_t* undo_rec, /* in: undo log record */
|
|
|
|
mem_heap_t* heap) /* in: heap where copied */
|
|
|
|
{
|
|
|
|
ulint len;
|
|
|
|
trx_undo_rec_t* rec_copy;
|
|
|
|
|
|
|
|
len = mach_read_from_2(undo_rec) + buf_frame_align(undo_rec)
|
|
|
|
- undo_rec;
|
|
|
|
rec_copy = mem_heap_alloc(heap, len);
|
|
|
|
|
|
|
|
ut_memcpy(rec_copy, undo_rec, len);
|
|
|
|
|
|
|
|
return(rec_copy);
|
|
|
|
}
|