MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
api0api.cc File Reference
#include "univ.i"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "api0api.h"
#include "api0misc.h"
#include "srv0start.h"
#include "dict0dict.h"
#include "btr0pcur.h"
#include "row0ins.h"
#include "row0upd.h"
#include "row0vers.h"
#include "trx0roll.h"
#include "dict0crea.h"
#include "row0merge.h"
#include "pars0pars.h"
#include "lock0types.h"
#include "row0sel.h"
#include "lock0lock.h"
#include "rem0cmp.h"
#include "ut0dbg.h"
#include "dict0priv.h"
#include "ut0ut.h"
#include "ha_prototypes.h"
Include dependency graph for api0api.cc:

Go to the source code of this file.

Classes

struct  ib_qry_grph_t
struct  ib_qry_node_t
struct  ib_qry_proc_t
struct  ib_cursor_t
struct  ib_col_t
struct  ib_key_col_t
struct  ib_index_def_t
struct  ib_table_def_t
struct  ib_tuple_t

Macros

#define INNOBASE_WAKE_INTERVAL   32
#define SRV_PATH_SEPARATOR   '/'

Enumerations

enum  ib_tuple_type_t { TPL_TYPE_ROW, TPL_TYPE_KEY }
enum  ib_qry_type_t { QRY_NON, QRY_INS, QRY_UPD, QRY_SEL }

Functions

