Debian Codegraph @

storage/innobase/include/row0quiesce.h

raw
1 /*****************************************************************************
2
3 Copyright (c) 2012, 2026, Oracle and/or its affiliates.
4
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License, version 2.0, as published by the
7 Free Software Foundation.
8
9 This program is designed to work with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have either included with
15 the program or referenced in the documentation.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20 for more details.
21
22 You should have received a copy of the GNU General Public License along with
23 this program; if not, write to the Free Software Foundation, Inc.,
24 51 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
41 struct trx_t;
42
43 /** The version number of the export meta-data text file. */
44 constexpr uint32_t IB_EXPORT_CFG_VERSION_V1 = 1;
45 /** The v2 .cfg has space flags written */
46 constexpr uint32_t IB_EXPORT_CFG_VERSION_V2 = 2;
47 /** The v3 .cfg writes instant column default values in metadata section. */
48 constexpr uint32_t IB_EXPORT_CFG_VERSION_V3 = 3;
49 /** The v4 .cfg has the is_ascending boolean written for each index column. */
50 constexpr uint32_t IB_EXPORT_CFG_VERSION_V4 = 4;
51 /** The v5 .cfg writes number of nullable column in table before first instant
52 column. */
53 constexpr uint32_t IB_EXPORT_CFG_VERSION_V5 = 5;
54 /** The v6 .cfg writes the Compression::Type of the table. */
55 constexpr uint32_t IB_EXPORT_CFG_VERSION_V6 = 6;
56 /** The v7 .cfg has metadata of INSTANT DROP/ADD columns. */
57 constexpr uint32_t IB_EXPORT_CFG_VERSION_V7 = 7;
58 /** Future version used to test that the correct error message is returned. */
59 constexpr 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 */
64 void row_quiesce_table_start(dict_table_t *table, trx_t *trx);
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 */
76 void row_quiesce_table_complete(dict_table_t *table, trx_t *trx);
77
78 #endif /* row0quiesce_h */