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