24#ifndef PFS_DATA_LOCK_H
25#define PFS_DATA_LOCK_H
33#include <unordered_set>
58 void set(
const char *
str,
size_t len) {
59 if ((len == 0) || (len >
max_len) || (
str ==
nullptr)) {
140 void set(
const char *requesting_lock_id,
size_t requesting_lock_id_length,
141 const char *blocking_lock_id,
size_t blocking_lock_id_length) {
142 if ((requesting_lock_id_length == 0) ||
143 (requesting_lock_id_length >
max_len) ||
144 (requesting_lock_id ==
nullptr) || (blocking_lock_id_length == 0) ||
145 (blocking_lock_id_length >
max_len) || (blocking_lock_id ==
nullptr)) {
153 requesting_lock_id_length);
154 if (requesting_lock_id_length <
max_len) {
156 max_len - requesting_lock_id_length);
162 blocking_lock_id_length);
163 if (blocking_lock_id_length <
max_len) {
165 max_len - blocking_lock_id_length);
233 size_t engine_length [[maybe_unused]]) {
238 size_t engine_lock_id_length [[maybe_unused]]) {
253 size_t table_schema_length [[maybe_unused]],
255 size_t table_name_length [[maybe_unused]],
256 const char *partition_name [[maybe_unused]],
257 size_t partition_name_length [[maybe_unused]],
258 const char *sub_partition_name [[maybe_unused]],
259 size_t sub_partition_name_length [[maybe_unused]]) {
275 const char *key_value;
276 size_t key_value_length;
300 size_t engine_lock_id_length)
override {
302 if (!
m_key_1.
match(engine_lock_id, engine_lock_id_length)) {
330 m_key_1(
"ENGINE_TRANSACTION_ID"),
398 m_key_4(
"SUBPARTITION_NAME") {}
402 bool match_object(
const char *table_schema,
size_t table_schema_length,
403 const char *
table_name,
size_t table_name_length,
404 const char *partition_name,
size_t partition_name_length,
405 const char *sub_partition_name,
406 size_t sub_partition_name_length)
override {
408 if (!
m_key_1.
match(table_schema, table_schema_length)) {
420 if (!
m_key_3.
match(partition_name, partition_name_length)) {
426 if (!
m_key_4.
match(sub_partition_name, sub_partition_name_length)) {
453 size_t engine_length [[maybe_unused]]) {
459 size_t engine_lock_id_length
466 size_t engine_lock_id_length
500 m_key_1(
"REQUESTING_ENGINE_LOCK_ID"),
501 m_key_2(
"BLOCKING_ENGINE_LOCK_ID"),
508 const char *key_value_1;
509 size_t key_value_length_1;
511 const char *key_value_2;
512 size_t key_value_length_2;
528 m_pk_pos.
set(key_value_1, key_value_length_1, key_value_2,
543 size_t engine_lock_id_length)
override {
545 if (!
m_key_1.
match(engine_lock_id, engine_lock_id_length)) {
554 size_t engine_lock_id_length)
override {
556 if (!
m_key_2.
match(engine_lock_id, engine_lock_id_length)) {
586 m_key_1(
"REQUESTING_ENGINE_LOCK_ID"),
592 size_t engine_lock_id_length)
override {
594 if (!
m_key_1.
match(engine_lock_id, engine_lock_id_length)) {
622 m_key_1(
"BLOCKING_ENGINE_LOCK_ID"),
628 size_t engine_lock_id_length)
override {
630 if (!
m_key_1.
match(engine_lock_id, engine_lock_id_length)) {
658 m_key_1(
"REQUESTING_ENGINE_TRANSACTION_ID"),
664 ulonglong engine_transaction_id)
override {
694 m_key_1(
"BLOCKING_ENGINE_TRANSACTION_ID"),
729 m_key_1(
"REQUESTING_THREAD_ID"),
730 m_key_2(
"REQUESTING_EVENT_ID") {}
762 m_key_2(
"BLOCKING_EVENT_ID") {}
805 typedef std::unordered_set<std::string, std::hash<std::string>,
806 std::equal_to<std::string>,
823 std::pair<set_type::iterator, bool> ret;
826 return (*ret.first).data();
840 const char **cached_ptr,
841 size_t *cached_length)
override;
843 bool accept_engine(
const char *engine,
size_t engine_length)
override;
845 size_t engine_lock_id_length)
override;
849 bool accept_object(
const char *table_schema,
size_t table_schema_length,
850 const char *
table_name,
size_t table_name_length,
851 const char *partition_name,
size_t partition_name_length,
852 const char *sub_partition_name,
853 size_t sub_partition_name_length)
override;
855 void add_lock_row(
const char *engine,
size_t engine_length,
856 const char *engine_lock_id,
size_t engine_lock_id_length,
858 ulonglong event_id,
const char *table_schema,
859 size_t table_schema_length,
const char *
table_name,
860 size_t table_name_length,
const char *partition_name,
861 size_t partition_name_length,
862 const char *sub_partition_name,
863 size_t sub_partition_name_length,
const char *index_name,
864 size_t index_name_length,
const void *identity,
865 const char *
lock_mode,
const char *lock_type,
866 const char *lock_status,
const char *lock_data)
override;
884 std::vector<row_data_lock, PFS_data_container_allocator<row_data_lock>>
899 bool accept_engine(
const char *engine,
size_t engine_length)
override;
901 size_t engine_lock_id_length)
override;
903 size_t engine_lock_id_length)
override;
912 const char *engine,
size_t engine_length,
913 const char *requesting_engine_lock_id,
914 size_t requesting_engine_lock_id_length,
916 ulonglong requesting_event_id,
const void *requesting_identity,
917 const char *blocking_engine_lock_id,
918 size_t blocking_engine_lock_id_length,
ulonglong blocking_transaction_id,
920 const void *blocking_identity)
override;
Definition: pfs_data_lock.h:803
void clear()
Definition: pfs_data_lock.h:829
const char * cache_data(const char *ptr, size_t length)
Definition: pfs_data_lock.h:816
set_type m_set
Definition: pfs_data_lock.h:810
PFS_data_cache()
Definition: pfs_data_lock.h:813
~PFS_data_cache()
Definition: pfs_data_lock.h:814
std::unordered_set< std::string, std::hash< std::string >, std::equal_to< std::string >, PFS_data_container_allocator< std::string > > set_type
Definition: pfs_data_lock.h:808
Definition: pfs_data_lock.h:789
constexpr PFS_data_container_allocator(const PFS_data_container_allocator< U > &u) noexcept
Definition: pfs_data_lock.h:798
PFS_data_container_allocator(const PFS_data_container_allocator &other)
Definition: pfs_data_lock.h:794
PFS_data_container_allocator()
Definition: pfs_data_lock.h:791
Definition: pfs_data_lock.h:832
void cache_identifier(PSI_identifier kind, const char *str, size_t length, const char **cached_ptr, size_t *cached_length) override
Add an identifier in the container cache.
Definition: pfs_data_lock.cc:200
std::vector< row_data_lock, PFS_data_container_allocator< row_data_lock > > m_rows
Definition: pfs_data_lock.h:885
PFS_data_lock_container()
Definition: pfs_data_lock.cc:186
bool accept_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Check if the container accepts data for a particular lock.
Definition: pfs_data_lock.cc:249
~PFS_data_lock_container() override
bool accept_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Check if the container accepts data for a particular event.
Definition: pfs_data_lock.cc:264
bool accept_engine(const char *engine, size_t engine_length) override
Check if the container accepts data for a particular engine.
Definition: pfs_data_lock.cc:241
void add_lock_row(const char *engine, size_t engine_length, const char *engine_lock_id, size_t engine_lock_id_length, ulonglong transaction_id, ulonglong thread_id, ulonglong event_id, const char *table_schema, size_t table_schema_length, const char *table_name, size_t table_name_length, const char *partition_name, size_t partition_name_length, const char *sub_partition_name, size_t sub_partition_name_length, const char *index_name, size_t index_name_length, const void *identity, const char *lock_mode, const char *lock_type, const char *lock_status, const char *lock_data) override
Add a row to table performance_schema.data_locks.
Definition: pfs_data_lock.cc:286
size_t m_logical_row_index
Definition: pfs_data_lock.h:883
bool accept_transaction_id(ulonglong transaction_id) override
Check if the container accepts data for a particular transaction.
Definition: pfs_data_lock.cc:257
void set_filter(PFS_index_data_locks *filter)
Definition: pfs_data_lock.h:880
const char * cache_string(const char *string) override
Add a string to the container cache.
Definition: pfs_data_lock.cc:191
void clear()
Clear the container.
Definition: pfs_data_lock.cc:336
PFS_index_data_locks * m_filter
Definition: pfs_data_lock.h:887
const char * cache_data(const char *ptr, size_t length) override
Add binary data to the container cache.
Definition: pfs_data_lock.cc:195
bool accept_object(const char *table_schema, size_t table_schema_length, const char *table_name, size_t table_name_length, const char *partition_name, size_t partition_name_length, const char *sub_partition_name, size_t sub_partition_name_length) override
Check if the container accepts data for a particular object.
Definition: pfs_data_lock.cc:272
row_data_lock * get_row(size_t index)
Definition: pfs_data_lock.cc:350
PFS_data_cache m_cache
Definition: pfs_data_lock.h:886
void shrink()
Shrink the container.
Definition: pfs_data_lock.cc:342
Definition: pfs_data_lock.h:891
void clear()
Clear the container.
Definition: pfs_data_lock.cc:471
row_data_lock_wait * get_row(size_t index)
Definition: pfs_data_lock.cc:485
PFS_data_cache m_cache
Definition: pfs_data_lock.h:941
void set_filter(PFS_index_data_lock_waits *filter)
Definition: pfs_data_lock.h:934
~PFS_data_lock_wait_container() override
bool accept_requesting_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Check if the container accepts data for a particular requesting event.
Definition: pfs_data_lock.cc:425
bool accept_blocking_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Check if the container accepts data for a particular blocking lock id.
Definition: pfs_data_lock.cc:400
PFS_data_lock_wait_container()
Definition: pfs_data_lock.cc:369
bool accept_requesting_transaction_id(ulonglong transaction_id) override
Check if the container accepts data for a particular requesting transaction id.
Definition: pfs_data_lock.cc:409
bool accept_requesting_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Check if the container accepts data for a particular requesting lock id.
Definition: pfs_data_lock.cc:391
const char * cache_string(const char *string) override
Definition: pfs_data_lock.cc:374
bool accept_blocking_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Check if the container accepts data for a particular blocking event.
Definition: pfs_data_lock.cc:433
bool accept_engine(const char *engine, size_t engine_length) override
Check if the container accepts data for a particular engine.
Definition: pfs_data_lock.cc:383
std::vector< row_data_lock_wait, PFS_data_container_allocator< row_data_lock_wait > > m_rows
Definition: pfs_data_lock.h:940
PFS_index_data_lock_waits * m_filter
Definition: pfs_data_lock.h:942
bool accept_blocking_transaction_id(ulonglong transaction_id) override
Check if the container accepts data for a particular blocking transaction id.
Definition: pfs_data_lock.cc:417
size_t m_logical_row_index
Definition: pfs_data_lock.h:937
void shrink()
Shrink the container.
Definition: pfs_data_lock.cc:477
void add_lock_wait_row(const char *engine, size_t engine_length, const char *requesting_engine_lock_id, size_t requesting_engine_lock_id_length, ulonglong requesting_transaction_id, ulonglong requesting_thread_id, ulonglong requesting_event_id, const void *requesting_identity, const char *blocking_engine_lock_id, size_t blocking_engine_lock_id_length, ulonglong blocking_transaction_id, ulonglong blocking_thread_id, ulonglong blocking_event_id, const void *blocking_identity) override
Add a row to table performance_schema.data_lock_waits.
Definition: pfs_data_lock.cc:441
const char * cache_data(const char *ptr, size_t length) override
Definition: pfs_data_lock.cc:378
uint m_fields
Definition: pfs_engine_table.h:296
Definition: pfs_engine_table.h:301
Definition: pfs_engine_table.h:268
Definition: pfs_data_lock.h:618
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:638
bool match_blocking_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Definition: pfs_data_lock.h:627
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:650
PFS_key_engine_lock_id m_key_1
Definition: pfs_data_lock.h:649
~PFS_index_data_lock_waits_by_blocking_lock_id() override=default
PFS_index_data_lock_waits_by_blocking_lock_id()
Definition: pfs_data_lock.h:620
Definition: pfs_data_lock.h:757
PFS_key_event_id m_key_2
Definition: pfs_data_lock.h:785
PFS_key_thread_id m_key_1
Definition: pfs_data_lock.h:784
PFS_index_data_lock_waits_by_blocking_thread_id()
Definition: pfs_data_lock.h:759
~PFS_index_data_lock_waits_by_blocking_thread_id() override=default
bool match_blocking_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Definition: pfs_data_lock.h:766
Definition: pfs_data_lock.h:690
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:721
PFS_index_data_lock_waits_by_blocking_transaction_id()
Definition: pfs_data_lock.h:692
bool match_blocking_transaction_id(ulonglong engine_transaction_id) override
Definition: pfs_data_lock.h:699
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:709
~PFS_index_data_lock_waits_by_blocking_transaction_id() override=default
PFS_key_engine_transaction_id m_key_1
Definition: pfs_data_lock.h:720
Definition: pfs_data_lock.h:582
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:614
PFS_index_data_lock_waits_by_requesting_lock_id()
Definition: pfs_data_lock.h:584
PFS_key_engine_lock_id m_key_1
Definition: pfs_data_lock.h:613
~PFS_index_data_lock_waits_by_requesting_lock_id() override=default
bool match_requesting_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Definition: pfs_data_lock.h:591
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:602
Definition: pfs_data_lock.h:725
PFS_key_thread_id m_key_1
Definition: pfs_data_lock.h:752
~PFS_index_data_lock_waits_by_requesting_thread_id() override=default
bool match_requesting_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Definition: pfs_data_lock.h:734
PFS_key_event_id m_key_2
Definition: pfs_data_lock.h:753
PFS_index_data_lock_waits_by_requesting_thread_id()
Definition: pfs_data_lock.h:727
Definition: pfs_data_lock.h:654
PFS_key_engine_transaction_id m_key_1
Definition: pfs_data_lock.h:685
~PFS_index_data_lock_waits_by_requesting_transaction_id() override=default
bool match_requesting_transaction_id(ulonglong engine_transaction_id) override
Definition: pfs_data_lock.h:663
PFS_index_data_lock_waits_by_requesting_transaction_id()
Definition: pfs_data_lock.h:656
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:686
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:674
Definition: pfs_data_lock.h:441
virtual bool match_blocking_lock_id(const char *engine_lock_id, size_t engine_lock_id_length)
Definition: pfs_data_lock.h:464
virtual bool match_requesting_thread_id_event_id(ulonglong thread_id, ulonglong event_id)
Definition: pfs_data_lock.h:481
~PFS_index_data_lock_waits() override=default
virtual bool match_blocking_transaction_id(ulonglong engine_transaction_id)
Definition: pfs_data_lock.h:476
PFS_index_data_lock_waits(PFS_engine_key *key_1, PFS_engine_key *key_2)
Definition: pfs_data_lock.h:443
virtual bool match_engine(const char *engine, size_t engine_length)
Definition: pfs_data_lock.h:452
virtual bool match_requesting_transaction_id(ulonglong engine_transaction_id)
Definition: pfs_data_lock.h:471
virtual bool match_blocking_thread_id_event_id(ulonglong thread_id, ulonglong event_id)
Definition: pfs_data_lock.h:488
virtual bool match_requesting_lock_id(const char *engine_lock_id, size_t engine_lock_id_length)
Definition: pfs_data_lock.h:457
PFS_index_data_lock_waits(PFS_engine_key *key_1, PFS_engine_key *key_2, PFS_engine_key *key_3)
Definition: pfs_data_lock.h:446
Definition: pfs_data_lock.h:391
bool match_object(const char *table_schema, size_t table_schema_length, const char *table_name, size_t table_name_length, const char *partition_name, size_t partition_name_length, const char *sub_partition_name, size_t sub_partition_name_length) override
Definition: pfs_data_lock.h:402
~PFS_index_data_locks_by_object() override=default
PFS_index_data_locks_by_object()
Definition: pfs_data_lock.h:393
PFS_key_object_name m_key_2
Definition: pfs_data_lock.h:436
PFS_key_object_schema m_key_1
Definition: pfs_data_lock.h:435
PFS_key_name m_key_4
Definition: pfs_data_lock.h:438
PFS_key_name m_key_3
Definition: pfs_data_lock.h:437
Definition: pfs_data_lock.h:360
PFS_index_data_locks_by_thread_id()
Definition: pfs_data_lock.h:362
PFS_key_thread_id m_key_1
Definition: pfs_data_lock.h:387
PFS_key_event_id m_key_2
Definition: pfs_data_lock.h:388
~PFS_index_data_locks_by_thread_id() override=default
bool match_thread_id_event_id(ulonglong thread_id, ulonglong event_id) override
Definition: pfs_data_lock.h:369
Definition: pfs_data_lock.h:326
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:345
PFS_index_data_locks_by_transaction_id()
Definition: pfs_data_lock.h:328
bool match_transaction_id(ulonglong engine_transaction_id) override
Definition: pfs_data_lock.h:335
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:357
~PFS_index_data_locks_by_transaction_id() override=default
PFS_key_engine_transaction_id m_key_1
Definition: pfs_data_lock.h:356
Definition: pfs_data_lock.h:221
PFS_index_data_locks(PFS_engine_key *key_1, PFS_engine_key *key_2)
Definition: pfs_data_lock.h:223
virtual bool match_transaction_id(ulonglong engine_transaction_id)
Definition: pfs_data_lock.h:242
PFS_index_data_locks(PFS_engine_key *key_1, PFS_engine_key *key_2, PFS_engine_key *key_3, PFS_engine_key *key_4)
Definition: pfs_data_lock.h:226
~PFS_index_data_locks() override=default
virtual bool match_thread_id_event_id(ulonglong thread_id, ulonglong event_id)
Definition: pfs_data_lock.h:247
virtual bool match_object(const char *table_schema, size_t table_schema_length, const char *table_name, size_t table_name_length, const char *partition_name, size_t partition_name_length, const char *sub_partition_name, size_t sub_partition_name_length)
Definition: pfs_data_lock.h:252
virtual bool match_engine(const char *engine, size_t engine_length)
Definition: pfs_data_lock.h:232
virtual bool match_lock_id(const char *engine_lock_id, size_t engine_lock_id_length)
Definition: pfs_data_lock.h:237
Definition: table_helper.h:1593
bool match(const char *engine_lock_id, size_t length)
Definition: table_helper.cc:2205
Definition: table_helper.h:1583
bool match(const char *engine_name, size_t length)
Definition: table_helper.cc:2201
Definition: table_helper.h:1317
bool match(ulonglong engine_transaction_id)
Definition: table_helper.cc:1891
Definition: table_helper.h:1294
bool match(ulonglong event_id)
Definition: table_helper.cc:1856
Definition: table_helper.h:1548
bool match(const LEX_CSTRING *name)
Definition: table_helper.cc:2155
Definition: table_helper.h:1650
bool match(const PFS_table_share *share)
Definition: table_helper.cc:2412
Definition: table_helper.h:1635
bool match(const PFS_table_share *share)
Definition: table_helper.cc:2374
void get_exact_key_value(bool &is_null, const char *&key_value, size_t &key_value_length)
Definition: table_helper.h:1433
Definition: table_helper.h:1278
bool match(ulonglong thread_id)
Definition: table_helper.cc:1795
Definition: pfs_data_lock.h:496
PFS_key_engine_lock_id m_key_2
Definition: pfs_data_lock.h:576
~PFS_pk_data_lock_waits() override=default
pk_pos_data_lock_wait * get_pk()
Definition: pfs_data_lock.h:506
bool match_blocking_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Definition: pfs_data_lock.h:553
PFS_key_engine_lock_id m_key_1
Definition: pfs_data_lock.h:575
PFS_pk_data_lock_waits()
Definition: pfs_data_lock.h:498
pk_pos_data_lock_wait m_pk_pos
Definition: pfs_data_lock.h:578
bool match_requesting_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Definition: pfs_data_lock.h:542
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:564
PFS_key_engine_name m_key_3
Definition: pfs_data_lock.h:577
Definition: pfs_data_lock.h:264
bool match_lock_id(const char *engine_lock_id, size_t engine_lock_id_length) override
Definition: pfs_data_lock.h:299
pk_pos_data_lock m_pk_pos
Definition: pfs_data_lock.h:323
PFS_key_engine_name m_key_2
Definition: pfs_data_lock.h:322
pk_pos_data_lock * get_pk()
Definition: pfs_data_lock.h:273
PFS_key_engine_lock_id m_key_1
Definition: pfs_data_lock.h:321
~PFS_pk_data_locks() override=default
bool match_engine(const char *engine, size_t engine_length) override
Definition: pfs_data_lock.h:310
PFS_pk_data_locks()
Definition: pfs_data_lock.h:266
Server interface, row lock container.
Definition: psi_data_lock.h:117
Definition: psi_data_lock.h:220
PSI_identifier
Definition: psi_data_lock.h:97
lock_mode
Definition: lock0types.h:54
Header for compiler-dependent features.
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
static my_thread_id thread_id
Definition: my_thr_init.cc:63
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
const char * table_name
Definition: rules_table_service.cc:56
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2875
PFS_builtin_memory_class builtin_memory_data_container
Definition: pfs_builtin_memory.cc:125
Performance schema instruments metadata (declarations).
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Row fragment for columns OBJECT_TYPE, SCHEMA_NAME, OBJECT_NAME, INDEX_NAME.
Definition: table_helper.h:678
Definition: pfs_std_allocator.h:38
Definition: pfs_data_lock.h:116
pk_pos_data_lock_wait()
Definition: pfs_data_lock.h:120
size_t get_blocking_lock_id_length() const
Definition: pfs_data_lock.h:181
void reset()
Definition: pfs_data_lock.h:122
size_t m_blocking_engine_lock_id_length
Definition: pfs_data_lock.h:191
size_t get_requesting_lock_id_length() const
Definition: pfs_data_lock.h:175
char m_requesting_engine_lock_id[max_len]
Column REQUESTING_ENGINE_LOCK_ID.
Definition: pfs_data_lock.h:187
const char * get_blocking_lock_id() const
Definition: pfs_data_lock.h:179
void set(const pk_pos_data_lock_wait *other)
Definition: pfs_data_lock.h:130
const char * get_requesting_lock_id() const
Definition: pfs_data_lock.h:171
void set(const char *requesting_lock_id, size_t requesting_lock_id_length, const char *blocking_lock_id, size_t blocking_lock_id_length)
Definition: pfs_data_lock.h:140
static constexpr size_t max_len
Definition: pfs_data_lock.h:118
size_t m_requesting_engine_lock_id_length
Definition: pfs_data_lock.h:188
char m_blocking_engine_lock_id[max_len]
Column BLOCKING_ENGINE_LOCK_ID.
Definition: pfs_data_lock.h:190
Definition: pfs_data_lock.h:42
char m_engine_lock_id[max_len]
Column ENGINE_LOCK_ID.
Definition: pfs_data_lock.h:77
void set(const char *str, size_t len)
Definition: pfs_data_lock.h:58
void reset()
Definition: pfs_data_lock.h:48
size_t m_engine_lock_id_length
Definition: pfs_data_lock.h:78
const char * str() const
Definition: pfs_data_lock.h:72
void set(const pk_pos_data_lock *other)
Definition: pfs_data_lock.h:53
pk_pos_data_lock()
Definition: pfs_data_lock.h:46
size_t length() const
Definition: pfs_data_lock.h:73
static constexpr size_t max_len
Definition: pfs_data_lock.h:44
A row of table PERFORMANCE_SCHEMA.DATA_LOCK_WAITS.
Definition: pfs_data_lock.h:198
pk_pos_data_lock_wait m_hidden_pk
Engine (REQUESTING_LOCK_ID, BLOCKING_LOCK_ID) key.
Definition: pfs_data_lock.h:202
const void * m_requesting_identity
Column REQUESTING_OBJECT_INSTANCE_BEGIN.
Definition: pfs_data_lock.h:210
ulonglong m_blocking_thread_id
Column BLOCKING_THREAD_ID.
Definition: pfs_data_lock.h:214
ulonglong m_requesting_event_id
Column REQUESTING_EVENT_ID.
Definition: pfs_data_lock.h:208
ulonglong m_blocking_event_id
Column BLOCKING_EVENT_ID.
Definition: pfs_data_lock.h:216
ulonglong m_requesting_thread_id
Column REQUESTING_THREAD_ID.
Definition: pfs_data_lock.h:206
const void * m_blocking_identity
Column BLOCKING_OBJECT_INSTANCE_BEGIN.
Definition: pfs_data_lock.h:218
ulonglong m_requesting_transaction_id
Column REQUESTING_ENGINE_TRANSACTION_ID.
Definition: pfs_data_lock.h:204
const char * m_engine
Column ENGINE.
Definition: pfs_data_lock.h:200
ulonglong m_blocking_transaction_id
Column BLOCKING_ENGINE_TRANSACTION_ID.
Definition: pfs_data_lock.h:212
A row of table PERFORMANCE_SCHEMA.DATA_LOCKS.
Definition: pfs_data_lock.h:85
const char * m_lock_status
Column LOCK_STATUS.
Definition: pfs_data_lock.h:111
const void * m_identity
Column OBJECT_INSTANCE_BEGIN.
Definition: pfs_data_lock.h:105
ulonglong m_transaction_id
Column ENGINE_TRANSACTION_ID.
Definition: pfs_data_lock.h:91
size_t m_sub_partition_name_length
Definition: pfs_data_lock.h:103
ulonglong m_thread_id
Column THREAD_ID.
Definition: pfs_data_lock.h:93
const char * m_lock_data
Column LOCK_DATA.
Definition: pfs_data_lock.h:113
const char * m_lock_mode
Column LOCK_MODE.
Definition: pfs_data_lock.h:107
const char * m_engine
Column ENGINE.
Definition: pfs_data_lock.h:87
const char * m_lock_type
Column LOCK_TYPE.
Definition: pfs_data_lock.h:109
PFS_index_view_row m_index_row
Columns OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME.
Definition: pfs_data_lock.h:97
ulonglong m_event_id
Column EVENT_ID.
Definition: pfs_data_lock.h:95
pk_pos_data_lock m_hidden_pk
Column ENGINE_LOCK_ID.
Definition: pfs_data_lock.h:89
size_t m_partition_name_length
Definition: pfs_data_lock.h:100
const char * m_partition_name
Column PARTITION_NAME.
Definition: pfs_data_lock.h:99
const char * m_sub_partition_name
Column SUB_PARTITION_NAME.
Definition: pfs_data_lock.h:102
Helpers to implement a performance schema table.