MySQL 8.4.3
Source Code Documentation
api0api.h File Reference

InnoDB Native API. More...

#include <stdint.h>
#include <stdio.h>
#include "my_config.h"
#include "db0err.h"

Go to the source code of this file.

Classes

struct  ib_col_meta_t
 InnoDB column meta data. More...
 

Macros

#define FOR_EACH_API_METHOD_NAME_STEM(transform)
 

Typedefs

typedef uint32_t page_no_t
 Page number. More...
 
typedef uint32_t space_id_t
 Tablespace identifier. More...
 
typedef struct ib_sdi_key ib_sdi_key_t
 
typedef struct ib_sdi_vector ib_sdi_vector_t
 
typedef enum dberr_t ib_err_t
 All InnoDB error codes are represented by ib_err_t. More...
 
typedef unsigned char ib_byte_t
 Representation of a byte within InnoDB. More...
 
typedef unsigned long int ib_ulint_t
 Representation of an unsigned long int within InnoDB. More...
 
typedef void * ib_opaque_t
 
typedef ib_opaque_t ib_charset_t
 
typedef uint64_t ib_id_u64_t
 
typedef void(* ib_cb_t) (void)
 Generical InnoDB callback prototype. More...
 
typedef FILE * ib_msg_stream_t
 The first argument to the InnoDB message logging function. More...
 
typedef int(* ib_msg_log_t) (ib_msg_stream_t, const char *,...)
 All log messages are written to this function.It should have the same behavior as fprintf(3). More...
 
typedef struct ib_tuple_tib_tpl_t
 InnoDB tuple handle. More...
 
typedef struct trx_tib_trx_t
 InnoDB transaction handle, all database operations need to be covered by transactions. More...
 
typedef struct ib_cursor_tib_crsr_t
 InnoDB cursor handle. More...
 
typedef int(* ib_client_cmp_t) (const ib_col_meta_t *col_meta, const ib_byte_t *p1, uint64_t p1_len, const ib_byte_t *p2, uint64_t p2_len)
 This function is used to compare two data fields for which the data type is such that we must use the client code to compare them. More...
 

Enumerations

enum  ib_cfg_type_t {
  IB_CFG_BOOL , IB_CFG_ULINT , IB_CFG_ULONG , IB_CFG_TEXT ,
  IB_CFG_CB
}
 Possible types for a configuration variable. More...
 
enum  ib_col_type_t {
  IB_VARCHAR = 1 , IB_CHAR = 2 , IB_BINARY = 3 , IB_VARBINARY = 4 ,
  IB_BLOB = 5 , IB_INT = 6 , IB_SYS = 8 , IB_FLOAT = 9 ,
  IB_DOUBLE = 10 , IB_DECIMAL = 11 , IB_VARCHAR_ANYCHARSET = 12 , IB_CHAR_ANYCHARSET = 13
}
 column types that are supported. More...
 
enum  ib_tbl_fmt_t { IB_TBL_REDUNDANT , IB_TBL_COMPACT , IB_TBL_DYNAMIC , IB_TBL_COMPRESSED }
 InnoDB table format types. More...
 
enum  ib_col_attr_t {
  IB_COL_NONE = 0 , IB_COL_NOT_NULL = 1 , IB_COL_UNSIGNED = 2 , IB_COL_NOT_USED = 4 ,
  IB_COL_CUSTOM1 = 8 , IB_COL_CUSTOM2 = 16 , IB_COL_CUSTOM3 = 32
}
 InnoDB column attributes. More...
 
enum  ib_lck_mode_t {
  IB_LOCK_IS = 0 , IB_LOCK_IX , IB_LOCK_S , IB_LOCK_X ,
  IB_LOCK_TABLE_X , IB_LOCK_NONE , IB_LOCK_NUM = IB_LOCK_NONE
}
 InnoDB lock modes. More...
 
enum  ib_index_type_t { IB_CLUSTERED = 1 , IB_UNIQUE = 2 }
 
enum  ib_srch_mode_t { IB_CUR_G = 1 , IB_CUR_GE = 2 , IB_CUR_L = 3 , IB_CUR_LE = 4 }
 InnoDB cursor search modes for ib_cursor_moveto(). More...
 
enum  ib_match_mode_t { IB_CLOSEST_MATCH , IB_EXACT_MATCH , IB_EXACT_PREFIX }
 Various match modes used by ib_cursor_moveto() More...
 
enum  ib_trx_level_t { IB_TRX_READ_UNCOMMITTED = 0 , IB_TRX_READ_COMMITTED = 1 , IB_TRX_REPEATABLE_READ = 2 , IB_TRX_SERIALIZABLE = 3 }
 Transaction isolation levels. More...
 

Functions

ib_err_t ib_trx_start (ib_trx_t ib_trx, ib_trx_level_t ib_trx_level, bool read_write, bool auto_commit, void *thd)
 Start a transaction that's been rolled back. More...
 
ib_trx_t ib_trx_begin (ib_trx_level_t ib_trx_level, bool read_write, bool auto_commit, void *thd)
 Begin a transaction. More...
 
uint32_t ib_trx_read_only (ib_trx_t ib_trx)
 Check if the transaction is read_only. More...
 
ib_err_t ib_trx_release (ib_trx_t ib_trx)
 Release the resources of the transaction. More...
 
ib_err_t ib_trx_commit (ib_trx_t ib_trx)
 Commit a transaction. More...
 
