InnoDB/XtraDB Encryption code cleanup

Step 4:
-- Review fixes
-- Rename pages_page_* to pages_*
-- Remove unnecessary code
This commit is contained in:
Jan Lindström 2015-04-01 22:03:14 +03:00 committed by Sergei Golubchik
parent 71ec0463af
commit af768c2f22
13 changed files with 128 additions and 213 deletions

View file

@ -180,20 +180,12 @@ fil_crypt_get_key(
crypt_data->keys[i] = crypt_data->keys[i - 1];
}
if (has_encryption_key(version)) {
int rc;
*key_length = get_encryption_key_size(version);
*key_length = sizeof(keybuf);
int rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
if (rc != CRYPT_KEY_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d can not be found. Reason=%d", version, rc);
ut_error;
}
} else {
if (rc != CRYPT_KEY_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d not found", version);
"Key %d can not be found. Reason=%d", version, rc);
ut_error;
}
@ -207,15 +199,15 @@ fil_crypt_get_key(
/* We use AES_ECB to encryp IV */
my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
int rc = (*func)(src, /* Data to be encrypted = IV */
srclen, /* data length */
buf, /* Output buffer */
&buflen, /* Output buffer */
keybuf, /* Key */
*key_length, /* Key length */
NULL, /* AES_ECB does not use IV */
0, /* IV-length */
1); /* NoPadding */
rc = (*func)(src, /* Data to be encrypted = IV */
srclen, /* data length */
buf, /* Output buffer */
&buflen, /* Output buffer */
keybuf, /* Key */
*key_length, /* Key length */
NULL, /* AES_ECB does not use IV */
0, /* IV-length */
1); /* NoPadding */
if (rc != AES_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
@ -250,14 +242,12 @@ fil_crypt_get_latest_key(
fil_space_crypt_t* crypt_data, /*!< in: crypt data */
uint* version) /*!< in: Key version */
{
if (srv_encrypt_tables) {
// used for key rotation - get the next key id from the key provider
int rc = get_latest_encryption_key_version();
// used for key rotation - get the next key id from the key provider
int rc = get_latest_encryption_key_version();
// if no new key was created use the last one
if (rc >= 0) {
*version = rc;
}
// if no new key was created use the last one
if (rc >= 0) {
*version = rc;
}
return fil_crypt_get_key(dst, key_length, crypt_data, *version);
@ -423,10 +413,6 @@ fil_space_destroy_crypt_data(
fil_space_crypt_t **crypt_data) /*!< out: crypt data */
{
if (crypt_data != NULL && (*crypt_data) != NULL) {
/* lock (and unlock) mutex to make sure no one has it locked
* currently */
mutex_enter(& (*crypt_data)->mutex);
mutex_exit(& (*crypt_data)->mutex);
mutex_free(& (*crypt_data)->mutex);
free(*crypt_data);
(*crypt_data) = NULL;
@ -755,6 +741,8 @@ fil_space_encrypt(
/* Store compression algorithm (for page compresed tables) or 0 */
mach_write_to_2(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 6,
compression_algo);
srv_stats.pages_encrypted.inc();
}
/*********************************************************************
@ -934,6 +922,8 @@ fil_space_decrypt(
compression_algo);
}
srv_stats.pages_decrypted.inc();
return true; /* page was decrypted */
}

View file

@ -815,12 +815,10 @@ static SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG},
{"num_pages_page_compression_error",
(char*) &export_vars.innodb_pages_page_compression_error, SHOW_LONGLONG},
{"num_pages_page_encrypted",
(char*) &export_vars.innodb_pages_page_encrypted, SHOW_LONGLONG},
{"num_pages_page_decrypted",
(char*) &export_vars.innodb_pages_page_decrypted, SHOW_LONGLONG},
{"num_pages_page_encryption_error",
(char*) &export_vars.innodb_pages_page_encryption_error, SHOW_LONGLONG},
{"num_pages_encrypted",
(char*) &export_vars.innodb_pages_encrypted, SHOW_LONGLONG},
{"num_pages_decrypted",
(char*) &export_vars.innodb_pages_decrypted, SHOW_LONGLONG},
{"have_lz4",
(char*) &innodb_have_lz4, SHOW_BOOL},
{"have_lzo",

View file

@ -328,9 +328,8 @@ enum monitor_id_t {
MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR,
/* New monitor variables for page encryption */
MONITOR_OVLD_PAGES_PAGE_ENCRYPTED,
MONITOR_OVLD_PAGES_PAGE_DECRYPTED,
MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR,
MONITOR_OVLD_PAGES_ENCRYPTED,
MONITOR_OVLD_PAGES_DECRYPTED,
/* Index related counters */
MONITOR_MODULE_INDEX,

View file

@ -133,12 +133,10 @@ struct srv_stats_t {
ulint_ctr_64_t pages_page_decompressed;
/* Number of page compression errors */
ulint_ctr_64_t pages_page_compression_error;
/* Number of pages encrypted with page encryption */
ulint_ctr_64_t pages_page_encrypted;
/* Number of pages decrypted with page encryption */
ulint_ctr_64_t pages_page_decrypted;
/* Number of page encryption errors */
ulint_ctr_64_t pages_page_encryption_error;
/* Number of pages encrypted */
ulint_ctr_64_t pages_encrypted;
/* Number of pages decrypted */
ulint_ctr_64_t pages_decrypted;
/** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read;
@ -1020,12 +1018,10 @@ struct export_var_t{
compression */
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
compression errors */
ib_int64_t innodb_pages_page_encrypted;/*!< Number of pages
encrypted by page encryption */
ib_int64_t innodb_pages_page_decrypted;/*!< Number of pages
decrypted by page encryption */
ib_int64_t innodb_pages_page_encryption_error;/*!< Number of page
encryption errors */
ib_int64_t innodb_pages_encrypted; /*!< Number of pages
encrypted */
ib_int64_t innodb_pages_decrypted; /*!< Number of pages
decrypted */
ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;

View file

@ -985,20 +985,15 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR},
{"compress_pages_page_encrypted", "compression",
"Number of pages encrypted by page encryption",
{"compress_pages_encrypted", "compression",
"Number of pages encrypted",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_ENCRYPTED},
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_ENCRYPTED},
{"compress_pages_page_decrypted", "compression",
"Number of pages decrypted by page encryption",
{"compress_pages_decrypted", "compression",
"Number of pages decrypted",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_DECRYPTED},
{"compress_pages_page_encryption_error", "compression",
"Number of page encryption errors ",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR},
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_DECRYPTED},
/* ========== Counters for Index ========== */
{"module_index", "index", "Index Manager",
@ -2014,14 +2009,11 @@ srv_mon_process_existing_counter(
case MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR:
value = srv_stats.pages_page_compression_error;
break;
case MONITOR_OVLD_PAGES_PAGE_ENCRYPTED:
value = srv_stats.pages_page_encrypted;
case MONITOR_OVLD_PAGES_ENCRYPTED:
value = srv_stats.pages_encrypted;
break;
case MONITOR_OVLD_PAGES_PAGE_DECRYPTED:
value = srv_stats.pages_page_decrypted;
break;
case MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR:
value = srv_stats.pages_page_encryption_error;
case MONITOR_OVLD_PAGES_DECRYPTED:
value = srv_stats.pages_decrypted;
break;
default:

View file

@ -1601,9 +1601,8 @@ srv_export_innodb_status(void)
export_vars.innodb_page_compressed_trim_op_saved = srv_stats.page_compressed_trim_op_saved;
export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed;
export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error;
export_vars.innodb_pages_page_decrypted = srv_stats.pages_page_decrypted;
export_vars.innodb_pages_page_encrypted = srv_stats.pages_page_encrypted;
export_vars.innodb_pages_page_encryption_error = srv_stats.pages_page_encryption_error;
export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted;
export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted;
export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures;

View file

@ -181,20 +181,12 @@ fil_crypt_get_key(
crypt_data->keys[i] = crypt_data->keys[i - 1];
}
if (has_encryption_key(version)) {
int rc;
*key_length = get_encryption_key_size(version);
*key_length = sizeof(keybuf);
int rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
if (rc != CRYPT_KEY_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d can not be found. Reason=%d", version, rc);
ut_error;
}
} else {
if (rc != CRYPT_KEY_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d not found", version);
"Key %d can not be found. Reason=%d", version, rc);
ut_error;
}
@ -208,15 +200,15 @@ fil_crypt_get_key(
/* We use AES_ECB to encryp IV */
my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
int rc = (*func)(src, /* Data to be encrypted = IV */
srclen, /* data length */
buf, /* Output buffer */
&buflen, /* Output buffer */
keybuf, /* Key */
*key_length, /* Key length */
NULL, /* AES_ECB does not use IV */
0, /* IV-length */
1); /* NoPadding */
rc = (*func)(src, /* Data to be encrypted = IV */
srclen, /* data length */
buf, /* Output buffer */
&buflen, /* Output buffer */
keybuf, /* Key */
*key_length, /* Key length */
NULL, /* AES_ECB does not use IV */
0, /* IV-length */
1); /* NoPadding */
if (rc != AES_OK) {
ib_logf(IB_LOG_LEVEL_FATAL,
@ -251,14 +243,12 @@ fil_crypt_get_latest_key(
fil_space_crypt_t* crypt_data, /*!< in: crypt data */
uint* version) /*!< in: Key version */
{
if (srv_encrypt_tables) {
// used for key rotation - get the next key id from the key provider
int rc = get_latest_encryption_key_version();
// used for key rotation - get the next key id from the key provider
int rc = get_latest_encryption_key_version();
// if no new key was created use the last one
if (rc >= 0) {
*version = rc;
}
// if no new key was created use the last one
if (rc >= 0) {
*version = rc;
}
return fil_crypt_get_key(dst, key_length, crypt_data, *version);
@ -424,10 +414,6 @@ fil_space_destroy_crypt_data(
fil_space_crypt_t **crypt_data) /*!< out: crypt data */
{
if (crypt_data != NULL && (*crypt_data) != NULL) {
/* lock (and unlock) mutex to make sure no one has it locked
* currently */
mutex_enter(& (*crypt_data)->mutex);
mutex_exit(& (*crypt_data)->mutex);
mutex_free(& (*crypt_data)->mutex);
free(*crypt_data);
(*crypt_data) = NULL;
@ -756,6 +742,8 @@ fil_space_encrypt(
/* Store compression algorithm (for page compresed tables) or 0 */
mach_write_to_2(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 6,
compression_algo);
srv_stats.pages_encrypted.inc();
}
/*********************************************************************
@ -935,6 +923,8 @@ fil_space_decrypt(
compression_algo);
}
srv_stats.pages_decrypted.inc();
return true; /* page was decrypted */
}

View file

@ -650,20 +650,6 @@ fil_node_open_file(
success = os_file_read(node->handle, page, 0, UNIV_PAGE_SIZE);
if (fil_page_is_encrypted(page)) {
/* if page is (still) encrypted, write an error and return.
* Otherwise the server would crash if decrypting is not possible.
* This may be the case, if the key file could not be
* opened on server startup.
*/
ib_logf(IB_LOG_LEVEL_ERROR,
"InnoDB: can not decrypt page, because "
"keys could not be read.\n"
);
return false;
}
space_id = fsp_header_get_space_id(page);
flags = fsp_header_get_flags(page);
@ -1939,7 +1925,6 @@ fil_check_first_page(
{
ulint space_id;
ulint flags;
ulint page_is_encrypted;
if (srv_force_recovery >= SRV_FORCE_IGNORE_CORRUPT) {
return(NULL);
@ -1947,20 +1932,14 @@ fil_check_first_page(
space_id = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page);
flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page);
/* Note: the 1st page is usually not encrypted. If the Key Provider
or the encryption key is not available, the
check for reading the first page should intentionally fail
with "can not decrypt" message. */
page_is_encrypted = fil_page_encryption_status(page, space_id);
if (!page_is_encrypted) {
if (UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) {
fprintf(stderr,
"InnoDB: Error: Current page size %lu != "
" page size on page %lu\n",
UNIV_PAGE_SIZE, fsp_flags_get_page_size(flags));
return("innodb-page-size mismatch");
}
if (UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) {
fprintf(stderr,
"InnoDB: Error: Current page size %lu != "
" page size on page %lu\n",
UNIV_PAGE_SIZE, fsp_flags_get_page_size(flags));
return("innodb-page-size mismatch");
}
if (!space_id && !flags) {
@ -1976,17 +1955,9 @@ fil_check_first_page(
}
}
if (!page_is_encrypted && buf_page_is_corrupted(
if (buf_page_is_corrupted(
false, page, fsp_flags_get_zip_size(flags))) {
return("checksum mismatch");
} else {
if (page_is_encrypted) {
/* this error message is interpreted by the calling method, which is
* executed if the server starts in recovery mode.
*/
return(FIL_MSG_CANNOT_DECRYPT);
}
}
if (page_get_space_id(page) == space_id
@ -2024,6 +1995,7 @@ fil_read_first_page(
byte* page;
lsn_t flushed_lsn;
const char* check_msg = NULL;
fil_space_crypt_t* cdata;
buf = static_cast<byte*>(ut_malloc(2 * UNIV_PAGE_SIZE));
@ -2042,13 +2014,6 @@ fil_read_first_page(
*space_id = fsp_header_get_space_id(page);
}
/* Page is page compressed page, need to decompress, before
continue. */
if (fil_page_is_compressed(page)) {
ulint write_size=0;
fil_decompress_page(NULL, page, UNIV_PAGE_SIZE, &write_size);
}
if (!one_read_already) {
check_msg = fil_check_first_page(page);
}
@ -2056,12 +2021,30 @@ fil_read_first_page(
flushed_lsn = mach_read_from_8(page +
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
ulint space = fsp_header_get_space_id(page);
ulint offset = fsp_header_get_crypt_offset(
fsp_flags_get_zip_size(*flags), NULL);
cdata = fil_space_read_crypt_data(space, page, offset);
/* If file space is encrypted we need to have at least some
encryption service available where to get keys */
if ((cdata && cdata->encryption == FIL_SPACE_ENCRYPTION_ON) ||
( srv_encrypt_tables &&
cdata && cdata->encryption == FIL_SPACE_ENCRYPTION_DEFAULT)) {
int rc = get_latest_encryption_key_version();
if (rc < 0) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Tablespace id %ld encrypted but encryption service"
" not available. Can't continue opening tablespace.\n",
space);
ut_error;
}
}
if (crypt_data) {
ulint space = fsp_header_get_space_id(page);
ulint offset =
fsp_header_get_crypt_offset(
fsp_flags_get_zip_size(*flags), NULL);
*crypt_data = fil_space_read_crypt_data(space, page, offset);
*crypt_data = cdata;
}
ut_free(buf);
@ -4216,7 +4199,6 @@ fil_validate_single_table_tablespace(
check_first_page:
fsp->success = TRUE;
fsp->encryption_error = 0;
if (const char* check_msg = fil_read_first_page(
fsp->file, FALSE, &fsp->flags, &fsp->id,
&fsp->lsn, &fsp->lsn, ULINT_UNDEFINED, &fsp->crypt_data)) {
@ -4224,14 +4206,6 @@ check_first_page:
"%s in tablespace %s (table %s)",
check_msg, fsp->filepath, tablename);
fsp->success = FALSE;
if (strncmp(check_msg, FIL_MSG_CANNOT_DECRYPT, strlen(check_msg))==0) {
/* by returning here, it should be avoided, that the server crashes,
* if started in recovery mode and can not decrypt tables, if
* the key file can not be read.
*/
fsp->encryption_error = 1;
return;
}
}
if (!fsp->success) {
@ -4386,13 +4360,6 @@ fil_load_single_table_tablespace(
if (!def.success && !remote.success) {
if (def.encryption_error || remote.encryption_error) {
fprintf(stderr,
"InnoDB: Error: could not open single-table"
" tablespace file %s. Encryption error!\n", def.filepath);
return;
}
/* The following call prints an error message */
os_file_get_last_error(true);
fprintf(stderr,

View file

@ -1013,12 +1013,10 @@ static SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG},
{"num_pages_page_compression_error",
(char*) &export_vars.innodb_pages_page_compression_error, SHOW_LONGLONG},
{"num_pages_page_encrypted",
(char*) &export_vars.innodb_pages_page_encrypted, SHOW_LONGLONG},
{"num_pages_page_decrypted",
(char*) &export_vars.innodb_pages_page_decrypted, SHOW_LONGLONG},
{"num_pages_page_encryption_error",
(char*) &export_vars.innodb_pages_page_encryption_error, SHOW_LONGLONG},
{"num_pages_encrypted",
(char*) &export_vars.innodb_pages_encrypted, SHOW_LONGLONG},
{"num_pages_decrypted",
(char*) &export_vars.innodb_pages_decrypted, SHOW_LONGLONG},
{"have_lz4",
(char*) &innodb_have_lz4, SHOW_BOOL},
{"have_lzo",

View file

@ -329,9 +329,8 @@ enum monitor_id_t {
MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR,
/* New monitor variables for page encryption */
MONITOR_OVLD_PAGES_PAGE_ENCRYPTED,
MONITOR_OVLD_PAGES_PAGE_DECRYPTED,
MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR,
MONITOR_OVLD_PAGES_ENCRYPTED,
MONITOR_OVLD_PAGES_DECRYPTED,
/* Index related counters */
MONITOR_MODULE_INDEX,

View file

@ -133,12 +133,10 @@ struct srv_stats_t {
ulint_ctr_64_t pages_page_decompressed;
/* Number of page compression errors */
ulint_ctr_64_t pages_page_compression_error;
/* Number of pages encrypted with page encryption */
ulint_ctr_64_t pages_page_encrypted;
/* Number of pages decrypted with page encryption */
ulint_ctr_64_t pages_page_decrypted;
/* Number of page encryption errors */
ulint_ctr_64_t pages_page_encryption_error;
/* Number of pages encrypted */
ulint_ctr_64_t pages_encrypted;
/* Number of pages decrypted */
ulint_ctr_64_t pages_decrypted;
/** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read;
@ -1238,12 +1236,10 @@ struct export_var_t{
compression */
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
compression errors */
ib_int64_t innodb_pages_page_encrypted;/*!< Number of pages
encrypted by page encryption */
ib_int64_t innodb_pages_page_decrypted;/*!< Number of pages
decrypted by page encryption */
ib_int64_t innodb_pages_page_encryption_error;/*!< Number of page
encryption errors */
ib_int64_t innodb_pages_encrypted; /*!< Number of pages
encrypted */
ib_int64_t innodb_pages_decrypted; /*!< Number of pages
decrypted */
ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;

View file

@ -985,20 +985,15 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR},
{"compress_pages_page_encrypted", "compression",
"Number of pages encrypted by page encryption",
{"compress_pages_encrypted", "compression",
"Number of pages encrypted",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_ENCRYPTED},
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_ENCRYPTED},
{"compress_pages_page_decrypted", "compression",
"Number of pages decrypted by page encryption",
{"compress_pages_decrypted", "compression",
"Number of pages decrypted",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_DECRYPTED},
{"compress_pages_page_encryption_error", "compression",
"Number of page encryption errors ",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR},
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_DECRYPTED},
/* ========== Counters for Index ========== */
{"module_index", "index", "Index Manager",
@ -2013,14 +2008,11 @@ srv_mon_process_existing_counter(
case MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR:
value = srv_stats.pages_page_compression_error;
break;
case MONITOR_OVLD_PAGES_PAGE_ENCRYPTED:
value = srv_stats.pages_page_encrypted;
case MONITOR_OVLD_PAGES_ENCRYPTED:
value = srv_stats.pages_encrypted;
break;
case MONITOR_OVLD_PAGES_PAGE_DECRYPTED:
value = srv_stats.pages_page_decrypted;
break;
case MONITOR_OVLD_PAGES_PAGE_ENCRYPTION_ERROR:
value = srv_stats.pages_page_encryption_error;
case MONITOR_OVLD_PAGES_DECRYPTED:
value = srv_stats.pages_decrypted;
break;
default:

View file

@ -1990,9 +1990,8 @@ srv_export_innodb_status(void)
export_vars.innodb_page_compressed_trim_op_saved = srv_stats.page_compressed_trim_op_saved;
export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed;
export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error;
export_vars.innodb_pages_page_decrypted = srv_stats.pages_page_decrypted;
export_vars.innodb_pages_page_encrypted = srv_stats.pages_page_encrypted;
export_vars.innodb_pages_page_encryption_error = srv_stats.pages_page_encryption_error;
export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted;
export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted;
export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures;