MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Classes | |
struct | i_s_hash_chain_t |
struct | i_s_locks_row_t |
struct | i_s_trx_row_t |
struct | i_s_lock_waits_row_t |
Macros | |
#define | TRX_I_S_MEM_LIMIT 16777216 /* 16 MiB */ |
#define | TRX_I_S_LOCK_DATA_MAX_LEN 8192 |
#define | TRX_I_S_TRX_QUERY_MAX_LEN 1024 |
#define | TRX_I_S_TRX_OP_STATE_MAX_LEN 64 |
#define | TRX_I_S_TRX_FK_ERROR_MAX_LEN 256 |
#define | TRX_I_S_TRX_ISOLATION_LEVEL_MAX_LEN 16 |
#define | TRX_I_S_STRING_COPY(data, field, constraint, tcache) |
#define | TRX_I_S_LOCK_ID_MAX_LEN (TRX_ID_MAX_LEN + 63) |
Enumerations | |
enum | i_s_table { I_S_INNODB_TRX, I_S_INNODB_LOCKS, I_S_INNODB_LOCK_WAITS } |
Functions | |
UNIV_INTERN void | trx_i_s_cache_init (trx_i_s_cache_t *cache) |
UNIV_INTERN void | trx_i_s_cache_free (trx_i_s_cache_t *cache) |
UNIV_INTERN void | trx_i_s_cache_start_read (trx_i_s_cache_t *cache) |
UNIV_INTERN void | trx_i_s_cache_end_read (trx_i_s_cache_t *cache) |
UNIV_INTERN void | trx_i_s_cache_start_write (trx_i_s_cache_t *cache) |
UNIV_INTERN void | trx_i_s_cache_end_write (trx_i_s_cache_t *cache) |
UNIV_INTERN ulint | trx_i_s_cache_get_rows_used (trx_i_s_cache_t *cache, enum i_s_table table) |
UNIV_INTERN void * | trx_i_s_cache_get_nth_row (trx_i_s_cache_t *cache, enum i_s_table table, ulint n) |
UNIV_INTERN int | trx_i_s_possibly_fetch_data_into_cache (trx_i_s_cache_t *cache) |
UNIV_INTERN ibool | trx_i_s_cache_is_truncated (trx_i_s_cache_t *cache) |
UNIV_INTERN char * | trx_i_s_create_lock_id (const i_s_locks_row_t *row, char *lock_id, ulint lock_id_size) |
Variables | |
trx_i_s_cache_t * | trx_i_s_cache |
INFORMATION SCHEMA innodb_trx, innodb_locks and innodb_lock_waits tables cache structures and public functions.
Created July 17, 2007 Vasil Dimov
Definition in file trx0i_s.h.
#define TRX_I_S_LOCK_DATA_MAX_LEN 8192 |
The maximum length of a string that can be stored in
#define TRX_I_S_LOCK_ID_MAX_LEN (TRX_ID_MAX_LEN + 63) |
The maximum length of a resulting lock_id_size in
trx_i_s_create_lock_id(), not including the terminating NUL. ":%lu:%lu:%lu" -> 63 chars
#define TRX_I_S_MEM_LIMIT 16777216 /* 16 MiB */ |
#define TRX_I_S_STRING_COPY | ( | data, | |
field, | |||
constraint, | |||
tcache | |||
) |
Safely copy strings in to the INNODB_TRX table's
string based columns
#define TRX_I_S_TRX_FK_ERROR_MAX_LEN 256 |
The maximum length of a string that can be stored in
#define TRX_I_S_TRX_ISOLATION_LEVEL_MAX_LEN 16 |
The maximum length of a string that can be stored in
#define TRX_I_S_TRX_OP_STATE_MAX_LEN 64 |
The maximum length of a string that can be stored in
#define TRX_I_S_TRX_QUERY_MAX_LEN 1024 |
The maximum length of a string that can be stored in
enum i_s_table |
UNIV_INTERN void trx_i_s_cache_end_read | ( | trx_i_s_cache_t * | cache | ) |
Release a shared/read lock on the tables cache. in: cache
Release a shared/read lock on the tables cache.
cache | in: cache |
Definition at line 1492 of file trx0i_s.cc.
UNIV_INTERN void trx_i_s_cache_end_write | ( | trx_i_s_cache_t * | cache | ) |
Release an exclusive/write lock on the tables cache. in: cache
Release an exclusive/write lock on the tables cache.
cache | in: cache |
Definition at line 1526 of file trx0i_s.cc.
UNIV_INTERN void trx_i_s_cache_free | ( | trx_i_s_cache_t * | cache | ) |
Free the INFORMATION SCHEMA trx related cache. in/out: cache to free
Free the INFORMATION SCHEMA trx related cache.
cache | in, own: cache to free |
Definition at line 1465 of file trx0i_s.cc.
UNIV_INTERN void* trx_i_s_cache_get_nth_row | ( | trx_i_s_cache_t * | cache, |
enum i_s_table | table, | ||
ulint | n | ||
) |
Retrieves the nth row in the cache for a given INFORMATION SCHEMA table.
Retrieves the nth row (zero-based) in the cache for a given INFORMATION SCHEMA table.
cache | in: cache |
table | in: which table |
n | in: row number |
Definition at line 1595 of file trx0i_s.cc.
UNIV_INTERN ulint trx_i_s_cache_get_rows_used | ( | trx_i_s_cache_t * | cache, |
enum i_s_table | table | ||
) |
Retrieves the number of used rows in the cache for a given INFORMATION SCHEMA table.
Retrieves the number of used rows in the cache for a given INFORMATION SCHEMA table.
cache | in: cache |
table | in: which table |
Definition at line 1577 of file trx0i_s.cc.
UNIV_INTERN void trx_i_s_cache_init | ( | trx_i_s_cache_t * | cache | ) |
Initialize INFORMATION SCHEMA trx related cache. out: cache to init
Initialize INFORMATION SCHEMA trx related cache.
cache | out: cache to init |
Definition at line 1424 of file trx0i_s.cc.
UNIV_INTERN ibool trx_i_s_cache_is_truncated | ( | trx_i_s_cache_t * | cache | ) |
Returns TRUE if the data in the cache is truncated due to the memory limit posed by TRX_I_S_MEM_LIMIT.
Returns TRUE if the data in the cache is truncated due to the memory limit posed by TRX_I_S_MEM_LIMIT.
cache | in: cache |
Definition at line 1413 of file trx0i_s.cc.
UNIV_INTERN void trx_i_s_cache_start_read | ( | trx_i_s_cache_t * | cache | ) |
Issue a shared/read lock on the tables cache. in: cache
Issue a shared/read lock on the tables cache.
cache | in: cache |
Definition at line 1481 of file trx0i_s.cc.
UNIV_INTERN void trx_i_s_cache_start_write | ( | trx_i_s_cache_t * | cache | ) |
Issue an exclusive/write lock on the tables cache. in: cache
Issue an exclusive/write lock on the tables cache.
cache | in: cache |
Definition at line 1515 of file trx0i_s.cc.
UNIV_INTERN char* trx_i_s_create_lock_id | ( | const i_s_locks_row_t * | row, |
char * | lock_id, | ||
ulint | lock_id_size | ||
) |
Crafts a lock id string from a i_s_locks_row_t object. Returns its second argument. This function aborts if there is not enough space in lock_id. Be sure to provide at least TRX_I_S_LOCK_ID_MAX_LEN + 1 if you want to be 100% sure that it will not abort.
Crafts a lock id string from a i_s_locks_row_t object. Returns its second argument. This function aborts if there is not enough space in lock_id. Be sure to provide at least TRX_I_S_LOCK_ID_MAX_LEN + 1 if you want to be 100% sure that it will not abort.
row | in: innodb_locks row |
lock_id | out: resulting lock_id |
lock_id_size | in: size of the lock id buffer |
Definition at line 1636 of file trx0i_s.cc.
UNIV_INTERN int trx_i_s_possibly_fetch_data_into_cache | ( | trx_i_s_cache_t * | cache | ) |
Update the transactions cache if it has not been read for some time.
Update the transactions cache if it has not been read for some time. Called from handler/i_s.cc.
cache | in/out: cache |
Definition at line 1383 of file trx0i_s.cc.
trx_i_s_cache_t* trx_i_s_cache |
This is the intermediate buffer where data needed to fill the
INFORMATION SCHEMA tables is fetched and later retrieved by the C++ code in handler/i_s.cc.
Definition at line 192 of file trx0i_s.cc.