mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-26601: mysys - O_TMPFILE ^ O_CREAT
Thanks to Fabian Vogt for noticing the mutual exclusions of these open flags on tmpfs caused by mariadb opening it incorrectly. As such we clear the O_CREAT flag while opening it as O_TMPFILE.
This commit is contained in:
parent
5527fc5861
commit
adaf0dde7f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue