MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
psi_mdl.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 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 MYSQL_PSI_MDL_H
25#define MYSQL_PSI_MDL_H
26
27/**
28 @file include/mysql/psi/psi_mdl.h
29 Performance schema instrumentation interface.
30
31 @defgroup psi_abi_mdl Metadata Lock Instrumentation (ABI)
32 @ingroup psi_abi
33 @{
34*/
35
36#include "my_inttypes.h"
37#include "my_macros.h"
38
39/* HAVE_PSI_*_INTERFACE */
40#include "my_psi_config.h" // IWYU pragma: keep
41
42#include "my_sharedlib.h"
44
45/**
46 @def PSI_MDL_VERSION_1
47 Performance Schema Metadata Lock Interface number for version 1.
48 Deprecated in MySQL 8.0.24
49*/
50#define PSI_MDL_VERSION_1 1
51
52/**
53 @def PSI_MDL_VERSION_2
54 Performance Schema Metadata Lock Interface number for version 2.
55 Introduced in MySQL 8.0.24
56 Deprecated in MySQL 8.0.41
57*/
58#define PSI_MDL_VERSION_2 2
59
60/**
61 @def PSI_MDL_VERSION_3
62 Performance Schema Metadata Lock Interface number for version 3.
63 Introduced in MySQL 8.0.41
64 This version is supported.
65*/
66#define PSI_MDL_VERSION_3 3
67
68/**
69 @def PSI_CURRENT_MDL_VERSION
70 Performance Schema Metadata Lock Interface number for the most recent version.
71 The most current version is @c PSI_MDL_VERSION_3
72*/
73#define PSI_CURRENT_MDL_VERSION 3
74
75/** Entry point for the performance schema interface. */
77 /**
78 ABI interface finder.
79 Calling this method with an interface version number returns either
80 an instance of the ABI for this version, or NULL.
81 @sa PSI_MDL_VERSION_1
82 @sa PSI_MDL_VERSION_2
83 @sa PSI_MDL_VERSION_3
84 @sa PSI_CURRENT_MDL_VERSION
85 */
86 void *(*get_interface)(int version);
87};
89
90#ifdef HAVE_PSI_METADATA_INTERFACE
91
92/**
93 Performance Schema Metadata Lock Interface, version 1.
94 @since PSI_MDL_VERSION_1
95*/
102};
103
104/**
105 Performance Schema Metadata Lock Interface, version 2.
106 @since PSI_MDL_VERSION_2
107*/
111 /* Added in version 2. */
116};
117
118/**
119 Performance Schema Metadata Lock Interface, version 3.
120 @since PSI_MDL_VERSION_3
121*/
126 /* Added in version 3. */
131};
132
134
136
137#endif /* HAVE_PSI_METADATA_INTERFACE */
138
139/** @} (end of group psi_abi_mdl) */
140
141#endif /* MYSQL_PSI_MDL_H */
void(* destroy_metadata_lock_v1_t)(PSI_metadata_lock *lock)
Definition: psi_mdl_bits.h:100
void(* end_metadata_wait_v1_t)(struct PSI_metadata_locker *locker, int rc)
Definition: psi_mdl_bits.h:106
void(* set_metadata_lock_type_v3_t)(PSI_metadata_lock *lock, opaque_mdl_type mdl_type)
Definition: psi_mdl_bits.h:97
struct PSI_metadata_locker *(* start_metadata_wait_v1_t)(struct PSI_metadata_locker_state_v1 *state, struct PSI_metadata_lock *mdl, const char *src_file, unsigned int src_line)
Definition: psi_mdl_bits.h:102
MYSQL_PLUGIN_IMPORT PSI_mdl_service_t * psi_mdl_service
Definition: psi_noop.cc:588
void(* set_metadata_lock_status_v1_t)(PSI_metadata_lock *lock, opaque_mdl_status mdl_status)
Definition: psi_mdl_bits.h:91
PSI_metadata_lock *(* create_metadata_lock_v1_t)(void *identity, const struct MDL_key *key, opaque_mdl_type mdl_type, opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status, const char *src_file, unsigned int src_line)
Definition: psi_mdl_bits.h:86
void(* set_metadata_lock_duration_v2_t)(PSI_metadata_lock *lock, opaque_mdl_duration mdl_duration)
Definition: psi_mdl_bits.h:94
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Functions related to handling of plugins and other dynamically loaded libraries.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:71
Performance schema instrumentation interface.
required uint64 version
Definition: replication_group_member_actions.proto:41
Entry point for the performance schema interface.
Definition: psi_mdl.h:76
Performance Schema Metadata Lock Interface, version 1.
Definition: psi_mdl.h:96
set_metadata_lock_status_v1_t set_metadata_lock_status
Definition: psi_mdl.h:98
create_metadata_lock_v1_t create_metadata_lock
Definition: psi_mdl.h:97
end_metadata_wait_v1_t end_metadata_wait
Definition: psi_mdl.h:101
start_metadata_wait_v1_t start_metadata_wait
Definition: psi_mdl.h:100
destroy_metadata_lock_v1_t destroy_metadata_lock
Definition: psi_mdl.h:99
Performance Schema Metadata Lock Interface, version 2.
Definition: psi_mdl.h:108
set_metadata_lock_duration_v2_t set_metadata_lock_duration
Definition: psi_mdl.h:112
create_metadata_lock_v1_t create_metadata_lock
Definition: psi_mdl.h:109
end_metadata_wait_v1_t end_metadata_wait
Definition: psi_mdl.h:115
start_metadata_wait_v1_t start_metadata_wait
Definition: psi_mdl.h:114
destroy_metadata_lock_v1_t destroy_metadata_lock
Definition: psi_mdl.h:113
set_metadata_lock_status_v1_t set_metadata_lock_status
Definition: psi_mdl.h:110
Performance Schema Metadata Lock Interface, version 3.
Definition: psi_mdl.h:122
start_metadata_wait_v1_t start_metadata_wait
Definition: psi_mdl.h:129
create_metadata_lock_v1_t create_metadata_lock
Definition: psi_mdl.h:123
end_metadata_wait_v1_t end_metadata_wait
Definition: psi_mdl.h:130
destroy_metadata_lock_v1_t destroy_metadata_lock
Definition: psi_mdl.h:128
set_metadata_lock_duration_v2_t set_metadata_lock_duration
Definition: psi_mdl.h:125
set_metadata_lock_status_v1_t set_metadata_lock_status
Definition: psi_mdl.h:124
set_metadata_lock_type_v3_t set_metadata_lock_type
Definition: psi_mdl.h:127