MySQL 9.1.0
Source Code Documentation
table_keyring_component_status.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
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_KEYRING_COMPONENT_STATUS_H
25#define TABLE_KEYRING_COMPONENT_STATUS_H
26
27/**
28 @file storage/perfschema/table_keyring_component_status.h
29 TABLE KEYRING_COMPONENT_STATUS
30*/
31#include <string>
32#include <vector>
33
34#include <sys/types.h>
36
37/**
38 A row in PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS table.
39*/
41 /** STATUS_KEY */
42 std::string m_status_key;
43 /** STATUS_VALUE */
44 std::string m_status_value;
45};
46
47/**
48 @addtogroup performance_schema_tables
49 @{
50*/
51
52/** Table PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS. */
54 public:
55 /** Table share */
57 /** Table builder */
59 static ha_rows get_row_count();
60
61 void reset_position() override;
62 int rnd_next() override;
63 int rnd_pos(const void *pos) override;
64
65 private:
67 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
68 bool read_all) override;
69
70 private:
71 void materialize();
72 /** Safe copy of the keyring status */
73 std::vector<row_keyring_component_status> m_row_keyring_component_status;
74
75 /** Table share lock */
77 /** Table definition */
79
80 /** Current row. */
82 /** Current position. */
84 /** Next position. */
86};
87
88/** @} */
89
90#endif // TABLE_KEYRING_COMPONENT_STATUS_H
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.KEYRING_COMPONENT_STATUS.
Definition: table_keyring_component_status.h:53
static PFS_engine_table_share m_share
Table share.
Definition: table_keyring_component_status.h:56
void materialize()
Definition: table_keyring_component_status.cc:99
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_keyring_component_status.cc:151
static Plugin_table m_table_def
Table definition.
Definition: table_keyring_component_status.h:78
PFS_simple_index m_pos
Current position.
Definition: table_keyring_component_status.h:83
std::vector< row_keyring_component_status > m_row_keyring_component_status
Safe copy of the keyring status.
Definition: table_keyring_component_status.h:73
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_keyring_component_status.cc:146
PFS_simple_index m_next_pos
Next position.
Definition: table_keyring_component_status.h:85
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_keyring_component_status.cc:158
static PFS_engine_table * create(PFS_engine_table_share *)
Table builder.
Definition: table_keyring_component_status.cc:85
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:169
row_keyring_component_status * m_row
Current row.
Definition: table_keyring_component_status.h:81
static ha_rows get_row_count()
Definition: table_keyring_component_status.cc:141
static THR_LOCK m_table_lock
Table share lock.
Definition: table_keyring_component_status.h:76
table_keyring_component_status()
Definition: table_keyring_component_status.cc:90
my_off_t ha_rows
Definition: my_base.h:1141
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Definition: table.h:1421
Definition: thr_lock.h:139
A row in PERFORMANCE_SCHEMA.KEYRING_COMPONENT_STATUS table.
Definition: table_keyring_component_status.h:40
std::string m_status_value
STATUS_VALUE.
Definition: table_keyring_component_status.h:44
std::string m_status_key
STATUS_KEY.
Definition: table_keyring_component_status.h:42
Helpers to implement a performance schema table.