MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
connection_control.cc File Reference

Functions

static void register_instruments ()
 
static int check_failed_connections_threshold (MYSQL_THD thd, SYS_VAR *var, void *save, struct st_mysql_value *value)
 check() function for connection_control_failed_connections_threshold More...
 
static void update_failed_connections_threshold (MYSQL_THD thd, SYS_VAR *var, void *var_ptr, const void *save)
 update() function for connection_control_failed_connections_threshold More...
 
static int check_min_connection_delay (MYSQL_THD thd, SYS_VAR *var, void *save, struct st_mysql_value *value)
 check() function for connection_control_min_connection_delay More...
 
static void update_min_connection_delay (MYSQL_THD thd, SYS_VAR *var, void *var_ptr, const void *save)
 update() function for connection_control_min_connection_delay More...
 
static int check_max_connection_delay (MYSQL_THD thd, SYS_VAR *var, void *save, struct st_mysql_value *value)
 check() function for connection_control_max_connection_delay More...
 
static void update_max_connection_delay (MYSQL_THD thd, SYS_VAR *var, void *var_ptr, const void *save)
 update() function for connection_control_max_connection_delay More...
 
static int show_delay_generated (MYSQL_THD thd, SHOW_VAR *var, char *buff)
 Function to display value for status variable : Connection_control_delay_generated. More...
 
static int register_status_variables ()
 
static int register_system_variables ()
 
static int unregister_status_variables ()
 
static int unregister_system_variables ()
 
static void log_service_init ()
 logger services initialization method for Component used when loading the Component. More...
 
static mysql_service_status_t connection_control_init ()
 Component initialization function. More...
 
static mysql_service_status_t connection_control_deinit ()
 Component deinitialization. More...
 
 IMPLEMENTS_SERVICE_EVENT_TRACKING_CONNECTION (connection_control)
 
 PROVIDES_SERVICE_EVENT_TRACKING_CONNECTION (connection_control)
 
 END_COMPONENT_PROVIDES ()
 
 REQUIRES_SERVICE_PLACEHOLDER (pfs_plugin_column_string_v2)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_thd_security_context)
 
 REQUIRES_SERVICE_PLACEHOLDER (pfs_plugin_column_integer_v1)
 
 REQUIRES_SERVICE_PLACEHOLDER (pfs_plugin_table_v1)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_security_context_options)
 
 REQUIRES_SERVICE_PLACEHOLDER (log_builtins)
 
 REQUIRES_SERVICE_PLACEHOLDER (log_builtins_string)
 
 REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_register)
 
 REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_unregister)
 
 REQUIRES_SERVICE_PLACEHOLDER (status_variable_registration)
 
 REQUIRES_SERVICE_PLACEHOLDER (registry_registration)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (registry, mysql_service_registry_no_lock)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (registry_registration, mysql_service_registration_no_lock)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_current_thread_reader)
 
 REQUIRES_SERVICE (log_builtins)
 
 REQUIRES_SERVICE (log_builtins_string)
 
 REQUIRES_SERVICE (pfs_plugin_column_integer_v1)
 
 REQUIRES_SERVICE (pfs_plugin_table_v1)
 
 REQUIRES_SERVICE (pfs_plugin_column_string_v2)
 
 REQUIRES_SERVICE (registry_registration)
 
 REQUIRES_SERVICE_IMPLEMENTATION_AS (registry_registration, mysql_minimal_chassis_no_lock, mysql_service_registration_no_lock)
 
 REQUIRES_SERVICE_IMPLEMENTATION_AS (registry, mysql_minimal_chassis_no_lock, mysql_service_registry_no_lock)
 
 REQUIRES_SERVICE (component_sys_variable_register)
 
 REQUIRES_SERVICE (component_sys_variable_unregister)
 
 REQUIRES_SERVICE (status_variable_registration)
 
 REQUIRES_SERVICE (mysql_current_thread_reader)
 
 REQUIRES_SERVICE (mysql_thd_security_context)
 
 REQUIRES_SERVICE (mysql_security_context_options)
 
 END_COMPONENT_REQUIRES ()
 
 METADATA ("mysql.author", "Oracle Corporation")
 
 METADATA ("mysql.license", "GPL")
 
 METADATA ("connection_control_service", "1")
 
 END_COMPONENT_METADATA ()
 

Variables

const mysql_service_log_builtins_tlog_bi = nullptr
 
const mysql_service_log_builtins_string_tlog_bs = nullptr
 
Connection_control_statistics g_statistics
 
Connection_control_variables g_variables
 
connection_control::Failed_attempts_list_imp g_failed_attempts_list
 
static Connection_event_coordinatorg_connection_event_coordinator = nullptr
 
