summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fsp0pagecompress.ic
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2013-12-19 14:36:38 +0200
committerJan Lindström <jplindst@mariadb.org>2013-12-19 14:36:38 +0200
commit5e55d1ced52c52fb2f0508e1346059901a85960f (patch)
tree517032a404d9b0ebde9b9174459fbce301dcec95 /storage/innobase/include/fsp0pagecompress.ic
parent1f4f425a2007c51eeee35f911a787fc7d82d977c (diff)
downloadmariadb-git-5e55d1ced52c52fb2f0508e1346059901a85960f.tar.gz
Changes for Fusion-io multi-threaded flush, page compressed tables and
tables using atomic write/table. This is work in progress and some parts are at most POC quality.
Diffstat (limited to 'storage/innobase/include/fsp0pagecompress.ic')
-rw-r--r--storage/innobase/include/fsp0pagecompress.ic61
1 files changed, 61 insertions, 0 deletions
diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.ic
new file mode 100644
index 00000000000..1dffd1bedf1
--- /dev/null
+++ b/storage/innobase/include/fsp0pagecompress.ic
@@ -0,0 +1,61 @@
+/*****************************************************************************
+
+Copyright (C) 2013 SkySQL Ab. All Rights Reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+*****************************************************************************/
+
+/******************************************************************//**
+@file include/fsp0pagecompress.ic
+Implementation for helper functions for extracting/storing page
+compression and atomic writes information to file space.
+
+Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
+***********************************************************************/
+
+/********************************************************************//**
+Determine if the tablespace is page compressed from dict_table_t::flags.
+@return TRUE if page compressed, FALSE if not page compressed */
+UNIV_INLINE
+ibool
+fsp_flags_is_page_compressed(
+/*=========================*/
+ ulint flags) /*!< in: tablespace flags */
+{
+ return(FSP_FLAGS_GET_PAGE_COMPRESSION(flags));
+}
+
+/********************************************************************//**
+Determine the tablespace is page compression level from dict_table_t::flags.
+@return page compression level or 0 if not compressed*/
+UNIV_INLINE
+ulint
+fsp_flags_get_page_compression_level(
+/*=================================*/
+ ulint flags) /*!< in: tablespace flags */
+{
+ return(FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags));
+}
+
+/********************************************************************//**
+Determine the tablespace is using atomic writes from dict_table_t::flags.
+@return true if atomic writes is used, false if not */
+UNIV_INLINE
+ibool
+fsp_flags_get_atomic_writes(
+/*========================*/
+ ulint flags) /*!< in: tablespace flags */
+{
+ return(FSP_FLAGS_GET_ATOMIC_WRITES(flags));
+}