24#ifndef DD__SYSTEM_REGISTRY_INCLUDED
25#define DD__SYSTEM_REGISTRY_INCLUDED
35#include "mysqld_error.h"
63template <
typename K,
typename T,
typename P, const
char *F(P),
bool D>
89 fprintf(stderr,
"Key= '%s.%s', property= '%s'\n",
m_key.first.c_str(),
119template <
typename K,
typename T,
typename P, const
char *F(P),
bool D>
145 for (
typename Entity_map_type::iterator it =
m_entity_map.begin();
164 P property, T *entity) {
166 K
key(schema_name, entity_name);
198 K
key(schema_name, entity_name);
201 typename Entity_map_type::const_iterator element_it =
207 return element_it->second->entity();
227 K
key(schema_name, entity_name);
230 typename Entity_map_type::const_iterator element_it =
236 return element_it->second->property_ptr();
261 while (it !=
end()) {
262 if ((*it)->property() == property)
break;
286 if (current ==
end())
return current;
304 if (current ==
end())
return current;
306 while (++current !=
end())
307 if ((*current)->property() == property)
break;
368 return "DDSE_PRIVATE";
370 return "DDSE_PROTECTED";
383 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE;
387 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE;
390 return ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE;
476 return "INFORMATION_SCHEMA";
478 return "NON_DD_BASED_INFORMATION_SCHEMA";
554 return "PREDEFINED_DDSE";
Class to hold information regarding a predefined tablespace created by a storage engine.
Definition: plugin_table.h:129
Class to wrap an entity object.
Definition: system_registry.h:64
Entity_element(const K &key, const T *entity, const P property)
Definition: system_registry.h:71
const P m_property
Property of some kind, like an enumeration.
Definition: system_registry.h:68
const P property() const
Definition: system_registry.h:83
const P * property_ptr() const
Definition: system_registry.h:85
~Entity_element()
Definition: system_registry.h:74
const K m_key
The key associated with the entity object.
Definition: system_registry.h:66
const T * m_entity
Entity object pointer, like an Object_table instance.
Definition: system_registry.h:67
const K & key() const
Definition: system_registry.h:79
const T * entity() const
Definition: system_registry.h:81
void dump() const
Definition: system_registry.h:88
Class to represent collections of meta data for entities.
Definition: system_registry.h:120
Entity_map_type m_entity_map
Map for direct key based lookup.
Definition: system_registry.h:127
std::map< K, Entity_element_type * > Entity_map_type
Definition: system_registry.h:124
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:194
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:223
Const_iterator end() const
Get the end of the vector of ordered inserts.
Definition: system_registry.h:276
std::vector< Entity_element_type * > Entity_list_type
Definition: system_registry.h:123
Entity_list_type m_entity_list
List for ordered access.
Definition: system_registry.h:126
Entity_list_type::const_iterator Const_iterator
Definition: system_registry.h:131
void dump() const
Definition: system_registry.h:313
Const_iterator next(Const_iterator current, P property) const
Get the next element in the list of ordered inserts.
Definition: system_registry.h:303
Entity_element< K, T, P, F, D > Entity_element_type
Definition: system_registry.h:122
Const_iterator begin(P property) const
Get the first element with a certain property.
Definition: system_registry.h:259
Const_iterator next(Const_iterator current) const
Get the next element in the list of ordered inserts.
Definition: system_registry.h:285
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:163
Const_iterator begin() const
Get the beginning of the vector of ordered inserts.
Definition: system_registry.h:246
~Entity_registry()
Delete the heap memory owned by the entity registry.
Definition: system_registry.h:142
This class represents all data dictionary table like mysql.tables, mysql.columns and more.
Definition: object_table.h:72
Class used to represent the dictionary tables.
Definition: system_registry.h:332
void dump() const
Definition: system_registry.h:440
Const_iterator begin(Types type) const
Definition: system_registry.h:431
static int type_name_error_code(Types type)
Definition: system_registry.h:381
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:398
System_table_registry_type m_registry
Definition: system_registry.h:399
const Object_table * find_table(const String_type &schema_name, const String_type &table_name) const
Definition: system_registry.h:418
static System_tables * instance()
Definition: system_registry.cc:132
static const char * type_name(Types type)
Definition: system_registry.h:359
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:435
System_table_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:403
void add_remaining_dd_tables()
Definition: system_registry.cc:165
Const_iterator end() const
Definition: system_registry.h:433
const Types * find_type(const String_type &schema_name, const String_type &table_name) const
Definition: system_registry.h:424
void add(const String_type &schema_name, const String_type &table_name, Types type, const Object_table *table)
Definition: system_registry.h:412
void add_inert_dd_tables()
Definition: system_registry.cc:151
Const_iterator begin() const
Definition: system_registry.h:429
Types
Definition: system_registry.h:348
Class used to represent the system tablespaces.
Definition: system_registry.h:540
static const char * type_name(Types type)
Definition: system_registry.h:549
const Plugin_tablespace * find(const String_type &tablespace_name) const
Definition: system_registry.h:581
Types
Definition: system_registry.h:543
void add(const String_type &tablespace_name, Types type, const Plugin_tablespace *space)
Definition: system_registry.h:575
Const_iterator begin(Types type) const
Definition: system_registry.h:587
void dump() const
Definition: system_registry.h:596
Const_iterator begin() const
Definition: system_registry.h:585
System_tablespace_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:570
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:591
Const_iterator end() const
Definition: system_registry.h:589
System_tablespace_registry_type m_registry
Definition: system_registry.h:566
static System_tablespaces * instance()
Definition: system_registry.cc:142
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:565
Class used to represent the system views.
Definition: system_registry.h:457
Types
Definition: system_registry.h:470
@ NON_DD_BASED_INFORMATION_SCHEMA
Const_iterator begin() const
Definition: system_registry.h:514
void dump() const
Definition: system_registry.h:525
System_view_registry_type m_registry
Definition: system_registry.h:491
Const_iterator end() const
Definition: system_registry.h:518
Const_iterator begin(Types type) const
Definition: system_registry.h:516
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:490
Const_iterator next(Const_iterator current, Types type) const
Definition: system_registry.h:520
static const char * type_name(Types type)
Definition: system_registry.h:473
void add(const String_type &schema_name, const String_type &view_name, Types type, const system_views::System_view *view)
Definition: system_registry.h:503
static System_views * instance()
Definition: system_registry.cc:137
void init()
Definition: system_registry.cc:260
const system_views::System_view * find(const String_type &schema_name, const String_type &view_name) const
Definition: system_registry.h:509
System_view_registry_type::Const_iterator Const_iterator
Definition: system_registry.h:495
This class represents base class for all INFORMATION_SCHEMA system views defined in sql/dd/impl/syste...
Definition: system_view.h:39
#define P
Definition: dtoa.cc:613
uint16_t value_type
Definition: vt100.h:184
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
const char * table_name
Definition: rules_table_service.cc:56
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required string type
Definition: replication_group_member_actions.proto:34