ib_err_t ib_trx_rollback (ib_trx_t ib_trx)
 Rollback a transaction. More...
 
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. More...
 
ib_err_t ib_cursor_open_table (const char *name, ib_trx_t ib_trx, ib_crsr_t *ib_crsr)
 Open an InnoDB table by name and return a cursor handle to it. More...
 
ib_err_t ib_cursor_reset (ib_crsr_t ib_crsr)
 Reset the cursor. More...
 
ib_err_t ib_cursor_close (ib_crsr_t ib_crsr)
 Close an InnoDB table and free the cursor. More...
 
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 More...
 
ib_err_t ib_cursor_commit_trx (ib_crsr_t ib_crsr, ib_trx_t ib_trx)
 Commit the transaction in a cursor. More...
 
ib_err_t ib_cursor_insert_row (ib_crsr_t ib_crsr, const ib_tpl_t ib_tpl)
 Insert a row to a table. More...
 
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. More...
 
ib_err_t ib_cursor_delete_row (ib_crsr_t ib_crsr)
 Delete a row in a table. More...
 
ib_err_t ib_cursor_read_row (ib_crsr_t ib_crsr, ib_tpl_t ib_tpl, ib_tpl_t cmp_tpl, int mode, void **row_buf, uint64_t *row_len, uint64_t *used_len)
 Read current row. More...
 
ib_err_t ib_cursor_first (ib_crsr_t ib_crsr)
 Move cursor to the first record in the table. More...
 
ib_err_t ib_cursor_next (ib_crsr_t ib_crsr)
 Move cursor to the next record in the table. More...
 
ib_err_t ib_cursor_moveto (ib_crsr_t ib_crsr, ib_tpl_t ib_tpl, ib_srch_mode_t ib_srch_mode, uint64_t direction)
 Search for key. More...
 
void ib_cursor_set_match_mode (ib_crsr_t ib_crsr, ib_match_mode_t match_mode)
 Set the match mode for ib_cursor_move(). More...
 
ib_err_t ib_col_set_value (ib_tpl_t ib_tpl, ib_ulint_t col_no, const void *src, uint64_t len, bool need_cpy)
 Set a column of the tuple. More...
 
uint64_t ib_col_get_len (ib_tpl_t ib_tpl, ib_ulint_t i)
 Get the size of the data available in the column the tuple. More...
 
uint64_t ib_col_copy_value (ib_tpl_t ib_tpl, ib_ulint_t i, void *dst, uint32_t len)
 Copy a column value from the tuple. More...
 
ib_err_t ib_tuple_read_i8 (ib_tpl_t ib_tpl, ib_ulint_t i, int8_t *ival)
 Read a signed int 8 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_u8 (ib_tpl_t ib_tpl, ib_ulint_t i, uint8_t *ival)
 Read an unsigned int 8 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_i16 (ib_tpl_t ib_tpl, ib_ulint_t i, int16_t *ival)
 Read a signed int 16 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_u16 (ib_tpl_t ib_tpl, ib_ulint_t i, uint16_t *ival)
 Read an unsigned int 16 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_i32 (ib_tpl_t ib_tpl, ib_ulint_t i, int32_t *ival)
 Read a signed int 32 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_u32 (ib_tpl_t ib_tpl, ib_ulint_t i, uint32_t *ival)
 Read an unsigned int 32 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_i64 (ib_tpl_t ib_tpl, ib_ulint_t i, int64_t *ival)
 Read a signed int 64 bit column from an InnoDB tuple. More...
 
ib_err_t ib_tuple_read_u64 (ib_tpl_t ib_tpl, ib_ulint_t i, uint64_t *ival)
 Read an unsigned int 64 bit column from an InnoDB tuple. More...
 
const void * ib_col_get_value (ib_tpl_t ib_tpl, ib_ulint_t i)
 Get a column value pointer from the tuple. More...
 
uint64_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. More...
 
ib_tpl_t ib_tuple_clear (ib_tpl_t ib_tpl)
 "Clear" or reset an InnoDB tuple. More...
 
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. More...
 
ib_tpl_t ib_sec_search_tuple_create (ib_crsr_t ib_crsr)
 Create an InnoDB tuple used for index/table search. More...
 
ib_tpl_t ib_sec_read_tuple_create (ib_crsr_t ib_crsr)
 Create an InnoDB tuple used for index/table search. More...
 
ib_tpl_t ib_clust_search_tuple_create (ib_crsr_t ib_crsr)
 Create an InnoDB tuple used for table key operations. More...
 
ib_tpl_t ib_clust_read_tuple_create (ib_crsr_t ib_crsr)
 Create an InnoDB tuple for table row operations. More...
 
uint64_t ib_tuple_get_n_user_cols (const ib_tpl_t ib_tpl)
 Return the number of user columns in the tuple definition. More...
 
uint64_t ib_tuple_get_n_cols (const ib_tpl_t ib_tpl)
 Return the number of columns in the tuple definition. More...
 
void ib_tuple_delete (ib_tpl_t ib_tpl)
 Destroy an InnoDB tuple. More...
 
ib_err_t ib_table_get_id (const char *table_name, ib_id_u64_t *table_id)
 Get a table id. More...
 
bool ib_cursor_is_positioned (const ib_crsr_t ib_crsr)
 Check if cursor is positioned. More...
 
bool ib_schema_lock_is_exclusive (const ib_trx_t ib_trx)
 Checks if the data dictionary is latched in exclusive mode by a user transaction. More...
 
ib_err_t ib_cursor_lock (ib_crsr_t ib_crsr, ib_lck_mode_t ib_lck_mode)
 Lock an InnoDB cursor/table. More...
 
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. More...
 
void ib_cursor_set_cluster_access (ib_crsr_t ib_crsr)
 Set need to access clustered index record flag. More...
 
void ib_cursor_stmt_begin (ib_crsr_t ib_crsr)
 Inform the cursor that it's the start of an SQL statement. More...
 
ib_err_t ib_tuple_write_double (ib_tpl_t ib_tpl, int col_no, double val)
 Write a double value to a column. More...
 
ib_err_t ib_tuple_read_double (ib_tpl_t ib_tpl, uint64_t col_no, double *dval)
 Read a double column value from an InnoDB tuple. More...
 
ib_err_t ib_tuple_write_float (ib_tpl_t ib_tpl, int col_no, float val)
 Write a float value to a column. More...
 
ib_err_t ib_tuple_read_float (ib_tpl_t ib_tpl, uint64_t col_no, float *fval)
 Read a float value from an InnoDB tuple. More...
 
const char * ib_col_get_name (ib_crsr_t ib_crsr, ib_ulint_t i)
 Get a column type, length and attributes from the tuple. More...
 
const char * ib_get_idx_field_name (ib_crsr_t ib_crsr, ib_ulint_t i)
 Get an index field name from the cursor. More...
 
int ib_cfg_get_cfg ()
 Get generic configure status. More...
 
ib_trx_level_t ib_cfg_trx_level ()
 Return isolation configuration set by "innodb_api_trx_level". More...
 
uint64_t ib_cfg_bk_commit_interval ()
 Return configure value for background commit interval (in seconds) More...
 
uint64_t ib_trx_get_start_time (ib_trx_t ib_trx)
 Get a trx start time. More...
 
const char * ib_ut_strerr (ib_err_t num)
 Wrapper of ut_strerr() which converts an InnoDB error number to a human readable text message. More...
 
ib_err_t ib_sdi_get_keys (uint32_t tablespace_id, ib_sdi_vector_t *ib_sdi_vector, ib_trx_t trx)
 Get the SDI keys in a tablespace into vector. More...
 
ib_err_t ib_sdi_get (uint32_t tablespace_id, const ib_sdi_key_t *ib_sdi_key, void *comp_sdi, uint32_t *comp_sdi_len, uint32_t *uncomp_sdi_len, ib_trx_t trx)
 Retrieve SDI from tablespace. More...
 
ib_err_t ib_sdi_set (uint32_t tablespace_id, const ib_sdi_key_t *sdi_key, uint32_t uncomp_len, uint32_t comp_len, const void *sdi, ib_trx_t trx)
 Insert/Update SDI in tablespace. More...
 
ib_err_t ib_sdi_delete (uint32_t tablespace_id, const ib_sdi_key_t *sdi_key, ib_trx_t trx)
 Delete SDI from tablespace. More...
 
ib_err_t ib_sdi_create (space_id_t tablespace_id)
 Create SDI in a tablespace. More...
 
ib_err_t ib_sdi_drop (space_id_t tablespace_id)
 Drop SDI Index from tablespace. More...
 
ib_err_t ib_sdi_flush (space_id_t space_id)
 Flush SDI in a tablespace. More...
 
bool ib_is_virtual_table (ib_crsr_t crsr)
 Check the table whether it contains virtual columns. More...
 

Variables

constexpr uint32_t IB_CFG_BINLOG_ENABLED = 0x1
 
constexpr uint32_t IB_CFG_MDL_ENABLED = 0x2
 
constexpr uint32_t IB_CFG_DISABLE_ROWLOCK = 0x4
 
static const size_t REC_BUF_SLOT_SIZE = 16384
 Used by ib_read_tuple to determine number of bytes to allocate for new slot if needed. More...
 
constexpr uint32_t IB_SQL_NULL = 0xFFFFFFFF
 Represents SQL_NULL length. More...
 

Detailed Description

InnoDB Native API.

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

Macro Definition Documentation

◆ FOR_EACH_API_METHOD_NAME_STEM

#define FOR_EACH_API_METHOD_NAME_STEM (   transform)

Typedef Documentation

◆ ib_byte_t

typedef unsigned char ib_byte_t

Representation of a byte within InnoDB.

◆ ib_cb_t

typedef void(* ib_cb_t) (void)

Generical InnoDB callback prototype.

◆ ib_charset_t

◆ ib_client_cmp_t

typedef int(* ib_client_cmp_t) (const ib_col_meta_t *col_meta, const ib_byte_t *p1, uint64_t p1_len, const ib_byte_t *p2, uint64_t p2_len)

This function is used to compare two data fields for which the data type is such that we must use the client code to compare them.

Parameters
col_metacolumn meta data
p1key
p1_lenkey length
p2second key
p2_lensecond key length
Returns
1, 0, -1, if a is greater, equal, less than b, respectively

◆ ib_crsr_t

typedef struct ib_cursor_t* ib_crsr_t

InnoDB cursor handle.

◆ ib_err_t

typedef enum dberr_t ib_err_t

All InnoDB error codes are represented by ib_err_t.

◆ ib_id_u64_t

typedef uint64_t ib_id_u64_t

◆ ib_msg_log_t

