InnoDB Plugin
1.0
|
Go to the source code of this file.
Macros | |
#define | MLOG_BUF_MARGIN 256 |
Functions | |
UNIV_INTERN void | mlog_write_ulint (byte *ptr, ulint val, byte type, mtr_t *mtr) |
UNIV_INTERN void | mlog_write_ull (byte *ptr, ib_uint64_t val, mtr_t *mtr) |
UNIV_INTERN void | mlog_write_string (byte *ptr, const byte *str, ulint len, mtr_t *mtr) |
UNIV_INTERN void | mlog_log_string (byte *ptr, ulint len, mtr_t *mtr) |
UNIV_INTERN void | mlog_write_initial_log_record (const byte *ptr, byte type, 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) |
UNIV_INLINE void | mlog_catenate_ulint (mtr_t *mtr, ulint val, ulint type) |
UNIV_INTERN void | mlog_catenate_string (mtr_t *mtr, const byte *str, ulint len) |
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_open (mtr_t *mtr, ulint size) |
UNIV_INLINE void | mlog_close (mtr_t *mtr, byte *ptr) |
UNIV_INLINE byte * | mlog_write_initial_log_record_fast (const byte *ptr, byte type, byte *log_ptr, mtr_t *mtr) |
UNIV_INTERN byte * | mlog_parse_initial_log_record (byte *ptr, byte *end_ptr, byte *type, ulint *space, ulint *page_no) |
UNIV_INTERN byte * | mlog_parse_nbytes (ulint type, byte *ptr, byte *end_ptr, byte *page, void *page_zip) |
UNIV_INTERN byte * | mlog_parse_string (byte *ptr, byte *end_ptr, byte *page, void *page_zip) |
UNIV_INTERN byte * | mlog_open_and_write_index (mtr_t *mtr, const byte *rec, const dict_index_t *index, byte type, ulint size) |
UNIV_INTERN byte * | mlog_parse_index (byte *ptr, const byte *end_ptr, ibool comp, dict_index_t **index) |
Mini-transaction logging routines
Created 12/7/1995 Heikki Tuuri
UNIV_INTERN void mlog_catenate_string | ( | mtr_t * | mtr, |
const byte * | str, | ||
ulint | len | ||
) |
Catenates n bytes to the mtr log. in: string length
mtr | in: mtr |
str | in: string to write |
UNIV_INLINE void mlog_catenate_ulint | ( | mtr_t * | mtr, |
ulint | val, | ||
ulint | type | ||
) |
Catenates 1 - 4 bytes to the mtr log. in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES
Catenates 1 - 4 bytes to the mtr log. The value is not compressed.
mtr | in: mtr |
val | in: value to write |
type | in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES |
UNIV_INLINE void mlog_catenate_ulint_compressed | ( | mtr_t * | mtr, |
ulint | val | ||
) |
Catenates a compressed ulint to mlog. in: value to write
Catenates a compressed ulint to mlog.
mtr | in: mtr |
val | in: 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. in: value to write
Catenates a compressed 64-bit integer to mlog.
mtr | in: mtr |
val | in: value to write |
UNIV_INLINE void mlog_close | ( | mtr_t * | mtr, |
byte * | ptr | ||
) |
Closes a buffer opened to mlog. in: buffer space from ptr up was not used
Closes a buffer opened to mlog.
mtr | in: mtr |
ptr | in: buffer space from ptr up was not used |
UNIV_INTERN void mlog_log_string | ( | byte * | ptr, |
ulint | len, | ||
mtr_t * | mtr | ||
) |
Logs a write of a string to a file page buffered in the buffer pool. Writes the corresponding log record to the mini-transaction log. in: mini-transaction handle
ptr | in: pointer written to |
len | in: string length |
UNIV_INLINE byte* mlog_open | ( | mtr_t * | mtr, |
ulint | size | ||
) |
Opens a buffer to mlog. It must be closed with mlog_close.
Opens a buffer to mlog. It must be closed with mlog_close.
mtr | in: mtr |
size | in: buffer size in bytes; MUST be smaller than DYN_ARRAY_DATA_SIZE! |
UNIV_INTERN byte* mlog_open_and_write_index | ( | mtr_t * | mtr, |
const byte * | rec, | ||
const dict_index_t * | index, | ||
byte | type, | ||
ulint | size | ||
) |
Opens a buffer for mlog, writes the initial log record and, if needed, the field lengths of an index. Reserves space for further log entries. The log entry must be closed with mtr_close().
mtr | in: mtr |
rec | in: index record or page |
index | in: record descriptor |
type | in: log item type |
UNIV_INTERN byte* mlog_parse_index | ( | byte * | ptr, |
const byte * | end_ptr, | ||
ibool | comp, | ||
dict_index_t ** | index | ||
) |
Parses a log record written by mlog_open_and_write_index.
ptr | in: buffer |
end_ptr | in: buffer end |
comp | in: TRUE=compact record format |
UNIV_INTERN byte* mlog_parse_initial_log_record | ( | byte * | ptr, |
byte * | end_ptr, | ||
byte * | type, | ||
ulint * | space, | ||
ulint * | page_no | ||
) |
Parses an initial log record written by mlog_write_initial_log_record.
ptr | in: buffer |
end_ptr | in: buffer end |
type | out: log record type: MLOG_1BYTE, ... |
space | out: space id |
UNIV_INTERN byte* mlog_parse_nbytes | ( | ulint | type, |
byte * | ptr, | ||
byte * | end_ptr, | ||
byte * | page, | ||
void * | page_zip | ||
) |
Parses a log record written by mlog_write_ulint or mlog_write_ull.
type | in: log record type: MLOG_1BYTE, ... |
ptr | in: buffer |
end_ptr | in: buffer end |
page | in: page where to apply the log record, or NULL |
UNIV_INTERN byte* mlog_parse_string | ( | byte * | ptr, |
byte * | end_ptr, | ||
byte * | page, | ||
void * | page_zip | ||
) |
Parses a log record written by mlog_write_string.
ptr | in: buffer |
end_ptr | in: buffer end |
page | in: page where to apply the log record, or NULL |
UNIV_INTERN void mlog_write_initial_log_record | ( | const byte * | ptr, |
byte | type, | ||
mtr_t * | mtr | ||
) |
Writes initial part of a log record consisting of one-byte item type and four-byte space and page numbers. in: mini-transaction handle
ptr | in: pointer to (inside) a buffer frame holding the file page where modification is made |
type | in: log item type: MLOG_1BYTE, ... |
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!
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!
ptr | in: pointer to (inside) a buffer frame holding the file page where modification is made |
type | in: log item type: MLOG_1BYTE, ... |
log_ptr | in: pointer to mtr log which has been opened |
mtr | in: 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.
Writes a log record about an .ibd file create/delete/rename.
type | in: MLOG_FILE_CREATE, MLOG_FILE_DELETE, or MLOG_FILE_RENAME |
space_id | in: space id, if applicable |
page_no | in: page number (not relevant currently) |
log_ptr | in: pointer to mtr log which has been opened |
mtr | in: mtr |
UNIV_INTERN void mlog_write_string | ( | byte * | ptr, |
const byte * | str, | ||
ulint | len, | ||
mtr_t * | mtr | ||
) |
Writes a string to a file page buffered in the buffer pool. Writes the corresponding log record to the mini-transaction log. in: mini-transaction handle
ptr | in: pointer where to write |
str | in: string to write |
len | in: string length |
UNIV_INTERN void mlog_write_ulint | ( | byte * | ptr, |
ulint | val, | ||
byte | type, | ||
mtr_t * | mtr | ||
) |
Writes 1, 2 or 4 bytes to a file page. Writes the corresponding log record to the mini-transaction log if mtr is not NULL. in: mini-transaction handle
ptr | in: pointer where to write |
val | in: value to write |
type | in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES |
UNIV_INTERN void mlog_write_ull | ( | byte * | ptr, |
ib_uint64_t | val, | ||
mtr_t * | mtr | ||
) |
Writes 8 bytes to a file page. Writes the corresponding log record to the mini-transaction log, only if mtr is not NULL in: mini-transaction handle
ptr | in: pointer where to write |
val | in: value to write |