MySQL 9.3.0
Source Code Documentation
connection_control_data.h
Go to the documentation of this file.
1/* Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef CONNECTION_CONTROL_DATA_H
25#define CONNECTION_CONTROL_DATA_H
26
27#include <atomic>
28
29#include <my_inttypes.h>
30
31/**
32 Enum for system variables : Must be in sync with
33 members of Connection_control_variables.
34*/
39 OPT_LAST /* Must be last */
41
42/**
43 Enum for status variables : Must be in sync with
44 members of Connection_control_statistics.
45*/
49 STAT_LAST /* Must be last */
51
52namespace connection_control {
53/** Structure to maintain system variables */
55 public:
56 /* Various global variables */
60};
61
62/** Structure to maintain statistics */
64 public:
66 /* Various statistics to be collected */
67 std::atomic<int64> stats_array[STAT_LAST];
68};
69} // namespace connection_control
70
73#endif // !CONNECTION_CONTROL_DATA_H
Structure to maintain statistics.
Definition: connection_control_data.h:63
std::atomic< int64 > stats_array[STAT_LAST]
Definition: connection_control_data.h:67
Structure to maintain system variables.
Definition: connection_control_data.h:54
long long min_connection_delay
Definition: connection_control_data.h:58
long long failed_connections_threshold
Definition: connection_control_data.h:57
long long max_connection_delay
Definition: connection_control_data.h:59
connection_control::Connection_control_statistics g_statistics
Definition: connection_control.cc:48
connection_control::Connection_control_variables g_variables
Definition: connection_control.cc:49
opt_connection_control
Enum for system variables : Must be in sync with members of Connection_control_variables.
Definition: connection_control_data.h:35
@ OPT_MIN_CONNECTION_DELAY
Definition: connection_control_data.h:37
@ OPT_LAST
Definition: connection_control_data.h:39
@ OPT_FAILED_CONNECTIONS_THRESHOLD
Definition: connection_control_data.h:36
@ OPT_MAX_CONNECTION_DELAY
Definition: connection_control_data.h:38
stats_connection_control
Enum for status variables : Must be in sync with members of Connection_control_statistics.
Definition: connection_control_data.h:46
@ STAT_OPTION_USAGE
Definition: connection_control_data.h:48
@ STAT_LAST
Definition: connection_control_data.h:49
@ STAT_CONNECTION_DELAY_TRIGGERED
Definition: connection_control_data.h:47
Some integer typedefs for easier portability.
Definition: connection_control.h:70