MySQL 9.1.0
Source Code Documentation
table_replication_applier_status.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_APPLIER_STATUS_H
26#define TABLE_REPLICATION_APPLIER_STATUS_H
27
28/**
29 @file storage/perfschema/table_replication_applier_status.h
30 Table replication_applier_status (declarations).
31*/
32
33#include <sys/types.h>
34
35#include "my_base.h"
36#include "sql/rpl_info.h" /*CHANNEL_NAME_LENGTH*/
39
40class Field;
41class Master_info;
42class Plugin_table;
43struct TABLE;
44struct THR_LOCK;
45
46/**
47 @addtogroup performance_schema_tables
48 @{
49*/
50
51#ifndef ENUM_RPL_YES_NO
52#define ENUM_RPL_YES_NO
53/** enum values for Service_State field*/
55#endif
56
57/** A row in the table. */
65};
66
68 public:
70 : PFS_engine_index(&m_key), m_key("CHANNEL_NAME") {}
71
72 ~PFS_index_rpl_applier_status() override = default;
73
74 virtual bool match(Master_info *mi);
75
76 private:
78};
79
80/** Table PERFORMANCE_SCHEMA.replication_applier_status */
83
84 private:
85 int make_row(Master_info *mi);
86
87 /** Table share lock. */
89 /** Table definition. */
91
92 /** Current row */
94 /** Current position. */
96 /** Next position. */
98
99 protected:
100 /**
101 Read the current row values.
102 @param table Table handle
103 @param buf row buffer
104 @param fields Table fields
105 @param read_all true if all columns are read.
106 */
107
108 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
109 bool read_all) override;
110
112
113 public:
115
116 /** Table share. */
119 static ha_rows get_row_count();
120
121 void reset_position() override;
122
123 int rnd_next() override;
124 int rnd_pos(const void *pos) override;
125
126 int index_init(uint idx, bool sorted) override;
127 int index_next() override;
128
129 private:
131};
132
133/** @} */
134#endif
Definition: field.h:577
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_status.h:67
virtual bool match(Master_info *mi)
Definition: table_replication_applier_status.cc:83
PFS_key_name m_key
Definition: table_replication_applier_status.h:77
PFS_index_rpl_applier_status()
Definition: table_replication_applier_status.h:69
~PFS_index_rpl_applier_status() override=default
Definition: table_helper.h:1569
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.replication_applier_status.
Definition: table_replication_applier_status.h:81
PFS_index_rpl_applier_status * m_opened_index
Definition: table_replication_applier_status.h:130
static Plugin_table m_table_def
Table definition.
Definition: table_replication_applier_status.h:90
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_replication_applier_status.cc:230
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_applier_status.cc:100
PFS_simple_index pos_t
Definition: table_replication_applier_status.h:82
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_applier_status.h:117
static ha_rows get_row_count()
Definition: table_replication_applier_status.cc:115
st_row_applier_status m_row
Current row.
Definition: table_replication_applier_status.h:93
table_replication_applier_status()
Definition: table_replication_applier_status.cc:105
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_applier_status.cc:138
int index_next() override
Find key in index, read record.
Definition: table_replication_applier_status.cc:164
pos_t m_next_pos
Next position.
Definition: table_replication_applier_status.h:97
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_applier_status.cc:119
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_applier_status.cc:110
int index_init(uint idx, bool sorted) override
Definition: table_replication_applier_status.cc:155
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_applier_status.h:88
int make_row(Master_info *mi)
Definition: table_replication_applier_status.cc:189
pos_t m_pos
Current position.
Definition: table_replication_applier_status.h:95
@ PS_RPL_NO
Definition: table_replication_applier_status.h:54
@ PS_RPL_YES
Definition: table_replication_applier_status.h:54
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
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:1421
Definition: thr_lock.h:139
A row in the table.
Definition: table_replication_applier_status.h:58
uint channel_name_length
Definition: table_replication_applier_status.h:60
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_applier_status.h:59
uint remaining_delay
Definition: table_replication_applier_status.h:62
ulong count_transactions_retries
Definition: table_replication_applier_status.h:64
bool remaining_delay_is_set
Definition: table_replication_applier_status.h:63
enum_rpl_yes_no service_state
Definition: table_replication_applier_status.h:61
Helpers to implement a performance schema table.
enum_rpl_yes_no
Definition: table_replication_applier_configuration.h:50