MySQL 9.0.0
Source Code Documentation
table_replication_group_member_stats.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2014, 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_GROUP_MEMBER_STATS_H
26#define TABLE_REPLICATION_GROUP_MEMBER_STATS_H
27
28/**
29 @file storage/perfschema/table_replication_group_member_stats.h
30 Table replication_group_member_stats (declarations).
31*/
32
33#include <stddef.h>
34#include <sys/types.h>
35
36#include "my_base.h"
37#include "my_hostname.h" /* HOSTNAME_LENGTH */
38#include "my_inttypes.h"
39#include "mysql_com.h"
40#include "sql/rpl_gtid.h"
41#include "sql/rpl_info.h"
42#include "sql/sql_const.h" // UUID_LENGTH
44
45class Field;
46class Plugin_table;
47struct TABLE;
48struct THR_LOCK;
49
50/**
51 @addtogroup performance_schema_tables
52 @{
53*/
54
55/**
56 A row in node status table. The fields with string values have an additional
57 length field denoted by @<field_name@>_length.
58*/
59
79};
80
81/** Table PERFORMANCE_SCHEMA.REPLICATION_GROUP_MEMBER_STATS. */
84
85 private:
86 int make_row(uint index);
87
88 /** Table share lock. */
90 /** Table definition. */
92
93 /** Current row */
95 /** Current position. */
97 /** Next position. */
99
100 protected:
101 /**
102 Read the current row values.
103 @param table Table handle
104 @param buf row buffer
105 @param fields Table fields
106 @param read_all true if all columns are read.
107 */
108
109 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
110 bool read_all) override;
111
113
114 public:
116
117 /** Table share. */
120 static ha_rows get_row_count();
121 int rnd_next() override;
122 int rnd_pos(const void *pos) override;
123 void reset_position() override;
124};
125
126/** @} */
127#endif
Definition: field.h:577
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.REPLICATION_GROUP_MEMBER_STATS.
Definition: table_replication_group_member_stats.h:82
PFS_simple_index pos_t
Definition: table_replication_group_member_stats.h:83
st_row_group_member_stats m_row
Current row.
Definition: table_replication_group_member_stats.h:94
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_replication_group_member_stats.cc:289
pos_t m_next_pos
Next position.
Definition: table_replication_group_member_stats.h:98
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_group_member_stats.cc:209
int make_row(uint index)
Definition: table_replication_group_member_stats.cc:246
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_group_member_stats.cc:192
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_group_member_stats.cc:233
static ha_rows get_row_count()
Definition: table_replication_group_member_stats.cc:214
pos_t m_pos
Current position.
Definition: table_replication_group_member_stats.h:96
table_replication_group_member_stats()
Definition: table_replication_group_member_stats.cc:197
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_group_member_stats.cc:218
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_group_member_stats.h:89
~table_replication_group_member_stats() override
Definition: table_replication_group_member_stats.cc:202
static Plugin_table m_table_def
Table definition.
Definition: table_replication_group_member_stats.h:91
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_group_member_stats.h:118
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Common definition used by mysys, performance schema and server & client.
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:43
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Common definition between mysql server & client.
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
File containing constants that can be used throughout the server.
constexpr const size_t UUID_LENGTH
Definition: sql_const.h:265
static const int MAX_TEXT_LENGTH
The maximal length of the textual representation of a TSID, not including the terminating '\0'.
Definition: rpl_gtid.h:1137
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:1407
Definition: thr_lock.h:139
A row in node status table.
Definition: table_replication_group_member_stats.h:60
ulonglong trx_local_proposed
Definition: table_replication_group_member_stats.h:77
char view_id[HOSTNAME_LENGTH]
Definition: table_replication_group_member_stats.h:63
uint member_id_length
Definition: table_replication_group_member_stats.h:66
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_group_member_stats.h:61
ulonglong trx_in_queue
Definition: table_replication_group_member_stats.h:67
ulonglong trx_conflicts
Definition: table_replication_group_member_stats.h:69
ulonglong trx_remote_applier_queue
Definition: table_replication_group_member_stats.h:75
ulonglong trx_remote_applied
Definition: table_replication_group_member_stats.h:76
char member_id[UUID_LENGTH]
Definition: table_replication_group_member_stats.h:65
ulonglong trx_rows_validating
Definition: table_replication_group_member_stats.h:70
char * trx_committed
Definition: table_replication_group_member_stats.h:71
ulonglong trx_local_rollback
Definition: table_replication_group_member_stats.h:78
size_t trx_committed_length
Definition: table_replication_group_member_stats.h:72
uint channel_name_length
Definition: table_replication_group_member_stats.h:62
int last_cert_trx_length
Definition: table_replication_group_member_stats.h:74
uint view_id_length
Definition: table_replication_group_member_stats.h:64
ulonglong trx_checked
Definition: table_replication_group_member_stats.h:68
char last_cert_trx[Gtid::MAX_TEXT_LENGTH+1]
Definition: table_replication_group_member_stats.h:73