InnoDB Plugin  1.0
Functions
mtr0log.ic File Reference
#include "mach0data.h"
#include "ut0lst.h"
#include "buf0buf.h"
#include "buf0dblwr.h"
#include "fsp0types.h"
#include "trx0sys.h"
Include dependency graph for mtr0log.ic:
This graph shows which files directly or indirectly include this file:

Functions

UNIV_INLINE byte * mlog_open (mtr_t *mtr, ulint size)
UNIV_INLINE void mlog_close (mtr_t *mtr, byte *ptr)
UNIV_INLINE void mlog_catenate_ulint (mtr_t *mtr, ulint val, ulint type)
UNIV_INLINE void mlog_catenate_ulint_compressed (mtr_t *mtr, ulint val)
UNIV_INLINE void mlog_catenate_ull_compressed (mtr_t *mtr, ib_uint64_t val)
UNIV_INLINE byte * mlog_write_initial_log_record_fast (const byte *ptr, byte type, byte *log_ptr, mtr_t *mtr)
UNIV_INLINE byte * mlog_write_initial_log_record_for_file_op (ulint type, ulint space_id, ulint page_no, byte *log_ptr, mtr_t *mtr)

Detailed Description

Mini-transaction logging routines

Created 12/7/1995 Heikki Tuuri

Function Documentation

UNIV_INLINE void mlog_catenate_ulint ( mtr_t mtr,
ulint  val,
ulint  type 
)

Catenates 1 - 4 bytes to the mtr log. The value is not compressed.

Parameters
mtrin: mtr
valin: value to write
typein: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES
UNIV_INLINE void mlog_catenate_ulint_compressed ( mtr_t mtr,
ulint  val 
)

Catenates a compressed ulint to mlog.

Parameters
mtrin: mtr
valin: value to write
UNIV_INLINE void mlog_catenate_ull_compressed ( mtr_t mtr,
ib_uint64_t  val 
)

Catenates a compressed 64-bit integer to mlog.

Parameters
mtrin: mtr
valin: value to write
UNIV_INLINE void mlog_close ( mtr_t mtr,
byte *  ptr 
)

Closes a buffer opened to mlog.

Parameters
mtrin: mtr
ptrin: buffer space from ptr up was not used
UNIV_INLINE byte* mlog_open ( mtr_t mtr,
ulint  size 
)

Opens a buffer to mlog. It must be closed with mlog_close.

Returns
buffer, NULL if log mode MTR_LOG_NONE
Parameters
mtrin: mtr
sizein: buffer size in bytes; MUST be smaller than DYN_ARRAY_DATA_SIZE!
UNIV_INLINE byte* mlog_write_initial_log_record_fast ( const byte *  ptr,
byte  type,
byte *  log_ptr,
mtr_t mtr 
)

Writes the initial part of a log record (3..11 bytes). If the implementation of this function is changed, all size parameters to mlog_open() should be adjusted accordingly!

Returns
new value of log_ptr
Parameters
ptrin: pointer to (inside) a buffer frame holding the file page where modification is made
typein: log item type: MLOG_1BYTE, ...
log_ptrin: pointer to mtr log which has been opened
mtrin: mtr
UNIV_INLINE byte* mlog_write_initial_log_record_for_file_op ( ulint  type,
ulint  space_id,
ulint  page_no,
byte *  log_ptr,
mtr_t mtr 
)

Writes a log record about an .ibd file create/delete/rename.

Returns
new value of log_ptr
Parameters
typein: MLOG_FILE_CREATE, MLOG_FILE_DELETE, or MLOG_FILE_RENAME
space_idin: space id, if applicable
page_noin: page number (not relevant currently)
log_ptrin: pointer to mtr log which has been opened
mtrin: mtr