Skip to content

Commit f9725ff

Browse files
Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL
WHERE INNODB WRITES TEMP FILES - Reverting the patch.
1 parent 76228a2 commit f9725ff

File tree

22 files changed

+64
-329
lines changed

22 files changed

+64
-329
lines changed

include/mysql/plugin.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -578,23 +578,6 @@ int thd_allow_batch(MYSQL_THD thd);
578578
*/
579579
int mysql_tmpfile(const char *prefix);
580580

581-
/**
582-
Create a temporary file.
583-
584-
@details
585-
The temporary file is created in a location specified by the parameter
586-
path. if path is null, then it will be created on the location given
587-
by the mysql server configuration (--tmpdir option). The caller
588-
does not need to delete the file, it will be deleted automatically.
589-
590-
@param path location for creating temporary file
591-
@param prefix prefix for temporary file name
592-
@retval -1 error
593-
@retval >= 0 a file handle that can be passed to dup or my_close
594-
*/
595-
int mysql_tmpfile_path(const char *path, const char *prefix);
596-
597-
598581
/**
599582
Check the killed state of a connection
600583

include/mysql/plugin_audit.h.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
void thd_inc_row_count(void* thd);
236236
int thd_allow_batch(void* thd);
237237
int mysql_tmpfile(const char *prefix);
238-
int mysql_tmpfile_path(const char *path, const char *prefix);
239238
int thd_killed(const void* thd);
240239
void thd_binlog_pos(const void* thd,
241240
const char **file_var,

include/mysql/plugin_auth.h.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
void thd_inc_row_count(void* thd);
236236
int thd_allow_batch(void* thd);
237237
int mysql_tmpfile(const char *prefix);
238-
int mysql_tmpfile_path(const char *path, const char *prefix);
239238
int thd_killed(const void* thd);
240239
void thd_binlog_pos(const void* thd,
241240
const char **file_var,

include/mysql/plugin_ftparser.h.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
void thd_inc_row_count(void* thd);
189189
int thd_allow_batch(void* thd);
190190
int mysql_tmpfile(const char *prefix);
191-
int mysql_tmpfile_path(const char *path, const char *prefix);
192191
int thd_killed(const void* thd);
193192
void thd_binlog_pos(const void* thd,
194193
const char **file_var,

mysql-test/suite/innodb/r/tmpdir.result

Lines changed: 0 additions & 48 deletions
This file was deleted.

mysql-test/suite/innodb/t/tmpdir.test

Lines changed: 0 additions & 58 deletions
This file was deleted.

mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result

Lines changed: 0 additions & 29 deletions
This file was deleted.

mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test

Lines changed: 0 additions & 36 deletions
This file was deleted.

sql/sql_class.cc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -527,16 +527,8 @@ ulong get_max_connections(void)
527527

528528
extern "C" int mysql_tmpfile(const char *prefix)
529529
{
530-
return mysql_tmpfile_path(mysql_tmpdir, prefix);
531-
}
532-
533-
int mysql_tmpfile_path(const char *path, const char *prefix)
534-
{
535-
DBUG_ASSERT(path != NULL);
536-
DBUG_ASSERT((strlen(path) + strlen(prefix)) <= FN_REFLEN);
537-
538530
char filename[FN_REFLEN];
539-
File fd = create_temp_file(filename, path, prefix,
531+
File fd = create_temp_file(filename, mysql_tmpdir, prefix,
540532
#ifdef __WIN__
541533
O_BINARY | O_TRUNC | O_SEQUENTIAL |
542534
O_SHORT_LIVED |
@@ -557,6 +549,7 @@ int mysql_tmpfile_path(const char *path, const char *prefix)
557549
return fd;
558550
}
559551

552+
560553
extern "C"
561554
int thd_in_lock_tables(const THD *thd)
562555
{

storage/innobase/dict/dict0dict.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ dict_init(void)
983983
&dict_operation_lock, SYNC_DICT_OPERATION);
984984

985985
if (!srv_read_only_mode) {
986-
dict_foreign_err_file = os_file_create_tmpfile(NULL);
986+
dict_foreign_err_file = os_file_create_tmpfile();
987987
ut_a(dict_foreign_err_file);
988988

989989
mutex_create(dict_foreign_err_mutex_key,

0 commit comments

Comments
 (0)