MySQL 9.0.0
Source Code Documentation
table_log_status.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 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_LOG_STATUS_H
25#define TABLE_LOG_STATUS_H
26
27/**
28 @file storage/perfschema/table_log_status.h
29 Table log_status (declarations).
30*/
31
32#include "sql-common/json_dom.h"
33#include "sql/sql_const.h"
36
37/*
38 A row in the table. The fields with string values have an additional
39 length field denoted by <field_name>_length.
40*/
46
47 st_row_log_status() = default;
48
49 void cleanup() {}
50};
51
52/** Table PERFORMANCE_SCHEMA.LOG_STATUS. */
54 private:
55 int make_row();
56
57 /** Table share lock. */
59 /** Table definition. */
61
62 /** Current row */
64 /** Current position. */
66 /** Next position. */
68
69 protected:
70 /**
71 Read the current row values.
72 @param table Table handle
73 @param buf row buffer
74 @param fields Table fields
75 @param read_all true if all columns are read.
76 */
77
78 int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
79 bool read_all) override;
80
82
83 public:
85
86 /** Table share. */
89 static ha_rows get_row_count();
90 void reset_position() override;
91
92 int rnd_next() override;
93 int rnd_pos(const void *pos) override;
94};
95
96#endif
Definition: field.h:577
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1153
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.LOG_STATUS.
Definition: table_log_status.h:53
table_log_status()
Definition: table_log_status.cc:79
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_log_status.cc:102
static PFS_engine_table_share m_share
Table share.
Definition: table_log_status.h:87
static ha_rows get_row_count()
Definition: table_log_status.cc:89
int make_row()
Definition: table_log_status.cc:139
PFS_simple_index m_pos
Current position.
Definition: table_log_status.h:65
st_row_log_status m_row
Current row.
Definition: table_log_status.h:63
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_log_status.cc:322
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_log_status.cc:84
static Plugin_table m_table_def
Table definition.
Definition: table_log_status.h:60
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_log_status.cc:91
PFS_simple_index m_next_pos
Next position.
Definition: table_log_status.h:67
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_log_status.cc:75
static THR_LOCK m_table_lock
Table share lock.
Definition: table_log_status.h:58
~table_log_status() override
JSON DOM.
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
Data types for columns used in the performance schema tables (declarations)
Performance schema tables (declarations).
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:566
Definition: table.h:1407
Definition: thr_lock.h:139
Definition: table_log_status.h:41
Json_wrapper w_replication
Definition: table_log_status.h:44
Json_wrapper w_local
Definition: table_log_status.h:43
char server_uuid[UUID_LENGTH]
Definition: table_log_status.h:42
st_row_log_status()=default
Json_wrapper w_storage_engines
Definition: table_log_status.h:45
void cleanup()
Definition: table_log_status.h:49