summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <joerg@mysql.com>2006-06-27 20:04:44 +0200
committerunknown <joerg@mysql.com>2006-06-27 20:04:44 +0200
commit0b6de748904d3626b9477cae37c7aae4c3ecbd6c (patch)
treed4cb2aef76f05b29a10e5a9df8b9ee3292b789e3
parent27cc02049e5d0c1d8ebb23cf1a2af959772d25ae (diff)
parent88812ad4abf961ba6455de5d980dcd51888d65a7 (diff)
downloadmariadb-git-0b6de748904d3626b9477cae37c7aae4c3ecbd6c.tar.gz
Merge mysql.com:/M50/bug19353-5.0-2 into mysql.com:/M50/bug20216-5.0
support-files/mysql.spec.sh: Auto merged
-rw-r--r--scripts/Makefile.am6
-rw-r--r--scripts/make_binary_distribution.sh2
-rw-r--r--scripts/mysql_upgrade_shell.sh (renamed from scripts/mysql_upgrade.sh)0
-rw-r--r--support-files/mysql.spec.sh22
4 files changed, 22 insertions, 8 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 0f68b484f41..a339ebc5b8f 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -32,7 +32,7 @@ bin_SCRIPTS = @server_scripts@ \
mysqldumpslow \
mysql_explain_log \
mysql_tableinfo \
- mysql_upgrade \
+ mysql_upgrade_shell \
mysqld_multi \
mysql_create_system_tables
@@ -60,7 +60,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
mysql_explain_log.sh \
mysqld_multi.sh \
mysql_tableinfo.sh \
- mysql_upgrade.sh \
+ mysql_upgrade_shell.sh \
mysqld_safe.sh \
mysql_create_system_tables.sh
@@ -89,7 +89,7 @@ CLEANFILES = @server_scripts@ \
mysqldumpslow \
mysql_explain_log \
mysql_tableinfo \
- mysql_upgrade \
+ mysql_upgrade_shell \
mysqld_multi \
make_win_src_distribution \
mysql_create_system_tables
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 36c941ef6aa..74b1993882e 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -134,7 +134,7 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \
client/mysqldump$BS client/mysqlimport$BS \
client/mysqltest$BS client/mysqlcheck$BS \
- client/mysqlbinlog$BS \
+ client/mysqlbinlog$BS client/mysql_upgrade$BS \
tests/mysql_client_test$BS \
libmysqld/examples/mysql_client_test_embedded$BS \
libmysqld/examples/mysqltest_embedded$BS \
diff --git a/scripts/mysql_upgrade.sh b/scripts/mysql_upgrade_shell.sh
index c9f375b6c5b..c9f375b6c5b 100644
--- a/scripts/mysql_upgrade.sh
+++ b/scripts/mysql_upgrade_shell.sh
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 92d0708200b..a452811dc91 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -491,11 +491,19 @@ chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
# So ensure the server is isolated as much as possible, and start it so that
# passwords are not checked.
# See the related change in the start script "/etc/init.d/mysql".
-chmod 700 $mysql_datadir
-%{_sysconfdir}/init.d/mysql start --skip-networking --skip-grant-tables
-%{_bindir}/mysql_upgrade
+if type mktemp >/dev/null 2>&1
+then
+ mysql_tmp_sockdir=`mktemp -dt`
+else
+ PID=$$
+ mysql_tmp_sockdir=/tmp/mysql-$PID
+ ( umask 077 ; mkdir $mysql_tmp_sockdir )
+fi
+chown %{mysqld_user}:%{mysqld_group} $mysql_tmp_sockdir
+%{_sysconfdir}/init.d/mysql start --skip-networking --skip-grant-tables --socket=$mysql_tmp_sockdir/upgrade.sock
+%{_bindir}/mysql_upgrade --socket=$mysql_tmp_sockdir/upgrade.sock
%{_sysconfdir}/init.d/mysql stop --skip-networking --skip-grant-tables
-chmod 755 $mysql_datadir
+rm -fr $mysql_tmp_sockdir
# Change permissions again to fix any new files.
chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
@@ -733,6 +741,12 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Thu Jun 22 2006 Joerg Bruehe <joerg@mysql.com>
+
+- Close a gap of the previous version by explicitly using
+ a newly created temporary directory for the socket to be used
+ in the "mysql_upgrade" operation, overriding any local setting.
+
* Tue Jun 20 2006 Joerg Bruehe <joerg@mysql.com>
- To run "mysql_upgrade", we need a running server;