diff --git a/mysql-test/suite/innodb/r/log_file_name.result b/mysql-test/suite/innodb/r/log_file_name.result index 220f5ab6699..6004f05ff98 100644 --- a/mysql-test/suite/innodb/r/log_file_name.result +++ b/mysql-test/suite/innodb/r/log_file_name.result @@ -21,7 +21,6 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Ignoring data file '.*t1.ibd' with space ID.*/ in mysqld.1.err FOUND 1 /InnoDB: Tablespace \d+ was not found at.*t3.ibd.*/ in mysqld.1.err # Fault 3: Wrong space_id in a dirty file, and no missing file. SELECT * FROM INFORMATION_SCHEMA.ENGINES diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test index df9f8664a64..b8f6025e617 100644 --- a/mysql-test/suite/innodb/t/log_file_name.test +++ b/mysql-test/suite/innodb/t/log_file_name.test @@ -54,9 +54,6 @@ let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Ano --source include/start_mysqld.inc eval $check_no_innodb; -let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t1.ibd' with space ID.*; ---source include/search_pattern_in_file.inc - let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at.*t3.ibd.*; --source include/search_pattern_in_file.inc diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 39e7507373f..2607856bc74 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2021, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2020, MariaDB Corporation. +Copyright (c) 2014, 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 @@ -4356,7 +4356,7 @@ fil_ibd_load( space = fil_space_get_by_id(space_id); mutex_exit(&fil_system->mutex); - if (space != NULL) { + if (space) { /* Compare the filename we are trying to open with the filename from the first node of the tablespace we opened previously. Fail if it is different. */ @@ -4368,8 +4368,8 @@ fil_ibd_load( << "' with space ID " << space->id << ". Another data file called " << node->name << " exists with the same space ID."; - space = NULL; - return(FIL_LOAD_ID_CHANGED); + space = NULL; + return(FIL_LOAD_ID_CHANGED); } return(FIL_LOAD_OK); } @@ -4406,13 +4406,6 @@ fil_ibd_load( os_offset_t minimum_size; case DB_SUCCESS: if (file.space_id() != space_id) { - ib::info() - << "Ignoring data file '" - << file.filepath() - << "' with space ID " << file.space_id() - << ", since the redo log references " - << file.filepath() << " with space ID " - << space_id << "."; return(FIL_LOAD_ID_CHANGED); } /* Get and test the file size. */