MySQL 9.0.0
Source Code Documentation
terminology_use_previous.cc File Reference
#include "storage/perfschema/terminology_use_previous.h"
#include <string>
#include <unordered_map>
#include <vector>
#include "include/my_base.h"
#include "my_dbug.h"
#include "sql/sql_class.h"
#include "storage/perfschema/pfs_instr_class.h"

Namespaces

namespace  terminology_use_previous
 In respect to the organization of modules, this really belongs in terminology_use_previous.h.
 

Typedefs

using str_map_t = std::unordered_map< std::string, const char * >
 
using class_map_t = std::unordered_map< PFS_class_type, str_map_t >
 
using version_vector_t = std::vector< class_map_t >
 

Functions

compatible_name_t terminology_use_previous::lookup (PFS_class_type class_type, const std::string &str, bool use_prefix=true)
 For a given PFS_class_type, and a name within that class, return the version-dependent alias for that name. More...
 
bool terminology_use_previous::is_older_required (enum_compatibility_version version)
 Checks the session variable @session.terminology_use_previous, to determine whether an instrumented object that was renamed in the given version should use the old name. More...
 

Variables

static str_map_t mutex_map_8_0_26
 Maps that describe the name changes enabled by setting terminology_use_previous. More...
 
static str_map_t rwlock_map_8_0_26
 
static str_map_t cond_map_8_0_26
 
static str_map_t memory_map_8_0_26
 
static str_map_t thread_map_8_0_26
 
static str_map_t stage_map_8_0_26
 
static str_map_t thread_command_map_8_0_26
 
static class_map_t class_map_8_0_26
 
static version_vector_t version_vector
 

Typedef Documentation

◆ class_map_t

using class_map_t = std::unordered_map<PFS_class_type, str_map_t>

◆ str_map_t

using str_map_t = std::unordered_map<std::string, const char *>

◆ version_vector_t

using version_vector_t = std::vector<class_map_t>

Variable Documentation

◆ class_map_8_0_26

class_map_t class_map_8_0_26
static
Initial value:
= {
}
@ PFS_CLASS_MUTEX
Definition: pfs_instr_class.h:115
@ PFS_CLASS_STAGE
Definition: pfs_instr_class.h:120
@ PFS_CLASS_RWLOCK
Definition: pfs_instr_class.h:116
@ PFS_CLASS_COND
Definition: pfs_instr_class.h:117
@ PFS_CLASS_MEMORY
Definition: pfs_instr_class.h:127
@ PFS_CLASS_THREAD
Definition: pfs_instr_class.h:130
@ PFS_CLASS_STATEMENT
Definition: pfs_instr_class.h:121
static str_map_t thread_map_8_0_26
Definition: terminology_use_previous.cc:124
static str_map_t rwlock_map_8_0_26
Definition: terminology_use_previous.cc:89
static str_map_t stage_map_8_0_26
Definition: terminology_use_previous.cc:130
static str_map_t memory_map_8_0_26
Definition: terminology_use_previous.cc:112
static str_map_t cond_map_8_0_26
Definition: terminology_use_previous.cc:94
static str_map_t thread_command_map_8_0_26
Definition: terminology_use_previous.cc:181
static str_map_t mutex_map_8_0_26
Maps that describe the name changes enabled by setting terminology_use_previous.
Definition: terminology_use_previous.cc:62

◆ cond_map_8_0_26

str_map_t cond_map_8_0_26
static
Initial value:
= {
{"wait/synch/cond/sql/Relay_log_info::replica_worker_hash_cond",
"wait/synch/cond/sql/Relay_log_info::slave_worker_hash_lock"},
{"wait/synch/cond/sql/Source_info::data_cond",
"wait/synch/cond/sql/Master_info::data_cond"},
{"wait/synch/cond/sql/Source_info::start_cond",
"wait/synch/cond/sql/Master_info::start_cond"},
{"wait/synch/cond/sql/Source_info::stop_cond",
"wait/synch/cond/sql/Master_info::stop_cond"},
{"wait/synch/cond/sql/Source_info::sleep_cond",
"wait/synch/cond/sql/Master_info::sleep_cond"},
{"wait/synch/cond/sql/Source_info::rotate_cond",
"wait/synch/cond/sql/Master_info::rotate_cond"},
{"wait/synch/cond/sql/Relay_log_info::mta_gaq_cond",
"wait/synch/cond/sql/Relay_log_info::mts_gaq_cond"},
}

