MySQL 8.4.2
Source Code Documentation
row0quiesce.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2012, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/** @file include/row0quiesce.h
29
30 Header file for tablespace quiesce functions.
31
32 Created 2012-02-08 by Sunny Bains
33 *******************************************************/
34
35#ifndef row0quiesce_h
36#define row0quiesce_h
37
38#include "dict0types.h"
39#include "univ.i"
40
41struct trx_t;
42
43/** The version number of the export meta-data text file. */
44constexpr uint32_t IB_EXPORT_CFG_VERSION_V1 = 1;
45/** The v2 .cfg has space flags written */
46constexpr uint32_t IB_EXPORT_CFG_VERSION_V2 = 2;
47/** The v3 .cfg writes instant column default values in metadata section. */
48constexpr uint32_t IB_EXPORT_CFG_VERSION_V3 = 3;
49/** The v4 .cfg has the is_ascending boolean written for each index column. */
50constexpr uint32_t IB_EXPORT_CFG_VERSION_V4 = 4;
51/** The v5 .cfg writes number of nullable column in table before first instant
52 column. */
53constexpr uint32_t IB_EXPORT_CFG_VERSION_V5 = 5;
54/** The v6 .cfg writes the Compression::Type of the table. */
55constexpr uint32_t IB_EXPORT_CFG_VERSION_V6 = 6;
56/** The v7 .cfg has metadata of INSTANT DROP/ADD columns. */
57constexpr uint32_t IB_EXPORT_CFG_VERSION_V7 = 7;
58/** Future version used to test that the correct error message is returned. */
59constexpr uint32_t IB_EXPORT_CFG_VERSION_V99 = 99;
60
61/** Quiesce the tablespace that the table resides in.
62@param[in] table Quiesce this table
63@param[in,out] trx Transaction/session */
65
66/** Set a table's quiesce state.
67 @return DB_SUCCESS or error code. */
68[[nodiscard]] dberr_t row_quiesce_set_state(
69 dict_table_t *table, /*!< in: quiesce this table */
70 ib_quiesce_t state, /*!< in: quiesce state to set */
71 trx_t *trx); /*!< in/out: transaction */
72
73/** Cleanup after table quiesce.
74@param[in] table Quiesce this table
75@param[in,out] trx Transaction/session */
77
78#endif /* row0quiesce_h */
dberr_t
Definition: db0err.h:39
Data dictionary global types.
ib_quiesce_t
Quiescing states for flushing tables to disk.
Definition: dict0types.h:311
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
constexpr uint32_t IB_EXPORT_CFG_VERSION_V2
The v2 .cfg has space flags written.
Definition: row0quiesce.h:46
void row_quiesce_table_start(dict_table_t *table, trx_t *trx)
Quiesce the tablespace that the table resides in.
Definition: row0quiesce.cc:924
void row_quiesce_table_complete(dict_table_t *table, trx_t *trx)
Cleanup after table quiesce.
Definition: row0quiesce.cc:986
constexpr uint32_t IB_EXPORT_CFG_VERSION_V99
Future version used to test that the correct error message is returned.
Definition: row0quiesce.h:59
constexpr uint32_t IB_EXPORT_CFG_VERSION_V3
The v3 .cfg writes instant column default values in metadata section.
Definition: row0quiesce.h:48
dberr_t row_quiesce_set_state(dict_table_t *table, ib_quiesce_t state, trx_t *trx)
Set a table's quiesce state.
Definition: row0quiesce.cc:1039
constexpr uint32_t IB_EXPORT_CFG_VERSION_V7
The v7 .cfg has metadata of INSTANT DROP/ADD columns.
Definition: row0quiesce.h:57
constexpr uint32_t IB_EXPORT_CFG_VERSION_V1
The version number of the export meta-data text file.
Definition: row0quiesce.h:44
constexpr uint32_t IB_EXPORT_CFG_VERSION_V4
The v4 .cfg has the is_ascending boolean written for each index column.
Definition: row0quiesce.h:50
constexpr uint32_t IB_EXPORT_CFG_VERSION_V5
The v5 .cfg writes number of nullable column in table before first instant column.
Definition: row0quiesce.h:53
constexpr uint32_t IB_EXPORT_CFG_VERSION_V6
The v6 .cfg writes the Compression::Type of the table.
Definition: row0quiesce.h:55
Data structure for a database table.
Definition: dict0mem.h:1909
Definition: trx0trx.h:684
std::atomic< trx_state_t > state
State of the trx from the point of view of concurrency control and the valid state transitions.
Definition: trx0trx.h:809
Version control for database, common definitions, and include files.