diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-09-26 12:29:31 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-09-27 07:54:27 +0300 |
commit | 452e84952228a290b3c1fb16a8f60e2990aa8710 (patch) | |
tree | fdfac1ee276f6da64eff7a2a4385794649ed271e /storage/xtradb/include/btr0btr.h | |
parent | 4e2a0c34b02dd556c2a521555662ed993cdc66a6 (diff) | |
download | mariadb-git-452e84952228a290b3c1fb16a8f60e2990aa8710.tar.gz |
MDEV-10886: encryption.innodb-bad-key-change fails (crashes) in buildbot
Problem was that NULL-pointer was accessed inside a macro when
page read from tablespace is encrypted but decrypt fails because
of incorrect key file.
Removed unsafe macro using inlined function where used pointers
are checked.
Diffstat (limited to 'storage/xtradb/include/btr0btr.h')
-rw-r--r-- | storage/xtradb/include/btr0btr.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/storage/xtradb/include/btr0btr.h b/storage/xtradb/include/btr0btr.h index 5047d1b2d4e..9ab62f7739f 100644 --- a/storage/xtradb/include/btr0btr.h +++ b/storage/xtradb/include/btr0btr.h @@ -298,9 +298,17 @@ btr_block_get_func( @param idx index tree, may be NULL if not the insert buffer tree @param mtr mini-transaction handle @return the uncompressed page frame */ -# define btr_page_get(space,zip_size,page_no,mode,idx,mtr) \ - buf_block_get_frame(btr_block_get(space,zip_size,page_no, \ - mode,idx,mtr)) +UNIV_INLINE +page_t* +btr_page_get( +/*=========*/ + ulint space, + ulint zip_size, + ulint root_page_no, + ulint mode, + dict_index_t* index, + mtr_t* mtr) + MY_ATTRIBUTE((warn_unused_result)); #endif /* !UNIV_HOTBACKUP */ /**************************************************************//** Gets the index id field of a page. |