MySQL 9.1.0
Source Code Documentation
psi_transaction_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_TRANSACTION_SERVICE_H
25#define COMPONENTS_SERVICES_PSI_TRANSACTION_SERVICE_H
26
29
30BEGIN_SERVICE_DEFINITION(psi_transaction_v1)
31/** @sa get_thread_transaction_locker_v1_t. */
32get_thread_transaction_locker_v1_t get_thread_transaction_locker;
33/** @sa start_transaction_v1_t. */
35/** @sa set_transaction_xid_v1_t. */
36set_transaction_xid_v1_t set_transaction_xid;
37/** @sa set_transaction_xa_state_v1_t. */
38set_transaction_xa_state_v1_t set_transaction_xa_state;
39/** @sa set_transaction_gtid_v1_t. */
40set_transaction_gtid_v1_t set_transaction_gtid;
41/** @sa set_transaction_trxid_v1_t. */
42set_transaction_trxid_v1_t set_transaction_trxid;
43/** @sa inc_transaction_savepoints_v1_t. */
44inc_transaction_savepoints_v1_t inc_transaction_savepoints;
45/** @sa inc_transaction_rollback_to_savepoint_v1_t. */
47 inc_transaction_rollback_to_savepoint;
48/** @sa inc_transaction_release_savepoint_v1_t. */
49inc_transaction_release_savepoint_v1_t inc_transaction_release_savepoint;
50/** @sa end_transaction_v1_t. */
52END_SERVICE_DEFINITION(psi_transaction_v1)
53
54#endif /* COMPONENTS_SERVICES_PSI_TRANSACTION_SERVICE_H */
void(* end_transaction_v1_t)(struct PSI_transaction_locker *locker, bool commit)
Commit or rollback the transaction.
Definition: psi_transaction_bits.h:170
void(* set_transaction_trxid_v1_t)(struct PSI_transaction_locker *locker, const unsigned long long *trxid)
Set the transaction trx_id.
Definition: psi_transaction_bits.h:138
void(* set_transaction_gtid_v1_t)(struct PSI_transaction_locker *locker, const void *sid, const void *gtid_spec)
Set the transaction gtid.
Definition: psi_transaction_bits.h:129
void(* inc_transaction_release_savepoint_v1_t)(struct PSI_transaction_locker *locker, unsigned long count)
Increment a transaction event release savepoint count.
Definition: psi_transaction_bits.h:162
void(* inc_transaction_rollback_to_savepoint_v1_t)(struct PSI_transaction_locker *locker, unsigned long count)
Increment a transaction event rollback to savepoint count.
Definition: psi_transaction_bits.h:154
void(* set_transaction_xa_state_v1_t)(struct PSI_transaction_locker *locker, int xa_state)
Set the state of the XA transaction.
Definition: psi_transaction_bits.h:120
void(* inc_transaction_savepoints_v1_t)(struct PSI_transaction_locker *locker, unsigned long count)
Increment a transaction event savepoint count.
Definition: psi_transaction_bits.h:146
struct PSI_transaction_locker *(* get_thread_transaction_locker_v1_t)(struct PSI_transaction_locker_state_v1 *state, const void *xid, const unsigned long long *trxid, int isolation_level, bool read_only, bool autocommit)
Get a transaction instrumentation locker.
Definition: psi_transaction_bits.h:91
void(* set_transaction_xid_v1_t)(struct PSI_transaction_locker *locker, const void *xid, int xa_state)
Set the transaction xid.
Definition: psi_transaction_bits.h:112
void(* start_transaction_v1_t)(struct PSI_transaction_locker *locker, const char *src_file, unsigned int src_line)
Start a new transaction event.
Definition: psi_transaction_bits.h:102
static int start_transaction(MYSQL *mysql_con)
Definition: mysqldump.cc:5508
bool end_transaction(THD *thd, bool error)
Helper function to do rollback or commit, depending on error.
Definition: utils.cc:181
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