diff options
Diffstat (limited to 'storage/innobase/include/fsp0fsp.ic')
-rw-r--r-- | storage/innobase/include/fsp0fsp.ic | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/storage/innobase/include/fsp0fsp.ic b/storage/innobase/include/fsp0fsp.ic index e204ac3c69f..475dd238728 100644 --- a/storage/innobase/include/fsp0fsp.ic +++ b/storage/innobase/include/fsp0fsp.ic @@ -1,7 +1,7 @@ /***************************************************************************** -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, SkySQL Ab. All Rights Reserved. +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2013, 2016, MariaDB Corporation. 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 @@ -181,10 +181,11 @@ fsp_flags_set_page_size( @param[in] has_data_dir This tablespace is in a remote location. @param[in] is_shared This tablespace can be shared by many tables. @param[in] is_temporary This tablespace is temporary. +@param[in] is_encrypted This tablespace is encrypted. @param[in] page_compressed Table uses page compression @param[in] page_compression_level Page compression level @param[in] atomic_writes Table uses atomic writes -@return tablespace flags after initialization */ +@@return tablespace flags after initialization */ UNIV_INLINE ulint fsp_flags_init( @@ -195,7 +196,8 @@ fsp_flags_init( bool is_temporary, bool page_compression, ulint page_compression_level, - ulint atomic_writes) + ulint atomic_writes, + bool is_encrypted) { ut_ad(page_size.physical() <= page_size.logical()); ut_ad(!page_size.is_compressed() || atomic_blobs); @@ -229,6 +231,10 @@ fsp_flags_init( flags |= FSP_FLAGS_MASK_TEMPORARY; } + if (is_encrypted) { + flags |= FSP_FLAGS_MASK_ENCRYPTION; + } + /* In addition, tablespace flags also contain if the page compression is used for this table. */ if (page_compression) { @@ -247,6 +253,8 @@ fsp_flags_init( flags |= FSP_FLAGS_SET_ATOMIC_WRITES(flags, atomic_writes); } + ut_ad(fsp_flags_is_valid(flags)); + return(flags); } @@ -329,4 +337,15 @@ xdes_calc_descriptor_page( return(ut_2pow_round(offset, page_size.physical())); } + +/** Calculates the descriptor array size. +@param[in] page_size page size +@return size of descriptor array */ +UNIV_INLINE +ulint +xdes_arr_size( + const page_size_t& page_size) +{ + return(page_size.physical()/FSP_EXTENT_SIZE); +} #endif /* !UNIV_INNOCHECKSUM */ |