UNIV_INLINE ib_bool_t ib_btr_cursor_is_positioned (btr_pcur_t *pcur)
UNIV_INTERN void * ib_open_table_by_name (const char *name)
UNIV_INLINE void ib_wake_master_thread (void)
UNIV_INLINE ulint ib_get_max_row_len (dict_index_t *cluster)
UNIV_INTERN ib_err_t ib_trx_start (ib_trx_t ib_trx, ib_trx_level_t ib_trx_level, void *thd)
UNIV_INTERN ib_trx_t ib_trx_begin (ib_trx_level_t ib_trx_level)
UNIV_INTERN ib_trx_state_t ib_trx_state (ib_trx_t ib_trx)
UNIV_INTERN ib_u64_t ib_trx_get_start_time (ib_trx_t ib_trx)
UNIV_INTERN ib_err_t ib_trx_release (ib_trx_t ib_trx)
ib_err_t ib_trx_commit (ib_trx_t ib_trx)
UNIV_INTERN ib_err_t ib_trx_rollback (ib_trx_t ib_trx)
UNIV_INLINE const ib_index_def_tib_table_find_index (ib_vector_t *indexes, const char *name)
UNIV_INLINE ulint ib_col_get_prtype (const ib_col_t *ib_col)
UNIV_INLINE ulint ib_col_get_mtype (const ib_col_t *ib_col)
UNIV_INLINE const ib_col_tib_table_find_col (const ib_vector_t *cols, const char *name)
UNIV_INLINE const ib_key_col_tib_index_find_col (ib_vector_t *cols, const char *name)
UNIV_INTERN ib_err_t ib_table_name_check (const char *name)
UNIV_INLINE ib_index_def_tib_find_clustered_index (ib_vector_t *indexes)
UNIV_INTERN ib_err_t ib_cursor_open_table_using_id (ib_id_u64_t table_id, ib_trx_t ib_trx, ib_crsr_t *ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_open_index_using_id (ib_id_u64_t index_id, ib_trx_t ib_trx, ib_crsr_t *ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_open_index_using_name (ib_crsr_t ib_open_crsr, const char *index_name, ib_crsr_t *ib_crsr, int *idx_type, ib_id_u64_t *idx_id)
UNIV_INTERN ib_err_t ib_cursor_open_table (const char *name, ib_trx_t ib_trx, ib_crsr_t *ib_crsr)
UNIV_INTERN void ib_cursor_clear_trx (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_reset (ib_crsr_t ib_crsr)
ib_err_t ib_cursor_new_trx (ib_crsr_t ib_crsr, ib_trx_t ib_trx)
ib_err_t ib_cursor_commit_trx (ib_crsr_t ib_crsr, ib_trx_t ib_trx)
UNIV_INTERN ib_err_t ib_cursor_close (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_close_table (ib_crsr_t ib_crsr)
UNIV_INLINE ib_err_t ib_insert_row_with_lock_retry (que_thr_t *thr, ins_node_t *node, trx_savept_t *savept)
UNIV_INTERN ib_err_t ib_cursor_insert_row (ib_crsr_t ib_crsr, const ib_tpl_t ib_tpl)
UNIV_INLINE upd_tib_update_vector_create (ib_cursor_t *cursor)
UNIV_INLINE ib_err_t ib_update_row_with_lock_retry (que_thr_t *thr, upd_node_t *node, trx_savept_t *savept)
UNIV_INLINE ib_err_t ib_execute_update_query_graph (ib_cursor_t *cursor, btr_pcur_t *pcur)
UNIV_INTERN ib_err_t ib_cursor_update_row (ib_crsr_t ib_crsr, const ib_tpl_t ib_old_tpl, const ib_tpl_t ib_new_tpl)
UNIV_INTERN ib_err_t ib_cursor_delete_row (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_read_row (ib_crsr_t ib_crsr, ib_tpl_t ib_tpl)
UNIV_INLINE ib_err_t ib_cursor_position (ib_cursor_t *cursor, ib_srch_mode_t mode)
UNIV_INTERN ib_err_t ib_cursor_first (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_last (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_next (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_moveto (ib_crsr_t ib_crsr, ib_tpl_t ib_tpl, ib_srch_mode_t ib_srch_mode)
UNIV_INTERN void ib_cursor_set_match_mode (ib_crsr_t ib_crsr, ib_match_mode_t match_mode)
UNIV_INLINE dfield_tib_col_get_dfield (ib_tuple_t *tuple, ulint col_no)
UNIV_INLINE ib_err_t ib_col_is_capped (const dtype_t *dtype)
UNIV_INTERN ib_err_t ib_col_set_value (ib_tpl_t ib_tpl, ib_ulint_t col_no, const void *src, ib_ulint_t len, ib_bool_t need_cpy)
UNIV_INTERN ib_ulint_t ib_col_get_len (ib_tpl_t ib_tpl, ib_ulint_t i)
UNIV_INLINE ib_ulint_t ib_col_copy_value_low (ib_tpl_t ib_tpl, ib_ulint_t i, void *dst, ib_ulint_t len)
UNIV_INTERN ib_ulint_t ib_col_copy_value (ib_tpl_t ib_tpl, ib_ulint_t i, void *dst, ib_ulint_t len)
UNIV_INLINE ib_col_attr_t ib_col_get_attr (ulint prtype)
UNIV_INTERN const char * ib_col_get_name (ib_crsr_t ib_crsr, ib_ulint_t i)
UNIV_INTERN const char * ib_get_idx_field_name (ib_crsr_t ib_crsr, ib_ulint_t i)
UNIV_INLINE ib_ulint_t ib_col_get_meta_low (ib_tpl_t ib_tpl, ib_ulint_t i, ib_col_meta_t *ib_col_meta)
UNIV_INLINE ib_err_t ib_tuple_check_int (ib_tpl_t ib_tpl, ib_ulint_t i, ib_bool_t usign, ulint size)
UNIV_INTERN ib_err_t ib_tuple_read_i8 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_i8_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_u8 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_u8_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_i16 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_i16_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_u16 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_u16_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_i32 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_i32_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_u32 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_u32_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_i64 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_i64_t *ival)
UNIV_INTERN ib_err_t ib_tuple_read_u64 (ib_tpl_t ib_tpl, ib_ulint_t i, ib_u64_t *ival)
UNIV_INTERN const void * ib_col_get_value (ib_tpl_t ib_tpl, ib_ulint_t i)
UNIV_INTERN ib_ulint_t ib_col_get_meta (ib_tpl_t ib_tpl, ib_ulint_t i, ib_col_meta_t *ib_col_meta)
UNIV_INTERN ib_tpl_t ib_tuple_clear (ib_tpl_t ib_tpl)
UNIV_INTERN ib_err_t ib_tuple_get_cluster_key (ib_crsr_t ib_crsr, ib_tpl_t *ib_dst_tpl, const ib_tpl_t ib_src_tpl)
UNIV_INTERN ib_err_t ib_tuple_copy (ib_tpl_t ib_dst_tpl, const ib_tpl_t ib_src_tpl)
UNIV_INTERN ib_tpl_t ib_sec_search_tuple_create (ib_crsr_t ib_crsr)
UNIV_INTERN ib_tpl_t ib_sec_read_tuple_create (ib_crsr_t ib_crsr)
UNIV_INTERN ib_tpl_t ib_clust_search_tuple_create (ib_crsr_t ib_crsr)
UNIV_INTERN ib_tpl_t ib_clust_read_tuple_create (ib_crsr_t ib_crsr)
UNIV_INTERN ib_ulint_t ib_tuple_get_n_user_cols (const ib_tpl_t ib_tpl)
UNIV_INTERN ib_ulint_t ib_tuple_get_n_cols (const ib_tpl_t ib_tpl)
UNIV_INTERN void ib_tuple_delete (ib_tpl_t ib_tpl)
UNIV_INTERN ib_err_t ib_table_get_id (const char *table_name, ib_id_u64_t *table_id)
UNIV_INTERN ib_err_t ib_index_get_id (const char *table_name, const char *index_name, ib_id_u64_t *index_id)
UNIV_INTERN ib_bool_t ib_cursor_is_positioned (const ib_crsr_t ib_crsr)
UNIV_INTERN ib_bool_t ib_schema_lock_is_exclusive (const ib_trx_t ib_trx)
UNIV_INTERN ib_bool_t ib_schema_lock_is_shared (const ib_trx_t ib_trx)
UNIV_INTERN ib_err_t ib_cursor_lock (ib_crsr_t ib_crsr, ib_lck_mode_t ib_lck_mode)
UNIV_INTERN ib_err_t ib_table_lock (ib_trx_t ib_trx, ib_id_u64_t table_id, ib_lck_mode_t ib_lck_mode)
UNIV_INTERN ib_err_t ib_cursor_unlock (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_cursor_set_lock_mode (ib_crsr_t ib_crsr, ib_lck_mode_t ib_lck_mode)
UNIV_INTERN void ib_cursor_set_cluster_access (ib_crsr_t ib_crsr)
UNIV_INLINE ib_err_t ib_tuple_write_int (ib_tpl_t ib_tpl, ulint col_no, const void *value, ulint value_len)
UNIV_INTERN ib_err_t ib_tuple_write_i8 (ib_tpl_t ib_tpl, int col_no, ib_i8_t val)
UNIV_INTERN ib_err_t ib_tuple_write_i16 (ib_tpl_t ib_tpl, int col_no, ib_i16_t val)
UNIV_INTERN ib_err_t ib_tuple_write_i32 (ib_tpl_t ib_tpl, int col_no, ib_i32_t val)
UNIV_INTERN ib_err_t ib_tuple_write_i64 (ib_tpl_t ib_tpl, int col_no, ib_i64_t val)
UNIV_INTERN ib_err_t ib_tuple_write_u8 (ib_tpl_t ib_tpl, int col_no, ib_u8_t val)
UNIV_INTERN ib_err_t ib_tuple_write_u16 (ib_tpl_t ib_tpl, int col_no, ib_u16_t val)
UNIV_INTERN ib_err_t ib_tuple_write_u32 (ib_tpl_t ib_tpl, int col_no, ib_u32_t val)
UNIV_INTERN ib_err_t ib_tuple_write_u64 (ib_tpl_t ib_tpl, int col_no, ib_u64_t val)
UNIV_INTERN void ib_cursor_stmt_begin (ib_crsr_t ib_crsr)
UNIV_INTERN ib_err_t ib_tuple_write_double (ib_tpl_t ib_tpl, int col_no, double val)
UNIV_INTERN ib_err_t ib_tuple_read_double (ib_tpl_t ib_tpl, ib_ulint_t col_no, double *dval)
UNIV_INTERN ib_err_t ib_tuple_write_float (ib_tpl_t ib_tpl, int col_no, float val)
UNIV_INTERN ib_err_t ib_tuple_read_float (ib_tpl_t ib_tpl, ib_ulint_t col_no, float *fval)
UNIV_INTERN ib_err_t ib_cursor_truncate (ib_crsr_t *ib_crsr, ib_id_u64_t *table_id)
UNIV_INTERN ib_err_t ib_table_truncate (const char *table_name, ib_id_u64_t *table_id)
UNIV_INTERN ib_err_t ib_close_thd (void *thd)
UNIV_INTERN ib_trx_state_t ib_cfg_trx_level ()
UNIV_INTERN ib_ulint_t ib_cfg_bk_commit_interval ()
UNIV_INTERN int ib_cfg_get_cfg ()

Variables

my_bool ib_binlog_enabled = FALSE
my_bool ib_mdl_enabled = FALSE
my_bool ib_disable_row_lock = FALSE
ulong ib_trx_level_setting = IB_TRX_READ_UNCOMMITTED
ulong ib_bk_commit_interval = 0

Detailed Description

InnoDB Native API

2008-08-01 Created Sunny Bains 3/20/2011 Jimmy Yang extracted from Embedded InnoDB

Definition in file api0api.cc.

Macro Definition Documentation

#define INNOBASE_WAKE_INTERVAL   32
The following counter is used to convey information to InnoDB

about server activity: in selects it is not sensible to call srv_active_wake_master_thread after each fetch or search, we only do it every INNOBASE_WAKE_INTERVAL'th step.

Definition at line 212 of file api0api.cc.

Enumeration Type Documentation

Query types supported.

Enumerator:
QRY_NON 

None/Sentinel

QRY_INS 

Insert operation

QRY_UPD 

Update operation

QRY_SEL 

Select operation

Definition at line 81 of file api0api.cc.

InnoDB tuple types.

Enumerator:
TPL_TYPE_ROW 

Data row tuple

TPL_TYPE_KEY 

Index key tuple

Definition at line 75 of file api0api.cc.

Function Documentation

UNIV_INLINE ib_bool_t ib_btr_cursor_is_positioned ( btr_pcur_t pcur)

Check whether the Innodb persistent cursor is positioned.

Returns
IB_TRUE if positioned
Parameters
pcurin: InnoDB persistent cursor

Definition at line 219 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INTERN ib_ulint_t ib_cfg_bk_commit_interval ( )

Return configure value for background commit interval (in seconds)

Returns
background commit interval (in seconds)

Definition at line 3921 of file api0api.cc.

UNIV_INTERN int ib_cfg_get_cfg ( )

Get generic configure status

Returns
configure status

Definition at line 3932 of file api0api.cc.

UNIV_INTERN ib_trx_state_t ib_cfg_trx_level ( )

Return isolation configuration set by "innodb_api_trx_level"

Returns
trx isolation level

Definition at line 3910 of file api0api.cc.

UNIV_INTERN ib_err_t ib_close_thd ( void *  thd)

Frees a possible InnoDB trx object associated with the current THD.

Returns
0 or error number
Parameters
thdin: handle to the MySQL thread of the user whose resources should be free'd

Definition at line 3895 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_tpl_t ib_clust_read_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple for table row operations.

Returns
own: Tuple for current table
Parameters
ib_crsrin: Cursor instance

Definition at line 3194 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_tpl_t ib_clust_search_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for table key operations.

Returns
own: Tuple for current table
Parameters
ib_crsrin: Cursor instance

Definition at line 3175 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_ulint_t ib_col_copy_value ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
void *  dst,
ib_ulint_t  len 
)

Copy a column value from the tuple.

Returns
bytes copied or IB_SQL_NULL
Parameters
ib_tplin: tuple instance
iin: column index in tuple
dstout: copied data value
lenin: max data value len to copy

Definition at line 2625 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_ulint_t ib_col_copy_value_low ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
void *  dst,
ib_ulint_t  len 
)

Copy a column value from the tuple.

Returns
bytes copied or IB_SQL_NULL
Parameters
ib_tplin: tuple instance
iin: column index in tuple
dstout: copied data value
lenin: max data value len to copy

Definition at line 2529 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE ib_col_attr_t ib_col_get_attr ( ulint  prtype)

Get the InnoDB column attribute from the internal column precise type.

Returns
precise type in api format
Parameters
prtypein: column definition

Definition at line 2640 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INLINE dfield_t* ib_col_get_dfield ( ib_tuple_t tuple,
ulint  col_no 
)

Get the dfield instance for the column in the tuple.

Returns
dfield instance in tuple
Parameters
tuplein: tuple instance
col_noin: col no. in tuple

Definition at line 2264 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INTERN ib_ulint_t ib_col_get_len ( ib_tpl_t  ib_tpl,
ib_ulint_t  i 
)

Get the size of the data available in a column of the tuple.

Returns
bytes avail or IB_SQL_NULL
Parameters
ib_tplin: tuple instance
iin: column index in tuple

Definition at line 2508 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_ulint_t ib_col_get_meta ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_col_meta_t ib_col_meta 
)

Get a column type, length and attributes from the tuple.

Returns
len of column data
Parameters
ib_tplin: tuple instance
iin: column index in tuple
ib_col_metaout: column meta data

Definition at line 2969 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_ulint_t ib_col_get_meta_low ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_col_meta_t ib_col_meta 
)

Get a column type, length and attributes from the tuple.

Returns
len of column data
Parameters
ib_tplin: tuple instance
iin: column index in tuple
ib_col_metaout: column meta data

Definition at line 2708 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE ulint ib_col_get_mtype ( const ib_col_t ib_col)

Get the InnoDB internal main type from the schema column definition.

Returns
column main type
Parameters
ib_colin: column definition

Definition at line 747 of file api0api.cc.

UNIV_INTERN const char* ib_col_get_name ( ib_crsr_t  ib_crsr,
ib_ulint_t  i 
)

Get a column name from the tuple.

Returns
name of the column
Parameters
ib_crsrin: InnoDB cursor instance
iin: column index in tuple

Definition at line 2662 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ulint ib_col_get_prtype ( const ib_col_t ib_col)

Get the InnoDB internal precise type from the schema column definition.

Returns
precise type in api format
Parameters
ib_colin: column definition

Definition at line 723 of file api0api.cc.

UNIV_INTERN const void* ib_col_get_value ( ib_tpl_t  ib_tpl,
ib_ulint_t  i 
)

Get a column value pointer from the tuple.

Returns
NULL or pointer to buffer
Parameters
ib_tplin: tuple instance
iin: column index in tuple

Definition at line 2946 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_col_is_capped ( const dtype_t dtype)

Predicate to check whether a column type contains variable length data.

Returns
DB_SUCCESS or error code
Parameters
dtypein: column type

Definition at line 2281 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_col_set_value ( ib_tpl_t  ib_tpl,
ib_ulint_t  col_no,
const void *  src,
ib_ulint_t  len,
ib_bool_t  need_cpy 
)

Set a column of the tuple. Make a copy using the tuple's heap.

Returns
DB_SUCCESS or error code
Parameters
ib_tplin: tuple instance
col_noin: column index in tuple
srcin: data value
lenin: data value len
need_cpyin: if need memcpy

Definition at line 2300 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void ib_cursor_clear_trx ( ib_crsr_t  ib_crsr)

set a cursor trx to NULL

Parameters
ib_crsrin/out: InnoDB cursor

Definition at line 1299 of file api0api.cc.

UNIV_INTERN ib_err_t ib_cursor_close ( ib_crsr_t  ib_crsr)

Close an InnoDB table and free the cursor.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin,own: InnoDB cursor

Definition at line 1388 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_cursor_close_table ( ib_crsr_t  ib_crsr)

Close the table, decrement n_ref_count count.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin,own: InnoDB cursor

Definition at line 1426 of file api0api.cc.

Here is the call graph for this function:

ib_err_t ib_cursor_commit_trx ( ib_crsr_t  ib_crsr,
ib_trx_t  ib_trx 
)

Commit the transaction in a cursor

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor
ib_trxin: transaction

Definition at line 1367 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_delete_row ( ib_crsr_t  ib_crsr)

Delete a row in a table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

Definition at line 1995 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_first ( ib_crsr_t  ib_crsr)

Move cursor to the first record in the table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

Definition at line 2152 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_insert_row ( ib_crsr_t  ib_crsr,
const ib_tpl_t  ib_tpl 
)

Insert a row to a table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor instance
ib_tplin: tuple to insert

Definition at line 1562 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_bool_t ib_cursor_is_positioned ( const ib_crsr_t  ib_crsr)

Check if cursor is positioned.

Returns
IB_TRUE if positioned
Parameters
ib_crsrin: InnoDB cursor instance

Definition at line 3336 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_cursor_last ( ib_crsr_t  ib_crsr)

Move cursor to the last record in the table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

Definition at line 2166 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_lock ( ib_crsr_t  ib_crsr,
ib_lck_mode_t  ib_lck_mode 
)

Set the Lock an InnoDB cursor/table.

Returns
DB_SUCCESS or error code
Parameters
ib_crsrin/out: InnoDB cursor
ib_lck_modein: InnoDB lock mode

Definition at line 3380 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_cursor_moveto ( ib_crsr_t  ib_crsr,
ib_tpl_t  ib_tpl,
ib_srch_mode_t  ib_srch_mode 
)

Search for key.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance
ib_tplin: Key to search for
ib_srch_modein: search mode

Definition at line 2203 of file api0api.cc.

Here is the call graph for this function:

ib_err_t ib_cursor_new_trx ( ib_crsr_t  ib_crsr,
ib_trx_t  ib_trx 
)

update the cursor with new transactions and also reset the cursor

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor
ib_trxin: transaction

Definition at line 1339 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_next ( ib_crsr_t  ib_crsr)

Move cursor to the next user record in the table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

Definition at line 2180 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_open_index_using_id ( ib_id_u64_t  index_id,
ib_trx_t  ib_trx,
ib_crsr_t ib_crsr 
)

Open an InnoDB index and return a cursor handle to it.

Returns
DB_SUCCESS or err code
Parameters
index_idin: index id of index to open
ib_trxin: Current transaction handle can be NULL
ib_crsrout: InnoDB cursor

Definition at line 1117 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_open_index_using_name ( ib_crsr_t  ib_open_crsr,
const char *  index_name,
ib_crsr_t ib_crsr,
int *  idx_type,
ib_id_u64_t *  idx_id 
)

Open an InnoDB secondary index cursor and return a cursor handle to it.

Returns
DB_SUCCESS or err code
Parameters
ib_open_crsrin: open/active cursor
index_namein: secondary index name
ib_crsrout,own: InnoDB index cursor
idx_typeout: index is cluster index
idx_idout: index id

Definition at line 1166 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_open_table ( const char *  name,
ib_trx_t  ib_trx,
ib_crsr_t ib_crsr 
)

Open an InnoDB table and return a cursor handle to it.

Returns
DB_SUCCESS or err code
Parameters
namein: table name
ib_trxin: Current transaction handle can be NULL
ib_crsrout,own: InnoDB cursor

Definition at line 1234 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_open_table_using_id ( ib_id_u64_t  table_id,
ib_trx_t  ib_trx,
ib_crsr_t ib_crsr 
)

Open an InnoDB table and return a cursor handle to it.

Returns
DB_SUCCESS or err code
Parameters
table_idin: table id of table to open
ib_trxin: Current transaction handle can be NULL
ib_crsrout,own: InnoDB cursor

Definition at line 1085 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_cursor_position ( ib_cursor_t cursor,
ib_srch_mode_t  mode 
)

Move cursor to the first record in the table.

Returns
DB_SUCCESS or err code
Parameters
cursorin: InnoDB cursor instance
modein: Search mode

Definition at line 2124 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_cursor_read_row ( ib_crsr_t  ib_crsr,
ib_tpl_t  ib_tpl 
)

Read current row.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance
ib_tplout: read cols into this tuple

Definition at line 2056 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_cursor_reset ( ib_crsr_t  ib_crsr)

Reset the cursor.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor

Definition at line 1313 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN void ib_cursor_set_cluster_access ( ib_crsr_t  ib_crsr)

Set need to access clustered index record.

Parameters
ib_crsrin/out: InnoDB cursor

Definition at line 3500 of file api0api.cc.

UNIV_INTERN ib_err_t ib_cursor_set_lock_mode ( ib_crsr_t  ib_crsr,
ib_lck_mode_t  ib_lck_mode 
)

Set the Lock mode of the cursor.

Returns
DB_SUCCESS or error code
Parameters
ib_crsrin/out: InnoDB cursor
ib_lck_modein: InnoDB lock mode

Definition at line 3471 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN void ib_cursor_set_match_mode ( ib_crsr_t  ib_crsr,
ib_match_mode_t  match_mode 
)

Set the cursor search mode.

Parameters
ib_crsrin: Cursor instance
match_modein: ib_cursor_moveto match mode

Definition at line 2249 of file api0api.cc.

UNIV_INTERN void ib_cursor_stmt_begin ( ib_crsr_t  ib_crsr)

Inform the cursor that it's the start of an SQL statement.

Parameters
ib_crsrin: cursor

Definition at line 3667 of file api0api.cc.

UNIV_INTERN ib_err_t ib_cursor_truncate ( ib_crsr_t ib_crsr,
ib_id_u64_t *  table_id 
)

Truncate a table. The cursor handle will be closed and set to NULL on success.

Returns
DB_SUCCESS or error code
Parameters
ib_crsrin/out: cursor for table to truncate
table_idout: new table id

Definition at line 3784 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_cursor_unlock ( ib_crsr_t  ib_crsr)

Unlock an InnoDB table.

Returns
DB_SUCCESS or error code
Parameters
ib_crsrin/out: InnoDB cursor

Definition at line 3449 of file api0api.cc.

UNIV_INTERN ib_err_t ib_cursor_update_row ( ib_crsr_t  ib_crsr,
const ib_tpl_t  ib_old_tpl,
const ib_tpl_t  ib_new_tpl 
)

Update a row in a table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance
ib_old_tplin: Old tuple in table
ib_new_tplin: New tuple to update

Definition at line 1883 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_execute_update_query_graph ( ib_cursor_t cursor,
btr_pcur_t pcur 
)

Does an update or delete of a row.

Returns
DB_SUCCESS or err code
Parameters
cursorin: Cursor instance
pcurin: Btree persistent cursor

Definition at line 1823 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE ib_index_def_t* ib_find_clustered_index ( ib_vector_t indexes)

Get an index definition that is tagged as a clustered index.

Returns
cluster index schema
Parameters
indexesin: index defs. to search

Definition at line 934 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN const char* ib_get_idx_field_name ( ib_crsr_t  ib_crsr,
ib_ulint_t  i 
)

Get an index field name from the cursor.

Returns
name of the field
Parameters
ib_crsrin: InnoDB cursor instance
iin: column index in tuple

Definition at line 2683 of file api0api.cc.

UNIV_INLINE ulint ib_get_max_row_len ( dict_index_t cluster)

Calculate the max row size of the columns in a cluster index.

Returns
max row length
Parameters
clusterin: cluster index

Definition at line 326 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE const ib_key_col_t* ib_index_find_col ( ib_vector_t cols,
const char *  name 
)

Find a column in the the column list with the same name.

Returns
col. def. if found else NULL
Parameters
colsin: column list head
namein: column name to find

Definition at line 787 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_index_get_id ( const char *  table_name,
const char *  index_name,
ib_id_u64_t *  index_id 
)

Get an index id.

Returns
DB_SUCCESS if found
Parameters
table_namein: find index for this table
index_namein: index to find
index_idout: index id if found

Definition at line 3283 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_insert_row_with_lock_retry ( que_thr_t thr,
ins_node_t node,
trx_savept_t savept 
)

Run the insert query and do error handling.

Returns
DB_SUCCESS or error code
Parameters
thrin: insert query graph
nodein: insert node for the query
saveptin: savepoint to rollback to in case of an error

Definition at line 1444 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN void* ib_open_table_by_name ( const char *  name)

Open a table using the table name, if found then increment table ref count.

Returns
table instance if found
Parameters
namein: table name to lookup

Definition at line 266 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_bool_t ib_schema_lock_is_exclusive ( const ib_trx_t  ib_trx)

Checks if the data dictionary is latched in exclusive mode.

Returns
TRUE if exclusive latch
Parameters
ib_trxin: transaction

Definition at line 3352 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INTERN ib_bool_t ib_schema_lock_is_shared ( const ib_trx_t  ib_trx)

Checks if the data dictionary is latched in shared mode.

Returns
TRUE if shared latch
Parameters
ib_trxin: transaction

Definition at line 3366 of file api0api.cc.

UNIV_INTERN ib_tpl_t ib_sec_read_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for index/table search.

Returns
own: Tuple for current index
Parameters
ib_crsrin: Cursor instance

Definition at line 3158 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_tpl_t ib_sec_search_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for index/table search.

Returns
own: Tuple for current index
Parameters
ib_crsrin: Cursor instance

Definition at line 3141 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE const ib_col_t* ib_table_find_col ( const ib_vector_t cols,
const char *  name 
)

Find a column in the the column vector with the same name.

Returns
col. def. if found else NULL
Parameters
colsin: column list head
namein: column name to find

Definition at line 761 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE const ib_index_def_t* ib_table_find_index ( ib_vector_t indexes,
const char *  name 
)

Find an index definition from the index vector using index name.

Returns
index def. if found else NULL
Parameters
indexesin: vector of indexes
namein: index name

Definition at line 698 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_table_get_id ( const char *  table_name,
ib_id_u64_t *  table_id 
)

Get a table id. This function will acquire the dictionary mutex.

Returns
DB_SUCCESS if found
Parameters
table_namein: table to find
table_idout: table id if found

Definition at line 3262 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_table_lock ( ib_trx_t  ib_trx,
ib_id_u64_t  table_id,
ib_lck_mode_t  ib_lck_mode 
)

Set the Lock an InnoDB table using the table id.

Returns
DB_SUCCESS or error code
Parameters
ib_trxin/out: transaction
table_idin: table id
ib_lck_modein: InnoDB lock mode

Definition at line 3399 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_table_name_check ( const char *  name)

Check whether the table name conforms to our requirements. Currently we only do a simple check for the presence of a '/'.

Returns
DB_SUCCESS or err code
Parameters
namein: table name to check

Definition at line 887 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_table_truncate ( const char *  table_name,
ib_id_u64_t *  table_id 
)

Truncate a table.

Returns
DB_SUCCESS or error code
Parameters
table_namein: table name
table_idout: new table id

Definition at line 3837 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_trx_t ib_trx_begin ( ib_trx_level_t  ib_trx_level)

Begin a transaction. This will allocate a new transaction handle. put the transaction in the active state.

Returns
innobase txn handle
Parameters
ib_trx_levelin: trx isolation level

Definition at line 584 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

ib_err_t ib_trx_commit ( ib_trx_t  ib_trx)

Commit a transaction. This function will also release the schema latches too.

Returns
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

Definition at line 647 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_u64_t ib_trx_get_start_time ( ib_trx_t  ib_trx)

Get a trx start time.

Returns
trx start_time
Parameters
ib_trxin: transaction

Definition at line 617 of file api0api.cc.

UNIV_INTERN ib_err_t ib_trx_release ( ib_trx_t  ib_trx)

Release the resources of the transaction.

Returns
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

Definition at line 629 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_trx_rollback ( ib_trx_t  ib_trx)

Rollback a transaction. This function will also release the schema latches too.

Returns
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

Definition at line 673 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_err_t ib_trx_start ( ib_trx_t  ib_trx,
ib_trx_level_t  ib_trx_level,
void *  thd 
)

Begin a transaction.

Returns
innobase txn handle
Parameters
ib_trxin: transaction to restart
ib_trx_levelin: trx isolation level
thdin: THD

Definition at line 556 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INTERN ib_trx_state_t ib_trx_state ( ib_trx_t  ib_trx)

Get the transaction's state.

Returns
transaction state
Parameters
ib_trxin: trx handle

Definition at line 603 of file api0api.cc.

Here is the caller graph for this function:

UNIV_INLINE ib_err_t ib_tuple_check_int ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_bool_t  usign,
ulint  size 
)

Read a signed int 8 bit column from an InnoDB tuple.

Parameters
ib_tplin: InnoDB tuple
iin: column number
usignin: true if unsigned
sizein: size of integer

Definition at line 2741 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_tpl_t ib_tuple_clear ( ib_tpl_t  ib_tpl)

"Clear" or reset an InnoDB tuple. We free the heap and recreate the tuple.

Returns
new tuple, or NULL
Parameters
ib_tplin,own: tuple (will be freed)

Definition at line 2983 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_copy ( ib_tpl_t  ib_dst_tpl,
const ib_tpl_t  ib_src_tpl 
)

Copy the contents of source tuple to destination tuple. The tuples must be of the same type and belong to the same table/index.

Returns
DB_SUCCESS or error code
Parameters
ib_dst_tplin: destination tuple
ib_src_tplin: source tuple

Definition at line 3087 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN void ib_tuple_delete ( ib_tpl_t  ib_tpl)

Destroy an InnoDB tuple.

Parameters
ib_tplin,own: Tuple instance to delete

Definition at line 3244 of file api0api.cc.

UNIV_INTERN ib_err_t ib_tuple_get_cluster_key ( ib_crsr_t  ib_crsr,
ib_tpl_t ib_dst_tpl,
const ib_tpl_t  ib_src_tpl 
)

Create a new cluster key search tuple and copy the contents of the secondary index key tuple columns that refer to the cluster index record to the cluster key. It does a deep copy of the column data.

Returns
DB_SUCCESS or error code
Parameters
ib_crsrin: secondary index cursor
ib_dst_tplout,own: destination tuple
ib_src_tplin: source tuple

Definition at line 3012 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_ulint_t ib_tuple_get_n_cols ( const ib_tpl_t  ib_tpl)

Return the number of columns in the tuple definition.

Returns
number of columns
Parameters
ib_tplin: Tuple for table/index

Definition at line 3231 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN ib_ulint_t ib_tuple_get_n_user_cols ( const ib_tpl_t  ib_tpl)

Return the number of user columns in the tuple definition.

Returns
number of user columns
Parameters
ib_tplin: Tuple for current table

Definition at line 3213 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_double ( ib_tpl_t  ib_tpl,
ib_ulint_t  col_no,
double *  dval 
)

Read a double column value from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
col_noin: column number
dvalout: double value

Definition at line 3705 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_float ( ib_tpl_t  ib_tpl,
ib_ulint_t  col_no,
float *  fval 
)

Read a float value from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
col_noin: column number
fvalout: float value

Definition at line 3756 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_i16 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_i16_t ival 
)

Read a signed int 16 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2814 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_i32 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_i32_t ival 
)

Read a signed int 32 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2858 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_i64 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_i64_t ival 
)

