diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 7bac0843036..f0326b3634c 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1171,7 +1171,10 @@ err_exit: } if (create_new_db) + { + node->find_metadata(node->handle); continue; + } if (skip_read) { size+= node->size; diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h index 5dd581097f9..3c5db853fe9 100644 --- a/storage/innobase/include/buf0types.h +++ b/storage/innobase/include/buf0types.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. -Copyright (c) 2019, 2021, MariaDB Corporation. +Copyright (c) 2019, 2022, 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 @@ -162,7 +162,7 @@ public: /** Retrieve the fold value. @return fold value */ - ulint fold() const { return (space() << 20) + space() + page_no(); } + ulint fold() const { return (ulint{space()} << 20) + space() + page_no(); } /** Reset the page number only. @param[in] page_no page number */