summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fsp0pagecompress.ic
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@skysql.com>2014-12-03 10:41:52 +0200
committerJan Lindström <jan.lindstrom@skysql.com>2014-12-03 10:41:52 +0200
commitd4aef382fd9e3cc10ed687cc981b43aac1f29281 (patch)
tree6cf63e29aaebe4f60d1150fc73c46e7e9471d7b4 /storage/innobase/include/fsp0pagecompress.ic
parent01590005ba44f350f63b70a7ceb9f69095b293d5 (diff)
downloadmariadb-git-d4aef382fd9e3cc10ed687cc981b43aac1f29281.tar.gz
Fix compiler failure on fallocate function and used flags.
Diffstat (limited to 'storage/innobase/include/fsp0pagecompress.ic')
-rw-r--r--storage/innobase/include/fsp0pagecompress.ic13
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.ic
index 1ba3b7835c9..3e59106b05d 100644
--- a/storage/innobase/include/fsp0pagecompress.ic
+++ b/storage/innobase/include/fsp0pagecompress.ic
@@ -182,3 +182,16 @@ fil_space_get_atomic_writes(
return((atomic_writes_t)0);
}
+
+/*******************************************************************//**
+Find out wheather the page is page compressed with lzo method
+@return true if page is page compressed with lzo method, false if not */
+UNIV_INLINE
+ibool
+fil_page_is_lzo_compressed(
+/*=======================*/
+ byte *buf) /*!< in: page */
+{
+ return(mach_read_from_2(buf+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED &&
+ mach_read_from_8(buf+FIL_PAGE_FILE_FLUSH_LSN) == PAGE_LZO_ALGORITHM);
+}