summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2013-12-18 11:05:18 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2013-12-18 11:05:18 +0100
commitba22c3f29a1b3277ac9b1094f13b9efcf39b05fb (patch)
tree799f10a187f6a64433df060f0b46fa02e11eb886 /libmysqld
parent11c0805e1d4ab1ba3e3b83aa5c041d69a6efa831 (diff)
downloadmariadb-git-ba22c3f29a1b3277ac9b1094f13b9efcf39b05fb.tar.gz
Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION
Bug#68338 RFE: make tmpdir a build-time configurable option Background: Some distributions use tmpfs for mounting /tmp by default, which has some advantages, but brings also new issues. Fedora started using tmpfs on /tmp in version 18 for example. If not configured otherwise in my.cnf, MySQL uses system's constant P_tmpdir expanded to /tmp on Linux. This can introduce some problems with limited space in /tmp and also some data loss in case of replication slave [1]. In case distributions would like to use /var/tmp, which should be better for MySQL purposes, then we have to patch the source or change tmpdir option in my.cnf, which is however not updated in case it has already existed. Thus, it would be useful to be able to specify default tmpdir path using a configure option, while using P_tmpdir in case it is not defined explicitly. Based on a contribution from Honza Horak
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 70cbe6080d7..0e77ddc923c 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -558,7 +558,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
opt_mysql_tmpdir=getenv("TMP");
#endif
if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0])
- opt_mysql_tmpdir=(char*) P_tmpdir; /* purecov: inspected */
+ opt_mysql_tmpdir= const_cast<char*>(DEFAULT_TMPDIR); /* purecov: inspected*/
init_ssl();
umask(((~my_umask) & 0666));