diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-17 14:03:51 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-17 14:03:51 +0300 |
commit | fe949504f0894686d434c6fbdac25efeb965253d (patch) | |
tree | 11bf92cdbb0c0454453c5e920d0a833cb35ecf4e /storage/innobase/include | |
parent | ca906fb27361f615a1c21d5ae61c312d9ab0dd87 (diff) | |
parent | 72c838b9fc3e5e9495d3c8e363ba85304b9db39a (diff) | |
download | mariadb-git-fe949504f0894686d434c6fbdac25efeb965253d.tar.gz |
Merge 10.2 into bb-10.2-ext
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/log0crypt.h | 40 | ||||
-rw-r--r-- | storage/innobase/include/row0ftsort.h | 1 | ||||
-rw-r--r-- | storage/innobase/include/row0merge.h | 15 | ||||
-rw-r--r-- | storage/innobase/include/row0mysql.h | 9 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 17 |
5 files changed, 61 insertions, 21 deletions
diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h index a5f7c56cc3f..d972ca01491 100644 --- a/storage/innobase/include/log0crypt.h +++ b/storage/innobase/include/log0crypt.h @@ -82,4 +82,44 @@ UNIV_INTERN void log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt = false); +/** Encrypt or decrypt a temporary file block. +@param[in] src block to encrypt or decrypt +@param[in] size size of the block +@param[out] dst destination block +@param[in] offs offset to block +@param[in] space_id tablespace id +@param[in] encrypt true=encrypt; false=decrypt +@return whether the operation succeeded */ +UNIV_INTERN +bool +log_tmp_block_encrypt( + const byte* src, + ulint size, + byte* dst, + uint64_t offs, + ulint space_id, + bool encrypt = true) + MY_ATTRIBUTE((warn_unused_result, nonnull)); + +/** Decrypt a temporary file block. +@param[in] src block to decrypt +@param[in] size size of the block +@param[out] dst destination block +@param[in] offs offset to block +@param[in] space_id tablespace id +@return whether the operation succeeded */ +inline +bool +log_tmp_block_decrypt( + const byte* src, + ulint size, + byte* dst, + uint64_t offs, + ulint space_id) +{ + return(log_tmp_block_encrypt(src, size, dst, offs, space_id, false)); +} + +/** @return whether temporary files are encrypted */ +inline bool log_tmp_is_encrypted() { return srv_encrypt_log; } #endif // log0crypt.h diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h index b1f3b8ab328..c8556cc4ca4 100644 --- a/storage/innobase/include/row0ftsort.h +++ b/storage/innobase/include/row0ftsort.h @@ -73,7 +73,6 @@ struct fts_psort_common_t { store Doc ID during sort, if Doc ID will not be big enough to use 8 bytes value */ - fil_space_crypt_t* crypt_data; /*!< crypt data or NULL */ }; struct fts_psort_t { diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index 50c3361a3f9..8ab4e2a2ee3 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -44,9 +44,6 @@ Created 13/06/2005 Jan Lindstrom /* Reserve free space from every block for key_version */ #define ROW_MERGE_RESERVE_SIZE 4 -/* Reserve free space from every block for key_version */ -#define ROW_MERGE_RESERVE_SIZE 4 - /* Cluster index read task is mandatory */ #define COST_READ_CLUSTERED_INDEX 1.0 @@ -373,15 +370,15 @@ row_merge_buf_sort( /********************************************************************//** Write a merge block to the file system. -@return TRUE if request was successful, FALSE if fail */ -ibool +@return whether the request was completed successfully */ +UNIV_INTERN +bool row_merge_write( /*============*/ int fd, /*!< in: file descriptor */ ulint offset, /*!< in: offset where to write, in number of row_merge_block_t elements */ const void* buf, /*!< in: data */ - fil_space_crypt_t* crypt_data, /*!< in: table crypt data */ void* crypt_buf, /*!< in: crypt buf or NULL */ ulint space) /*!< in: space id */ MY_ATTRIBUTE((warn_unused_result)); @@ -414,7 +411,6 @@ row_merge_file_create( @param[in] update_progress true, if we should update progress status @param[in] pct_progress total progress percent until now @param[in] pct_ocst current progress percent -@param[in] crypt_data tale crypt data @param[in] crypt_block crypt buf or NULL @param[in] space space_id @param[in,out] stage performance schema accounting object, used by @@ -432,7 +428,6 @@ row_merge_sort( const bool update_progress, const double pct_progress, const double pct_cost, - fil_space_crypt_t* crypt_data, row_merge_block_t* crypt_block, ulint space, ut_stage_alter_t* stage = NULL) @@ -464,7 +459,7 @@ row_merge_file_destroy( MY_ATTRIBUTE((nonnull)); /** Read a merge block from the file system. -@return whether the request was successful */ +@return whether the request was completed successfully */ bool row_merge_read( /*===========*/ @@ -473,7 +468,6 @@ row_merge_read( in number of row_merge_block_t elements */ row_merge_block_t* buf, /*!< out: data */ - fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */ ulint space) /*!< in: space id */ MY_ATTRIBUTE((warn_unused_result)); @@ -494,7 +488,6 @@ row_merge_read_rec( or NULL on end of list (non-NULL on I/O error) */ ulint* offsets,/*!< out: offsets of mrec */ - fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ ulint space) /*!< in: space id */ MY_ATTRIBUTE((warn_unused_result)); diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 8e93faf7286..2b000603929 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -262,15 +262,6 @@ row_get_prebuilt_update_vector( /*===========================*/ row_prebuilt_t* prebuilt); /*!< in: prebuilt struct in MySQL handle */ -/*********************************************************************//** -Checks if a table is such that we automatically created a clustered -index on it (on row id). -@return TRUE if the clustered index was generated automatically */ -ibool -row_table_got_default_clust_index( -/*==============================*/ - const dict_table_t* table); /*!< in: table */ - /** Does an update or delete of a row for MySQL. @param[in,out] prebuilt prebuilt struct in MySQL handle @return error code or DB_SUCCESS */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 3eddd300acc..a51520e881c 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -129,6 +129,14 @@ struct srv_stats_t ulint_ctr_64_t pages_encrypted; /* Number of pages decrypted */ ulint_ctr_64_t pages_decrypted; + /* Number of merge blocks encrypted */ + ulint_ctr_64_t n_merge_blocks_encrypted; + /* Number of merge blocks decrypted */ + ulint_ctr_64_t n_merge_blocks_decrypted; + /* Number of row log blocks encrypted */ + ulint_ctr_64_t n_rowlog_blocks_encrypted; + /* Number of row log blocks decrypted */ + ulint_ctr_64_t n_rowlog_blocks_decrypted; /** Number of data read in total (in bytes) */ ulint_ctr_1_t data_read; @@ -1052,6 +1060,15 @@ struct export_var_t{ int64_t innodb_pages_decrypted; /*!< Number of pages decrypted */ + /*!< Number of merge blocks encrypted */ + ib_int64_t innodb_n_merge_blocks_encrypted; + /*!< Number of merge blocks decrypted */ + ib_int64_t innodb_n_merge_blocks_decrypted; + /*!< Number of row log blocks encrypted */ + ib_int64_t innodb_n_rowlog_blocks_encrypted; + /*!< Number of row log blocks decrypted */ + ib_int64_t innodb_n_rowlog_blocks_decrypted; + ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */ ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */ |