MySQL 8.3.0
Source Code Documentation
table_keyring_component_status.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef TABLE_KEYRING_COMPONENT_STATUS_H
24#define TABLE_KEYRING_COMPONENT_STATUS_H
25
26/**
27 @file storage/perfschema/table_keyring_component_status.h
28 TABLE KEYRING_COMPONENT_STATUS
29*/
30#include <string>
31#include <vector>
32
33#include <sys/types.h>
35
36/**
37 A row in PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS table.
38*/
40 /** STATUS_KEY */
41 std::string m_status_key;
42 /** STATUS_VALUE */
43 std::string m_status_value;
44};
45
46/**
47 @addtogroup performance_schema_tables
48 @{
49*/
50
51/** Table PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS. */
53 public:
54 /** Table share */
56 /** Table builder */
58 static ha_rows get_row_count();
59
60 void reset_position() override;
61 int rnd_next() override;
62 int rnd_pos(const void *pos) override;
63
64 private:
66 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
67 bool read_all) override;
68
69 private:
70 void materialize();
71 /** Safe copy of the keyring status */
72 std::vector<row_keyring_component_status> m_row_keyring_component_status;
73
74 /** Table share lock */
76 /** Table definition */
78
79 /** Current row. */
81 /** Current position. */
83 /** Next position. */
85};
86
87/** @} */
88
89#endif // TABLE_KEYRING_COMPONENT_STATUS_H
Definition: field.h:574
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.KEYRING_COMPONENT_STATUS.
Definition: table_keyring_component_status.h:52
static PFS_engine_table_share m_share
Table share.
Definition: table_keyring_component_status.h:55
void materialize()
Definition: table_keyring_component_status.cc:98
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_keyring_component_status.cc:150
static Plugin_table m_table_def
Table definition.
Definition: table_keyring_component_status.h:77
PFS_simple_index m_pos
Current position.
Definition: table_keyring_component_status.h:82
std::vector< row_keyring_component_status > m_row_keyring_component_status
Safe copy of the keyring status.
Definition: table_keyring_component_status.h:72
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_keyring_component_status.cc:145
PFS_simple_index m_next_pos
Next position.
Definition: table_keyring_component_status.h:84
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_keyring_component_status.cc:157
static PFS_engine_table * create(PFS_engine_table_share *)
Table builder.
Definition: table_keyring_component_status.cc:84
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_keyring_component_status.cc:168
row_keyring_component_status * m_row
Current row.
Definition: table_keyring_component_status.h:80
static ha_rows get_row_count()
Definition: table_keyring_component_status.cc:140
static THR_LOCK m_table_lock
Table share lock.
Definition: table_keyring_component_status.h:75
table_keyring_component_status()
Definition: table_keyring_component_status.cc:89
my_off_t ha_rows
Definition: my_base.h:1140
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
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:1403
Definition: thr_lock.h:138
A row in PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS table.
Definition: table_keyring_component_status.h:39
std::string m_status_value
STATUS_VALUE.
Definition: table_keyring_component_status.h:43
std::string m_status_key
STATUS_KEY.
Definition: table_keyring_component_status.h:41
Helpers to implement a performance schema table.