24#ifndef MDL_CONTEXT_BACKUP_H
25#define MDL_CONTEXT_BACKUP_H
56 std::less<MDL_context_backup_key>,
58 std::unique_ptr<MDL_context_backup>>>>
121 const size_t keylen);
142 const size_t keylen);
161 const size_t keylen);
Intrusive parameterized list.
Definition: sql_plist.h:75
Wrapper around MDL_context class which allows to store it in backup manager's collection.
Definition: mdl_context_backup.cc:37
Class which is used to store MDL locks associated with XA transactions in prepared state which client...
Definition: mdl_context_backup.h:45
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:151
static void init_psi_keys(void)
Definition: mdl_context_backup.cc:106
~MDL_context_backup_manager()
destroy mutex and clear backup map
Definition: mdl_context_backup.cc:147
void delete_backup(const uchar *key, const size_t keylen)
Delete backup context and release associated locks.
Definition: mdl_context_backup.cc:251
Element_map_type m_backup_map
Definition: mdl_context_backup.h:174
static bool init()
Initialize member variables and singleton object.
Definition: mdl_context_backup.cc:129
static void destroy()
Cleanup and delete singleton object.
Definition: mdl_context_backup.cc:141
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:233
MDL_context_backup_manager(PSI_memory_key key)
Definition: mdl_context_backup.cc:116
static MDL_context_backup_manager * m_single
Definition: mdl_context_backup.h:65
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:52
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:157
mysql_mutex_t m_LOCK_mdl_context_backup
Definition: mdl_context_backup.h:177
static MDL_context_backup_manager & instance()
Return singleton object.
Definition: mdl_context_backup.cc:136
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:50
void operator=(const MDL_context_backup_manager &)=delete
Context of the owner of metadata locks.
Definition: mdl.h:1412
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:63
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
unsigned char uchar
Definition: my_inttypes.h:52
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2892
required string key
Definition: replication_asynchronous_connection_failover.proto:60
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50