MySQL 26.7.0
Source Code Documentation
table_replication_applier_configuration.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2013, 2026, 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_APPLIER_CONFIGURATION_H
26#define TABLE_REPLICATION_APPLIER_CONFIGURATION_H
27
28/**
29 @file storage/perfschema/table_replication_applier_configuration.h
30 Table replication_applier_configuration (declarations).
31*/
32
33#include <sys/types.h>
34#include <time.h>
35
36#include "my_base.h"
38#include "sql/rpl_info.h" /*CHANNEL_NAME_LENGTH*/
39#include "sql/rpl_rli.h" /*enum_require_table_primary_key*/
42
43class Field;
44class Master_info;
45class Plugin_table;
46struct TABLE;
47struct THR_LOCK;
48
49#ifndef ENUM_RPL_YES_NO
50#define ENUM_RPL_YES_NO
52#endif
53
54/**
55 @addtogroup performance_schema_tables
56 @{
57*/
58
59/** A row in the table*/
63 time_t desired_delay{0};
69 Relay_log_info::enum_require_table_primary_key::PK_CHECK_NONE};
77};
78
80 public:
82 : PFS_engine_index(&m_key), m_key("CHANNEL_NAME") {}
83
84 ~PFS_index_rpl_applier_config() override = default;
85
86 virtual bool match(Master_info *mi);
87
88 private:
90};
91
92/** Table PERFORMANCE_SCHEMA.replication_applier_configuration */
95
96 private:
97 int make_row(Master_info *mi);
98
99 /** Table share lock. */
101 /** Table definition. */
103
104 /** Current row */
106 /** Current position. */
108 /** Next position. */
110
111 protected:
112 /**
113 Read the current row values.
114 @param table Table handle
115 @param buf row buffer
116 @param fields Table fields
117 @param read_all true if all columns are read.
118 */
119
120 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
121 bool read_all) override;
122
124
125 public:
127
128 /** Table share. */
131 static ha_rows get_row_count();
132
133 void reset_position() override;
134
135 int rnd_next() override;
136 int rnd_pos(const void *pos) override;
137
138 int index_init(uint idx, bool sorted) override;
139 int index_next() override;
140
141 private:
143};
144
145/** @} */
146#endif
enum_type
This accepted value of the type of the Assign_gtids_to_anonymous_transactions info OFF : Anonymous gt...
Definition: rpl_rli.h:111
Definition: field.h:573
Definition: rpl_mi.h:87
Definition: pfs_engine_table.h:301
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_replication_applier_configuration.h:79
PFS_key_name m_key
Definition: table_replication_applier_configuration.h:89
~PFS_index_rpl_applier_config() override=default
virtual bool match(Master_info *mi)
Definition: table_replication_applier_configuration.cc:107
PFS_index_rpl_applier_config()
Definition: table_replication_applier_configuration.h:81
Definition: table_helper.h:1573
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
enum_require_table_primary_key
Identifies what is the replica policy on primary keys in tables.
Definition: rpl_rli.h:280
Table PERFORMANCE_SCHEMA.replication_applier_configuration.
Definition: table_replication_applier_configuration.h:93
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_applier_configuration.cc:139
PFS_simple_index pos_t
Definition: table_replication_applier_configuration.h:94
int index_init(uint idx, bool sorted) override
Definition: table_replication_applier_configuration.cc:186
table_replication_applier_configuration()
Definition: table_replication_applier_configuration.cc:130
static Plugin_table m_table_def
Table definition.
Definition: table_replication_applier_configuration.h:102
pos_t m_pos
Current position.
Definition: table_replication_applier_configuration.h:107
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_replication_applier_configuration.cc:279
static ha_rows get_row_count()
Definition: table_replication_applier_configuration.cc:144
int make_row(Master_info *mi)
Definition: table_replication_applier_configuration.cc:221
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_applier_configuration.cc:148
PFS_index_rpl_applier_config * m_opened_index
Definition: table_replication_applier_configuration.h:142
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_applier_configuration.h:100
pos_t m_next_pos
Next position.
Definition: table_replication_applier_configuration.h:109
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_applier_configuration.cc:167
int index_next() override
Find key in index, read record.
Definition: table_replication_applier_configuration.cc:196
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_applier_configuration.h:129
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_applier_configuration.cc:124
st_row_applier_config m_row
Current row.
Definition: table_replication_applier_configuration.h:105
@ PS_RPL_NO
Definition: table_replication_applier_configuration.h:51
@ PS_RPL_YES
Definition: table_replication_applier_configuration.h:51
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1228
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:359
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Definition: table.h:1456
Definition: thr_lock.h:139
static constexpr unsigned int unspecified
Required by system tables and PFS when no specific version is chosen.
Definition: applier_version.h:36
A row in the table.
Definition: table_replication_applier_configuration.h:60
enum_rpl_yes_no requires_row_format
Definition: table_replication_applier_configuration.h:66
time_t desired_delay
Definition: table_replication_applier_configuration.h:63
std::string assign_gtids_to_anonymous_transactions_value
Definition: table_replication_applier_configuration.h:73
bool desired_delay_is_set
Definition: table_replication_applier_configuration.h:64
std::size_t applier_worker_count
Definition: table_replication_applier_configuration.h:75
Relay_log_info::enum_require_table_primary_key require_table_primary_key_check
Definition: table_replication_applier_configuration.h:68
ulong applier_event_memory_limit
Definition: table_replication_applier_configuration.h:76
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_applier_configuration.h:61
uint applier_version
Definition: table_replication_applier_configuration.h:74
std::string privilege_checks_user
Definition: table_replication_applier_configuration.h:65
uint channel_name_length
Definition: table_replication_applier_configuration.h:62
Assign_gtids_to_anonymous_transactions_info::enum_type assign_gtids_to_anonymous_transactions_type
Definition: table_replication_applier_configuration.h:71
Helpers to implement a performance schema table.
enum_rpl_yes_no
Definition: table_replication_applier_configuration.h:51