PSI_memory_key key_connection_delay_memory = PSI_NOT_INSTRUMENTED
 
static PSI_memory_info all_connection_delay_memory_info []
 
PSI_mutex_key key_connection_delay_mutex = PSI_NOT_INSTRUMENTED
 
static PSI_mutex_info all_connection_delay_mutex_info []
 
PSI_rwlock_key key_connection_event_delay_lock = PSI_NOT_INSTRUMENTED
 
static PSI_rwlock_info all_connection_delay_rwlock_info []
 
PSI_cond_key key_connection_delay_wait = PSI_NOT_INSTRUMENTED
 
static PSI_cond_info all_connection_delay_cond_info []
 
static SHOW_VAR component_connection_control_status_variables [STAT_LAST+1]
 
 REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER
 
 REQUIRES_MYSQL_COND_SERVICE_PLACEHOLDER
 
 REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER
 
 REQUIRES_PSI_MEMORY_SERVICE_PLACEHOLDER
 
 REQUIRES_MYSQL_MUTEX_SERVICE
 
 REQUIRES_MYSQL_RWLOCK_SERVICE
 
 REQUIRES_MYSQL_COND_SERVICE
 
 REQUIRES_PSI_MEMORY_SERVICE
 
mysql_component_t mysql_component_connection_control
 

Function Documentation

◆ check_failed_connections_threshold()

static int check_failed_connections_threshold ( MYSQL_THD  thd,
SYS_VAR var,
void *  save,
struct st_mysql_value value 
)
static

check() function for connection_control_failed_connections_threshold

Check whether new value is within valid bounds or not.

Parameters
thdNot used.
varNot used.
savePointer to which new value to be saved.
valueNew value for the option.
Returns
whether new value is within valid bounds or not.
Return values
0Value is ok
1Value is not within valid bounds

◆ check_max_connection_delay()

static int check_max_connection_delay ( MYSQL_THD  thd,
SYS_VAR var,
void *  save,
struct st_mysql_value value 
)
static

check() function for connection_control_max_connection_delay

Check whether new value is within valid bounds or not.

Parameters
thdNot used.
varNot used.
savePointer to which new value to be saved.
valueNew value for the option.
Returns
whether new value is within valid bounds or not.
Return values
0Value is ok
1Value is not within valid bounds

◆ check_min_connection_delay()

static int check_min_connection_delay ( MYSQL_THD  thd,
SYS_VAR var,
void *  save,
struct st_mysql_value value 
)
static

check() function for connection_control_min_connection_delay

Check whether new value is within valid bounds or not.

Parameters
thdNot used.
varNot used.
saveNot used.
valueNew value for the option.
Returns
whether new value is within valid bounds or not.
Return values
0Value is ok
1Value is not within valid bounds

◆ connection_control_deinit()

static mysql_service_status_t connection_control_deinit ( )
static

Component deinitialization.

Returns
success

◆ connection_control_init()

static mysql_service_status_t connection_control_init ( )
static

Component initialization function.

Returns
initialization status
Return values
0Success
1Failure

◆ END_COMPONENT_METADATA()

END_COMPONENT_METADATA ( )

◆ END_COMPONENT_PROVIDES()

END_COMPONENT_PROVIDES ( )

◆ END_COMPONENT_REQUIRES()

END_COMPONENT_REQUIRES ( )

◆ IMPLEMENTS_SERVICE_EVENT_TRACKING_CONNECTION()

IMPLEMENTS_SERVICE_EVENT_TRACKING_CONNECTION ( connection_control  )

◆ log_service_init()

static void log_service_init ( )
static

logger services initialization method for Component used when loading the Component.

◆ METADATA() [1/3]

METADATA ( "connection_control_service"  ,
"1"   
)

◆ METADATA() [2/3]

METADATA ( "mysql.author"  ,
"Oracle Corporation"   
)

◆ METADATA() [3/3]

METADATA ( "mysql.license"  ,
"GPL"   
)

◆ PROVIDES_SERVICE_EVENT_TRACKING_CONNECTION()

PROVIDES_SERVICE_EVENT_TRACKING_CONNECTION ( connection_control  )

◆ register_instruments()

static void register_instruments ( )
static

◆ register_status_variables()

static int register_status_variables ( )
static

◆ register_system_variables()

static int register_system_variables ( )
static

◆ REQUIRES_SERVICE() [1/12]

REQUIRES_SERVICE ( component_sys_variable_register  )

◆ REQUIRES_SERVICE() [2/12]

REQUIRES_SERVICE ( component_sys_variable_unregister  )

◆ REQUIRES_SERVICE() [3/12]

