24#ifndef DD_CACHE__STORAGE_ADAPTER_INCLUDED
25#define DD_CACHE__STORAGE_ADAPTER_INCLUDED
40class CacheStorageTest;
96 template <
typename K,
typename T>
125 template <
typename T>
136 template <
typename T>
143 template <
typename T>
176 template <
typename K,
typename T>
178 bool bypass_core_registry,
const T **
object);
188 template <
typename T>
202 template <
typename T>
203 static bool drop(
THD *thd,
const T *
object);
217 template <
typename T>
231 template <
typename T>
232 static bool store(
THD *thd, T *
object);
243 template <
typename T>
244 bool core_sync(
THD *thd,
const typename T::Name_key &
key,
const T *
object);
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: tablespace.h:56
Object registry containing several maps.
Definition: object_registry.h:62
void erase_all()
Remove and delete all objects from the registry.
Definition: object_registry.h:321
Handling of access to persistent storage.
Definition: storage_adapter.h:60
void core_update(const T *)
Update the dd object in the core registry.
Definition: storage_adapter.h:144
static bool get(THD *thd, const K &key, enum_tx_isolation isolation, bool bypass_core_registry, const T **object)
Get a dictionary object from persistent storage.
Definition: storage_adapter.cc:150
static Storage_adapter * instance()
Definition: storage_adapter.cc:80
Object_id next_oid()
Generate a new object id for a registry partition.
Definition: storage_adapter.cc:89
static const Object_id FIRST_OID
Use an id not starting at 1 to make it easy to recognize ids generated before objects are stored pers...
Definition: storage_adapter.h:69
void erase_all()
Remove and delete all elements and objects from core storage.
Definition: storage_adapter.cc:415
static bool store(THD *thd, T *object)
Store a dictionary object to persistent storage.
Definition: storage_adapter.cc:313
void core_get(const K &key, const T **object)
Get a dictionary object from core storage.
Definition: storage_adapter.cc:116
void core_store(THD *thd, T *object)
Store a dictionary object to core storage.
Definition: storage_adapter.cc:274
static bool drop(THD *thd, const T *object)
Drop a dictionary object from persistent storage.
Definition: storage_adapter.cc:242
Object_id core_get_id(const typename T::Name_key &key)
Get a dictionary object id from core storage.
Definition: storage_adapter.cc:103
~Storage_adapter()
Definition: storage_adapter.h:108
bool core_sync(THD *thd, const typename T::Name_key &key, const T *object)
Sync a dictionary object from persistent to core storage.
Definition: storage_adapter.cc:353
Object_registry m_core_registry
Definition: storage_adapter.h:99
mysql_mutex_t m_lock
Definition: storage_adapter.h:100
size_t core_size()
Get the number of core objects in a registry partition.
Definition: storage_adapter.cc:96
static bool s_use_fake_storage
Definition: storage_adapter.h:101
void core_drop(THD *thd, const T *object)
Drop a dictionary object from core storage.
Definition: storage_adapter.cc:214
void dump()
Dump the contents of the core storage.
Definition: storage_adapter.cc:421
Storage_adapter()
Definition: storage_adapter.h:104
friend class dd_cache_unittest::CacheStorageTest
Definition: storage_adapter.h:61
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_destroy(M)
Definition: mysql_mutex.h:46
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
#define mysql_mutex_init(K, M, A)
Definition: mysql_mutex.h:41
ABI for instrumented mutexes.
Definition: dictionary_client.h:1274
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
Instrumentation helpers for mutexes.
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
enum_tx_isolation
Definition: handler.h:3186
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
MySQL mutex implementation.
#define MY_MUTEX_INIT_FAST
Definition: thr_mutex.h:68
#define PSI_NOT_INSTRUMENTED
Definition: validate_password_imp.cc:42