typedef int(* ib_msg_log_t) (ib_msg_stream_t, const char *,...)

All log messages are written to this function.It should have the same behavior as fprintf(3).

◆ ib_msg_stream_t

typedef FILE* ib_msg_stream_t

The first argument to the InnoDB message logging function.

By default it's set to stderr. You should treat ib_msg_stream_t as a void*, since it will probably change in the future.

◆ ib_opaque_t

typedef void* ib_opaque_t

◆ ib_sdi_key_t

typedef struct ib_sdi_key ib_sdi_key_t

◆ ib_sdi_vector_t

◆ ib_tpl_t

typedef struct ib_tuple_t* ib_tpl_t

InnoDB tuple handle.

This handle can refer to either a cluster index tuple or a secondary index tuple. There are two types of tuples for each type of index, making a total of four types of tuple handles. There is a tuple for reading the entire row contents and another for searching on the index key.

◆ ib_trx_t

typedef struct trx_t* ib_trx_t

InnoDB transaction handle, all database operations need to be covered by transactions.

This handle represents a transaction. The handle can be created with ib_trx_begin(), you commit your changes with ib_trx_commit() and undo your changes using ib_trx_rollback(). If the InnoDB deadlock monitor rolls back the transaction then you need to free the transaction using the function ib_trx_release(). You can query the state of an InnoDB transaction by calling ib_trx_state().

◆ ib_ulint_t

typedef unsigned long int ib_ulint_t

Representation of an unsigned long int within InnoDB.

◆ page_no_t

typedef uint32_t page_no_t

Page number.

◆ space_id_t

typedef uint32_t space_id_t

Tablespace identifier.

Enumeration Type Documentation

◆ ib_cfg_type_t

Possible types for a configuration variable.

Enumerator
IB_CFG_BOOL 

The configuration parameter is of type bool.

IB_CFG_ULINT 

The configuration parameter is of type ulint.

IB_CFG_ULONG 

The configuration parameter is of type ulong.

IB_CFG_TEXT 

The configuration parameter is of type char*.

IB_CFG_CB 

The configuration parameter is a callback parameter.

◆ ib_col_attr_t

InnoDB column attributes.

Enumerator
IB_COL_NONE 

No special attributes.

IB_COL_NOT_NULL 

Column data can't be NULL.

IB_COL_UNSIGNED 

Column is IB_INT and unsigned.

IB_COL_NOT_USED 

Future use, reserved.

IB_COL_CUSTOM1 

Custom precision type, this is a bit that is ignored by InnoDB and so can be set and queried by users.

IB_COL_CUSTOM2 

Custom precision type, this is a bit that is ignored by InnoDB and so can be set and queried by users.

IB_COL_CUSTOM3 

Custom precision type, this is a bit that is ignored by InnoDB and so can be set and queried by users.

◆ ib_col_type_t

column types that are supported.

Enumerator
IB_VARCHAR 

Character varying length.

The column is not padded.

IB_CHAR 

Fixed length character string.

The column is padded to the right.

IB_BINARY 

Fixed length binary, similar to IB_CHAR but the column is not padded to the right.

IB_VARBINARY 

Variable length binary.

IB_BLOB 

Binary large object, or a TEXT type.

IB_INT 

Integer: can be any size from 1 - 8 bytes.

If the size is 1, 2, 4 and 8 bytes then you can use the typed read and write functions. For other sizes you will need to use the ib_col_get_value() function and do the conversion yourself.

IB_SYS 

System column, this column can be one of DATA_TRX_ID, DATA_ROLL_PTR or DATA_ROW_ID.

IB_FLOAT 

C (float) floating point value.

IB_DOUBLE 
IB_DECIMAL 

C (double) floating point value.

Decimal stored as an ASCII string

IB_VARCHAR_ANYCHARSET 

Any charset, varying length.

IB_CHAR_ANYCHARSET 

Any charset, fixed length.

◆ ib_index_type_t

Enumerator
IB_CLUSTERED 

clustered index

IB_UNIQUE 

unique index

◆ ib_lck_mode_t

InnoDB lock modes.

Enumerator
IB_LOCK_IS 

Intention shared, an intention lock should be used to lock tables.

IB_LOCK_IX 

Intention exclusive, an intention lock should be used to lock tables.

IB_LOCK_S 

Shared locks should be used to lock rows.

IB_LOCK_X 

Exclusive locks should be used to lock rows.

IB_LOCK_TABLE_X 

exclusive table lock

IB_LOCK_NONE 

This is used internally to note consistent read.

IB_LOCK_NUM 

number of lock modes

◆ ib_match_mode_t

Various match modes used by ib_cursor_moveto()

Enumerator
IB_CLOSEST_MATCH 

Closest match possible.

IB_EXACT_MATCH 

Search using a complete key value.

IB_EXACT_PREFIX 

Search using a key prefix which must match to rows: the prefix may contain an incomplete field (the last field in prefix may be just a prefix of a fixed length column)

◆ ib_srch_mode_t

InnoDB cursor search modes for ib_cursor_moveto().

Note: Values must match those found in page0cur.h

Enumerator
IB_CUR_G 

If search key is not found then position the cursor on the row that is greater than the search key.

IB_CUR_GE 

If the search key not found then position the cursor on the row that is greater than or equal to the search key.

IB_CUR_L 

If search key is not found then position the cursor on the row that is less than the search key.

IB_CUR_LE 

If search key is not found then position the cursor on the row that is less than or equal to the search key.