◆ memory_map_8_0_26

str_map_t memory_map_8_0_26
static
Initial value:
= {
{"memory/sql/Replica_job_group::group_relay_log_name",
"memory/sql/Slave_job_group::group_relay_log_name"},
{"memory/sql/rpl_replica::check_temp_dir",
"memory/sql/rpl_slave::check_temp_dir"},
{"memory/sql/REPLICA_INFO", "memory/sql/SLAVE_INFO"},
{"memory/sql/show_replica_status_io_gtid_set",
"memory/sql/show_slave_status_io_gtid_set"},
{"memory/sql/Relay_log_info::mta_coor",
"memory/sql/Relay_log_info::mts_coor"},
}

◆ mutex_map_8_0_26

str_map_t mutex_map_8_0_26
static
Initial value:
= {
{"wait/synch/mutex/sql/Source_info::data_lock",
"wait/synch/mutex/sql/Master_info::data_lock"},
{"wait/synch/mutex/sql/Source_info::run_lock",
"wait/synch/mutex/sql/Master_info::run_lock"},
{"wait/synch/mutex/sql/Source_info::sleep_lock",
"wait/synch/mutex/sql/Master_info::sleep_lock"},
{"wait/synch/mutex/sql/Source_info::info_thd_lock",
"wait/synch/mutex/sql/Master_info::info_thd_lock"},
{"wait/synch/mutex/sql/Source_info::rotate_lock",
"wait/synch/mutex/sql/Master_info::rotate_lock"},
{"wait/synch/mutex/sql/Replica_reporting_capability::err_lock",
"wait/synch/mutex/sql/Slave_reporting_capability::err_lock"},
{"wait/synch/mutex/sql/key_mta_temp_table_LOCK",
"wait/synch/mutex/sql/key_mts_temp_table_LOCK"},
{"wait/synch/mutex/sql/key_mta_gaq_LOCK",
"wait/synch/mutex/sql/key_mts_gaq_LOCK"},
{"wait/synch/mutex/sql/Relay_log_info::replica_worker_hash_lock",
"wait/synch/mutex/sql/Relay_log_info::slave_worker_hash_lock"},
{"wait/synch/mutex/sql/LOCK_replica_list",
"wait/synch/mutex/sql/LOCK_slave_list"},
{"wait/synch/mutex/sql/LOCK_replica_net_timeout",
"wait/synch/mutex/sql/LOCK_slave_net_timeout"},
{"wait/synch/mutex/sql/LOCK_sql_replica_skip_counter",
"wait/synch/mutex/sql/LOCK_sql_slave_skip_counter"},
}

Maps that describe the name changes enabled by setting terminology_use_previous.

The version_vector is a vector where each element holds information about names changed in a given server release. Each element of version_vector is a map where keys are the instrumentation class of type PFS_class_type, and the values are maps that hold information about the names changed for that class, within the given server release. In the latter map, the keys and values are strings, represented as std::string and const char *, respectively, where each key is the version of a name introduced in the given release and the corresponding value is the name that was used before that release.

When you add elements, note that you need to increment the number passed as argument in the call to plan() in main() in storage/perfschema/unittest/pfs-t.cc, by the number of added elements.

◆ rwlock_map_8_0_26

str_map_t rwlock_map_8_0_26
static
Initial value:
= {
{"wait/synch/rwlock/sql/LOCK_sys_init_replica",
"wait/synch/rwlock/sql/LOCK_sys_init_slave"},
}

◆ stage_map_8_0_26

str_map_t stage_map_8_0_26
static

◆ thread_command_map_8_0_26

str_map_t thread_command_map_8_0_26
static
Initial value:
= {
{"statement/com/Register Replica", "statement/com/Register Slave"}}

◆ thread_map_8_0_26

str_map_t thread_map_8_0_26
static
Initial value:
= {
{"thread/sql/replica_io", "thread/sql/slave_io"},
{"thread/sql/replica_sql", "thread/sql/slave_sql"},
{"thread/sql/replica_worker", "thread/sql/slave_worker"},
}

◆ version_vector

version_vector_t version_vector
static
Initial value:
= {
}
static class_map_t class_map_8_0_26
Definition: terminology_use_previous.cc:184