diff options
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 8 | ||||
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 6 | ||||
-rw-r--r-- | storage/innobase/include/fil0fil.h | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 12775c74daf..062673287fa 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); @@ -846,7 +848,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 ce417b1e511..3b80b662dbc 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -5186,6 +5186,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 @@ -5197,7 +5198,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); @@ -5276,7 +5278,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 d8b6cf33675..4bb4b29e3dd 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1225,7 +1225,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 @@ -1237,7 +1237,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 |