diff options
Diffstat (limited to 'storage/innobase/buf/buf0rea.cc')
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 7877087dd4a..e6004ada302 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -279,11 +279,7 @@ buf_read_ahead_random( high = (page_id.page_no() / buf_read_ahead_random_area + 1) * buf_read_ahead_random_area; - /* Remember the tablespace version before we ask the tablespace size - below: if DISCARD + IMPORT changes the actual .ibd file meanwhile, we - do not try to read outside the bounds of the tablespace! */ if (fil_space_t* space = fil_space_acquire(page_id.space())) { - #ifdef UNIV_DEBUG if (srv_file_per_table) { ulint size = 0; @@ -301,9 +297,7 @@ buf_read_ahead_random( } #endif /* UNIV_DEBUG */ - if (high > space->size) { - high = space->size; - } + high = space->max_page_number_for_io(high); space->release(); } else { return(0); @@ -580,13 +574,10 @@ buf_read_ahead_linear( return(0); } - /* Remember the tablespace version before we ask te tablespace size - below: if DISCARD + IMPORT changes the actual .ibd file meanwhile, we - do not try to read outside the bounds of the tablespace! */ ulint space_size; if (fil_space_t* space = fil_space_acquire(page_id.space())) { - space_size = space->size; + space_size = space->committed_size; space->release(); if (high > space_size) { |