diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 92795a8f797..b58ed52db31 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -336,24 +336,9 @@ ulong get_max_connections(void) extern "C" int mysql_tmpfile(const char *prefix) { char filename[FN_REFLEN]; - File fd = create_temp_file(filename, mysql_tmpdir, prefix, -#ifdef __WIN__ - O_BINARY | O_TRUNC | O_SEQUENTIAL | - O_SHORT_LIVED | -#endif /* __WIN__ */ - O_CREAT | O_EXCL | O_RDWR | O_TEMPORARY, - MYF(MY_WME)); - if (fd >= 0) { -#ifndef __WIN__ - /* - This can be removed once the following bug is fixed: - Bug #28903 create_temp_file() doesn't honor O_TEMPORARY option - (file not removed) (Unix) - */ - unlink(filename); -#endif /* !__WIN__ */ - } - + File fd= create_temp_file(filename, mysql_tmpdir, prefix, + O_BINARY | O_SEQUENTIAL, + MYF(MY_WME | MY_TEMPORARY)); return fd; } |