diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 15 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 4 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0fil.cc | 16 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0start.cc | 3 |
4 files changed, 22 insertions, 16 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 5891db62758..31178b67a06 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2018, MariaDB Corporation. +Copyright (c) 2014, 2019, 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 @@ -838,10 +838,9 @@ fil_try_to_close_file_in_LRU( } /** Flush any writes cached by the file system. -@param[in,out] space tablespace */ -static -void -fil_flush_low(fil_space_t* space) +@param[in,out] space tablespace +@param[in] metadata whether to update file system metadata */ +static void fil_flush_low(fil_space_t* space, bool metadata = false) { ut_ad(mutex_own(&fil_system->mutex)); ut_ad(space); @@ -865,7 +864,7 @@ fil_flush_low(fil_space_t* space) } #endif /* UNIV_DEBUG */ - return; + if (!metadata) return; } /* Prevent dropping of the space while we are flushing */ @@ -1030,12 +1029,12 @@ fil_space_extend_must_retry( *success = os_file_set_size(node->name, node->handle, new_size, FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", *success = FALSE; os_has_said_disk_full = TRUE;); if (*success) { + os_file_flush(node->handle); os_has_said_disk_full = FALSE; start_page_no = size; } @@ -1063,7 +1062,7 @@ fil_space_extend_must_retry( = (node->size / pages_per_mb) * pages_per_mb; } - fil_flush_low(space); + fil_flush_low(space, true); return(false); } diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index db52e31881c..4ce3ea6672d 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -2312,6 +2312,10 @@ innobase_start_or_create_for_mysql() break; } + if (stat_info.type != OS_FILE_TYPE_FILE) { + break; + } + if (!srv_file_check_mode(logfilename)) { return(DB_ERROR); } diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index a8835083165..d6d2a6f887c 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2018, MariaDB Corporation. +Copyright (c) 2014, 2019, 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 @@ -846,10 +846,9 @@ fil_try_to_close_file_in_LRU( } /** Flush any writes cached by the file system. -@param[in,out] space tablespace */ -static -void -fil_flush_low(fil_space_t* space) +@param[in,out] space tablespace +@param[in] metadata whether to update file system metadata */ +static void fil_flush_low(fil_space_t* space, bool metadata = false) { ut_ad(mutex_own(&fil_system->mutex)); ut_ad(space); @@ -873,7 +872,7 @@ fil_flush_low(fil_space_t* space) } #endif /* UNIV_DEBUG */ - return; + if (!metadata) return; } /* Prevent dropping of the space while we are flushing */ @@ -1037,15 +1036,16 @@ fil_space_extend_must_retry( *success = os_file_set_size(node->name, node->handle, new_size, FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", *success = FALSE; os_has_said_disk_full = TRUE;); if (*success) { + os_file_flush(node->handle); os_has_said_disk_full = FALSE; start_page_no = size; } + mutex_enter(&fil_system->mutex); ut_a(node->being_extended); @@ -1069,7 +1069,7 @@ fil_space_extend_must_retry( = (node->size / pages_per_mb) * pages_per_mb; } - fil_flush_low(space); + fil_flush_low(space, true); return(false); } diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc index 75b664a0558..2553d405a19 100644 --- a/storage/xtradb/srv/srv0start.cc +++ b/storage/xtradb/srv/srv0start.cc @@ -2408,6 +2408,9 @@ innobase_start_or_create_for_mysql() break; } + if (stat_info.type != OS_FILE_TYPE_FILE) { + break; + } if (!srv_file_check_mode(logfilename)) { return(DB_ERROR); } |