summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-09-15 20:23:07 +0300
committerMonty <monty@mariadb.org>2021-09-15 20:23:07 +0300
commitb4f24c745a42d69fca2d67ce827c30632ef4b5fc (patch)
treed33f5e720f6beb4d544635c2e30db974508eff95 /mysys
parentf03fee06b0f4bdb1d754d987db3375cade02445e (diff)
parent689b8d060ac890dcf1071b34a68234b30005e9a1 (diff)
downloadmariadb-git-b4f24c745a42d69fca2d67ce827c30632ef4b5fc.tar.gz
Merge branch '10.4' into 10.5
Fixed also an error in suite/perfschema/t/transaction_nested_events-master.opt
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_tempfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 51a3efa05ad..0f1c6d6b1bc 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -121,7 +121,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
/* explictly don't use O_EXCL here has it has a different
meaning with O_TMPFILE
*/
- if ((file= open(dir, mode | O_TMPFILE | O_CLOEXEC,
+ if ((file= open(dir, (mode & ~O_CREAT) | O_TMPFILE | O_CLOEXEC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) >= 0)
{
my_snprintf(to, FN_REFLEN, "%s/#sql/fd=%d", dir, file);