MySQL 8.3.0
Source Code Documentation
table_replication_connection_configuration.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2013, 2023, 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 also distributed 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 included with MySQL.
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 TABLE_REPLICATION_CONFIGURATION_H
25#define TABLE_REPLICATION_CONFIGURATION_H
26
27/**
28 @file storage/perfschema/table_replication_connection_configuration.h
29 Table replication_connection_configuration (declarations).
30*/
31
32#include <sys/types.h>
33
34#include "compression.h" // COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE
35#include "my_base.h"
36#include "my_io.h"
37#include "mysql_com.h"
38#include "sql/rpl_info.h" /* CHANNEL_NAME_LENGTH*/
41
42class Field;
43class Master_info;
44class Plugin_table;
45struct TABLE;
46struct THR_LOCK;
47
48/**
49 @addtogroup performance_schema_tables
50 @{
51*/
52
53#ifndef ENUM_RPL_YES_NO
54#define ENUM_RPL_YES_NO
56#endif
57
58/** enum values for SSL_Allowed*/
63};
64
65/**
66 A row in the table. The fields with string values have an additional
67 length field denoted by <field_name>_length.
68*/
74 uint port;
109 /*
110 tls_ciphersuites = NULL means that TLS 1.3 default ciphersuites
111 are enabled. To allow a value that can either be NULL or a string,
112 it is represented by the pair:
113 first: true if tls_ciphersuites is set to NULL
114 second: the string value when first is false
115 */
116 std::pair<bool, std::string> tls_ciphersuites = {true, ""};
118 /*PS_RPL_NO if gtid_only is disabled, PS_RPL_YES if enabled */
120};
121
123 public:
125 : PFS_engine_index(&m_key), m_key("CHANNEL_NAME") {}
126
128
129 virtual bool match(Master_info *mi);
130
131 private:
133};
134
135/** Table PERFORMANCE_SCHEMA.TABLE_REPLICATION_CONNECTION_CONFIGURATION. */
138
139 private:
140 int make_row(Master_info *);
141
142 /** Table share lock. */
144 /** Table definition. */
146
147 /** Current row */
149 /** Current position. */
151 /** Next position. */
153
154 protected:
155 /**
156 Read the current row values.
157 @param table Table handle
158 @param buf row buffer
159 @param fields Table fields
160 @param read_all true if all columns are read.
161 */
162
163 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
164 bool read_all) override;
165
167
168 public:
170
171 /** Table share. */
174 static ha_rows get_row_count();
175 void reset_position() override;
176
177 int rnd_next() override;
178 int rnd_pos(const void *pos) override;
179
180 int index_init(uint idx, bool sorted) override;
181 int index_next() override;
182
183 private:
185};
186
187/** @} */
188#endif
Definition: field.h:574
Definition: rpl_mi.h:86
Definition: pfs_engine_table.h:299
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Definition: table_replication_connection_configuration.h:122
~PFS_index_rpl_connection_config() override=default
PFS_key_name m_key
Definition: table_replication_connection_configuration.h:132
PFS_index_rpl_connection_config()
Definition: table_replication_connection_configuration.h:124
virtual bool match(Master_info *mi)
Definition: table_replication_connection_configuration.cc:109
Definition: table_helper.h:1553
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Table PERFORMANCE_SCHEMA.TABLE_REPLICATION_CONNECTION_CONFIGURATION.
Definition: table_replication_connection_configuration.h:136
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_connection_configuration.h:143
static ha_rows get_row_count()
Definition: table_replication_connection_configuration.cc:143
PFS_simple_index pos_t
Definition: table_replication_connection_configuration.h:137
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_connection_configuration.h:172
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_connection_configuration.cc:151
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_connection_configuration.cc:138
table_replication_connection_configuration()
Definition: table_replication_connection_configuration.cc:132
int make_row(Master_info *)
Definition: table_replication_connection_configuration.cc:225
pos_t m_next_pos
Next position.
Definition: table_replication_connection_configuration.h:152
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_connection_configuration.cc:126
pos_t m_pos
Current position.
Definition: table_replication_connection_configuration.h:150
static Plugin_table m_table_def
Table definition.
Definition: table_replication_connection_configuration.h:145
int index_next() override
Find key in index, read record.
Definition: table_replication_connection_configuration.cc:200
int index_init(uint idx, bool sorted) override
Definition: table_replication_connection_configuration.cc:189
PFS_index_rpl_connection_config * m_opened_index
Definition: table_replication_connection_configuration.h:184
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_connection_configuration.cc:170
st_row_connect_config m_row
Current row.
Definition: table_replication_connection_configuration.h:148
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:336
#define COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE
Definition: compression.h:41
enum_ssl_allowed
enum values for SSL_Allowed
Definition: table_replication_connection_configuration.h:59
@ PS_RPL_NO
Definition: table_replication_connection_configuration.h:55
@ PS_RPL_YES
Definition: table_replication_connection_configuration.h:55
@ PS_SSL_ALLOWED_NO
Definition: table_replication_connection_configuration.h:61
@ PS_SSL_ALLOWED_YES
Definition: table_replication_connection_configuration.h:60
@ PS_SSL_ALLOWED_IGNORED
Definition: table_replication_connection_configuration.h:62
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:42
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:82
Common definition between mysql server & client.
#define NAME_LEN
Definition: mysql_com.h:66
#define USERNAME_LENGTH
Definition: mysql_com.h:68
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
Performance schema tables (declarations).
#define CHANNEL_NAME_LENGTH
Definition: rpl_info.h:40
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Definition: table.h:1403
Definition: thr_lock.h:138
A row in the table.
Definition: table_replication_connection_configuration.h:69
uint connection_retry_interval
Definition: table_replication_connection_configuration.h:96
ulong connection_retry_count
Definition: table_replication_connection_configuration.h:97
enum_rpl_yes_no gtid_only
Definition: table_replication_connection_configuration.h:119
uint ssl_ca_file_length
Definition: table_replication_connection_configuration.h:82
enum_rpl_yes_no ssl_verify_server_certificate
Definition: table_replication_connection_configuration.h:91
char ssl_ca_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:83
uint ssl_key_length
Definition: table_replication_connection_configuration.h:90
char host[HOSTNAME_LENGTH]
Definition: table_replication_connection_configuration.h:72
char user[USERNAME_LENGTH]
Definition: table_replication_connection_configuration.h:75
char ssl_cipher[FN_REFLEN]
Definition: table_replication_connection_configuration.h:87
char ssl_key[FN_REFLEN]
Definition: table_replication_connection_configuration.h:89
char ssl_certificate[FN_REFLEN]
Definition: table_replication_connection_configuration.h:85
uint ssl_cipher_length
Definition: table_replication_connection_configuration.h:88
uint network_interface_length
Definition: table_replication_connection_configuration.h:78
uint channel_name_length
Definition: table_replication_connection_configuration.h:71
uint zstd_compression_level
Definition: table_replication_connection_configuration.h:108
char ssl_crl_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:94
double heartbeat_interval
Definition: table_replication_connection_configuration.h:98
char ssl_ca_file[FN_REFLEN]
Definition: table_replication_connection_configuration.h:81
uint ssl_certificate_length
Definition: table_replication_connection_configuration.h:86
char tls_version[FN_REFLEN]
Definition: table_replication_connection_configuration.h:99
char network_interface[HOSTNAME_LENGTH]
Definition: table_replication_connection_configuration.h:77
char compression_algorithm[COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE]
Definition: table_replication_connection_configuration.h:106
uint host_length
Definition: table_replication_connection_configuration.h:73
char public_key_path[FN_REFLEN]
Definition: table_replication_connection_configuration.h:101
std::pair< bool, std::string > tls_ciphersuites
Definition: table_replication_connection_configuration.h:116
uint compression_algorithm_length
Definition: table_replication_connection_configuration.h:107
enum_rpl_yes_no source_connection_auto_failover
Definition: table_replication_connection_configuration.h:117
uint public_key_path_length
Definition: table_replication_connection_configuration.h:102
uint ssl_crl_path_length
Definition: table_replication_connection_configuration.h:95
uint ssl_crl_file_length
Definition: table_replication_connection_configuration.h:93
enum_ssl_allowed ssl_allowed
Definition: table_replication_connection_configuration.h:80
char ssl_crl_file[FN_REFLEN]
Definition: table_replication_connection_configuration.h:92
uint network_namespace_length
Definition: table_replication_connection_configuration.h:105
uint port
Definition: table_replication_connection_configuration.h:74
uint user_length
Definition: table_replication_connection_configuration.h:76
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_connection_configuration.h:70
uint ssl_ca_path_length
Definition: table_replication_connection_configuration.h:84
enum_rpl_yes_no get_public_key
Definition: table_replication_connection_configuration.h:103
uint tls_version_length
Definition: table_replication_connection_configuration.h:100
enum_rpl_yes_no auto_position
Definition: table_replication_connection_configuration.h:79
char network_namespace[NAME_LEN]
Definition: table_replication_connection_configuration.h:104
Helpers to implement a performance schema table.
enum_rpl_yes_no
Definition: table_replication_applier_configuration.h:49