diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 472f87ec4da..1b796159f48 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -6220,7 +6220,14 @@ fil_load_status Fil_shard::ibd_open_for_recovery(space_id_t space_id, const fil_node_t *file; - file = create_node(df.filepath(), 0, space, false, true, false); + /* For undo tablespaces, the behavior aligns with the setting of initial_size + within the srv_undo_tablespace_open function. */ + page_no_t n_pages = 0; + if (fsp_is_undo_tablespace(space->id)) { + n_pages = static_cast(size / UNIV_PAGE_SIZE); + } + + file = create_node(df.filepath(), n_pages, space, false, true, false); ut_a(file != nullptr);