23#ifndef DD__SYSTEM_REGISTRY_INCLUDED
24#define DD__SYSTEM_REGISTRY_INCLUDED
34#include "mysqld_error.h"
62template <
typename K,
typename T,
typename P, const
char *F(P),
bool D>
88 fprintf(stderr,
"Key= '%s.%s', property= '%s'\n",
m_key.first.c_str(),
118template <
typename K,
typename T,
typename P, const
char *F(P),
bool D>
144 for (
typename Entity_map_type::iterator it =
m_entity_map.begin();
163 P property, T *entity) {
165 K
key(schema_name, entity_name);
197 K
key(schema_name, entity_name);
200 typename Entity_map_type::const_iterator element_it =
206 return element_it->second->entity();
226 K
key(schema_name, entity_name);
229 typename Entity_map_type::const_iterator element_it =
235 return element_it->second->property_ptr();
260 while (it !=
end()) {
261 if ((*it)->property() == property)
break;
285 if (current ==
end())
return current;
303 if (current ==
end())
return current;
305 while (++current !=
end())
306 if ((*current)->property() == property)
break;
367 return "DDSE_PRIVATE";
369 return "DDSE_PROTECTED";
382 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE;
386 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE;
389 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE;
475 return "INFORMATION_SCHEMA";
477 return "NON_DD_BASED_INFORMATION_SCHEMA";
553 return "PREDEFINED_DDSE";
Class to hold information regarding a predefined tablespace created by a storage engine.
Definition: plugin_table.h:128
Class to wrap an entity object.
Definition: system_registry.h:63
Entity_element(const K &key, const T *entity, const P property)
Definition: system_registry.h:70
const P m_property
Property of some kind, like an enumeration.
Definition: system_registry.h:67
const P property() const
Definition: system_registry.h:82
const P * property_ptr() const
Definition: system_registry.h:84
~Entity_element()
Definition: system_registry.h:73
const K m_key
The key associated with the entity object.
Definition: system_registry.h:65
const T * m_entity
Entity object pointer, like an Object_table instance.
Definition: system_registry.h:66
const K & key() const
Definition: system_registry.h:78
const T * entity() const
Definition: system_registry.h:80
void dump() const
Definition: system_registry.h:87
Class to represent collections of meta data for entities.
Definition: system_registry.h:119
Entity_map_type m_entity_map
Map for direct key based lookup.
Definition: system_registry.h:126
std::map< K, Entity_element_type * > Entity_map_type
Definition: system_registry.h:123
const T * find_entity(const String_type &schema_name, const String_type &entity_name) const
Find an element entity in the registry.
Definition: system_registry.h:193
const P * find_property(const String_type &schema_name, const String_type &entity_name) const
Find the property of an element in the registry.
Definition: system_registry.h:222
Const_iterator end() const
Get the end of the vector of ordered inserts.
Definition: system_registry.h:275
std::vector< Entity_element_type * > Entity_list_type
Definition: system_registry.h:122
Entity_list_type m_entity_list
List for ordered access.
Definition: system_registry.h:125
Entity_list_type::const_iterator Const_iterator
Definition: system_registry.h:130
void dump() const
Definition: system_registry.h:312
Const_iterator next(Const_iterator current, P property) const
Get the next element in the list of ordered inserts.
Definition: system_registry.h:302
Entity_element< K, T, P, F, D > Entity_element_type
Definition: system_registry.h:121
Const_iterator begin(P property) const
Get the first element with a certain property.
Definition: system_registry.h:258
Const_iterator next(Const_iterator current) const
Get the next element in the list of ordered inserts.
Definition: system_registry.h:284
void add(const String_type &schema_name, const String_type &entity_name, P property, T *entity)
Add a new entity to the registry.
Definition: system_registry.h:162
Const_iterator begin() const
Get the beginning of the vector of ordered inserts.
Definition: system_registry.h:245
~Entity_registry()
Delete the heap memory owned by the entity registry.
Definition: system_registry.h:141
This class represents all data dictionary table like mysql.tables, mysql.columns and more.
Definition: object_table.h:71
Class used to represent the dictionary tables.
Definition: system_registry.h:331
void dump() const
Definition: system_registry.h:439
Const_iterator begin(Types type) const
Definition: system_registry.h:430
static int type_name_error_code(Types type)
Definition: system_registry.h:380
Entity_registry< std::pair< const String_type, const String_type >, const Object_table, Types, type_name, true > System_table_registry_type
Definition: system_registry.h:397
System_table_registry_type m_registry
Definition: system_registry.h:398
const Object_table * find_table(const String_type &schema_name, const String_type &table_name) const
Definition: system_registry.h:417
static System_tables * instance()
Definition: system_registry.cc:131
static const char * type_name(Types type)
Definition: system_registry.h:358
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:434
System_table_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:402
void add_remaining_dd_tables()
Definition: system_registry.cc:164
Const_iterator end() const
Definition: system_registry.h:432
const Types * find_type(const String_type &schema_name, const String_type &table_name) const
Definition: system_registry.h:423
void add(const String_type &schema_name, const String_type &table_name, Types type, const Object_table *table)
Definition: system_registry.h:411
void add_inert_dd_tables()
Definition: system_registry.cc:150
Const_iterator begin() const
Definition: system_registry.h:428
Types
Definition: system_registry.h:347
Class used to represent the system tablespaces.
Definition: system_registry.h:539
static const char * type_name(Types type)
Definition: system_registry.h:548
const Plugin_tablespace * find(const String_type &tablespace_name) const
Definition: system_registry.h:580
Types
Definition: system_registry.h:542
void add(const String_type &tablespace_name, Types type, const Plugin_tablespace *space)
Definition: system_registry.h:574
Const_iterator begin(Types type) const
Definition: system_registry.h:586
void dump() const
Definition: system_registry.h:595
Const_iterator begin() const
Definition: system_registry.h:584
System_tablespace_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:569
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:590
Const_iterator end() const
Definition: system_registry.h:588
System_tablespace_registry_type m_registry
Definition: system_registry.h:565
static System_tablespaces * instance()
Definition: system_registry.cc:141
Entity_registry< std::pair< const String_type, const String_type >, const Plugin_tablespace, Types, type_name, false > System_tablespace_registry_type
Definition: system_registry.h:564
Class used to represent the system views.
Definition: system_registry.h:456
Types
Definition: system_registry.h:469
@ NON_DD_BASED_INFORMATION_SCHEMA
Const_iterator begin() const
Definition: system_registry.h:513
void dump() const
Definition: system_registry.h:524
System_view_registry_type m_registry
Definition: system_registry.h:490
Const_iterator end() const
Definition: system_registry.h:517
Const_iterator begin(Types type) const
Definition: system_registry.h:515
Entity_registry< std::pair< const String_type, const String_type >, const system_views::System_view, Types, type_name, true > System_view_registry_type
Definition: system_registry.h:489
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:519
static const char * type_name(Types type)
Definition: system_registry.h:472
void add(const String_type &schema_name, const String_type &view_name, Types type, const system_views::System_view *view)
Definition: system_registry.h:502
static System_views * instance()
Definition: system_registry.cc:136
void init()
Definition: system_registry.cc:259
const system_views::System_view * find(const String_type &schema_name, const String_type &view_name) const
Definition: system_registry.h:508
System_view_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:494
This class represents base class for all INFORMATION_SCHEMA system views defined in sql/dd/impl/syste...
Definition: system_view.h:38
#define P
Definition: dtoa.cc:619
uint16_t value_type
Definition: vt100.h:183
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
const char * table_name
Definition: rules_table_service.cc:55
required string key
Definition: replication_asynchronous_connection_failover.proto:59
required string type
Definition: replication_group_member_actions.proto:33