◆ ib_tbl_fmt_t

InnoDB table format types.

Enumerator
IB_TBL_REDUNDANT 

Redundant row format, the column type and length is stored in the row.

IB_TBL_COMPACT 

Compact row format, the column type is not stored in the row.

The length is stored in the row but the storage format uses a compact format to store the length of the column data and record data storage format also uses less storage.

IB_TBL_DYNAMIC 

Compact row format.

BLOB prefixes are not stored in the clustered index

IB_TBL_COMPRESSED 

Similar to dynamic format but with pages compressed.

◆ ib_trx_level_t

Transaction isolation levels.

Enumerator
IB_TRX_READ_UNCOMMITTED 

Dirty read: non-locking SELECTs are performed so that we do not look at a possible earlier version of a record; thus they are not 'consistent' reads under this isolation level; otherwise like level 2.

IB_TRX_READ_COMMITTED 

Somewhat Oracle-like isolation, except that in range UPDATE and DELETE we must block phantom rows with next-key locks; SELECT ... FOR UPDATE and ... LOCK IN SHARE MODE only lock the index records, NOT the gaps before them, and thus allow free inserting; each consistent read reads its own snapshot.

IB_TRX_REPEATABLE_READ 

All consistent reads in the same trx read the same snapshot; full next-key locking used in locking reads to block insertions into gaps.

IB_TRX_SERIALIZABLE 

All plain SELECTs are converted to LOCK IN SHARE MODE reads.

Function Documentation

◆ ib_cfg_bk_commit_interval()

uint64_t ib_cfg_bk_commit_interval ( )

Return configure value for background commit interval (in seconds)

Returns
background commit interval (in seconds)

◆ ib_cfg_get_cfg()

int ib_cfg_get_cfg ( )

Get generic configure status.

Returns
configure status

◆ ib_cfg_trx_level()

ib_trx_level_t ib_cfg_trx_level ( )

Return isolation configuration set by "innodb_api_trx_level".

Returns
trx isolation level

◆ ib_clust_read_tuple_create()

ib_tpl_t ib_clust_read_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple for table row operations.

Parameters
[in]ib_crsrCursor instance
Returns
tuple for current table
own: Tuple for current table
Parameters
ib_crsrin: Cursor instance

◆ ib_clust_search_tuple_create()

ib_tpl_t ib_clust_search_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for table key operations.

Parameters
[in]ib_crsrCursor instance
Returns
tuple for current table
own: Tuple for current table
Parameters
ib_crsrin: Cursor instance

◆ ib_col_copy_value()

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

Copy a column value from the tuple.

Parameters
[in]ib_tpltuple instance
[in]iin column index in tuple
[out]dstcopied data value
[in]lenmax data value len to copy
Returns
bytes copied or IB_SQL_NULL

◆ ib_col_get_len()

uint64_t ib_col_get_len ( ib_tpl_t  ib_tpl,
ib_ulint_t  i 
)

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

Parameters
[in]ib_tpltuple instance
[in]icolumn index in tuple
Returns
bytes avail or IB_SQL_NULL

◆ ib_col_get_meta()

uint64_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.

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ib_col_metacolumn meta data
Returns
len of column data

◆ ib_col_get_name()

const char * ib_col_get_name ( ib_crsr_t  ib_crsr,
ib_ulint_t  i 
)

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

Parameters
[in]ib_crsrInnoDB cursor instance
[in]icolumn index in tuple
Returns
len of column data

◆ ib_col_get_value()

const void * ib_col_get_value ( ib_tpl_t  ib_tpl,
ib_ulint_t  i 
)

Get a column value pointer from the tuple.

Parameters
[in]ib_tpltuple instance
[in]icolumn index in tuple
Returns
NULL or pointer to buffer

◆ ib_col_set_value()

ib_err_t ib_col_set_value ( ib_tpl_t  ib_tpl,
ib_ulint_t  col_no,
const void *  src,
uint64_t  len,
bool  need_cpy 
)

Set a column of the tuple.

Make a copy using the tuple's heap.

Parameters
[in]ib_tpltuple instance
[in]col_nocolumn index in tuple
[in]srcdata value
[in]lendata value len
[in]need_cpyif need memcpy
Returns
DB_SUCCESS or error code

◆ ib_cursor_close()

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 in/out: InnoDB cursor
DB_SUCCESS or err code
Parameters
ib_crsrin,own: InnoDB cursor

◆ ib_cursor_commit_trx()

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 in: transaction
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor
ib_trxin: transaction

◆ ib_cursor_delete_row()

ib_err_t ib_cursor_delete_row ( ib_crsr_t  ib_crsr)

Delete a row in a table.

Returns
DB_SUCCESS or err code in: cursor instance
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

◆ ib_cursor_first()

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 in: InnoDB cursor instance
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

◆ ib_cursor_insert_row()

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 in: tuple to insert
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor instance
ib_tplin: tuple to insert

◆ ib_cursor_is_positioned()

bool ib_cursor_is_positioned ( const ib_crsr_t  ib_crsr)

Check if cursor is positioned.

Parameters
[in]ib_crsrInnoDB cursor instance
Returns
IB_true if positioned

◆ ib_cursor_lock()

ib_err_t ib_cursor_lock ( ib_crsr_t  ib_crsr,
ib_lck_mode_t  ib_lck_mode 
)

Lock an InnoDB cursor/table.

