MySQL 8.0.31
Source Code Documentation
psi_table_service.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2022, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENTS_SERVICES_PSI_TABLE_SERVICE_H
24#define COMPONENTS_SERVICES_PSI_TABLE_SERVICE_H
25
28
30/** @sa get_table_share_v1_t. */
32/** @sa release_table_share_v1_t. */
34/** @sa drop_table_share_v1_t. */
36/** @sa open_table_v1_t. */
38/** @sa unbind_table_v1_t. */
39unbind_table_v1_t unbind_table;
40/** @sa rebind_table_v1_t. */
41rebind_table_v1_t rebind_table;
42/** @sa close_table_v1_t. */
43close_table_v1_t close_table;
44/** @sa start_table_io_wait_v1_t. */
45start_table_io_wait_v1_t start_table_io_wait;
46/** @sa end_table_io_wait_v1_t. */
47end_table_io_wait_v1_t end_table_io_wait;
48/** @sa start_table_lock_wait_v1_t. */
49start_table_lock_wait_v1_t start_table_lock_wait;
50/** @sa end_table_lock_wait_v1_t. */
51end_table_lock_wait_v1_t end_table_lock_wait;
52/** @sa end_table_lock_wait_v1_t. */
53unlock_table_v1_t unlock_table;
55
56#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:980
bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
Open a base table.
Definition: sql_base.cc:2804
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:680
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:2018
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:200
void(* release_table_share_v1_t)(struct PSI_table_share *share)
Release a table share.
Definition: psi_table_bits.h:130
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:212
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:221
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
void(* unlock_table_v1_t)(struct PSI_table *table)
Record a table unlock event.
Definition: psi_table_bits.h:227
void(* close_table_v1_t)(struct TABLE_SHARE *server_share, struct PSI_table *table)
Close an instrumentation table handle.
Definition: psi_table_bits.h:178
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
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
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:190
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:169
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:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85