Skip to content

Commit

Permalink
Cleanup: Remove unused OS_DATA_TEMP_FILE
Browse files Browse the repository at this point in the history
This had been originally added in
mysql/mysql-server@192bb15
with the motivation to disable O_DIRECT for the dedicated tablespace
for temporary tables. In MariaDB Server,
commit 5eb5395 (MDEV-12227)
should be a better solution.

The code became orphaned later in
mysql/mysql-server@c61244c
and it had been applied to MariaDB Server 10.2.2 in
commit 2e814d4 and
commit fec844a.

Thanks to Vladislav Vaintroub for spotting this.
  • Loading branch information
dr-m committed Mar 18, 2021
1 parent c9ba668 commit 14a8b70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions storage/innobase/include/os0file.h
Expand Up @@ -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
Expand Down Expand Up @@ -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;
/* @} */

Expand Down
5 changes: 2 additions & 3 deletions storage/innobase/os/os0file.cc
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 14a8b70

Please sign in to comment.