diff options
Diffstat (limited to 'storage/innobase/include/fil0crypt.h')
-rw-r--r-- | storage/innobase/include/fil0crypt.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h index fdc413e7520..acac155ef3f 100644 --- a/storage/innobase/include/fil0crypt.h +++ b/storage/innobase/include/fil0crypt.h @@ -128,7 +128,8 @@ fil_space_crypt_t * fil_space_create_crypt_data( /*========================*/ fil_encryption_t encrypt_mode, /*!< in: encryption mode */ - uint key_id); /*!< in: encryption key id */ + uint key_id) /*!< in: encryption key id */ + __attribute__((warn_unused_result)); /********************************************************************* Destroy crypt data */ @@ -211,7 +212,8 @@ UNIV_INTERN bool fil_space_check_encryption_read( /*============================*/ - ulint space); /*!< in: tablespace id */ + ulint space) /*!< in: tablespace id */ + __attribute__((warn_unused_result)); /****************************************************************** Decrypt a page @@ -222,10 +224,11 @@ fil_space_decrypt( /*==============*/ fil_space_crypt_t* crypt_data, /*!< in: crypt data */ byte* tmp_frame, /*!< in: temporary buffer */ - ulint page_size, /*!< in: page size */ + const page_size_t& page_size, /*!< in: page size */ byte* src_frame, /*!< in:out: page buffer */ - dberr_t* err); /*!< in: out: DB_SUCCESS or + dberr_t* err) /*!< in: out: DB_SUCCESS or error code */ + __attribute__((warn_unused_result)); /********************************************************************* Encrypt buffer page @@ -239,8 +242,9 @@ fil_space_encrypt( ulint offset, /*!< in: page no */ lsn_t lsn, /*!< in: page lsn */ byte* src_frame, /*!< in: page frame */ - ulint size, /*!< in: size of data to encrypt */ - byte* dst_frame); /*!< in: where to encrypt to */ + const page_size_t& page_size, /*!< in: page size */ + byte* dst_frame) /*!< in: where to encrypt to */ + __attribute__((warn_unused_result)); /********************************************************************* Decrypt buffer page @@ -250,10 +254,10 @@ UNIV_INTERN byte* fil_space_decrypt( /*==============*/ - ulint space, /*!< in: tablespace id */ - byte* src_frame, /*!< in: page frame */ - ulint page_size, /*!< in: size of data to encrypt */ - byte* dst_frame) /*!< in: where to decrypt to */ + ulint space, /*!< in: tablespace id */ + byte* src_frame, /*!< in: page frame */ + const page_size_t& page_size, /*!< in: page size */ + byte* dst_frame) /*!< in: where to decrypt to */ __attribute__((warn_unused_result)); /********************************************************************* @@ -265,8 +269,9 @@ UNIV_INTERN bool fil_space_verify_crypt_checksum( /*============================*/ - const byte* src_frame,/*!< in: page frame */ - ulint zip_size); /*!< in: size of data to encrypt */ + const byte* src_frame,/*!< in: page frame */ + const page_size_t& page_size) /*!< in: page size */ + __attribute__((warn_unused_result)); /********************************************************************* Init threads for key rotation */ @@ -408,9 +413,9 @@ fil_encrypt_buf( ulint offset, /*!< in: Page offset */ lsn_t lsn, /*!< in: lsn */ byte* src_frame, /*!< in: Source page to be encrypted */ - ulint zip_size, /*!< in: compressed size if - row_format compressed */ - byte* dst_frame); /*!< in: outbut buffer */ + const page_size_t& page_size, /*!< in: page size */ + byte* dst_frame) /*!< in: outbut buffer */ + __attribute__((warn_unused_result)); /****************************************************************** Calculate post encryption checksum @@ -420,8 +425,9 @@ UNIV_INTERN ulint fil_crypt_calculate_checksum( /*=========================*/ - ulint zip_size, /*!< in: zip_size or 0 */ - byte* dst_frame); /*!< in: page where to calculate */ + const page_size_t& page_size, /*!< in: page size */ + byte* dst_frame) /*!< in: page where to calculate */ + __attribute__((warn_unused_result)); #ifndef UNIV_NONINL #include "fil0crypt.ic" |