Parameters
[in,out]ib_crsrInnoDB cursor
[in]ib_lck_modeInnoDB lock mode
Returns
DB_SUCCESS or error code

Lock an InnoDB cursor/table.

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

◆ ib_cursor_moveto()

ib_err_t ib_cursor_moveto ( ib_crsr_t  ib_crsr,
ib_tpl_t  ib_tpl,
ib_srch_mode_t  ib_srch_mode,
uint64_t  direction 
)

Search for key.

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

◆ ib_cursor_new_trx()

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 in: transaction
DB_SUCCESS or err code
Parameters
ib_crsrin/out: InnoDB cursor
ib_trxin: transaction

◆ ib_cursor_next()

ib_err_t ib_cursor_next ( ib_crsr_t  ib_crsr)

Move cursor to the next record in the table.

Returns
DB_SUCCESS or err code in: InnoDB cursor instance

Move cursor to the next record in the table.

Returns
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance

◆ ib_cursor_open_index_using_name()

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 out: index id
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

◆ ib_cursor_open_table()

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

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

Returns
DB_SUCCESS or err code out,own: InnoDB cursor

Open an InnoDB table by name 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

◆ ib_cursor_read_row()

ib_err_t ib_cursor_read_row ( ib_crsr_t  ib_crsr,
ib_tpl_t  ib_tpl,
ib_tpl_t  cmp_tpl,
int  mode,
void **  row_buf,
uint64_t *  slot,
uint64_t *  used_len 
)

Read current row.

Returns
DB_SUCCESS or err code in/out: row buffer len used
DB_SUCCESS or err code
Parameters
ib_crsrin: InnoDB cursor instance
ib_tplout: read cols into this tuple
cmp_tplin: tuple to compare and stop reading
modein: mode determine when to stop read
row_bufin/out: row buffer
slotin/out: slot being used
used_lenin/out: buffer len used

◆ ib_cursor_reset()

ib_err_t ib_cursor_reset ( ib_crsr_t  ib_crsr)

Reset the cursor.

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

◆ ib_cursor_set_cluster_access()

void ib_cursor_set_cluster_access ( ib_crsr_t  ib_crsr)

Set need to access clustered index record flag.

Parameters
[in,out]ib_crsrInnoDB cursor

Set need to access clustered index record flag.

Parameters
ib_crsrin/out: InnoDB cursor

◆ ib_cursor_set_lock_mode()

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.

Parameters
[in,out]ib_crsrInnoDB cursor
[in]ib_lck_modeInnoDB lock mode
Returns
DB_SUCCESS or error code
DB_SUCCESS or error code
Parameters
ib_crsrin/out: InnoDB cursor
ib_lck_modein: InnoDB lock mode

◆ ib_cursor_set_match_mode()

void ib_cursor_set_match_mode ( ib_crsr_t  ib_crsr,
ib_match_mode_t  match_mode 
)

Set the match mode for ib_cursor_move().

Parameters
[in]ib_crsrCursor instance
[in]match_modeib_cursor_moveto match mode

Set the match mode for ib_cursor_move().

Parameters
ib_crsrin: Cursor instance
match_modein: ib_cursor_moveto match mode

◆ ib_cursor_stmt_begin()

void ib_cursor_stmt_begin ( ib_crsr_t  ib_crsr)

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

Parameters
[in,out]ib_crsrInnoDB cursor
Parameters
ib_crsrin: cursor

◆ ib_cursor_update_row()

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 in: New tuple to update
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

◆ ib_get_idx_field_name()

const char * ib_get_idx_field_name ( ib_crsr_t  ib_crsr,
ib_ulint_t  i 
)

Get an index field name from the cursor.

Parameters
[in]ib_crsrInnoDB cursor instance
[in]icolumn index in tuple
Returns
name of the field

◆ ib_is_virtual_table()

bool ib_is_virtual_table ( ib_crsr_t  crsr)

Check the table whether it contains virtual columns.

Parameters
[in]crsrInnoDB Cursor
Returns
true if the table contains virtual column else failure.

◆ ib_schema_lock_is_exclusive()

bool ib_schema_lock_is_exclusive ( const ib_trx_t  ib_trx)

Checks if the data dictionary is latched in exclusive mode by a user transaction.

Parameters
[in]ib_trxtransaction
Returns
true if exclusive latch

Checks if the data dictionary is latched in exclusive mode by a user transaction.

Returns
true if exclusive latch
Parameters
ib_trxin: transaction

◆ ib_sdi_create()

ib_err_t ib_sdi_create ( space_id_t  tablespace_id)

Create SDI in a tablespace.

Parameters
[in]tablespace_idInnoDB tablespace id
Returns
DB_SUCCESS if SDI index creation is successful, else error

◆ ib_sdi_delete()

ib_err_t ib_sdi_delete ( uint32_t  tablespace_id,
const ib_sdi_key_t sdi_key,
ib_trx_t  trx 
)

Delete SDI from tablespace.

Parameters
[in]tablespace_idtablespace id
[in]sdi_keySDI key to uniquely identify the tablespace object
[in,out]trxinnodb transaction
Returns
DB_SUCCESS if SDI deletion is successful, else error

◆ ib_sdi_drop()

ib_err_t ib_sdi_drop ( space_id_t  tablespace_id)

Drop SDI Index from tablespace.

This should be used only when SDI is corrupted.

Parameters
[in]tablespace_idInnoDB tablespace id
Returns
DB_SUCCESS if dropping of SDI indexes is successful, else error

