MySQL 9.1.0
Source Code Documentation
|
#include "sql/sql_servers.h"
#include <stdlib.h>
#include <string.h>
#include <atomic>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include "m_string.h"
#include "map_helpers.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "my_psi_config.h"
#include "my_sys.h"
#include "mysql/components/services/bits/mysql_rwlock_bits.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/components/services/bits/psi_memory_bits.h"
#include "mysql/components/services/bits/psi_rwlock_bits.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/my_loglevel.h"
#include "mysql/psi/mysql_memory.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/psi/mysql_rwlock.h"
#include "mysql/strings/m_ctype.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/iterators/row_iterator.h"
#include "sql/psi_memory_key.h"
#include "sql/sql_backup_lock.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_executor.h"
#include "sql/sql_system_table_check.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/thd_raii.h"
#include "sql/thr_malloc.h"
#include "sql/transaction.h"
#include "string_with_len.h"
#include "thr_lock.h"
Enumerations | |
enum | enum_servers_table_field { SERVERS_FIELD_NAME = 0 , SERVERS_FIELD_HOST , SERVERS_FIELD_DB , SERVERS_FIELD_USERNAME , SERVERS_FIELD_PASSWORD , SERVERS_FIELD_PORT , SERVERS_FIELD_SOCKET , SERVERS_FIELD_SCHEME , SERVERS_FIELD_OWNER } |
This enum describes the structure of the mysql.servers table. More... | |
Functions | |
static bool | get_server_from_table_to_cache (TABLE *table) |
static void | init_servers_cache_psi_keys (void) |
bool | servers_init (THD *thd) |
static bool | servers_load (THD *thd, TABLE *table) |
bool | servers_reload (THD *thd) |
static bool | close_cached_connection_tables (THD *thd, const char *connection_string, size_t connection_length) |
Close all tables which match specified connection string or if specified string is NULL, then any table with a connection string. More... | |
static void | store_new_field (TABLE *table, enum_servers_table_field field, const LEX_STRING *val) |
Helper function for creating a record for inserting a new server into the mysql.servers table. More... | |
static void | store_updated_field (TABLE *table, enum_servers_table_field field, const char *existing_val, const LEX_STRING *new_val) |
Helper function for creating a record for updating an existing server in the mysql.servers table. More... | |
void | servers_free (bool end) |
static FOREIGN_SERVER * | clone_server (MEM_ROOT *mem, const FOREIGN_SERVER *server, FOREIGN_SERVER *buffer) |
FOREIGN_SERVER * | get_server_by_name (MEM_ROOT *mem, const char *server_name, FOREIGN_SERVER *buff) |
Variables | |
static collation_unordered_map< std::string, FOREIGN_SERVER * > * | servers_cache |
static MEM_ROOT | mem |
static mysql_rwlock_t | THR_LOCK_servers |
static const int | MYSQL_SERVERS_TABLE_FIELD_COUNT = 9 |
static const TABLE_FIELD_TYPE | mysql_servers_table_fields [MYSQL_SERVERS_TABLE_FIELD_COUNT] |
static const TABLE_FIELD_DEF | mysql_servers_table_def |
static PSI_rwlock_key | key_rwlock_THR_LOCK_servers |
static PSI_rwlock_info | all_servers_cache_rwlocks [] |
static PSI_memory_info | all_servers_cache_memory [] |
|
static |
|
static |
Close all tables which match specified connection string or if specified string is NULL, then any table with a connection string.
FOREIGN_SERVER * get_server_by_name | ( | MEM_ROOT * | mem, |
const char * | server_name, | ||
FOREIGN_SERVER * | buff | ||
) |
|
static |
|
static |
void servers_free | ( | bool | end | ) |
bool servers_init | ( | THD * | thd | ) |
bool servers_reload | ( | THD * | thd | ) |
|
inlinestatic |
Helper function for creating a record for inserting a new server into the mysql.servers table.
Set a field to the given parser string. If the parser string is empty, set the field to "" instead.
|
inlinestatic |
Helper function for creating a record for updating an existing server in the mysql.servers table.
Set a field to the given parser string unless the parser string is empty or equal to the existing value.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |