MySQL 9.0.0
Source Code Documentation
psi_table_service.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENTS_SERVICES_PSI_TABLE_SERVICE_H
25#define COMPONENTS_SERVICES_PSI_TABLE_SERVICE_H
26
29
31/** @sa get_table_share_v1_t. */
33/** @sa release_table_share_v1_t. */
35/** @sa drop_table_share_v1_t. */
37/** @sa open_table_v1_t. */
39/** @sa unbind_table_v1_t. */
40unbind_table_v1_t unbind_table;
41/** @sa rebind_table_v1_t. */
42rebind_table_v1_t rebind_table;
43/** @sa close_table_v1_t. */
45/** @sa start_table_io_wait_v1_t. */
46start_table_io_wait_v1_t start_table_io_wait;
47/** @sa end_table_io_wait_v1_t. */
48end_table_io_wait_v1_t end_table_io_wait;
49/** @sa start_table_lock_wait_v1_t. */
50start_table_lock_wait_v1_t start_table_lock_wait;
51/** @sa end_table_lock_wait_v1_t. */
52end_table_lock_wait_v1_t end_table_lock_wait;
53/** @sa end_table_lock_wait_v1_t. */
54unlock_table_v1_t unlock_table;
56
57#endif /* COMPONENTS_SERVICES_PSI_TABLE_SERVICE_H */
void release_table_share(TABLE_SHARE *share)
Mark that we are not using table share anymore.
Definition: sql_base.cc:1055
TABLE_SHARE * get_table_share(THD *thd, const char *db, const char *table_name, const char *key, size_t key_length, bool open_view, bool open_secondary)
Get the TABLE_SHARE for a table.
Definition: sql_base.cc:748
void drop_table_share(PFS_thread *thread, bool temporary, const char *schema_name, uint schema_name_length, const char *table_name, uint table_name_length)
Drop the instrumented table share associated with a table.
Definition: pfs_instr_class.cc:2395
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:201
void(* release_table_share_v1_t)(struct PSI_table_share *share)
Release a table share.
Definition: psi_table_bits.h:131
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:213
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:222
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:152
void(* unlock_table_v1_t)(struct PSI_table *table)
Record a table unlock event.
Definition: psi_table_bits.h:228
void(* close_table_v1_t)(struct TABLE_SHARE *server_share, struct PSI_table *table)
Close an instrumentation table handle.
Definition: psi_table_bits.h:179
void(* unbind_table_v1_t)(struct PSI_table *table)
Unbind a table handle from the current thread.
Definition: psi_table_bits.h:160
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:124
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:141
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:191
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:170
void close_table(PSI_table_handle *h)
Definition: pfs.cc:294
PSI_table_handle * open_table(PSI_pos **pos)
Definition: pfs.cc:266
Performance schema instrumentation interface.
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86