◆ ib_sdi_flush()

ib_err_t ib_sdi_flush ( space_id_t  space_id)

Flush SDI in a tablespace.

The pages of a SDI Index modified by the transaction will be flushed to disk.

Parameters
[in]space_idtablespace id
Returns
DB_SUCCESS always

◆ ib_sdi_get()

ib_err_t ib_sdi_get ( uint32_t  tablespace_id,
const ib_sdi_key_t ib_sdi_key,
void *  comp_sdi,
uint32_t *  comp_sdi_len,
uint32_t *  uncomp_sdi_len,
ib_trx_t  trx 
)

Retrieve SDI from tablespace.

Parameters
[in]tablespace_idtablespace id
[in]ib_sdi_keySDI key
[in,out]comp_sdiin: buffer to hold the SDI BLOB out: compressed SDI retrieved from tablespace
[in,out]comp_sdi_lenin: Size of memory allocated out: compressed length of SDI
[out]uncomp_sdi_lenout: uncompressed length of SDI
[in,out]trxinnodb transaction
Returns
DB_SUCCESS if SDI retrieval is successful, else error in case the passed buffer length is smaller than the actual SDI DB_OUT_OF_MEMORY is thrown and uncompressed length is set in uncomp_sdi_len

◆ ib_sdi_get_keys()

ib_err_t ib_sdi_get_keys ( uint32_t  tablespace_id,
ib_sdi_vector_t ib_sdi_vector,
ib_trx_t  trx 
)

Get the SDI keys in a tablespace into vector.

Parameters
[in]tablespace_idtablespace id
[in,out]ib_sdi_vectorvector to hold objects with tablespace types and ids
[in,out]trxdata dictionary transaction
Returns
DB_SUCCESS if SDI keys retrieval is successful, else error

◆ ib_sdi_set()

ib_err_t ib_sdi_set ( uint32_t  tablespace_id,
const ib_sdi_key_t sdi_key,
uint32_t  uncomp_len,
uint32_t  comp_len,
const void *  sdi,
ib_trx_t  trx 
)

Insert/Update SDI in tablespace.

Parameters
[in]tablespace_idtablespace id
[in]sdi_keySDI key to uniquely identify the tablespace object
[in]uncomp_lenuncompressed length of SDI
[in]comp_lencompressed length of SDI
[in]sdicompressed SDI to be stored in tablespace
[in,out]trxinnodb transaction
Returns
DB_SUCCESS if SDI Insert/Update is successful, else error

◆ ib_sec_read_tuple_create()

ib_tpl_t ib_sec_read_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for index/table search.

Parameters
[in]ib_crsrCursor instance
Returns
tuple for current index
own: Tuple for current index
Parameters
ib_crsrin: Cursor instance

◆ ib_sec_search_tuple_create()

ib_tpl_t ib_sec_search_tuple_create ( ib_crsr_t  ib_crsr)

Create an InnoDB tuple used for index/table search.

Parameters
[in]ib_crsrCursor instance
Returns
tuple for current index
own: Tuple for current index
Parameters
ib_crsrin: Cursor instance

◆ ib_table_get_id()

ib_err_t ib_table_get_id ( const char *  table_name,
ib_id_u64_t table_id 
)

Get a table id.

Parameters
[in]table_nametable_to_find
[out]table_idtable id if found
Returns
DB_SUCCESS if found

This function will acquire the dictionary mutex.

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

◆ ib_trx_begin()

ib_trx_t ib_trx_begin ( ib_trx_level_t  ib_trx_level,
bool  read_write,
bool  auto_commit,
void *  thd 
)

Begin a transaction.

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

Parameters
[in]ib_trx_leveltrx isolation level
[in]read_writetrue if read write transaction
[in]auto_commitauto commit after each single DML
[in,out]thdMySQL THD
Returns
innobase txn handle

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
read_writein: true if read write transaction
auto_commitin: auto commit after each single DML
thdin,out: MySQL THD

◆ ib_trx_commit()

ib_err_t ib_trx_commit ( ib_trx_t  ib_trx)

Commit a transaction.

This function will release the schema latches too. It will also free the transaction handle.

Returns
DB_SUCCESS or err code in: trx handle

This function will also release the schema latches too.

Returns
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

◆ ib_trx_get_start_time()

uint64_t ib_trx_get_start_time ( ib_trx_t  ib_trx)

Get a trx start time.

Returns
trx start_time in: transaction
trx start_time
Parameters
ib_trxin: transaction

◆ ib_trx_read_only()

uint32_t ib_trx_read_only ( ib_trx_t  ib_trx)

Check if the transaction is read_only.

in: trx handle

Check if the transaction is read_only.

Returns
transaction read_only status
Parameters
ib_trxin: trx handle

◆ ib_trx_release()

ib_err_t ib_trx_release ( ib_trx_t  ib_trx)

Release the resources of the transaction.

If the transaction was selected as a victim by InnoDB and rolled back then use this function to free the transaction handle.

Returns
DB_SUCCESS or err code in: trx handle
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

◆ ib_trx_rollback()

ib_err_t ib_trx_rollback ( ib_trx_t  ib_trx)

Rollback a transaction.

This function will release the schema latches too. It will also free the transaction handle.

Returns
DB_SUCCESS or err code in: trx handle

This function will also release the schema latches too.

Returns
DB_SUCCESS or err code
Parameters
ib_trxin: trx handle

