![]() |
MySQL 9.5.0
Source Code Documentation
|
#include "connection_control.h"#include <mysql/components/service_implementation.h>#include <mysql/components/services/bits/psi_memory_bits.h>#include <mysql/components/services/connection_control_pfs.h>#include <mysql/components/services/log_builtins.h>#include <mysql/components/services/mysql_cond.h>#include <mysql/components/services/mysql_mutex.h>#include <mysql/components/services/psi_memory.h>#include <mysqld_error.h>#include <template_utils.h>#include "connection_control_coordinator.h"#include "connection_control_memory.h"#include "connection_control_pfs_table.h"#include "connection_delay.h"#include "connection_delay_api.h"#include "failed_attempts_list_imp.h"#include "option_usage.h"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_status_variable (int var_index, SHOW_VAR *var, char *buff) |
| Helper function to display value for status variable defined by its index within the array of all status variables. 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 | show_exempted_users (MYSQL_THD thd, SHOW_VAR *var, char *buff) |
| Function to display value for status variable : Component_connection_control_exempted_unknown_users. More... | |
| static void | update_exempt_unknown_users (MYSQL_THD thd, SYS_VAR *var, void *var_ptr, const void *save) |
| 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 (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 (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 () | |
|
static |
check() function for connection_control_failed_connections_threshold
Check whether new value is within valid bounds or not.
| thd | Not used. |
| var | Not used. |
| save | Pointer to which new value to be saved. |
| value | New value for the option. |
| 0 | Value is ok |
| 1 | Value is not within valid bounds |
|
static |
check() function for connection_control_max_connection_delay
Check whether new value is within valid bounds or not.
| thd | Not used. |
| var | Not used. |
| save | Pointer to which new value to be saved. |
| value | New value for the option. |
| 0 | Value is ok |
| 1 | Value is not within valid bounds |
|
static |
check() function for connection_control_min_connection_delay
Check whether new value is within valid bounds or not.
| thd | Not used. |
| var | Not used. |
| save | Not used. |
| value | New value for the option. |
| 0 | Value is ok |
| 1 | Value is not within valid bounds |
|
static |
Component deinitialization.
|
static |
Component initialization function.
| 0 | Success |
| 1 | Failure |
| END_COMPONENT_METADATA | ( | ) |
| END_COMPONENT_PROVIDES | ( | ) |
| END_COMPONENT_REQUIRES | ( | ) |
| IMPLEMENTS_SERVICE_EVENT_TRACKING_CONNECTION | ( | connection_control | ) |
|
static |
logger services initialization method for Component used when loading the Component.
| METADATA | ( | "connection_control_service" | , |
| "1" | |||
| ) |
| METADATA | ( | "mysql.author" | , |
| "Oracle Corporation" | |||
| ) |
| METADATA | ( | "mysql.license" | , |
| "GPL" | |||
| ) |
| PROVIDES_SERVICE_EVENT_TRACKING_CONNECTION | ( | connection_control | ) |
|
static |
|
static |
|
static |
| REQUIRES_SERVICE | ( | component_sys_variable_register | ) |
| REQUIRES_SERVICE | ( | component_sys_variable_unregister | ) |
| REQUIRES_SERVICE | ( | log_builtins | ) |
| REQUIRES_SERVICE | ( | log_builtins_string | ) |
| REQUIRES_SERVICE | ( | mysql_current_thread_reader | ) |
| REQUIRES_SERVICE | ( | mysql_security_context_options | ) |
| REQUIRES_SERVICE | ( | mysql_thd_security_context | ) |
| REQUIRES_SERVICE | ( | pfs_plugin_column_integer_v1 | ) |
| REQUIRES_SERVICE | ( | pfs_plugin_column_string_v2 | ) |
| REQUIRES_SERVICE | ( | pfs_plugin_table_v1 | ) |
| REQUIRES_SERVICE | ( | registry_registration | ) |
| REQUIRES_SERVICE | ( | status_variable_registration | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | component_sys_variable_register | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | component_sys_variable_unregister | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins_string | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_current_thread_reader | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_security_context_options | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_thd_security_context | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | pfs_plugin_column_integer_v1 | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | pfs_plugin_column_string_v2 | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | pfs_plugin_table_v1 | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | registry_registration | ) |
| REQUIRES_SERVICE_PLACEHOLDER | ( | status_variable_registration | ) |
Function to display value for status variable : Connection_control_delay_generated.
| thd | MYSQL_THD handle. Unused. |
| var | Status variable structure |
| buff | Value buffer. |
Function to display value for status variable : Component_connection_control_exempted_unknown_users.
| thd | MYSQL_THD handle. Unused. |
| var | Status variable structure |
| buff | Value buffer. |
|
static |
Helper function to display value for status variable defined by its index within the array of all status variables.
| var_index | Status variable index. |
| var | Status variable structure |
| buff | Value buffer. |
|
static |
|
static |
|
static |
|
static |
update() function for connection_control_failed_connections_threshold
Updates g_connection_event_coordinator with new value. Also notifies observers about the update.
| thd | Not used. |
| var | Not used. |
| var_ptr | Variable information |
| save | New value for connection_control_failed_connections_threshold |
|
static |
update() function for connection_control_max_connection_delay
Updates g_connection_event_coordinator with new value. Also notifies observers about the update.
| thd | Not used. |
| var | Not used. |
| var_ptr | Variable information |
| save | New value for connection_control_max_connection_delay |
|
static |
update() function for connection_control_min_connection_delay
Updates g_connection_event_coordinator with new value. Also notifies observers about the update.
| thd | Not used. |
| var | Not used. |
| var_ptr | Variable information |
| save | New value for connection_control_min_connection_delay |
|
static |
|
static |
|
static |
|
static |
|
static |
| connection_control::Failed_attempts_list_imp g_failed_attempts_list |
| Connection_control_statistics g_statistics |
| Connection_control_variables g_variables |
| PSI_memory_key key_connection_delay_memory = PSI_NOT_INSTRUMENTED |
| PSI_mutex_key key_connection_delay_mutex = PSI_NOT_INSTRUMENTED |
| PSI_cond_key key_connection_delay_wait = PSI_NOT_INSTRUMENTED |
| PSI_rwlock_key key_connection_event_delay_lock = PSI_NOT_INSTRUMENTED |
| const mysql_service_log_builtins_t* log_bi = nullptr |
| const mysql_service_log_builtins_string_t* log_bs = nullptr |
| mysql_component_t mysql_component_connection_control |
| REQUIRES_MYSQL_COND_SERVICE |
| REQUIRES_MYSQL_COND_SERVICE_PLACEHOLDER |
| REQUIRES_MYSQL_MUTEX_SERVICE |
| REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER |
| REQUIRES_MYSQL_RWLOCK_SERVICE |
| REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER |
| REQUIRES_PSI_MEMORY_SERVICE |
| REQUIRES_PSI_MEMORY_SERVICE_PLACEHOLDER |