diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-09-14 12:15:27 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-09-14 12:15:27 +0300 |
commit | ddaddf1019f07f00ba419988f69f8cb9ebd3e169 (patch) | |
tree | ef0f1df817c455632c81c3dad4d6b6db01b834fc /storage/innobase/include/btr0btr.ic | |
parent | 71b14446013e2ff4e7f918c70fca95d0795f80e4 (diff) | |
download | mariadb-git-ddaddf1019f07f00ba419988f69f8cb9ebd3e169.tar.gz |
MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
Add error handling when getting block from encrypted table and decryption
fails.
Diffstat (limited to 'storage/innobase/include/btr0btr.ic')
-rw-r--r-- | storage/innobase/include/btr0btr.ic | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index 6604ac6a6f0..5fc621f469d 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -49,16 +49,19 @@ btr_block_get_func( ulint mode, /*!< in: latch mode */ const char* file, /*!< in: file name */ ulint line, /*!< in: line where called */ -#ifdef UNIV_SYNC_DEBUG - const dict_index_t* index, /*!< in: index tree, may be NULL + dict_index_t* index, /*!< in: index tree, may be NULL if it is not an insert buffer tree */ -#endif /* UNIV_SYNC_DEBUG */ mtr_t* mtr) /*!< in/out: mtr */ { buf_block_t* block; + dberr_t err; block = buf_page_get_gen(space, zip_size, page_no, mode, - NULL, BUF_GET, file, line, mtr); + NULL, BUF_GET, file, line, mtr, &err); + + if (err == DB_DECRYPTION_FAILED) { + index->table->is_encrypted = true; + } if (block) { if (mode != RW_NO_LATCH) { |