diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 14:33:07 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 14:33:07 +0300 |
commit | 6e9642beb2cafecbcb96e591e1b4466b877d4885 (patch) | |
tree | 39aa60527982a3a91946c9c6e0608992a309f178 /storage/innobase/buf | |
parent | 8149e4d0a139b901c8902b5b9fae371cef47275f (diff) | |
parent | dfa2d0bc13362b949b1b1699955583f74e7db90a (diff) | |
download | mariadb-git-6e9642beb2cafecbcb96e591e1b4466b877d4885.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 9e3daa5e40e..b0eb56972fc 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2020, MariaDB Corporation. +Copyright (c) 2015, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -806,13 +806,18 @@ tablespace_deleted: continue; } - if (UNIV_UNLIKELY(page_nos[i] >= space->size)) { + ulint size = space->size; + if (!size) { + size = fil_space_get_size(space->id); + } + + if (UNIV_UNLIKELY(page_nos[i] >= size)) { do { ibuf_delete_recs(page_id_t(space_ids[i], page_nos[i])); } while (++i < n_stored && space_ids[i - 1] == space_ids[i] - && page_nos[i] >= space->size); + && page_nos[i] >= size); i--; next: space->release(); |