diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index f3b701816e6..3c2b697b0f4 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -105,6 +105,7 @@ flag is cleared and the x-lock released by an i/o-handler thread. @param[in] mode BUF_READ_IBUF_PAGES_ONLY, ..., @param[in] page_id page id @param[in] unzip true=request uncompressed page +@param[in] ignore_missing_space true=ignore missing space when reading @return 1 if a read request was queued, 0 if the page already resided in buf_pool, or if the page is in the doublewrite buffer blocks in which case it is never read into the pool, or if the tablespace does @@ -118,7 +119,8 @@ buf_read_page_low( ulint mode, const page_id_t& page_id, const page_size_t& page_size, - bool unzip) + bool unzip, + bool ignore_missing_space = false) { buf_page_t* bpage; @@ -178,7 +180,7 @@ buf_read_page_low( *err = fil_io( request, sync, page_id, page_size, 0, page_size.physical(), - dst, bpage); + dst, bpage, ignore_missing_space); if (sync) { thd_wait_end(NULL); @@ -847,7 +849,7 @@ tablespace_deleted: sync && (i + 1 == n_stored), 0, BUF_READ_ANY_PAGE, page_id, page_size, - true); + true, true /* ignore_missing_space */); switch(err) { case DB_SUCCESS: diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index eaa678bba3b..f34619663ad 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -5158,6 +5158,7 @@ fil_report_invalid_page_access( aligned @param[in] message message for aio handler if non-sync aio used, else ignored +@param[in] ignore_missing_space true=ignore missing space duging read @return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED if we are trying to do i/o on a tablespace which does not exist */ dberr_t @@ -5169,7 +5170,8 @@ fil_io( ulint byte_offset, ulint len, void* buf, - void* message) + void* message, + bool ignore_missing_space) { os_offset_t offset; IORequest req_type(type); @@ -5248,7 +5250,7 @@ fil_io( mutex_exit(&fil_system->mutex); - if (!req_type.ignore_missing()) { + if (!req_type.ignore_missing() && !ignore_missing_space) { ib::error() << "Trying to do I/O to a tablespace which" " does not exist. I/O type: " diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 204f031bce2..3b53fa28be3 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1224,7 +1224,7 @@ fil_space_get_n_reserved_extents( aligned @param[in] message message for aio handler if non-sync aio used, else ignored - +@param[in] ignore_missing_space true=ignore missing space during read @return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED if we are trying to do i/o on a tablespace which does not exist */ dberr_t @@ -1236,7 +1236,9 @@ fil_io( ulint byte_offset, ulint len, void* buf, - void* message); + void* message, + bool ignore_missing_space = false); + /**********************************************************************//** Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided