MySQL 8.0.29
Source Code Documentation
table_replication_group_member_stats.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2014, 2022, 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_GROUP_MEMBER_STATS_H
25#define TABLE_REPLICATION_GROUP_MEMBER_STATS_H
26
27/**
28 @file storage/perfschema/table_replication_group_member_stats.h
29 Table replication_group_member_stats (declarations).
30*/
31
32#include <stddef.h>
33#include <sys/types.h>
34
35#include "my_base.h"
36#include "my_hostname.h" /* HOSTNAME_LENGTH */
37#include "my_inttypes.h"
38#include "mysql_com.h"
39#include "sql/rpl_gtid.h"
40#include "sql/rpl_info.h"
41#include "sql/sql_const.h" // UUID_LENGTH
43
44class Field;
45class Plugin_table;
46struct TABLE;
47struct THR_LOCK;
48
49/**
50 @addtogroup performance_schema_tables
51 @{
52*/
53
54/**
55 A row in node status table. The fields with string values have an additional
56 length field denoted by @<field_name@>_length.
57*/
58
78};
79
80/** Table PERFORMANCE_SCHEMA.REPLICATION_GROUP_MEMBER_STATS. */
83
84 private:
85 int make_row(uint index);
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 int rnd_next() override;
121 int rnd_pos(const void *pos) override;
122 void reset_position(void) override;
123};
124
125/** @} */
126#endif
Definition: field.h:573
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Table PERFORMANCE_SCHEMA.REPLICATION_GROUP_MEMBER_STATS.
Definition: table_replication_group_member_stats.h:81
PFS_simple_index pos_t
Definition: table_replication_group_member_stats.h:82
st_row_group_member_stats m_row
Current row.
Definition: table_replication_group_member_stats.h:93
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:301
pos_t m_next_pos
Next position.
Definition: table_replication_group_member_stats.h:97
int make_row(uint index)
Definition: table_replication_group_member_stats.cc:258
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_group_member_stats.cc:204
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_group_member_stats.cc:245
static ha_rows get_row_count()
Definition: table_replication_group_member_stats.cc:226
pos_t m_pos
Current position.
Definition: table_replication_group_member_stats.h:95
void reset_position(void) override
Reset the cursor position to the beginning of the table.
Definition: table_replication_group_member_stats.cc:221
table_replication_group_member_stats()
Definition: table_replication_group_member_stats.cc:209
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_group_member_stats.cc:230
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_group_member_stats.h:88
~table_replication_group_member_stats() override
Definition: table_replication_group_member_stats.cc:214
static Plugin_table m_table_def
Table definition.
Definition: table_replication_group_member_stats.h:90
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_group_member_stats.h:117
char * pos
Definition: do_ctype.cc:76
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1139
Common definition used by mysys, performance schema and server & client.
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:42
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
Common definition between mysql server & client.
Definition: buf0block_hint.cc:29
Performance schema tables (declarations).
#define CHANNEL_NAME_LENGTH
Definition: rpl_info.h:40
File containing constants that can be used throughout the server.
constexpr const size_t UUID_LENGTH
Definition: sql_const.h:269
static const int MAX_TEXT_LENGTH
The maximal length of the textual representation of a SID, not including the terminating '\0'.
Definition: rpl_gtid.h:1100
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:558
Definition: table.h:1394
Definition: thr_lock.h:138
A row in node status table.
Definition: table_replication_group_member_stats.h:59
ulonglong trx_local_proposed
Definition: table_replication_group_member_stats.h:76
char view_id[HOSTNAME_LENGTH]
Definition: table_replication_group_member_stats.h:62
uint member_id_length
Definition: table_replication_group_member_stats.h:65
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_group_member_stats.h:60
ulonglong trx_in_queue
Definition: table_replication_group_member_stats.h:66
ulonglong trx_conflicts
Definition: table_replication_group_member_stats.h:68
ulonglong trx_remote_applier_queue
Definition: table_replication_group_member_stats.h:74
ulonglong trx_remote_applied
Definition: table_replication_group_member_stats.h:75
char member_id[UUID_LENGTH]
Definition: table_replication_group_member_stats.h:64
ulonglong trx_rows_validating
Definition: table_replication_group_member_stats.h:69
char * trx_committed
Definition: table_replication_group_member_stats.h:70
ulonglong trx_local_rollback
Definition: table_replication_group_member_stats.h:77
size_t trx_committed_length
Definition: table_replication_group_member_stats.h:71
uint channel_name_length
Definition: table_replication_group_member_stats.h:61
int last_cert_trx_length
Definition: table_replication_group_member_stats.h:73
uint view_id_length
Definition: table_replication_group_member_stats.h:63
ulonglong trx_checked
Definition: table_replication_group_member_stats.h:67
char last_cert_trx[Gtid::MAX_TEXT_LENGTH+1]
Definition: table_replication_group_member_stats.h:72
unsigned int uint
Definition: uca-dump.cc:29