MySQL 8.0.30
Source Code Documentation
persistent_dynamic_loader.cc File Reference
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include <atomic>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "m_ctype.h"
#include "m_string.h"
#include "mutex_lock.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_loglevel.h"
#include "my_macros.h"
#include "my_sys.h"
#include "mysql/components/service_implementation.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/components/services/bits/psi_mutex_bits.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/components/services/log_shared.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysqld_error.h"
#include "persistent_dynamic_loader_imp.h"
#include "scope_guard.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/debug_sync.h"
#include "sql/derror.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/iterators/row_iterator.h"
#include "sql/key.h"
#include "sql/mysqld.h"
#include "sql/sql_base.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_executor.h"
#include "sql/table.h"
#include "sql/thd_raii.h"
#include "sql/transaction.h"
#include "sql_string.h"
#include "thr_lock.h"
#include "thr_mutex.h"

Classes

class  Component_db_intact
 

Typedefs

typedef std::string my_string
 

Enumerations

enum  enum_component_table_field { CT_FIELD_COMPONENT_ID = 0 , CT_FIELD_GROUP_ID , CT_FIELD_COMPONENT_URN , CT_FIELD_COUNT }
 

Functions

static bool open_component_table (THD *thd, enum thr_lock_type lock_type, TABLE **table, ulong acl_to_check)
 Open mysql.component table for read or write. More...
 
bool persistent_dynamic_loader_init (void *thd)
 Initializes persistence store, loads all groups of components registered in component table. More...
 
void persistent_dynamic_loader_deinit ()
 

Variables

const mysql_service_dynamic_loader_tdynamic_loader_srv
 
static const TABLE_FIELD_TYPE component_table_fields [CT_FIELD_COUNT]
 
static const TABLE_FIELD_DEF component_table_def
 
static Component_db_intact table_intact
 In case of an error, a message is printed to the error log. More...
 

Typedef Documentation

◆ my_string

typedef std::string my_string

Enumeration Type Documentation

◆ enum_component_table_field

Enumerator
CT_FIELD_COMPONENT_ID 
CT_FIELD_GROUP_ID 
CT_FIELD_COMPONENT_URN 
CT_FIELD_COUNT 

Function Documentation

◆ open_component_table()

static bool open_component_table ( THD thd,
enum thr_lock_type  lock_type,
TABLE **  table,
ulong  acl_to_check 
)
static

Open mysql.component table for read or write.

Note that if the table can't be locked successfully this operation will close it. Therefore it provides guarantee that it either opens and locks table or fails without leaving any tables open.

Parameters
thdThread context
lock_typeHow to lock the table
[out]tablePointer to table structure to store the open table into.
acl_to_checkacl type to check
Returns
Status of performed operation
Return values
trueopen and lock failed - an error message is pushed into the stack.
falsesuccess

◆ persistent_dynamic_loader_deinit()

void persistent_dynamic_loader_deinit ( )

◆ persistent_dynamic_loader_init()

bool persistent_dynamic_loader_init ( void *  thd)

Initializes persistence store, loads all groups of components registered in component table.

Parameters
thdCurrent thread execution context
Returns
Status of performed operation
Return values
falsesuccess
truefailure

Variable Documentation

◆ component_table_def

const TABLE_FIELD_DEF component_table_def
static
Initial value:
static const TABLE_FIELD_TYPE component_table_fields[CT_FIELD_COUNT]
Definition: persistent_dynamic_loader.cc:88
@ CT_FIELD_COUNT
Definition: persistent_dynamic_loader.cc:85

◆ component_table_fields

const TABLE_FIELD_TYPE component_table_fields[CT_FIELD_COUNT]
static
Initial value:
= {
{{STRING_WITH_LEN("component_id")}, {STRING_WITH_LEN("int")}, {nullptr, 0}},
{{STRING_WITH_LEN("component_group_id")},
{STRING_WITH_LEN("int")},
{nullptr, 0}},
{{STRING_WITH_LEN("component_urn")},
{STRING_WITH_LEN("text")},
{STRING_WITH_LEN("utf8mb3")}}}
#define STRING_WITH_LEN(X)
Definition: m_string.h:314

◆ dynamic_loader_srv

const mysql_service_dynamic_loader_t* dynamic_loader_srv

◆ table_intact

Component_db_intact table_intact
static

In case of an error, a message is printed to the error log.