From 14a8b700f3e031700bd49dec8f2dca0ae1786090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 17 Mar 2021 14:09:05 +0200 Subject: [PATCH] Cleanup: Remove unused OS_DATA_TEMP_FILE This had been originally added in mysql/mysql-server@192bb153b675fe09037a53e456a79eee7211e3a7 with the motivation to disable O_DIRECT for the dedicated tablespace for temporary tables. In MariaDB Server, commit 5eb539555b36a60944eefeb84d5d6d436ba61e63 (MDEV-12227) should be a better solution. The code became orphaned later in mysql/mysql-server@c61244c0e6c58727cffebfb312ac415a463fa0fe and it had been applied to MariaDB Server 10.2.2 in commit 2e814d4702d71a04388386a9f591d14a35980bfe and commit fec844aca88e1c6b9c36bb0b811e92d9d023ffb9. Thanks to Vladislav Vaintroub for spotting this. --- storage/innobase/include/os0file.h | 3 +-- storage/innobase/os/os0file.cc | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 82d1551de6cf0..23de5bd0ef1ce 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -2,7 +2,7 @@ Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2020, MariaDB Corporation. +Copyright (c) 2013, 2021, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Percona Inc.. Those modifications are @@ -160,7 +160,6 @@ static const ulint OS_FILE_NORMAL = 62; /** Types for file create @{ */ static const ulint OS_DATA_FILE = 100; static const ulint OS_LOG_FILE = 101; -static const ulint OS_DATA_TEMP_FILE = 102; static const ulint OS_DATA_FILE_NO_O_DIRECT = 103; /* @} */ diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 5c6da7ad51c9e..17a565c8db26d 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2019, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2020, MariaDB Corporation. +Copyright (c) 2013, 2021, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Percona Inc.. Those modifications are @@ -3007,7 +3007,6 @@ os_file_create_func( ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE - || type == OS_DATA_TEMP_FILE || type == OS_DATA_FILE_NO_O_DIRECT); ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL); @@ -3055,7 +3054,7 @@ os_file_create_func( /* We disable OS caching (O_DIRECT) only on data files */ if (!read_only && *success - && (type != OS_LOG_FILE && type != OS_DATA_TEMP_FILE + && (type != OS_LOG_FILE && type != OS_DATA_FILE_NO_O_DIRECT) && (srv_file_flush_method == SRV_O_DIRECT || srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)) {