MySQL  8.0.18
Source Code Documentation
psi_table.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
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 MYSQL_PSI_TABLE_H
24 #define MYSQL_PSI_TABLE_H
25 
26 /**
27  @file include/mysql/psi/psi_table.h
28  Performance schema instrumentation interface.
29 
30  @defgroup psi_abi_table Table Instrumentation (ABI)
31  @ingroup psi_abi
32  @{
33 */
34 
35 #include "my_inttypes.h"
36 #include "my_macros.h"
37 #include "my_psi_config.h" // IWYU pragma: keep
38 #include "my_sharedlib.h"
40 
41 /**
42  @def PSI_TABLE_VERSION_1
43  Performance Schema Table Interface number for version 1.
44  This version is supported.
45 */
46 #define PSI_TABLE_VERSION_1 1
47 
48 /**
49  @def PSI_CURRENT_TABLE_VERSION
50  Performance Schema Table Interface number for the most recent version.
51  The most current version is @c PSI_TABLE_VERSION_1
52 */
53 #define PSI_CURRENT_TABLE_VERSION 1
54 
55 /** Entry point for the performance schema interface. */
57  /**
58  ABI interface finder.
59  Calling this method with an interface version number returns either
60  an instance of the ABI for this version, or NULL.
61  @sa PSI_TABLE_VERSION_1
62  @sa PSI_TABLE_VERSION_2
63  @sa PSI_CURRENT_TABLE_VERSION
64  */
65  void *(*get_interface)(int version);
66 };
68 
69 #ifdef HAVE_PSI_TABLE_INTERFACE
70 
71 /**
72  Performance Schema Transaction Interface, version 1.
73  @since PSI_TABLE_VERSION_1
74 */
76  /** @sa get_table_share_v1_t. */
78  /** @sa release_table_share_v1_t. */
80  /** @sa drop_table_share_v1_t. */
82  /** @sa open_table_v1_t. */
84  /** @sa unbind_table_v1_t. */
86  /** @sa rebind_table_v1_t. */
88  /** @sa close_table_v1_t. */
90  /** @sa start_table_io_wait_v1_t. */
92  /** @sa end_table_io_wait_v1_t. */
94  /** @sa start_table_lock_wait_v1_t. */
96  /** @sa end_table_lock_wait_v1_t. */
98  /** @sa end_table_lock_wait_v1_t. */
100 };
101 
103 
105 
106 #endif /* HAVE_PSI_TABLE_INTERFACE */
107 
108 /** @} (end of group psi_abi_table) */
109 
110 #endif /* MYSQL_PSI_TRANSACTION_H */
unlock_table_v1_t unlock_table
Definition: psi_table.h:99
Some common macros.
unbind_table_v1_t unbind_table
Definition: psi_table.h:85
void(* unbind_table_v1_t)(struct PSI_table *table)
Unbind a table handle from the current thread.
Definition: psi_table_bits.h:159
struct PSI_table_share *(* get_table_share_v1_t)(bool temporary, struct TABLE_SHARE *share)
Acquire a table share instrumentation.
Definition: psi_table_bits.h:123
Some integer typedefs for easier portability.
void(* drop_table_share_v1_t)(bool temporary, const char *schema_name, int schema_name_length, const char *table_name, int table_name_length)
Drop a table share.
Definition: psi_table_bits.h:140
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
end_table_lock_wait_v1_t end_table_lock_wait
Definition: psi_table.h:97
start_table_lock_wait_v1_t start_table_lock_wait
Definition: psi_table.h:95
struct PSI_table *(* open_table_v1_t)(struct PSI_table_share *share, const void *identity)
Open an instrumentation table handle.
Definition: psi_table_bits.h:151
drop_table_share_v1_t drop_table_share
Definition: psi_table.h:81
Performance schema instrumentation interface.
Functions related to handling of plugins and other dynamically loaded libraries.
PSI_table *(* rebind_table_v1_t)(PSI_table_share *share, const void *identity, PSI_table *table)
Rebind a table handle to the current thread.
Definition: psi_table_bits.h:167
start_table_io_wait_v1_t start_table_io_wait
Definition: psi_table.h:91
void(* end_table_io_wait_v1_t)(struct PSI_table_locker *locker, unsigned long long numrows)
Record a table instrumentation io wait end event.
Definition: psi_table_bits.h:197
get_table_share_v1_t get_table_share
Definition: psi_table.h:77
void(* close_table_v1_t)(struct TABLE_SHARE *server_share, struct PSI_table *table)
Close an instrumentation table handle.
Definition: psi_table_bits.h:175
Performance Schema Transaction Interface, version 1.
Definition: psi_table.h:75
end_table_io_wait_v1_t end_table_io_wait
Definition: psi_table.h:93
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
const string version("\ersion\)
struct PSI_table_locker *(* start_table_lock_wait_v1_t)(struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_lock_operation op, unsigned long flags, const char *src_file, unsigned int src_line)
Record a table instrumentation lock wait start event.
Definition: psi_table_bits.h:209
Entry point for the performance schema interface.
Definition: psi_table.h:56
MYSQL_PLUGIN_IMPORT PSI_table_service_t * psi_table_service
Definition: psi_noop.cc:514
void(* unlock_table_v1_t)(struct PSI_table *table)
Record a table unlock event.
Definition: psi_table_bits.h:224
struct PSI_table_locker *(* start_table_io_wait_v1_t)(struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_io_operation op, unsigned int index, const char *src_file, unsigned int src_line)
Record a table instrumentation io wait start event.
Definition: psi_table_bits.h:187
rebind_table_v1_t rebind_table
Definition: psi_table.h:87
void(* release_table_share_v1_t)(struct PSI_table_share *share)
Release a table share.
Definition: psi_table_bits.h:130
open_table_v1_t open_table
Definition: psi_table.h:83
release_table_share_v1_t release_table_share
Definition: psi_table.h:79
void(* end_table_lock_wait_v1_t)(struct PSI_table_locker *locker)
Record a table instrumentation lock wait end event.
Definition: psi_table_bits.h:218
close_table_v1_t close_table
Definition: psi_table.h:89