summaryrefslogtreecommitdiffstats
path: root/debian/patches/3039-os-data-file-no-o-direct.patch
blob: 634bfbd9b4217fcd0cfe9a4da9bee1672871c625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Forwarded: https://github.com/MariaDB/server/pull/3039 (merged in Feb 2024)
Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/3039.patch
From: Daniel Black <daniel@mariadb.org>
Date: Fri, 2 Feb 2024 11:38:00 +1100
Subject: [PATCH] MDEV-33095 MariaDB-backup - no OS_DATA_FILE_NO_O_DIRECT on
 some platforms

Postfix for a6290a5bc5f3cba096854595c354d19d9267743d, in 10.11
where OS_DATA_FILE_NO_O_DIRECT gets used. Same #ifdef conditions
as other uses of OS_DATA_FILE_NO_O_DIRECT.

Noticed on aarch64-macos builder.
---
 extra/mariabackup/xtrabackup.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -2428,7 +2428,12 @@ static bool innodb_init()
   os_file_delete_if_exists_func(ib_logfile0.c_str(), nullptr);
   os_file_t file= os_file_create_func(ib_logfile0.c_str(),
                                       OS_FILE_CREATE, OS_FILE_NORMAL,
-                                      OS_DATA_FILE_NO_O_DIRECT, false, &ret);
+#if defined _WIN32 || defined HAVE_FCNTL_DIRECT
+                                      OS_DATA_FILE_NO_O_DIRECT,
+#else
+                                      OS_DATA_FILE,
+#endif
+				      false, &ret);
   if (!ret)
   {
   invalid_log: