From cf552f5886968fc022122960d3a9274ce9f27819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 7 Apr 2021 18:01:13 +0300 Subject: MDEV-25312 Replace fil_space_t::name with fil_space_t::name() A consistency check for fil_space_t::name is causing recovery failures in MDEV-25180 (Atomic ALTER TABLE). So, we'd better remove that field altogether. fil_space_t::name was more or less a copy of dict_table_t::name (except for some special cases), and it was not being used for anything useful. There used to be a name_hash, but it had been removed already in commit a75dbfd7183cc96680f3e3e684fd36500dac8158 (MDEV-12266). We will also remove os_normalize_path(), OS_PATH_SEPARATOR, OS_PATH_SEPATOR_ALT. On Microsoft Windows, we will treat \ and / roughly in the same way. The intention is that for per-table tablespaces, the filenames will always follow the pattern prefix/databasename/tablename.ibd. (Any \ in the prefix must not be converted.) ut_basename_noext(): Remove (unused function). read_link_file(): Replaces RemoteDatafile::read_link_file(). We will ensure that the last two path component separators are forward slashes (converting up to 2 trailing backslashes on Microsoft Windows), so that everywhere else we can assume that data file names end in "/databasename/tablename.ibd". Note: On Microsoft Windows, path names that start with \\?\ must not contain / as path component separators. Previously, such paths did work in the DATA DIRECTORY argument of InnoDB tables. Reviewed by: Vladislav Vaintroub --- storage/innobase/fsp/fsp0file.cc | 295 ++++++++++++----------------------- storage/innobase/fsp/fsp0fsp.cc | 9 +- storage/innobase/fsp/fsp0space.cc | 24 +-- storage/innobase/fsp/fsp0sysspace.cc | 92 +++++------ 4 files changed, 156 insertions(+), 264 deletions(-) (limited to 'storage/innobase/fsp') diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc index 57164113647..77faf58edcf 100644 --- a/storage/innobase/fsp/fsp0file.cc +++ b/storage/innobase/fsp/fsp0file.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2020, MariaDB Corporation. +Copyright (c) 2017, 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 @@ -30,29 +30,12 @@ Created 2013-7-26 by Kevin Lewis #include "page0page.h" #include "srv0start.h" -/** Initialize the name, size and order of this datafile -@param[in] name tablespace name, will be copied -@param[in] flags tablespace flags */ -void -Datafile::init( - const char* name, - ulint flags) -{ - ut_ad(m_name == NULL); - ut_ad(name != NULL); - - m_name = mem_strdup(name); - m_flags = flags; -} - /** Release the resources. */ void Datafile::shutdown() { close(); - ut_free(m_name); - m_name = NULL; free_filepath(); free_first_page(); } @@ -119,13 +102,12 @@ Datafile::open_read_only(bool strict) /** Open a data file in read-write mode during start-up so that doublewrite pages can be restored and then it can be validated.* -@param[in] read_only_mode if true, then readonly mode checks are enforced. @return DB_SUCCESS or error code */ -dberr_t -Datafile::open_read_write(bool read_only_mode) +inline dberr_t Datafile::open_read_write() { bool success = false; ut_ad(m_handle == OS_FILE_CLOSED); + ut_ad(!srv_read_only_mode); /* This function can be called for file objects that do not need to be opened, which is the case when the m_filepath is NULL */ @@ -136,7 +118,7 @@ Datafile::open_read_write(bool read_only_mode) set_open_flags(OS_FILE_OPEN); m_handle = os_file_create_simple_no_error_handling( innodb_data_file_key, m_filepath, m_open_flags, - OS_FILE_READ_WRITE, read_only_mode, &success); + OS_FILE_READ_WRITE, false, &success); if (!success) { m_last_os_error = os_file_get_last_error(true); @@ -182,24 +164,17 @@ Datafile::close() Prepend the dirpath to filename using the extension given. If dirpath is NULL, prepend the default datadir to filepath. Store the result in m_filepath. -@param[in] dirpath directory path -@param[in] filename filename or filepath -@param[in] ext filename extension */ -void -Datafile::make_filepath( - const char* dirpath, - const char* filename, - ib_extention ext) +@param dirpath directory path +@param name tablespace (table) name +@param ext filename extension */ +void Datafile::make_filepath(const char *dirpath, fil_space_t::name_type name, + ib_extention ext) { - ut_ad(dirpath != NULL || filename != NULL); - - free_filepath(); - - m_filepath = fil_make_filepath(dirpath, filename, ext, false); - - ut_ad(m_filepath != NULL); - - set_filename(); + ut_ad(dirpath || name.size()); + free_filepath(); + m_filepath= fil_make_filepath(dirpath, name, ext, false); + ut_ad(m_filepath); + set_filename(); } /** Set the filepath by duplicating the filepath sent in. This is the @@ -258,23 +233,6 @@ Datafile::same_as( #endif /* WIN32 */ } -/** Allocate and set the datafile or tablespace name in m_name. -If a name is provided, use it; else extract a file-per-table -tablespace name from m_filepath. The value of m_name -will be freed in the destructor. -@param[in] name tablespace name if known, NULL if not */ -void -Datafile::set_name(const char* name) -{ - ut_free(m_name); - - if (name != NULL) { - m_name = mem_strdup(name); - } else { - m_name = fil_path_to_space_name(m_filepath); - } -} - /** Reads a few significant fields from the first page of the first datafile. The Datafile must already be open. @param[in] read_only_mode If true, then readonly mode checks are enforced. @@ -454,7 +412,7 @@ Datafile::validate_for_recovery() page 0 from doublewrite and read the space ID from a survey of the first few pages. */ close(); - err = open_read_write(srv_read_only_mode); + err = open_read_write(); if (err != DB_SUCCESS) { return(err); } @@ -476,10 +434,6 @@ Datafile::validate_for_recovery() err = validate_first_page(0); } - if (err == DB_SUCCESS) { - set_name(NULL); - } - return(err); } @@ -491,11 +445,8 @@ m_is_valid is set true on success, else false. @retval DB_SUCCESS on if the datafile is valid @retval DB_CORRUPTION if the datafile is not readable @retval DB_TABLESPACE_EXISTS if there is a duplicate space_id */ -dberr_t -Datafile::validate_first_page(lsn_t* flush_lsn) +dberr_t Datafile::validate_first_page(lsn_t *flush_lsn) { - char* prev_name; - char* prev_filepath; const char* error_txt = NULL; m_is_valid = true; @@ -576,26 +527,30 @@ err_exit: goto err_exit; } - if (fil_space_read_name_and_filepath( - m_space_id, &prev_name, &prev_filepath)) { + mysql_mutex_lock(&fil_system.mutex); - if (0 == strcmp(m_filepath, prev_filepath)) { - ut_free(prev_name); - ut_free(prev_filepath); - return(DB_SUCCESS); + fil_space_t* space = fil_space_get_by_id(m_space_id); + + if (space) { + fil_node_t* node = UT_LIST_GET_FIRST(space->chain); + + if (node && !strcmp(m_filepath, node->name)) { + mysql_mutex_unlock(&fil_system.mutex); + return DB_SUCCESS; } /* Make sure the space_id has not already been opened. */ ib::error() << "Attempted to open a previously opened" - " tablespace. Previous tablespace " << prev_name - << " at filepath: " << prev_filepath - << " uses space ID: " << m_space_id - << ". Cannot open filepath: " << m_filepath - << " which uses the same space ID."; + " tablespace. Previous tablespace: " + << (node ? node->name : "(unknown)") + << " uses space ID: " << m_space_id + << ". Cannot open filepath: " << m_filepath + << " which uses the same space ID."; + } - ut_free(prev_name); - ut_free(prev_filepath); + mysql_mutex_unlock(&fil_system.mutex); + if (space) { m_is_valid = false; free_first_page(); @@ -809,68 +764,61 @@ Datafile::restore_from_doublewrite() != DB_SUCCESS); } -/** Create a link filename based on the contents of m_name, -open that file, and read the contents into m_filepath. -@retval DB_SUCCESS if remote linked tablespace file is opened and read. -@retval DB_CANNOT_OPEN_FILE if the link file does not exist. */ -dberr_t -RemoteDatafile::open_link_file() -{ - if (m_link_filepath == NULL) { - m_link_filepath = fil_make_filepath(NULL, name(), ISL, false); - } - - m_filepath = read_link_file(m_link_filepath); - - return(m_filepath == NULL ? DB_CANNOT_OPEN_FILE : DB_SUCCESS); -} - -/** Opens a handle to the file linked to in an InnoDB Symbolic Link file -in read-only mode so that it can be validated. -@param[in] strict whether to issue error messages -@return DB_SUCCESS if remote linked tablespace file is found and opened. */ -dberr_t -RemoteDatafile::open_read_only(bool strict) +/** Read an InnoDB Symbolic Link (ISL) file by name. +@param link_filepath filepath of the ISL file +@return data file name (must be freed by the caller) +@retval nullptr on error */ +static char *read_link_file(const char *link_filepath) { - if (m_filepath == NULL && open_link_file() == DB_CANNOT_OPEN_FILE) { - return(DB_ERROR); - } - - dberr_t err = Datafile::open_read_only(strict); - - if (err != DB_SUCCESS && strict) { - /* The following call prints an error message */ - os_file_get_last_error(true); - ib::error() << "A link file was found named '" - << m_link_filepath << "' but the linked tablespace '" - << m_filepath << "' could not be opened read-only."; - } - - return(err); + if (FILE* file= fopen(link_filepath, "r+b" STR_O_CLOEXEC)) + { + char *filepath= static_cast(ut_malloc_nokey(OS_FILE_MAX_PATH)); + + os_file_read_string(file, filepath, OS_FILE_MAX_PATH); + fclose(file); + + if (size_t len= strlen(filepath)) + { + /* Trim whitespace from end of filepath */ + len--; + while (filepath[len] >= 0 && filepath[len] <= 0x20) + filepath[len--]= 0; + if (!*filepath) + return nullptr; + /* Ensure that the last 2 path separators are forward slashes, + because elsewhere we are assuming that tablespace file names end + in "/databasename/tablename.ibd". */ + unsigned trailing_slashes= 0; + for (; len; len--) + { + switch (filepath[len]) { +#ifdef _WIN32 + case '\\': + filepath[len]= '/'; + /* fall through */ +#endif + case '/': + if (++trailing_slashes >= 2) + return filepath; + } + } + } + } + + return nullptr; } -/** Opens a handle to the file linked to in an InnoDB Symbolic Link file -in read-write mode so that it can be restored from doublewrite and validated. -@param[in] read_only_mode If true, then readonly mode checks are enforced. -@return DB_SUCCESS if remote linked tablespace file is found and opened. */ -dberr_t -RemoteDatafile::open_read_write(bool read_only_mode) +/** Create a link filename, +open that file, and read the contents into m_filepath. +@param name table name +@return filepath() +@retval nullptr if the .isl file does not exist or cannot be read */ +const char *RemoteDatafile::open_link_file(const table_name_t &name) { - if (m_filepath == NULL && open_link_file() == DB_CANNOT_OPEN_FILE) { - return(DB_ERROR); - } - - dberr_t err = Datafile::open_read_write(read_only_mode); - - if (err != DB_SUCCESS) { - /* The following call prints an error message */ - m_last_os_error = os_file_get_last_error(true); - ib::error() << "A link file was found named '" - << m_link_filepath << "' but the linked data file '" - << m_filepath << "' could not be opened for writing."; - } - - return(err); + if (!m_link_filepath) + m_link_filepath= fil_make_filepath(nullptr, name, ISL, false); + m_filepath= read_link_file(m_link_filepath); + return m_filepath; } /** Release the resources. */ @@ -885,16 +833,12 @@ RemoteDatafile::shutdown() } } -/** Creates a new InnoDB Symbolic Link (ISL) file. It is always created -under the 'datadir' of MySQL. The datadir is the directory of a -running mysqld program. We can refer to it by simply using the path ".". -@param[in] name tablespace name -@param[in] filepath remote filepath of tablespace datafile +/** Create InnoDB Symbolic Link (ISL) file. +@param name tablespace name +@param filepath full file name @return DB_SUCCESS or error code */ -dberr_t -RemoteDatafile::create_link_file( - const char* name, - const char* filepath) +dberr_t RemoteDatafile::create_link_file(fil_space_t::name_type name, + const char *filepath) { bool success; dberr_t err = DB_SUCCESS; @@ -902,7 +846,6 @@ RemoteDatafile::create_link_file( char* prev_filepath = NULL; ut_ad(!srv_read_only_mode); - ut_ad(0 == strcmp(&filepath[strlen(filepath) - 4], DOT_IBD)); link_filepath = fil_make_filepath(NULL, name, ISL, false); @@ -915,7 +858,8 @@ RemoteDatafile::create_link_file( /* Truncate (starting with MySQL 5.6, probably no longer since MariaDB Server 10.2.19) used to call this with an existing link file which contains the same filepath. */ - bool same = !strcmp(prev_filepath, filepath); + bool same = !strncmp(prev_filepath, name.data(), name.size()) + && !strcmp(prev_filepath + name.size(), DOT_IBD); ut_free(prev_filepath); if (same) { ut_free(link_filepath); @@ -963,9 +907,8 @@ RemoteDatafile::create_link_file( return(err); } - ulint rbytes = fwrite(filepath, 1, strlen(filepath), file); - - if (rbytes != strlen(filepath)) { + const size_t len = strlen(filepath); + if (fwrite(filepath, 1, len, file) != len) { error = os_file_get_last_error(true); ib::error() << "Cannot write link file: " @@ -994,50 +937,12 @@ RemoteDatafile::delete_link_file(void) } /** Delete an InnoDB Symbolic Link (ISL) file by name. -@param[in] name tablespace name */ -void -RemoteDatafile::delete_link_file( - const char* name) -{ - char* link_filepath = fil_make_filepath(NULL, name, ISL, false); - - if (link_filepath != NULL) { - os_file_delete_if_exists( - innodb_data_file_key, link_filepath, NULL); - - ut_free(link_filepath); - } -} - -/** Read an InnoDB Symbolic Link (ISL) file by name. -It is always created under the datadir of MySQL. -For file-per-table tablespaces, the isl file is expected to be -in a 'database' directory and called 'tablename.isl'. -The caller must free the memory returned if it is not null. -@param[in] link_filepath filepath of the ISL file -@return Filepath of the IBD file read from the ISL file */ -char* -RemoteDatafile::read_link_file( - const char* link_filepath) +@param name tablespace name */ +void RemoteDatafile::delete_link_file(fil_space_t::name_type name) { - FILE* file = fopen(link_filepath, "r+b" STR_O_CLOEXEC); - if (file == NULL) { - return(NULL); - } - - char* filepath = static_cast(ut_malloc_nokey(OS_FILE_MAX_PATH)); - - os_file_read_string(file, filepath, OS_FILE_MAX_PATH); - fclose(file); - - if (filepath[0] != '\0') { - /* Trim whitespace from end of filepath */ - ulint last_ch = strlen(filepath) - 1; - while (last_ch > 4 && filepath[last_ch] <= 0x20) { - filepath[last_ch--] = 0x00; - } - os_normalize_path(filepath); - } - - return(filepath); + if (char *link_filepath= fil_make_filepath(NULL, name, ISL, false)) + { + os_file_delete_if_exists(innodb_data_file_key, link_filepath, nullptr); + ut_free(link_filepath); + } } diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index 5ef65564b64..defdb35b575 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -1142,10 +1142,11 @@ fsp_alloc_free_page( ut_a(!is_system_tablespace(space_id)); if (page_no >= FSP_EXTENT_SIZE) { - ib::error() << "Trying to extend a single-table" - " tablespace " << space->name << " , by single" - " page(s) though the space size " << space_size - << ". Page no " << page_no << "."; + ib::error() << "Trying to extend " + << space->chain.start->name + << " by single page(s) though the size is " + << space_size + << ". Page no " << page_no << "."; return(NULL); } diff --git a/storage/innobase/fsp/fsp0space.cc b/storage/innobase/fsp/fsp0space.cc index b0a80efe7c4..b069250ff9f 100644 --- a/storage/innobase/fsp/fsp0space.cc +++ b/storage/innobase/fsp/fsp0space.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, MariaDB Corporation. +Copyright (c) 2017, 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 @@ -131,7 +131,7 @@ Tablespace::open_or_create(bool is_temp) } space = fil_space_t::create( - m_name, m_space_id, fsp_flags, + m_space_id, fsp_flags, is_temp ? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE, NULL); @@ -178,7 +178,7 @@ Tablespace::delete_files() if (success && file_pre_exists) { ib::info() << "Removed temporary tablespace data" - " file: \"" << it->m_name << "\""; + " file: \"" << it->m_filepath << "\""; } } } @@ -191,18 +191,13 @@ must end with the extension .ibd and have a basename of at least 1 byte. Set tablespace m_path member and add a Datafile with the filename. @param[in] datafile_path full path of the tablespace file. */ -dberr_t -Tablespace::add_datafile( - const char* datafile_added) +dberr_t Tablespace::add_datafile(const char *filepath) { /* The path provided ends in ".ibd". This was assured by validate_create_tablespace_info() */ - ut_d(const char* dot = strrchr(datafile_added, '.')); + ut_d(const char* dot = strrchr(filepath, '.')); ut_ad(dot != NULL && 0 == strcmp(dot, DOT_IBD)); - char* filepath = mem_strdup(datafile_added); - os_normalize_path(filepath); - /* If the path is an absolute path, separate it onto m_path and a basename. For relative paths, make the whole thing a basename so that it can be appended to the datadir. */ @@ -219,12 +214,9 @@ Tablespace::add_datafile( /* Now add a new Datafile and set the filepath using the m_path created above. */ - m_files.push_back(Datafile(m_name, m_flags, - FIL_IBD_FILE_INITIAL_SIZE, 0)); - Datafile* datafile = &m_files.back(); - datafile->make_filepath(m_path, basename, IBD); - - ut_free(filepath); + m_files.push_back(Datafile(m_flags, FIL_IBD_FILE_INITIAL_SIZE, 0)); + m_files.back().make_filepath(m_path, {basename, strlen(basename) - 4}, + IBD); return(DB_SUCCESS); } diff --git a/storage/innobase/fsp/fsp0sysspace.cc b/storage/innobase/fsp/fsp0sysspace.cc index a2c9e1bc688..aba7dac4a19 100644 --- a/storage/innobase/fsp/fsp0sysspace.cc +++ b/storage/innobase/fsp/fsp0sysspace.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, 2020, MariaDB Corporation. +Copyright (c) 2016, 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 @@ -275,10 +275,10 @@ SysTablespace::parse_params( } } - m_files.push_back(Datafile(filepath, flags(), uint32_t(size), - order)); - Datafile* datafile = &m_files.back(); - datafile->make_filepath(path(), filepath, NO_EXT); + m_files.push_back(Datafile(flags(), uint32_t(size), order)); + m_files.back().make_filepath(path(), + {filepath, strlen(filepath)}, + NO_EXT); if (::strlen(str) >= 6 && *str == 'n' @@ -361,13 +361,12 @@ SysTablespace::check_size( if (file.m_size > rounded_size_pages || (m_last_file_size_max > 0 && m_last_file_size_max < rounded_size_pages)) { - ib::error() << "The Auto-extending " << name() - << " data file '" << file.filepath() << "' is" - " of a different size " << rounded_size_pages - << " pages than specified" - " in the .cnf file: initial " << file.m_size - << " pages, max " << m_last_file_size_max - << " (relevant if non-zero) pages!"; + ib::error() << "The Auto-extending data file '" + << file.filepath() + << "' is of a different size " + << rounded_size_pages + << " pages than specified" + " by innodb_data_file_path"; return(DB_ERROR); } @@ -375,11 +374,11 @@ SysTablespace::check_size( } if (rounded_size_pages != file.m_size) { - ib::error() << "The " << name() << " data file '" + ib::error() << "The data file '" << file.filepath() << "' is of a different size " << rounded_size_pages << " pages" - " than the " << file.m_size << " pages specified in" - " the .cnf file!"; + " than the " << file.m_size << " pages specified by" + " innodb_data_file_path"; return(DB_ERROR); } @@ -584,7 +583,7 @@ SysTablespace::read_lsn_and_check_flags(lsn_t* flushed_lsn) if (space_id() != it->m_space_id) { ib::error() - << "The " << name() << " data file '" << it->name() + << "The data file '" << it->filepath() << "' has the wrong space ID. It should be " << space_id() << ", but " << it->m_space_id << " was found"; @@ -628,20 +627,16 @@ SysTablespace::check_file_status( break; case DB_SUCCESS: - /* Note: stat.rw_perm is only valid for "regular" files */ if (stat.type == OS_FILE_TYPE_FILE) { - if (!stat.rw_perm) { - const char *p = (!srv_read_only_mode - || m_ignore_read_only) - ? "writable" - : "readable"; - - ib::error() << "The " << name() << " data file" - << " '" << file.name() << "' must be " - << p; + ib::error() << "The data file" + << " '" << file.filepath() + << ((!srv_read_only_mode + || m_ignore_read_only) + ? "' must be writable" + : "' must be readable"); err = DB_ERROR; reason = FILE_STATUS_READ_WRITE_ERROR; @@ -649,9 +644,8 @@ SysTablespace::check_file_status( } else { /* Not a regular file, bail out. */ - ib::error() << "The " << name() << " data file '" - << file.name() << "' is not a regular" - " InnoDB data file."; + ib::error() << "The data file '" << file.filepath() + << "' is not a regular file."; err = DB_ERROR; reason = FILE_STATUS_NOT_REGULAR_FILE_ERROR; @@ -692,14 +686,14 @@ SysTablespace::file_not_found( *create_new_db = TRUE; if (space_id() == TRX_SYS_SPACE) { - ib::info() << "The first " << name() << " data file '" - << file.name() << "' did not exist." + ib::info() << "The first data file '" + << file.filepath() << "' did not exist." " A new tablespace will be created!"; } } else { - ib::info() << "Need to create a new " << name() - << " data file '" << file.name() << "'."; + ib::info() << "Need to create a new data file '" + << file.filepath() << "'."; } /* Set the file create mode. */ @@ -758,8 +752,8 @@ SysTablespace::check_file_spec( *create_new_db = FALSE; if (m_files.size() >= 1000) { - ib::error() << "There must be < 1000 data files in " - << name() << " but " << m_files.size() << " have been" + ib::error() << "There must be < 1000 data files " + " but " << m_files.size() << " have been" " defined."; return(DB_ERROR); @@ -798,22 +792,23 @@ SysTablespace::check_file_spec( } else if (err != DB_SUCCESS) { if (reason_if_failed == FILE_STATUS_READ_WRITE_ERROR) { - const char* p = (!srv_read_only_mode - || m_ignore_read_only) - ? "writable" : "readable"; - ib::error() << "The " << name() << " data file" - << " '" << it->name() << "' must be " - << p; + ib::error() << "The data file '" + << it->filepath() + << ((!srv_read_only_mode + || m_ignore_read_only) + ? "' must be writable" + : "' must be readable"); } ut_a(err != DB_FAIL); break; } else if (*create_new_db) { - ib::error() << "The " << name() << " data file '" - << begin->m_name << "' was not found but" - " one of the other data files '" << it->m_name - << "' exists."; + ib::error() << "The data file '" + << begin->filepath() + << "' was not found but" + " one of the other data files '" + << it->filepath() << "' exists."; err = DB_ERROR; break; @@ -907,7 +902,7 @@ SysTablespace::open_or_create( } else if (is_temp) { ut_ad(space_id() == SRV_TMP_SPACE_ID); space = fil_space_t::create( - name(), SRV_TMP_SPACE_ID, flags(), + SRV_TMP_SPACE_ID, flags(), FIL_TYPE_TEMPORARY, NULL); ut_ad(space == fil_system.temp_space); if (!space) { @@ -918,7 +913,7 @@ SysTablespace::open_or_create( } else { ut_ad(space_id() == TRX_SYS_SPACE); space = fil_space_t::create( - name(), TRX_SYS_SPACE, it->flags(), + TRX_SYS_SPACE, it->flags(), FIL_TYPE_TABLESPACE, NULL); ut_ad(space == fil_system.sys_space); if (!space) { @@ -965,8 +960,7 @@ uint32_t SysTablespace::get_increment() const if (!is_valid_size()) { - ib::error() << "The last data file in " << name() - << " has a size of " << last_file_size() + ib::error() << "The last data file has a size of " << last_file_size() << " but the max size allowed is " << m_last_file_size_max; } -- cgit v1.2.1