diff options
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); +} |