MySQL 8.4.2
Source Code Documentation
table_replication_connection_configuration.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2013, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24
25#ifndef TABLE_REPLICATION_CONFIGURATION_H
26#define TABLE_REPLICATION_CONFIGURATION_H
27
28/**
29 @file storage/perfschema/table_replication_connection_configuration.h
30 Table replication_connection_configuration (declarations).
31*/
32
33#include <sys/types.h>
34
35#include "compression.h" // COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE
36#include "my_base.h"
37#include "my_io.h"
38#include "mysql_com.h"
39#include "sql/rpl_info.h" /* CHANNEL_NAME_LENGTH*/
42
43class Field;
44class Master_info;
45class Plugin_table;
46struct TABLE;
47struct THR_LOCK;
48
49/**
50 @addtogroup performance_schema_tables
51 @{
52*/
53
54#ifndef ENUM_RPL_YES_NO
55#define ENUM_RPL_YES_NO
57#endif
58
59/** enum values for SSL_Allowed*/
64};
65
66/**
67 A row in the table. The fields with string values have an additional
68 length field denoted by <field_name>_length.
69*/
75 uint port;
110 /*
111 tls_ciphersuites = NULL means that TLS 1.3 default ciphersuites
112 are enabled. To allow a value that can either be NULL or a string,
113 it is represented by the pair:
114 first: true if tls_ciphersuites is set to NULL
115 second: the string value when first is false
116 */
117 std::pair<bool, std::string> tls_ciphersuites = {true, ""};
119 /*PS_RPL_NO if gtid_only is disabled, PS_RPL_YES if enabled */
121};
122
124 public:
126 : PFS_engine_index(&m_key), m_key("CHANNEL_NAME") {}
127
129
130 virtual bool match(Master_info *mi);
131
132 private:
134};
135
136/** Table PERFORMANCE_SCHEMA.TABLE_REPLICATION_CONNECTION_CONFIGURATION. */
139
140 private:
141 int make_row(Master_info *);
142
143 /** Table share lock. */
145 /** Table definition. */
147
148 /** Current row */
150 /** Current position. */
152 /** Next position. */
154
155 protected:
156 /**
157 Read the current row values.
158 @param table Table handle
159 @param buf row buffer
160 @param fields Table fields
161 @param read_all true if all columns are read.
162 */
163
164 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
165 bool read_all) override;
166
168
169 public:
171
172 /** Table share. */
175 static ha_rows get_row_count();
176 void reset_position() override;
177
178 int rnd_next() override;
179 int rnd_pos(const void *pos) override;
180
181 int index_init(uint idx, bool sorted) override;
182 int index_next() override;
183
184 private:
186};
187
188/** @} */
189#endif
Definition: field.h:575
Definition: rpl_mi.h:87
Definition: pfs_engine_table.h:300
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_replication_connection_configuration.h:123
~PFS_index_rpl_connection_config() override=default
PFS_key_name m_key
Definition: table_replication_connection_configuration.h:133
PFS_index_rpl_connection_config()
Definition: table_replication_connection_configuration.h:125
virtual bool match(Master_info *mi)
Definition: table_replication_connection_configuration.cc:110
Definition: table_helper.h:1554
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.TABLE_REPLICATION_CONNECTION_CONFIGURATION.
Definition: table_replication_connection_configuration.h:137
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_connection_configuration.h:144
static ha_rows get_row_count()
Definition: table_replication_connection_configuration.cc:144
PFS_simple_index pos_t
Definition: table_replication_connection_configuration.h:138
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_connection_configuration.h:173
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_connection_configuration.cc:152
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_connection_configuration.cc:139
table_replication_connection_configuration()
Definition: table_replication_connection_configuration.cc:133
int make_row(Master_info *)
Definition: table_replication_connection_configuration.cc:226
pos_t m_next_pos
Next position.
Definition: table_replication_connection_configuration.h:153
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_connection_configuration.cc:127
pos_t m_pos
Current position.
Definition: table_replication_connection_configuration.h:151
static Plugin_table m_table_def
Table definition.
Definition: table_replication_connection_configuration.h:146
int index_next() override
Find key in index, read record.
Definition: table_replication_connection_configuration.cc:201
int index_init(uint idx, bool sorted) override
Definition: table_replication_connection_configuration.cc:190
PFS_index_rpl_connection_config * m_opened_index
Definition: table_replication_connection_configuration.h:185
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_connection_configuration.cc:171
st_row_connect_config m_row
Current row.
Definition: table_replication_connection_configuration.h:149
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_replication_connection_configuration.cc:337
#define COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE
Definition: compression.h:42
enum_ssl_allowed
enum values for SSL_Allowed
Definition: table_replication_connection_configuration.h:60
@ PS_RPL_NO
Definition: table_replication_connection_configuration.h:56
@ PS_RPL_YES
Definition: table_replication_connection_configuration.h:56
@ PS_SSL_ALLOWED_NO
Definition: table_replication_connection_configuration.h:62
@ PS_SSL_ALLOWED_YES
Definition: table_replication_connection_configuration.h:61
@ PS_SSL_ALLOWED_IGNORED
Definition: table_replication_connection_configuration.h:63
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:43
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Common definition between mysql server & client.
#define NAME_LEN
Definition: mysql_com.h:67
#define USERNAME_LENGTH
Definition: mysql_com.h:69
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Performance schema tables (declarations).
#define CHANNEL_NAME_LENGTH
Definition: rpl_info.h:41
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:358
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:566
Definition: table.h:1406
Definition: thr_lock.h:139
A row in the table.
Definition: table_replication_connection_configuration.h:70
uint connection_retry_interval
Definition: table_replication_connection_configuration.h:97
ulong connection_retry_count
Definition: table_replication_connection_configuration.h:98
enum_rpl_yes_no gtid_only
Definition: table_replication_connection_configuration.h:120
uint ssl_ca_file_length
Definition: table_replication_connection_configuration.h:83
enum_rpl_yes_no ssl_verify_server_certificate
Definition: table_replication_connection_configuration.h:92
char ssl_ca_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:84
uint ssl_key_length
Definition: table_replication_connection_configuration.h:91
char host[HOSTNAME_LENGTH]
Definition: table_replication_connection_configuration.h:73
char user[USERNAME_LENGTH]
Definition: table_replication_connection_configuration.h:76
char ssl_cipher[FN_REFLEN]
Definition: table_replication_connection_configuration.h:88
char ssl_key[FN_REFLEN]
Definition: table_replication_connection_configuration.h:90
char ssl_certificate[FN_REFLEN]
Definition: table_replication_connection_configuration.h:86
uint ssl_cipher_length
Definition: table_replication_connection_configuration.h:89
uint network_interface_length
Definition: table_replication_connection_configuration.h:79
uint channel_name_length
Definition: table_replication_connection_configuration.h:72
uint zstd_compression_level
Definition: table_replication_connection_configuration.h:109
char ssl_crl_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:95
double heartbeat_interval
Definition: table_replication_connection_configuration.h:99
char ssl_ca_file[FN_REFLEN]
Definition: table_replication_connection_configuration.h:82
uint ssl_certificate_length
Definition: table_replication_connection_configuration.h:87
char tls_version[FN_REFLEN]
Definition: table_replication_connection_configuration.h:100
char network_interface[HOSTNAME_LENGTH]
Definition: table_replication_connection_configuration.h:78
char compression_algorithm[COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE]
Definition: table_replication_connection_configuration.h:107
uint host_length
Definition: table_replication_connection_configuration.h:74
char public_key_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:102
std::pair< bool, std::string > tls_ciphersuites
Definition: table_replication_connection_configuration.h:117
uint compression_algorithm_length
Definition: table_replication_connection_configuration.h:108
enum_rpl_yes_no source_connection_auto_failover
Definition: table_replication_connection_configuration.h:118
uint public_key_path_length
Definition: table_replication_connection_configuration.h:103
uint ssl_crl_path_length
Definition: table_replication_connection_configuration.h:96
uint ssl_crl_file_length
Definition: table_replication_connection_configuration.h:94
enum_ssl_allowed ssl_allowed
Definition: table_replication_connection_configuration.h:81
char ssl_crl_file[FN_REFLEN]
Definition: table_replication_connection_configuration.h:93
uint network_namespace_length
Definition: table_replication_connection_configuration.h:106
uint port
Definition: table_replication_connection_configuration.h:75
uint user_length
Definition: table_replication_connection_configuration.h:77
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_connection_configuration.h:71
uint ssl_ca_path_length
Definition: table_replication_connection_configuration.h:85
enum_rpl_yes_no get_public_key
Definition: table_replication_connection_configuration.h:104
uint tls_version_length
Definition: table_replication_connection_configuration.h:101
enum_rpl_yes_no auto_position
Definition: table_replication_connection_configuration.h:80
char network_namespace[NAME_LEN]
Definition: table_replication_connection_configuration.h:105
Helpers to implement a performance schema table.
enum_rpl_yes_no
Definition: table_replication_applier_configuration.h:50