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