MySQL 5.6.14 Source Code Document
|
#include "mtr0log.h"
#include "buf0buf.h"
#include "dict0dict.h"
#include "log0recv.h"
#include "page0page.h"
#include "dict0boot.h"
Go to the source code of this file.
Functions | |
UNIV_INTERN void | mlog_catenate_string (mtr_t *mtr, const byte *str, ulint len) |
UNIV_INTERN void | mlog_write_initial_log_record (const byte *ptr, byte type, 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 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 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) |
UNIV_INTERN void mlog_catenate_string | ( | mtr_t * | mtr, |
const byte * | str, | ||
ulint | len | ||
) |
Catenates n bytes to the mtr log.
mtr | in: mtr |
str | in: string to write |
len | in: string length |
Definition at line 44 of file mtr0log.cc.
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.
ptr | in: pointer written to |
len | in: string length |
mtr | in: mini-transaction handle |
Definition at line 346 of file mtr0log.cc.
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.
mtr | in: mtr |
rec | in: index record or page |
index | in: record descriptor |
type | in: log item type |
size | in: requested buffer size in bytes (if 0, calls mlog_close() and returns NULL) |
Definition at line 436 of file mtr0log.cc.
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 row format |
index | out, own: dummy index |
Definition at line 534 of file mtr0log.cc.
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 |
page_no | out: page number |
Definition at line 100 of file mtr0log.cc.
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 |
page_zip | in/out: compressed page, or NULL |
Definition at line 140 of file mtr0log.cc.
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 |
page_zip | in/out: compressed page, or NULL |
Definition at line 384 of file mtr0log.cc.
UNIV_INTERN void mlog_write_initial_log_record | ( | const byte * | ptr, |
byte | type, | ||
mtr_t * | mtr | ||
) |
Writes the initial part of a log record consisting of one-byte item type and four-byte space and page numbers. Also pushes info to the mtr memo that a buffer page has been modified.
ptr | in: pointer to (inside) a buffer frame holding the file page where modification is made |
type | in: log item type: MLOG_1BYTE, ... |
mtr | in: mini-transaction handle |
Definition at line 68 of file mtr0log.cc.
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.
ptr | in: pointer where to write |
str | in: string to write |
len | in: string length |
mtr | in: mini-transaction handle |
Definition at line 326 of file mtr0log.cc.
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.
ptr | in: pointer where to write |
val | in: value to write |
type | in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES |
mtr | in: mini-transaction handle |
Definition at line 247 of file mtr0log.cc.
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
ptr | in: pointer where to write |
val | in: value to write |
mtr | in: mini-transaction handle |
Definition at line 293 of file mtr0log.cc.