Use /var/tmp instead of /tmp, since the later is using tmpfs,
which can cause problems Resolves: #962087
This commit is contained in:
parent
36438a3dd0
commit
cf6dc1b3a8
87
mariadb-tmpdir.patch
Normal file
87
mariadb-tmpdir.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
Directory /tmp is now on tmpfs, which can cause problems with limitted space
|
||||||
|
or replication. It's documented here:
|
||||||
|
http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_tmpdir
|
||||||
|
|
||||||
|
"If the MySQL server is acting as a replication slave, you should not set --tmpdir
|
||||||
|
to point to a directory on a memory-based file system or to a directory that is
|
||||||
|
cleared when the server host restarts."
|
||||||
|
|
||||||
|
RHBZ#962087
|
||||||
|
Upstream bug report: https://mariadb.atlassian.net/browse/MDEV-4165
|
||||||
|
MySQL bug report: http://bugs.mysql.com/bug.php?id=68338
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.31/CMakeLists.txt.tmpdir mariadb-5.5.31/CMakeLists.txt
|
||||||
|
--- mariadb-5.5.31/CMakeLists.txt.tmpdir 2013-05-22 00:09:51.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/CMakeLists.txt 2013-05-24 13:28:47.830720926 +0200
|
||||||
|
@@ -246,6 +246,9 @@ IF(INSTALL_SYSCONFDIR)
|
||||||
|
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
+IF(TMPDIR)
|
||||||
|
+ SET(DEFAULT_TMPDIR "${TMPDIR}")
|
||||||
|
+ENDIF()
|
||||||
|
|
||||||
|
# Run platform tests
|
||||||
|
INCLUDE(configure.cmake)
|
||||||
|
diff -up mariadb-5.5.31/config.h.cmake.tmpdir mariadb-5.5.31/config.h.cmake
|
||||||
|
--- mariadb-5.5.31/config.h.cmake.tmpdir 2013-05-22 00:09:48.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/config.h.cmake 2013-05-24 13:27:38.828722133 +0200
|
||||||
|
@@ -618,6 +618,7 @@
|
||||||
|
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
|
||||||
|
#cmakedefine PLUGINDIR "@PLUGINDIR@"
|
||||||
|
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
|
||||||
|
+#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@"
|
||||||
|
|
||||||
|
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.31/include/my_global.h.tmpdir mariadb-5.5.31/include/my_global.h
|
||||||
|
--- mariadb-5.5.31/include/my_global.h.tmpdir 2013-05-22 00:09:48.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/include/my_global.h 2013-05-24 13:27:38.829722133 +0200
|
||||||
|
@@ -1513,4 +1513,11 @@ static inline double rint(double x)
|
||||||
|
|
||||||
|
#endif /* EMBEDDED_LIBRARY */
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ Define default tmpdir if not already set.
|
||||||
|
+*/
|
||||||
|
+#if !defined(DEFAULT_TMPDIR)
|
||||||
|
+#define DEFAULT_TMPDIR P_tmpdir
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#endif /* my_global_h */
|
||||||
|
diff -up mariadb-5.5.31/libmysqld/lib_sql.cc.tmpdir mariadb-5.5.31/libmysqld/lib_sql.cc
|
||||||
|
--- mariadb-5.5.31/libmysqld/lib_sql.cc.tmpdir 2013-05-22 00:09:48.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/libmysqld/lib_sql.cc 2013-05-24 13:27:38.830722133 +0200
|
||||||
|
@@ -559,7 +559,7 @@ int init_embedded_server(int argc, char
|
||||||
|
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=(char*) DEFAULT_TMPDIR; /* purecov: inspected */
|
||||||
|
|
||||||
|
init_ssl();
|
||||||
|
umask(((~my_umask) & 0666));
|
||||||
|
diff -up mariadb-5.5.31/mysys/mf_tempdir.c.tmpdir mariadb-5.5.31/mysys/mf_tempdir.c
|
||||||
|
--- mariadb-5.5.31/mysys/mf_tempdir.c.tmpdir 2013-05-22 00:09:51.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/mysys/mf_tempdir.c 2013-05-24 13:27:38.831722133 +0200
|
||||||
|
@@ -43,7 +43,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, c
|
||||||
|
pathlist=getenv("TMP");
|
||||||
|
#endif
|
||||||
|
if (!pathlist || !pathlist[0])
|
||||||
|
- pathlist=(char*) P_tmpdir;
|
||||||
|
+ pathlist=(char*) DEFAULT_TMPDIR;
|
||||||
|
}
|
||||||
|
do
|
||||||
|
{
|
||||||
|
diff -up mariadb-5.5.31/mysys/mf_tempfile.c.tmpdir mariadb-5.5.31/mysys/mf_tempfile.c
|
||||||
|
--- mariadb-5.5.31/mysys/mf_tempfile.c.tmpdir 2013-05-22 00:09:51.000000000 +0200
|
||||||
|
+++ mariadb-5.5.31/mysys/mf_tempfile.c 2013-05-24 13:27:38.832722133 +0200
|
||||||
|
@@ -111,7 +111,7 @@ File create_temp_file(char *to, const ch
|
||||||
|
sizeof(prefix_buff)-7),"XXXXXX") -
|
||||||
|
prefix_buff);
|
||||||
|
if (!dir && ! (dir =getenv("TMPDIR")))
|
||||||
|
- dir=P_tmpdir;
|
||||||
|
+ dir=DEFAULT_TMPDIR;
|
||||||
|
if (strlen(dir)+ pfx_len > FN_REFLEN-2)
|
||||||
|
{
|
||||||
|
errno=my_errno= ENAMETOOLONG;
|
@ -52,6 +52,7 @@ Patch11: mariadb-string-overflow.patch
|
|||||||
Patch12: mariadb-dh1024.patch
|
Patch12: mariadb-dh1024.patch
|
||||||
Patch13: mariadb-man-plugin.patch
|
Patch13: mariadb-man-plugin.patch
|
||||||
Patch14: mariadb-basedir.patch
|
Patch14: mariadb-basedir.patch
|
||||||
|
Patch15: mariadb-tmpdir.patch
|
||||||
|
|
||||||
BuildRequires: perl, readline-devel, openssl-devel
|
BuildRequires: perl, readline-devel, openssl-devel
|
||||||
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
|
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
|
||||||
@ -247,6 +248,7 @@ MariaDB is a community developed branch of MySQL.
|
|||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
|
%patch15 -p1
|
||||||
|
|
||||||
# workaround for upstream bug #56342
|
# workaround for upstream bug #56342
|
||||||
rm -f mysql-test/t/ssl_8k_key-master.opt
|
rm -f mysql-test/t/ssl_8k_key-master.opt
|
||||||
@ -320,6 +322,7 @@ cmake . -DBUILD_CONFIG=mysql_release \
|
|||||||
-DWITH_READLINE=ON \
|
-DWITH_READLINE=ON \
|
||||||
-DWITH_SSL=system \
|
-DWITH_SSL=system \
|
||||||
-DWITH_ZLIB=system \
|
-DWITH_ZLIB=system \
|
||||||
|
-DTMPDIR=/var/tmp \
|
||||||
-DWITH_MYSQLD_LDFLAGS="-Wl,-z,relro,-z,now"
|
-DWITH_MYSQLD_LDFLAGS="-Wl,-z,relro,-z,now"
|
||||||
|
|
||||||
make %{?_smp_mflags} VERBOSE=1
|
make %{?_smp_mflags} VERBOSE=1
|
||||||
@ -748,6 +751,9 @@ fi
|
|||||||
- Rebase to 5.5.31
|
- Rebase to 5.5.31
|
||||||
https://kb.askmonty.org/en/mariadb-5531-changelog/
|
https://kb.askmonty.org/en/mariadb-5531-changelog/
|
||||||
- Preserve time-stamps in case of installed files
|
- Preserve time-stamps in case of installed files
|
||||||
|
- Use /var/tmp instead of /tmp, since the later is using tmpfs,
|
||||||
|
which can cause problems
|
||||||
|
Resolves: #962087
|
||||||
|
|
||||||
* Sun May 5 2013 Honza Horak <hhorak@redhat.com> 5.5.30-2
|
* Sun May 5 2013 Honza Horak <hhorak@redhat.com> 5.5.30-2
|
||||||
- Remove mytop utility, which is packaged separately
|
- Remove mytop utility, which is packaged separately
|
||||||
|
Loading…
Reference in New Issue
Block a user