diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-07-01 20:21:26 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-07-01 20:21:26 +0530 |
commit | 40c1f4bd4cdd8f8ed69c466e151a2c52f7b79b72 (patch) | |
tree | 1ed325c285c642a906a9b620a0e89a85af354a94 | |
parent | dca9792a24b78fa07d3ce72b7a39e7f765c50b41 (diff) | |
download | mariadb-git-40c1f4bd4cdd8f8ed69c466e151a2c52f7b79b72.tar.gz |
MDEV-19781 Add page id matching check in innochecksum tool
Changed the debug insert inside fil_io() to check whether it writes
the page to wrong offset only for user tablespace.
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index f718b8bdc52..bc542d36f46 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -5056,19 +5056,9 @@ fil_io( req_type.set_fil_node(node); -#ifdef UNIV_DEBUG - if (req_type.is_write() - && page_id.space() != SRV_LOG_SPACE_FIRST_ID - && (page_id.space() != TRX_SYS_SPACE - || buf_dblwr == NULL - || !(page_id.page_no() >= - (buf_dblwr->block1 + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) - || page_id.page_no() >= - (buf_dblwr->block2 + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE)))) { - - ut_ad(offset == page_id.page_no() * page_size.physical()); - } -#endif /* UNIV_DEBUG */ + ut_ad(!req_type.is_write() + || !fil_is_user_tablespace_id(page_id.space()) + || offset == page_id.page_no() * page_size.physical()); /* Queue the aio request */ dberr_t err = os_aio( |