summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/dict/dict0dict.cc2
-rw-r--r--storage/innobase/include/os0file.h7
-rw-r--r--storage/innobase/lock/lock0lock.cc2
-rw-r--r--storage/innobase/os/os0file.cc13
-rw-r--r--storage/innobase/srv/srv0start.cc4
5 files changed, 11 insertions, 17 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 4309ead2feb..122bbff4dc7 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1109,7 +1109,7 @@ dict_init(void)
dict_operation_lock, SYNC_DICT_OPERATION);
if (!srv_read_only_mode) {
- dict_foreign_err_file = os_file_create_tmpfile(NULL);
+ dict_foreign_err_file = os_file_create_tmpfile();
ut_a(dict_foreign_err_file);
}
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 13de798280a..dec5e974ad2 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -535,14 +535,11 @@ struct os_file_stat_t {
};
/** Create a temporary file. This function is like tmpfile(3), but
-the temporary file is created in the given parameter path. If the path
-is null then it will create the file in the mysql server configuration
+the temporary file is created in the in the mysql server configuration
parameter (--tmpdir).
-@param[in] path location for creating temporary file
@return temporary file handle, or NULL on error */
FILE*
-os_file_create_tmpfile(
- const char* path);
+os_file_create_tmpfile();
/** The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 7924966eb83..089ae5b8a3f 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -496,7 +496,7 @@ void lock_sys_t::create(ulint n_cells)
prdt_page_hash = hash_create(n_cells);
if (!srv_read_only_mode) {
- lock_latest_err_file = os_file_create_tmpfile(NULL);
+ lock_latest_err_file = os_file_create_tmpfile();
ut_a(lock_latest_err_file);
}
}
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index b0f4b90b127..0f82dea9c99 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -1215,19 +1215,16 @@ AIO::release_with_mutex(Slot* slot)
release();
}
-/** Creates a temporary file. This function is like tmpfile(3), but
-the temporary file is created in the given parameter path. If the path
-is NULL then it will create the file in the MySQL server configuration
+/** Create a temporary file. This function is like tmpfile(3), but
+the temporary file is created in the in the mysql server configuration
parameter (--tmpdir).
-@param[in] path location for creating temporary file
-@@return temporary file handle, or NULL on error */
+@return temporary file handle, or NULL on error */
FILE*
-os_file_create_tmpfile(
- const char* path)
+os_file_create_tmpfile()
{
FILE* file = NULL;
WAIT_ALLOW_WRITES();
- int fd = innobase_mysql_tmpfile(path);
+ int fd = innobase_mysql_tmpfile(NULL);
if (fd >= 0) {
file = fdopen(fd, "w+b");
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index eb508409e58..8b17fdaad96 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -1754,7 +1754,7 @@ innobase_start_or_create_for_mysql()
} else {
srv_monitor_file_name = NULL;
- srv_monitor_file = os_file_create_tmpfile(NULL);
+ srv_monitor_file = os_file_create_tmpfile();
if (!srv_monitor_file && err == DB_SUCCESS) {
err = DB_ERROR;
@@ -1764,7 +1764,7 @@ innobase_start_or_create_for_mysql()
mutex_create(LATCH_ID_SRV_MISC_TMPFILE,
&srv_misc_tmpfile_mutex);
- srv_misc_tmpfile = os_file_create_tmpfile(NULL);
+ srv_misc_tmpfile = os_file_create_tmpfile();
if (!srv_misc_tmpfile && err == DB_SUCCESS) {
err = DB_ERROR;