diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-12-03 11:37:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-12-03 11:37:26 +0100 |
commit | ec4137c62b00a2bad91dd108f5782b206fe86a8b (patch) | |
tree | b284d929d1a498df14aafffd0c31831f2b4e9fd5 /storage/xtradb/include | |
parent | 1caee393076dc642a7d8e1283377b59ef8f52dbd (diff) | |
parent | bafe529af76a915f43dbf6a3fb8dc610a4ea121b (diff) | |
download | mariadb-git-ec4137c62b00a2bad91dd108f5782b206fe86a8b.tar.gz |
Merge branch '10.1' into bb-10.1-merge
Diffstat (limited to 'storage/xtradb/include')
-rw-r--r-- | storage/xtradb/include/fil0pagecompress.h | 7 | ||||
-rw-r--r-- | storage/xtradb/include/fsp0pagecompress.ic | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/storage/xtradb/include/fil0pagecompress.h b/storage/xtradb/include/fil0pagecompress.h index fb97af87460..c797c221efc 100644 --- a/storage/xtradb/include/fil0pagecompress.h +++ b/storage/xtradb/include/fil0pagecompress.h @@ -135,4 +135,11 @@ fil_page_is_compressed( /*===================*/ byte *buf); /*!< in: page */ +/*******************************************************************//** +Find out wheather the page is page compressed with lzo method +@return true if page is page compressed with lzo method*/ +ibool +fil_page_is_lzo_compressed( +/*=======================*/ + byte *buf); /*!< in: page */ #endif diff --git a/storage/xtradb/include/fsp0pagecompress.ic b/storage/xtradb/include/fsp0pagecompress.ic index a2553eeb47b..4dde042e19e 100644 --- a/storage/xtradb/include/fsp0pagecompress.ic +++ b/storage/xtradb/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); +} |