Below is the list of changes that have just been committed into a local
5.0 repository of joerg. When joerg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2192 06/06/22 14:28:05 joerg@stripped +3 -0
Improved fix for bug#18516 (also 19353):
1) Rename the old shell tool "mysql_upgrade", to avoid a name collision.
2) Improve the spec file, to explicitly use a temporary socket.
support-files/mysql.spec.sh
1.141 06/06/22 14:27:53 joerg@stripped +18 -4
The previous version was incomplete, as it did not cover the case
where the DBA had configured a non-default socket file.
Solve that by creating and explicitly providing a temporary directory
for the socket just for the duration of "mysql_upgrade", which also
can be better protected than the default socket.
scripts/Makefile.am
1.51 06/06/22 14:27:53 joerg@stripped +3 -3
The old shell script "mysql_upgrade" must be renamed,
so that its name does not collide with the new binary.
scripts/mysql_upgrade_shell.sh
1.4 06/06/22 14:13:00 joerg@stripped +0 -0
Rename: scripts/mysql_upgrade.sh -> scripts/mysql_upgrade_shell.sh
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: joerg
# Host: trift2.
# Root: /M50/bug19353-5.0-2
--- 1.50/scripts/Makefile.am 2006-02-17 07:51:10 +01:00
+++ 1.51/scripts/Makefile.am 2006-06-22 14:27:53 +02:00
@@ -32,7 +32,7 @@
mysqldumpslow \
mysql_explain_log \
mysql_tableinfo \
- mysql_upgrade \
+ mysql_upgrade_shell \
mysqld_multi \
mysql_create_system_tables
@@ -60,7 +60,7 @@
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 @@
mysqldumpslow \
mysql_explain_log \
mysql_tableinfo \
- mysql_upgrade \
+ mysql_upgrade_shell \
mysqld_multi \
make_win_src_distribution \
mysql_create_system_tables
--- 1.140/support-files/mysql.spec.sh 2006-06-20 22:40:40 +02:00
+++ 1.141/support-files/mysql.spec.sh 2006-06-22 14:27:53 +02:00
@@ -490,11 +490,19 @@
# 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
@@ -732,6 +740,12 @@
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Thu Jun 22 2006 Joerg Bruehe <joerg@stripped>
+
+- 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@stripped>
- To run "mysql_upgrade", we need a running server;
| Thread |
|---|
| • bk commit into 5.0 tree (joerg:1.2192) BUG#18516 | Joerg Bruehe | 22 Jun |