1 /*****************************************************************************
2 
3 Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved.
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 as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
16 
17 *****************************************************************************/
18 
19 /******************************************************************//**
20 @file include/dict0pagecompress.h
21 Helper functions for extracting/storing page compression information
22 to dictionary.
23 
24 Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
25 ***********************************************************************/
26 
27 #ifndef dict0pagecompress_h
28 #define dict0pagecompress_h
29 
30 /********************************************************************//**
31 Extract the page compression level from table flags.
32 @return	page compression level, or 0 if not compressed */
33 UNIV_INLINE
34 ulint
35 dict_tf_get_page_compression_level(
36 /*===============================*/
37 	ulint	flags)			/*!< in: flags */
38 	__attribute__((const));
39 /********************************************************************//**
40 Extract the page compression flag from table flags
41 @return	page compression flag, or false if not compressed */
42 UNIV_INLINE
43 ibool
44 dict_tf_get_page_compression(
45 /*==========================*/
46 	ulint	flags)			/*!< in: flags */
47 	__attribute__((const));
48 
49 /********************************************************************//**
50 Check whether the table uses the page compressed page format.
51 @return	page compression level, or 0 if not compressed */
52 UNIV_INLINE
53 ulint
54 dict_table_page_compression_level(
55 /*==============================*/
56 	const dict_table_t*	table)	/*!< in: table */
57 	__attribute__((const));
58 
59 #include "dict0pagecompress.inl"
60 
61 #endif
62