23#ifndef MDL_CONTEXT_BACKUP_H
24#define MDL_CONTEXT_BACKUP_H
55 std::less<MDL_context_backup_key>,
57 std::unique_ptr<MDL_context_backup>>>>
120 const size_t keylen);
141 const size_t keylen);
160 const size_t keylen);
Intrusive parameterized list.
Definition: sql_plist.h:74
Wrapper around MDL_context class which allows to store it in backup manager's collection.
Definition: mdl_context_backup.cc:36
Class which is used to store MDL locks associated with XA transactions in prepared state which client...
Definition: mdl_context_backup.h:44
bool check_key_exist(const MDL_context_backup_key &key_obj)
Check for presence of a record with specified key.
Definition: mdl_context_backup.cc:150
static void init_psi_keys(void)
Definition: mdl_context_backup.cc:105
~MDL_context_backup_manager()
destroy mutex and clear backup map
Definition: mdl_context_backup.cc:146
void delete_backup(const uchar *key, const size_t keylen)
Delete backup context and release associated locks.
Definition: mdl_context_backup.cc:250
Element_map_type m_backup_map
Definition: mdl_context_backup.h:173
static bool init()
Initialize member variables and singleton object.
Definition: mdl_context_backup.cc:128
static void destroy()
Cleanup and delete singleton object.
Definition: mdl_context_backup.cc:140
MDL_context_backup_manager(const MDL_context_backup_manager &)=delete
bool restore_backup(MDL_context *mdl_context, const uchar *key, const size_t keylen)
Restore locks from backup to given MDL_context.
Definition: mdl_context_backup.cc:232
MDL_context_backup_manager(PSI_memory_key key)
Definition: mdl_context_backup.cc:115
static MDL_context_backup_manager * m_single
Definition: mdl_context_backup.h:64
std::map< MDL_context_backup_key, std::unique_ptr< MDL_context_backup >, std::less< MDL_context_backup_key >, Malloc_allocator< std::pair< const MDL_context_backup_key, std::unique_ptr< MDL_context_backup > > > > Element_map_type
Definition: mdl_context_backup.h:51
bool create_backup(const MDL_context *context, const uchar *key, const size_t keylen)
Create backup from given MDL_context by cloning all transactional locks to backup context and adds to...
Definition: mdl_context_backup.cc:156
mysql_mutex_t m_LOCK_mdl_context_backup
Definition: mdl_context_backup.h:176
static MDL_context_backup_manager & instance()
Return singleton object.
Definition: mdl_context_backup.cc:135
std::basic_string< uchar > MDL_context_backup_key
Key for uniquely identifying MDL_context in the MDL_context_backup map.
Definition: mdl_context_backup.h:49
void operator=(const MDL_context_backup_manager &)=delete
Context of the owner of metadata locks.
Definition: mdl.h:1410
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:62
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:48
unsigned char uchar
Definition: my_inttypes.h:51
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2890
required string key
Definition: replication_asynchronous_connection_failover.proto:59
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49