summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-09-14 08:27:14 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-09-14 08:27:36 +0300
commitd581ef5b2c68465815d78548357e3e104e39f5d6 (patch)
tree97a63640fd5aea58652f6121135442607b8a1ff7 /storage/xtradb/buf
parent27ec0e159b05155ee92aaabe9466d78ef3a26712 (diff)
downloadmariadb-git-d581ef5b2c68465815d78548357e3e104e39f5d6.tar.gz
MDEV-8764: Wrong error when encrypted table can't be decrypted.
Add a new error message when table is encrypted but decryption fails. Use this new error message on InnoDB/XtraDB.
Diffstat (limited to 'storage/xtradb/buf')
-rw-r--r--storage/xtradb/buf/buf0buf.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 31157aa737f..85023be9402 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -2911,12 +2911,15 @@ loop:
ib_mutex_t* pmutex = buf_page_get_mutex(bpage);
mutex_enter(&buf_pool->LRU_list_mutex);
mutex_enter(pmutex);
+ buf_block_t* block = buf_page_get_block(bpage);
buf_page_set_io_fix(bpage, BUF_IO_NONE);
- buf_LRU_free_page(bpage, zip_size ? true : false);
+ buf_block_set_state(block, BUF_BLOCK_NOT_USED);
+ buf_block_set_state(block, BUF_BLOCK_READY_FOR_USE);
+ mutex_exit(&buf_pool->LRU_list_mutex);
mutex_exit(pmutex);
if (err) {
- *err = DB_ENCRYPTED_DECRYPT_FAILED;
+ *err = DB_DECRYPTION_FAILED;
}
return (NULL);
}
@@ -2954,12 +2957,15 @@ loop:
ib_mutex_t* pmutex = buf_page_get_mutex(bpage);
mutex_enter(&buf_pool->LRU_list_mutex);
mutex_enter(pmutex);
+ buf_block_t* block = buf_page_get_block(bpage);
buf_page_set_io_fix(bpage, BUF_IO_NONE);
- buf_LRU_free_page(bpage, zip_size ? true : false);
+ buf_block_set_state(block, BUF_BLOCK_NOT_USED);
+ buf_block_set_state(block, BUF_BLOCK_READY_FOR_USE);
+ mutex_exit(&buf_pool->LRU_list_mutex);
mutex_exit(pmutex);
if (err) {
- *err = DB_ENCRYPTED_DECRYPT_FAILED;
+ *err = DB_DECRYPTION_FAILED;
}
return (NULL);
}
@@ -4721,7 +4727,7 @@ corrupt:
ut_error;
}
- ib_push_warning(innobase_get_trx(), DB_ENCRYPTED_DECRYPT_FAILED,
+ ib_push_warning(innobase_get_trx(), DB_DECRYPTION_FAILED,
"Table in tablespace %lu encrypted."
"However key management plugin or used key_id %lu is not found or"
" used encryption algorithm or method does not match."