MySQL 8.1.0
Source Code Documentation
table_replication_group_members.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_GROUP_MEMBERS_H
25#define TABLE_REPLICATION_GROUP_MEMBERS_H
26
27/**
28 @file storage/perfschema/table_replication_group_members.h
29 Table replication_group_members (declarations).
30*/
31
32#include <sys/types.h>
33
34#include "my_base.h"
35#include "my_hostname.h" // HOSTNAME_LENGTH
36#include "mysql_com.h"
37#include "sql/rpl_info.h"
38#include "sql/sql_const.h" // UUID_LENGTH
40
41class Field;
42class Plugin_table;
43struct TABLE;
44struct THR_LOCK;
45
46/**
47 @addtogroup performance_schema_tables
48 @{
49*/
50
51/**
52 A row in connection nodes table. The fields with string values have an
53 additional
54 length field denoted by @<field_name@>_length.
55*/
72};
73
74/** Table PERFORMANCE_SCHEMA.replication_group_members. */
77
78 private:
79 int make_row(uint index);
80
81 /** Table share lock. */
83 /** Table definition. */
85
86 /** Current row */
88 /** Current position. */
90 /** Next position. */
92
93 protected:
94 /**
95 Read the current row values.
96 @param table Table handle
97 @param buf row buffer
98 @param fields Table fields
99 @param read_all true if all columns are read.
100 */
101
102 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
103 bool read_all) override;
104
106
107 public:
109
110 /** Table share. */
113 static ha_rows get_row_count();
114 int rnd_next() override;
115 int rnd_pos(const void *pos) override;
116 void reset_position() override;
117};
118
119/** @} */
120#endif
Definition: field.h:575
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_members.
Definition: table_replication_group_members.h:75
static PFS_engine_table_share m_share
Table share.
Definition: table_replication_group_members.h:111
table_replication_group_members()
Definition: table_replication_group_members.cc:167
static Plugin_table m_table_def
Table definition.
Definition: table_replication_group_members.h:84
pos_t m_pos
Current position.
Definition: table_replication_group_members.h:89
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_replication_group_members.cc:172
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_replication_group_members.cc:162
st_row_group_members m_row
Current row.
Definition: table_replication_group_members.h:87
static THR_LOCK m_table_lock
Table share lock.
Definition: table_replication_group_members.h:82
PFS_simple_index pos_t
Definition: table_replication_group_members.h:76
pos_t m_next_pos
Next position.
Definition: table_replication_group_members.h:91
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_replication_group_members.cc:233
static ha_rows get_row_count()
Definition: table_replication_group_members.cc:177
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_replication_group_members.cc:195
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_replication_group_members.cc:181
int make_row(uint index)
Definition: table_replication_group_members.cc:205
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
Common definition between mysql server & client.
#define NAME_LEN
Definition: mysql_com.h:66
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
File containing constants that can be used throughout the server.
constexpr const size_t UUID_LENGTH
Definition: sql_const.h:263
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:1394
Definition: thr_lock.h:138
A row in connection nodes table.
Definition: table_replication_group_members.h:56
char channel_name[CHANNEL_NAME_LENGTH]
Definition: table_replication_group_members.h:57
uint channel_name_length
Definition: table_replication_group_members.h:58
char member_version[NAME_LEN]
Definition: table_replication_group_members.h:68
char member_id[UUID_LENGTH]
Definition: table_replication_group_members.h:59
uint member_state_length
Definition: table_replication_group_members.h:65
uint member_port
Definition: table_replication_group_members.h:63
uint member_version_length
Definition: table_replication_group_members.h:69
uint member_host_length
Definition: table_replication_group_members.h:62
uint member_id_length
Definition: table_replication_group_members.h:60
char member_communication_stack[NAME_LEN]
Definition: table_replication_group_members.h:70
char member_host[HOSTNAME_LENGTH]
Definition: table_replication_group_members.h:61
char member_state[NAME_LEN]
Definition: table_replication_group_members.h:64
char member_role[NAME_LEN]
Definition: table_replication_group_members.h:66
uint member_communication_stack_length
Definition: table_replication_group_members.h:71
uint member_role_length
Definition: table_replication_group_members.h:67