76#define TRX_I_S_STRING_COPY(data, field, constraint, tcache) \
78 if (strlen(data) > constraint) { \
79 char buff[constraint + 1]; \
80 strncpy(buff, data, constraint); \
81 buff[constraint] = '\0'; \
83 field = static_cast<const char *>( \
84 ha_storage_put_memlim((tcache)->storage, buff, constraint + 1, \
85 MAX_ALLOWED_FOR_STORAGE(tcache))); \
87 field = static_cast<const char *>(ha_storage_put_str_memlim( \
88 (tcache)->storage, data, MAX_ALLOWED_FOR_STORAGE(tcache))); \
269 size_t lock_id_size);
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
uint32_t page_no_t
Page number.
Definition: api0api.h:46
Server interface, row lock container.
Definition: psi_data_lock.h:117
Data dictionary global types.
ib_id_t table_id_t
Table or partition identifier (unique within an InnoDB instance).
Definition: dict0types.h:232
The transaction lock system global types.
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: atomics_array.h:39
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
Definition: m_ctype.h:423
This structure represents INFORMATION_SCHEMA.innodb_locks row.
Definition: trx0i_s.h:93
space_id_t lock_space
Information for record locks.
Definition: trx0i_s.h:101
ulint lock_rec
heap number of the record on the page
Definition: trx0i_s.h:103
lock_guid_t lock_guid
The unique identifier of this lock, which does not change over time for a single lock request and no ...
Definition: trx0i_s.h:96
table_id_t lock_table_id
The following are auxiliary and not included in the table.
Definition: trx0i_s.h:109
page_no_t lock_page
page number within the_space
Definition: trx0i_s.h:102
This structure represents INFORMATION_SCHEMA.innodb_trx row.
Definition: trx0i_s.h:116
ulint trx_lock_memory_bytes
mem_heap_get_size(trx->lock_heap)
Definition: trx0i_s.h:164
ulint trx_rows_locked
lock_number_of_rows_locked()
Definition: trx0i_s.h:167
std::chrono::system_clock::time_point trx_started
trx_t::start_time
Definition: trx0i_s.h:124
const char * trx_isolation_level
isolation_level in trx_t
Definition: trx0i_s.h:176
bool trx_unique_checks
check_unique_secondary in trx_t
Definition: trx0i_s.h:179
std::pair< bool, trx_schedule_weight_t > trx_schedule_weight
If first is true then second is the value of the trx->lock.schedule_weight, otherwise the second shou...
Definition: trx0i_s.h:139
ulint trx_tables_locked
mysql_n_tables_locked in trx_t
Definition: trx0i_s.h:158
const char * trx_state
transaction state from trx_get_que_state_str()
Definition: trx0i_s.h:121
ulint trx_concurrency_tickets
n_tickets_to_enter_innodb in trx_t
Definition: trx0i_s.h:173
bool trx_has_search_latch
has_search_latch in trx_t
Definition: trx0i_s.h:188
const char * trx_foreign_key_error
detailed_error in trx_t
Definition: trx0i_s.h:185
const CHARSET_INFO * trx_query_cs
the charset of trx_query
Definition: trx0i_s.h:149
trx_id_t trx_id
transaction identifier
Definition: trx0i_s.h:118
const char * trx_operation_state
trx_t::op_info
Definition: trx0i_s.h:152
ulint trx_mysql_thread_id
thd_get_thread_id()
Definition: trx0i_s.h:142
ulint trx_is_read_only
trx_t::read_only
Definition: trx0i_s.h:191
ulint trx_lock_structs
list len of trx_locks in trx_t
Definition: trx0i_s.h:161
ulint trx_tables_in_use
n_mysql_tables_in_use in trx_t
Definition: trx0i_s.h:155
bool trx_foreign_key_checks
check_foreigns in trx_t
Definition: trx0i_s.h:182
ulint trx_is_autocommit_non_locking
trx_is_autocommit_non_locking(trx)
Definition: trx0i_s.h:194
const char * trx_query
TRX_I_S_TRX_QUERY_MAX_LEN byte prefix of MySQL statement being executed in the transaction.
Definition: trx0i_s.h:146
std::chrono::system_clock::time_point trx_wait_started
The value of trx->lock.wait_started.
Definition: trx0i_s.h:130
const i_s_locks_row_t * requested_lock_row
a description of lock request if trx is waiting, or nullptr otherwise
Definition: trx0i_s.h:127
uintmax_t trx_weight
The value of TRX_WEIGHT(trx)
Definition: trx0i_s.h:133
uintmax_t trx_rows_modified
trx_t::undo_no
Definition: trx0i_s.h:170
Used to represent locks requests uniquely over time.
Definition: lock0types.h:106
Lock struct; protected by lock_sys latches.
Definition: lock0priv.h:137
This structure describes the intermediate buffer.
Definition: trx0i_s.cc:131
void trx_i_s_cache_end_read(trx_i_s_cache_t *cache)
Release a shared/read lock on the tables cache.
Definition: trx0i_s.cc:893
void trx_i_s_cache_start_read(trx_i_s_cache_t *cache)
Issue a shared/read lock on the tables cache.
Definition: trx0i_s.cc:887
constexpr uint32_t TRX_I_S_MEM_LIMIT
The maximum amount of memory that can be consumed by innodb_trx, innodb_locks and innodb_lock_waits i...
Definition: trx0i_s.h:52
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.
Definition: trx0i_s.cc:955
void trx_i_s_cache_start_write(trx_i_s_cache_t *cache)
Issue an exclusive/write lock on the tables cache.
Definition: trx0i_s.cc:904
void fill_locks_row(i_s_locks_row_t *row, const lock_t *lock, ulint heap_no)
Fills i_s_locks_row_t object with data about the lock.
Definition: trx0i_s.cc:652
bool 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...
Definition: trx0i_s.cc:838
constexpr uint32_t TRX_I_S_TRX_FK_ERROR_MAX_LEN
The maximum length of a string that can be stored in i_s_trx_row_t::trx_foreign_key_error.
Definition: trx0i_s.h:68
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 an...
Definition: trx0i_s.cc:167
constexpr uint32_t TRX_I_S_TRX_ISOLATION_LEVEL_MAX_LEN
The maximum length of a string that can be stored in i_s_trx_row_t::trx_isolation_level.
Definition: trx0i_s.h:72
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.
Definition: trx0i_s.cc:942
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.
Definition: trx0i_s.cc:817
constexpr uint32_t TRX_I_S_TRX_OP_STATE_MAX_LEN
The maximum length of a string that can be stored in i_s_trx_row_t::trx_operation_state.
Definition: trx0i_s.h:64
constexpr uint32_t TRX_I_S_TRX_QUERY_MAX_LEN
The maximum length of a string that can be stored in i_s_trx_row_t::trx_query.
Definition: trx0i_s.h:60
void trx_i_s_cache_end_write(trx_i_s_cache_t *cache)
Release an exclusive/write lock on the tables cache.
Definition: trx0i_s.cc:910
constexpr uint32_t TRX_I_S_LOCK_ID_MAX_LEN
The maximum length of a resulting lock_id_size in trx_i_s_create_lock_id(), not including the termina...
Definition: trx0i_s.h:255
void trx_i_s_cache_free(trx_i_s_cache_t *cache)
Free the INFORMATION SCHEMA trx related cache.
Definition: trx0i_s.cc:875
int trx_i_s_parse_lock_id(const char *lock_id, i_s_locks_row_t *row)
Parses lock id into row.
Definition: trx0i_s.cc:1023
i_s_table
Auxiliary enum used by functions that need to select one of the INFORMATION_SCHEMA tables.
Definition: trx0i_s.h:202
@ I_S_INNODB_TRX
INFORMATION_SCHEMA.innodb_trx.
Definition: trx0i_s.h:203
char * trx_i_s_create_lock_id(const i_s_locks_row_t &row, char *lock_id, size_t lock_id_size)
Crafts a lock id string from a i_s_locks_row_t object.
Definition: trx0i_s.cc:989
constexpr uint32_t TRX_I_S_LOCK_DATA_MAX_LEN
The maximum length of a string that can be stored in i_s_locks_row_t::lock_data.
Definition: trx0i_s.h:56
void p_s_fill_lock_data(const char **lock_data, const lock_t *lock, ulint heap_no, PSI_server_data_lock_container *container)
Fill performance schema lock data.
Definition: trx0i_s.cc:587
void trx_i_s_cache_init(trx_i_s_cache_t *cache)
Initialize INFORMATION SCHEMA trx related cache.
Definition: trx0i_s.cc:843
Transaction system global type definitions.
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
int n
Definition: xcom_base.cc:509