Read a signed int 64 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2902 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_i8 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_i8_t ival 
)

Read a signed int 8 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2770 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_u16 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_u16_t ival 
)

Read an unsigned int 16 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2836 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_u32 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_u32_t ival 
)

Read an unsigned int 32 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2880 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_u64 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_u64_t ival 
)

Read an unsigned int 64 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2924 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_read_u8 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
ib_u8_t ival 
)

Read an unsigned int 8 bit column from an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
iin: column number
ivalout: integer value

Definition at line 2792 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_double ( ib_tpl_t  ib_tpl,
int  col_no,
double  val 
)

Write a double value to a column.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3681 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_float ( ib_tpl_t  ib_tpl,
int  col_no,
float  val 
)

Write a float value to a column.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3732 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_i16 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_i16_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3564 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_i32 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_i32_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3579 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_i64 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_i64_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3594 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_i8 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_i8_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3549 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_tuple_write_int ( ib_tpl_t  ib_tpl,
ulint  col_no,
const void *  value,
ulint  value_len 
)

Convert and write an INT column value to an InnoDB tuple.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valuein: integer value
value_lenin: sizeof value type

Definition at line 3515 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_u16 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_u16_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tupe to write to
col_noin: column number
valin: value to write

Definition at line 3624 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_u32 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_u32_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3639 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_u64 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_u64_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3654 of file api0api.cc.