REQUIRES_SERVICE ( log_builtins  )

◆ REQUIRES_SERVICE() [4/12]

REQUIRES_SERVICE ( log_builtins_string  )

◆ REQUIRES_SERVICE() [5/12]

REQUIRES_SERVICE ( mysql_current_thread_reader  )

◆ REQUIRES_SERVICE() [6/12]

REQUIRES_SERVICE ( mysql_security_context_options  )

◆ REQUIRES_SERVICE() [7/12]

REQUIRES_SERVICE ( mysql_thd_security_context  )

◆ REQUIRES_SERVICE() [8/12]

REQUIRES_SERVICE ( pfs_plugin_column_integer_v1  )

◆ REQUIRES_SERVICE() [9/12]

REQUIRES_SERVICE ( pfs_plugin_column_string_v2  )

◆ REQUIRES_SERVICE() [10/12]

REQUIRES_SERVICE ( pfs_plugin_table_v1  )

◆ REQUIRES_SERVICE() [11/12]

REQUIRES_SERVICE ( registry_registration  )

◆ REQUIRES_SERVICE() [12/12]

REQUIRES_SERVICE ( status_variable_registration  )

◆ REQUIRES_SERVICE_IMPLEMENTATION_AS() [1/2]

REQUIRES_SERVICE_IMPLEMENTATION_AS ( registry  ,
mysql_minimal_chassis_no_lock  ,
mysql_service_registry_no_lock   
)

◆ REQUIRES_SERVICE_IMPLEMENTATION_AS() [2/2]

REQUIRES_SERVICE_IMPLEMENTATION_AS ( registry_registration  ,
mysql_minimal_chassis_no_lock  ,
mysql_service_registration_no_lock   
)

◆ REQUIRES_SERVICE_PLACEHOLDER() [1/12]

