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/innobase/btr/btr0cur.cc | |
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/innobase/btr/btr0cur.cc')
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index eca232d81b4..18f193094e2 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -2138,9 +2138,12 @@ func_exit: if (page_zip && !(flags & BTR_KEEP_IBUF_BITMAP) && !dict_index_is_clust(index) - && page_is_leaf(buf_block_get_frame(block))) { - /* Update the free bits in the insert buffer. */ - ibuf_update_free_bits_zip(block, mtr); + && block) { + buf_frame_t* frame = buf_block_get_frame(block); + if (frame && page_is_leaf(frame)) { + /* Update the free bits in the insert buffer. */ + ibuf_update_free_bits_zip(block, mtr); + } } return(err); |