Here is the call graph for this function:

UNIV_INTERN ib_err_t ib_tuple_write_u8 ( ib_tpl_t  ib_tpl,
int  col_no,
ib_u8_t  val 
)

Write an integer value to a column. Integers are stored in big-endian format and will need to be converted from the host format.

Returns
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

Definition at line 3609 of file api0api.cc.

Here is the call graph for this function:

UNIV_INLINE ib_err_t ib_update_row_with_lock_retry ( que_thr_t thr,
upd_node_t node,
trx_savept_t savept 
)

Run the update query and do error handling.

Returns
DB_SUCCESS or error code
Parameters
thrin: Update query graph
nodein: Update node for the query
saveptin: savepoint to rollback to in case of an error

Definition at line 1775 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE upd_t* ib_update_vector_create ( ib_cursor_t cursor)

Gets pointer to a prebuilt update vector used in updates.

Returns
update vector
Parameters
cursorin: current cursor

Definition at line 1643 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE void ib_wake_master_thread ( void  )

Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth time calls srv_active_wake_master_thread. This function should be used when a single database operation may introduce a small need for server utility activity, like checkpointing.

Definition at line 309 of file api0api.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

my_bool ib_binlog_enabled = FALSE

configure variable for binlog option with InnoDB APIs

Definition at line 60 of file api0api.cc.

ulong ib_bk_commit_interval = 0

configure variable for background commit interval in seconds

Definition at line 72 of file api0api.cc.

my_bool ib_disable_row_lock = FALSE

configure variable for disable rowlock with InnoDB APIs

Definition at line 66 of file api0api.cc.

my_bool ib_mdl_enabled = FALSE

configure variable for MDL option with InnoDB APIs

Definition at line 63 of file api0api.cc.

ulong ib_trx_level_setting = IB_TRX_READ_UNCOMMITTED

configure variable for Transaction isolation levels

Definition at line 69 of file api0api.cc.