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