REQUIRES_SERVICE_PLACEHOLDER ( component_sys_variable_register  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [2/12]

REQUIRES_SERVICE_PLACEHOLDER ( component_sys_variable_unregister  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [3/12]

REQUIRES_SERVICE_PLACEHOLDER ( log_builtins  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [4/12]

REQUIRES_SERVICE_PLACEHOLDER ( log_builtins_string  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [5/12]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_current_thread_reader  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [6/12]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_security_context_options  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [7/12]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_thd_security_context  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [8/12]

REQUIRES_SERVICE_PLACEHOLDER ( pfs_plugin_column_integer_v1  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [9/12]

REQUIRES_SERVICE_PLACEHOLDER ( pfs_plugin_column_string_v2  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [10/12]

REQUIRES_SERVICE_PLACEHOLDER ( pfs_plugin_table_v1  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [11/12]

REQUIRES_SERVICE_PLACEHOLDER ( registry_registration  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [12/12]

REQUIRES_SERVICE_PLACEHOLDER ( status_variable_registration  )

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [1/2]

REQUIRES_SERVICE_PLACEHOLDER_AS ( registry  ,
mysql_service_registry_no_lock   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [2/2]

REQUIRES_SERVICE_PLACEHOLDER_AS ( registry_registration  ,
mysql_service_registration_no_lock   
)

◆ show_delay_generated()

static int show_delay_generated ( MYSQL_THD  thd,
SHOW_VAR var,
char *  buff 
)
static

Function to display value for status variable : Connection_control_delay_generated.

Parameters
thdMYSQL_THD handle. Unused.
varStatus variable structure
buffValue buffer.
Returns
Always returns success.

◆ unregister_status_variables()

static int unregister_status_variables ( )
static

◆ unregister_system_variables()

static int unregister_system_variables ( )
static

◆ update_failed_connections_threshold()

static void update_failed_connections_threshold ( MYSQL_THD  thd,
SYS_VAR var,
void *  var_ptr,
const void *  save 
)
static

update() function for connection_control_failed_connections_threshold

Updates g_connection_event_coordinator with new value. Also notifies observers about the update.

Parameters
thdNot used.
varNot used.
var_ptrVariable information
saveNew value for connection_control_failed_connections_threshold

◆ update_max_connection_delay()

static void update_max_connection_delay ( MYSQL_THD  thd,
SYS_VAR var,
void *  var_ptr,
const void *  save 
)
static

update() function for connection_control_max_connection_delay

Updates g_connection_event_coordinator with new value. Also notifies observers about the update.

Parameters
thdNot used.
varNot used.
var_ptrVariable information
saveNew value for connection_control_max_connection_delay

◆ update_min_connection_delay()

static void update_min_connection_delay ( MYSQL_THD  thd,
SYS_VAR var,
void *  var_ptr,
const void *  save 
)
static

update() function for connection_control_min_connection_delay

Updates g_connection_event_coordinator with new value. Also notifies observers about the update.

Parameters
thdNot used.
varNot used.
var_ptrVariable information
saveNew value for connection_control_min_connection_delay

Variable Documentation

◆ all_connection_delay_cond_info

PSI_cond_info all_connection_delay_cond_info[]
static
Initial value:
= {
{&key_connection_delay_wait, "connection_delay_wait_condition", 0, 0,
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
PSI_cond_key key_connection_delay_wait
Definition: connection_control.cc:73

◆ all_connection_delay_memory_info

PSI_memory_info all_connection_delay_memory_info[]
static
Initial value:
= {
"Memory allocated by connection_control component."}}
PSI_memory_key key_connection_delay_memory
Definition: connection_control.cc:55
#define PSI_VOLATILITY_UNKNOWN
Definition: psi_bits.h:153

◆ all_connection_delay_mutex_info

PSI_mutex_info all_connection_delay_mutex_info[]
static
Initial value:
= {
{&key_connection_delay_mutex, "connection_delay_mutex", 0, 0,
PSI_mutex_key key_connection_delay_mutex
Definition: connection_control.cc:61

◆ all_connection_delay_rwlock_info

PSI_rwlock_info all_connection_delay_rwlock_info[]
static
Initial value:
= {
{&key_connection_event_delay_lock, "connection_event_delay_lock",
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
PSI_rwlock_key key_connection_event_delay_lock
Definition: connection_control.cc:67

◆ component_connection_control_status_variables

SHOW_VAR component_connection_control_status_variables[STAT_LAST+1]
static
Initial value:
= {
{.name = "Component_connection_control_delay_generated",
.value = reinterpret_cast<char *>(&show_delay_generated),
.scope = SHOW_SCOPE_GLOBAL},
{.name = nullptr,
.value = nullptr,
.type = static_cast<enum_mysql_show_type>(0),
.scope = static_cast<enum_mysql_show_scope>(0)}}
static int show_delay_generated(MYSQL_THD thd, SHOW_VAR *var, char *buff)
Function to display value for status variable : Connection_control_delay_generated.
Definition: connection_control.cc:297
required string type
Definition: replication_group_member_actions.proto:34
enum_mysql_show_type
Declarations for SHOW STATUS support in plugins.
Definition: status_variables_bits.h:32
@ SHOW_FUNC
Definition: status_variables_bits.h:41
enum_mysql_show_scope
Status variable scope.
Definition: status_variables_bits.h:70
@ SHOW_SCOPE_GLOBAL
Definition: status_variables_bits.h:72

◆ g_connection_event_coordinator

Connection_event_coordinator* g_connection_event_coordinator = nullptr
static

◆ g_failed_attempts_list

◆ g_statistics

◆ g_variables

◆ key_connection_delay_memory

PSI_memory_key key_connection_delay_memory = PSI_NOT_INSTRUMENTED

◆ key_connection_delay_mutex

PSI_mutex_key key_connection_delay_mutex = PSI_NOT_INSTRUMENTED

◆ key_connection_delay_wait

PSI_cond_key key_connection_delay_wait = PSI_NOT_INSTRUMENTED

◆ key_connection_event_delay_lock

PSI_rwlock_key key_connection_event_delay_lock = PSI_NOT_INSTRUMENTED

◆ log_bi

◆ log_bs

◆ mysql_component_connection_control

mysql_component_t mysql_component_connection_control
Initial value:
= { "mysql:connection_control" , __connection_control_provides, __connection_control_requires, __connection_control_metadata,
static mysql_service_status_t connection_control_init()
Component initialization function.
Definition: connection_control.cc:447
static mysql_service_status_t connection_control_deinit()
Component deinitialization.
Definition: connection_control.cc:486

◆ REQUIRES_MYSQL_COND_SERVICE

REQUIRES_MYSQL_COND_SERVICE

◆ REQUIRES_MYSQL_COND_SERVICE_PLACEHOLDER

REQUIRES_MYSQL_COND_SERVICE_PLACEHOLDER

◆ REQUIRES_MYSQL_MUTEX_SERVICE

REQUIRES_MYSQL_MUTEX_SERVICE

◆ REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER

REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER

◆ REQUIRES_MYSQL_RWLOCK_SERVICE

REQUIRES_MYSQL_RWLOCK_SERVICE

◆ REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER

REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER

◆ REQUIRES_PSI_MEMORY_SERVICE

REQUIRES_PSI_MEMORY_SERVICE

◆ REQUIRES_PSI_MEMORY_SERVICE_PLACEHOLDER

REQUIRES_PSI_MEMORY_SERVICE_PLACEHOLDER