1 /* Copyright (c) 2012, 2021, 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 Foundation, 21 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 22 23 #ifndef PFS_METADATA_PROVIDER_H 24 #define PFS_METADATA_PROVIDER_H 25 26 /** 27 @file include/pfs_metadata_provider.h 28 Performance schema instrumentation (declarations). 29 */ 30 31 #ifdef HAVE_PSI_METADATA_INTERFACE 32 #ifdef MYSQL_SERVER 33 #ifndef EMBEDDED_LIBRARY 34 #ifndef MYSQL_DYNAMIC_PLUGIN 35 36 #include "mysql/psi/psi.h" 37 38 #define PSI_METADATA_CALL(M) pfs_ ## M ## _v1 39 40 C_MODE_START 41 42 PSI_metadata_lock* pfs_create_metadata_lock_v1 43 (void *identity, 44 const MDL_key *key, 45 opaque_mdl_type mdl_type, 46 opaque_mdl_duration mdl_duration, 47 opaque_mdl_status mdl_status, 48 const char *src_file, 49 uint src_line); 50 51 void pfs_set_metadata_lock_status_v1 52 (PSI_metadata_lock *lock, 53 opaque_mdl_status mdl_status); 54 55 void pfs_destroy_metadata_lock_v1(PSI_metadata_lock *lock); 56 57 struct PSI_metadata_locker* 58 pfs_start_metadata_wait_v1 59 (struct PSI_metadata_locker_state_v1 *state, 60 struct PSI_metadata_lock *mdl, 61 const char *src_file, uint src_line); 62 63 void pfs_end_metadata_wait_v1 64 (struct PSI_metadata_locker *locker, int rc); 65 66 C_MODE_END 67 68 #endif /* MYSQL_DYNAMIC_PLUGIN */ 69 #endif /* EMBEDDED_LIBRARY */ 70 #endif /* MYSQL_SERVER */ 71 #endif /* HAVE_PSI_METADATA_INTERFACE */ 72 73 #endif 74 75