MySQL 8.0.39
Source Code Documentation
pfs_metadata_provider.h
Go to the documentation of this file.
1/* Copyright (c) 2012, 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 PFS_METADATA_PROVIDER_H
25#define PFS_METADATA_PROVIDER_H
26
27/* HAVE_PSI_*_INTERFACE */
28#include "my_psi_config.h" // IWYU pragma: keep
29
30/**
31 @file include/pfs_metadata_provider.h
32 Performance schema instrumentation (declarations).
33*/
34
35#ifdef HAVE_PSI_METADATA_INTERFACE
36#if defined(MYSQL_SERVER) || defined(PFS_DIRECT_CALL)
37#ifndef MYSQL_DYNAMIC_PLUGIN
38#ifndef WITH_LOCK_ORDER
39
40#include <sys/types.h>
41
42#include "my_inttypes.h"
43#include "my_macros.h"
44#include "mysql/psi/psi_mdl.h"
45
46struct MDL_key;
47
48#define PSI_METADATA_CALL(M) pfs_##M##_vc
49
51 void *identity, const MDL_key *key, opaque_mdl_type mdl_type,
52 opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status,
53 const char *src_file, uint src_line);
54
56 opaque_mdl_status mdl_status);
57
59 opaque_mdl_duration mdl_duration);
60
62
64 struct PSI_metadata_locker_state_v1 *state, struct PSI_metadata_lock *mdl,
65 const char *src_file, uint src_line);
66
67void pfs_end_metadata_wait_vc(struct PSI_metadata_locker *locker, int rc);
68
69#endif /* WITH_LOCK_ORDER */
70#endif /* MYSQL_DYNAMIC_PLUGIN */
71#endif /* MYSQL_SERVER || PFS_DIRECT_CALL */
72#endif /* HAVE_PSI_METADATA_INTERFACE */
73
74#endif
int opaque_mdl_duration
Definition: psi_mdl_bits.h:42
struct PSI_metadata_locker PSI_metadata_locker
Definition: psi_mdl_bits.h:59
int opaque_mdl_status
Definition: psi_mdl_bits.h:45
int opaque_mdl_type
Definition: psi_mdl_bits.h:36
struct PSI_metadata_lock PSI_metadata_lock
Definition: psi_mdl_bits.h:52
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
void pfs_destroy_metadata_lock_vc(PSI_metadata_lock *lock)
Definition: pfs.cc:8761
PSI_metadata_lock * pfs_create_metadata_lock_vc(void *identity, const MDL_key *key, opaque_mdl_type mdl_type, opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status, const char *src_file, uint src_line)
Definition: pfs.cc:8718
struct PSI_metadata_locker * pfs_start_metadata_wait_vc(struct PSI_metadata_locker_state_v1 *state, struct PSI_metadata_lock *mdl, const char *src_file, uint src_line)
Definition: pfs.cc:8767
void pfs_end_metadata_wait_vc(struct PSI_metadata_locker *locker, int rc)
Definition: pfs.cc:8850
void pfs_set_metadata_lock_status_vc(PSI_metadata_lock *lock, opaque_mdl_status mdl_status)
Definition: pfs.cc:8747
void pfs_set_metadata_lock_duration_vc(PSI_metadata_lock *lock, opaque_mdl_duration mdl_duration)
Definition: pfs.cc:8754
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Metadata lock object key.
Definition: mdl.h:365
State data storage for start_metadata_wait_v1_t.
Definition: psi_mdl_bits.h:70
unsigned int uint
Definition: uca9-dump.cc:75