1 /*****************************************************************************
2 
3 Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License, version 2.0,
7 as published by the Free Software Foundation.
8 
9 This program is also distributed 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 included with MySQL.
15 
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License, version 2.0, for more details.
20 
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
24 
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 "univ.i"
39 #include "dict0types.h"
40 
41 struct trx_t;
42 
43 /** The version number of the export meta-data text file. */
44 #define IB_EXPORT_CFG_VERSION_V1	0x1UL
45 
46 /*********************************************************************//**
47 Quiesce the tablespace that the table resides in. */
48 UNIV_INTERN
49 void
50 row_quiesce_table_start(
51 /*====================*/
52 	dict_table_t*	table,		/*!< in: quiesce this table */
53 	trx_t*		trx)		/*!< in/out: transaction/session */
54         MY_ATTRIBUTE((nonnull));
55 
56 /*********************************************************************//**
57 Set a table's quiesce state.
58 @return DB_SUCCESS or errro code. */
59 UNIV_INTERN
60 dberr_t
61 row_quiesce_set_state(
62 /*==================*/
63 	dict_table_t*	table,		/*!< in: quiesce this table */
64 	ib_quiesce_t	state,		/*!< in: quiesce state to set */
65 	trx_t*		trx)		/*!< in/out: transaction */
66         MY_ATTRIBUTE((nonnull, warn_unused_result));
67 
68 /*********************************************************************//**
69 Cleanup after table quiesce. */
70 UNIV_INTERN
71 void
72 row_quiesce_table_complete(
73 /*=======================*/
74 	dict_table_t*	table,		/*!< in: quiesce this table */
75 	trx_t*		trx)		/*!< in/out: transaction/session */
76         MY_ATTRIBUTE((nonnull));
77 
78 #ifndef UNIV_NONINL
79 #include "row0quiesce.ic"
80 #endif
81 
82 #endif /* row0quiesce_h */
83