MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
row0log.cc File Reference
#include "row0log.h"
#include "row0row.h"
#include "row0ins.h"
#include "row0upd.h"
#include "row0merge.h"
#include "row0ext.h"
#include "data0data.h"
#include "que0que.h"
#include "handler0alter.h"
#include <map>
Include dependency graph for row0log.cc:

Go to the source code of this file.

Classes

struct  row_log_buf_t
class  row_log_table_blob_t
struct  row_log_t
 Buffer for logging modifications during online index creation. More...

Macros

#define ROW_LOG_HEADER_SIZE   2/*op, extra_size*/
#define row_log_table_close(log, b, size, avail)   row_log_table_close_func(log, size, avail)
#define log_pos   /* empty */

Typedefs

typedef std::map< ulint,
row_log_table_blob_t
page_no_map
 Map of off-page column page numbers to 0 or log byte offsets.

Enumerations

enum  row_tab_op { ROW_T_INSERT = 0x41, ROW_T_UPDATE, ROW_T_DELETE }
enum  row_op { ROW_OP_INSERT = 0x61, ROW_OP_DELETE }

Functions

UNIV_INTERN void row_log_online_op (dict_index_t *index, const dtuple_t *tuple, trx_id_t trx_id)
UNIV_INTERN dberr_t row_log_table_get_error (const dict_index_t *index)

Variables

static ulint size

Detailed Description

Modification log for online index creation and online table rebuild

Created 2011-05-26 Marko Makela

Definition in file row0log.cc.

Macro Definition Documentation

#define ROW_LOG_HEADER_SIZE   2/*op, extra_size*/

Size of the modification log entry header, in bytes

Definition at line 73 of file row0log.cc.

Typedef Documentation

typedef std::map<ulint, row_log_table_blob_t> page_no_map

Map of off-page column page numbers to 0 or log byte offsets.

If there is no mapping for a page number, it is safe to access. If a page number maps to 0, it is an off-page column that has been freed. If a page number maps to a nonzero number, the number is a byte offset into the index->online_log, indicating that the page is safe to access when applying log records starting from that offset.

Definition at line 154 of file row0log.cc.

Enumeration Type Documentation

enum row_op

Index record modification operations during online index creation

Enumerator:
ROW_OP_INSERT 

Insert a record

ROW_OP_DELETE 

Delete a record

Definition at line 55 of file row0log.cc.

enum row_tab_op
Table row modification operations during online table rebuild.

Delete-marked records are not copied to the rebuilt table.

Enumerator:
ROW_T_INSERT 

Insert a record

ROW_T_UPDATE 

Update a record in place

ROW_T_DELETE 

Delete (purge) a record

Definition at line 45 of file row0log.cc.

Function Documentation

UNIV_INTERN void row_log_online_op ( dict_index_t index,
const dtuple_t tuple,
trx_id_t  trx_id 
)

Logs an operation to a secondary index that is (or was) being created.

Parameters
indexin/out: index, S or X latched
tuplein: index tuple
trx_idin: transaction ID for insert, or 0 for delete

Definition at line 203 of file row0log.cc.

Here is the call graph for this function:

UNIV_INTERN dberr_t row_log_table_get_error ( const dict_index_t index)

Gets the error status of the online index rebuild log.

Returns
DB_SUCCESS or error code
Parameters
indexin: clustered index of a table that is being rebuilt online

Definition at line 329 of file row0log.cc.

Here is the call graph for this function:

Variable Documentation

ulint size

< in/out: online rebuild log in: size of log record

Definition at line 347 of file row0log.cc.