◆ ib_trx_start()

ib_err_t ib_trx_start ( ib_trx_t  ib_trx,
ib_trx_level_t  ib_trx_level,
bool  read_write,
bool  auto_commit,
void *  thd 
)

Start a transaction that's been rolled back.

This special function exists for the case when InnoDB's deadlock detector has rolledack a transaction. While the transaction has been rolled back the handle is still valid and can be reused by calling this function. If you don't want to reuse the transaction handle then you can free the handle by calling ib_trx_release().

Returns
innobase txn handle in: THD

Start a transaction that's been rolled back.

Returns
innobase txn handle
Parameters
ib_trxin: transaction to restart
ib_trx_levelin: trx isolation level
read_writein: true if read write transaction
auto_commitin: auto commit after each single DML
thdin: THD

◆ ib_tuple_clear()

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 in: InnoDB tuple

We free the heap and recreate the tuple.

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

◆ ib_tuple_delete()

void ib_tuple_delete ( ib_tpl_t  ib_tpl)

Destroy an InnoDB tuple.

Parameters
[in]ib_tplTuple for current table
Parameters
ib_tplin,own: Tuple instance to delete

◆ ib_tuple_get_cluster_key()

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.

Parameters
[in]ib_crsrsecondary index cursor
[out]ib_dst_tpldestination tuple
[in]ib_src_tplsource tuple
Returns
DB_SUCCESS or error code

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

◆ ib_tuple_get_n_cols()

uint64_t ib_tuple_get_n_cols ( const ib_tpl_t  ib_tpl)

Return the number of columns in the tuple definition.

Parameters
[in]ib_tplTuple for current table
Returns
number of columns
number of columns
Parameters
ib_tplin: Tuple for table/index

◆ ib_tuple_get_n_user_cols()

uint64_t ib_tuple_get_n_user_cols ( const ib_tpl_t  ib_tpl)

Return the number of user columns in the tuple definition.

Parameters
[in]ib_tplTuple for current table
Returns
number of user columns
number of user columns
Parameters
ib_tplin: Tuple for current table

◆ ib_tuple_read_double()

ib_err_t ib_tuple_read_double ( ib_tpl_t  ib_tpl,
uint64_t  col_no,
double *  dval 
)

Read a double column value from an InnoDB tuple.

Parameters
[in]ib_tplInnoDB tuple
[in]col_nocolumn number
[out]dvaldouble value
Returns
DB_SUCCESS or error
DB_SUCCESS or error
Parameters
ib_tplin: InnoDB tuple
col_noin: column number
dvalout: double value

◆ ib_tuple_read_float()

ib_err_t ib_tuple_read_float ( ib_tpl_t  ib_tpl,
uint64_t  col_no,
float *  fval 
)

Read a float value from an InnoDB tuple.

Parameters
[in]ib_tplInnoDB tuple
[in]col_nocolumn number
[out]fvalfloat value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_i16()

ib_err_t ib_tuple_read_i16 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
int16_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_i32()

ib_err_t ib_tuple_read_i32 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
int32_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_i64()

ib_err_t ib_tuple_read_i64 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
int64_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_i8()

ib_err_t ib_tuple_read_i8 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
int8_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_u16()

ib_err_t ib_tuple_read_u16 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
uint16_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_u32()

ib_err_t ib_tuple_read_u32 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
uint32_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_u64()

ib_err_t ib_tuple_read_u64 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
uint64_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuple
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_read_u8()

ib_err_t ib_tuple_read_u8 ( ib_tpl_t  ib_tpl,
ib_ulint_t  i,
uint8_t *  ival 
)

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

Parameters
[in]ib_tplInnoDB tuplr
[in]icolumn number
[out]ivalinteger value
Returns
DB_SUCCESS or error

◆ ib_tuple_write_double()

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

Write a double value to a column.

Parameters
[in]ib_tplInnoDB tuple
[in]col_nocolumn number
[in]valvalue to write
Returns
DB_SUCCESS or error
DB_SUCCESS or error
Parameters
ib_tplin/out: tuple to write to
col_noin: column number
valin: value to write

◆ ib_tuple_write_float()

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

Write a float value to a column.

Parameters
[in,out]ib_tpltuple to write to
[in]col_nocolumn number
[in]valvalue to write
Returns
DB_SUCCESS or error

◆ ib_ut_strerr()

const char * ib_ut_strerr ( ib_err_t  num)

Wrapper of ut_strerr() which converts an InnoDB error number to a human readable text message.

Returns
string, describing the error in: error number
string, describing the error
Parameters
numin: error number

Variable Documentation

◆ IB_CFG_BINLOG_ENABLED

constexpr uint32_t IB_CFG_BINLOG_ENABLED = 0x1
constexpr

◆ IB_CFG_DISABLE_ROWLOCK

constexpr uint32_t IB_CFG_DISABLE_ROWLOCK = 0x4
constexpr

◆ IB_CFG_MDL_ENABLED

constexpr uint32_t IB_CFG_MDL_ENABLED = 0x2
constexpr

◆ IB_SQL_NULL

constexpr uint32_t IB_SQL_NULL = 0xFFFFFFFF
constexpr

Represents SQL_NULL length.

◆ REC_BUF_SLOT_SIZE

const size_t REC_BUF_SLOT_SIZE = 16384
static

Used by ib_read_tuple to determine number of bytes to allocate for new slot if needed.