Below is the list of changes that have just been committed into a local
5.0 repository of cps. When cps 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.1810 05/03/15 22:51:13 petr@stripped +2 -0
IM setup patch. Enable IM instead of mysqld_safe in start/stop script.
Alter RPM to include mysqlmanger binary and config files.
support-files/mysql.spec.sh
1.92 05/03/15 22:51:10 petr@stripped +11 -2
correct RPM to include mysqlmanager
support-files/mysql.server.sh
1.39 05/03/15 22:51:09 petr@stripped +32 -27
mysql start/stop script altered to use mysqlmanager instead of mysqld_safe, novel 'reload' option
was temporarily removed
# 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: petr
# Host: owlet.
# Root: /home/cps/mysql/devel/im-fix-review
--- 1.38/support-files/mysql.server.sh 2005-03-15 14:28:42 +03:00
+++ 1.39/support-files/mysql.server.sh 2005-03-15 22:51:09 +03:00
@@ -53,8 +53,10 @@
basedir=@prefix@
bindir=@bindir@
datadir=@localstatedir@
+ sbindir=@sbindir@
else
bindir="$basedir/bin"
+ sbindir="$basedir/sbin"
fi
#
@@ -79,11 +81,18 @@
*) echo_n= echo_c='\c' ;;
esac
-parse_arguments() {
+parse_server_arguments() {
for arg do
case "$arg" in
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ esac
+ done
+}
+
+parse_manager_arguments() {
+ for arg do
+ case "$arg" in
--pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
esac
done
@@ -104,7 +113,7 @@
}
# Get arguments from the my.cnf file,
-# groups [mysqld] [mysql_server] and [mysql.server]
+# the only group, which is read from now on is [mysqld]
if test -x ./bin/my_print_defaults
then
print_defaults="./bin/my_print_defaults"
@@ -153,14 +162,17 @@
extra_args="-e $datadir/my.cnf"
fi
-parse_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`
+parse_server_arguments `$print_defaults $extra_args mysqld`
+
+# Look for the pidfile
+parse_manager_arguments `$print_defaults $extra_args manager`
#
# Set pid file if not given
#
if test -z "$pid_file"
then
- pid_file=$datadir/`@HOSTNAME@`.pid
+ pid_file=$datadir/mysqlmanager-`@HOSTNAME@`.pid
else
case "$pid_file" in
/* ) ;;
@@ -168,6 +180,9 @@
esac
fi
+user=@MYSQLD_USER@
+USER_OPTION="--user=$user"
+
# Safeguard (relative paths, core dumps..)
cd $basedir
@@ -175,21 +190,21 @@
'start')
# Start daemon
- if test -x $bindir/mysqld_safe
+ if test -x $sbindir/mysqlmanager
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
echo $echo_n "Starting MySQL"
- $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
+ $sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid
-
+
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
then
- touch /var/lock/subsys/mysql
+ touch /var/lock/subsys/mysqlmanager
fi
else
- log_failure_msg "Can't execute $bindir/mysqld_safe"
+ log_failure_msg "Can't execute $sbindir/mysqlmanager"
fi
;;
@@ -198,19 +213,19 @@
# root password.
if test -s "$pid_file"
then
- mysqld_pid=`cat $pid_file`
+ mysqlmanager_pid=`cat $pid_file`
echo $echo_n "Shutting down MySQL"
- kill $mysqld_pid
- # mysqld should remove the pid_file when it exits, so wait for it.
+ kill $mysqlmanager_pid
+ # mysqlmanager should remove the pid_file when it exits, so wait for it.
wait_for_pid
# delete lock for RedHat / SuSE
- if test -f /var/lock/subsys/mysql
+ if test -f /var/lock/subsys/mysqlmanager
then
- rm -f /var/lock/subsys/mysql
+ rm -f /var/lock/subsys/mysqlmanager
fi
else
- log_failure_msg "MySQL PID file could not be found!"
+ log_failure_msg "mysqlmanager PID file could not be found!"
fi
;;
@@ -219,21 +234,11 @@
# running or not, start it again.
$0 stop
$0 start
- ;;
-
- 'reload')
- if test -s "$pid_file" ; then
- mysqld_pid=`cat $pid_file`
- kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL"
- touch $pid_file
- else
- log_failure_msg "MySQL PID file could not be found!"
- fi
- ;;
+ ;;
*)
# usage
- echo "Usage: $0 start|stop|restart|reload"
+ echo "Usage: $0 start|stop|restart"
exit 1
;;
esac
--- 1.91/support-files/mysql.spec.sh 2005-02-19 02:25:37 +03:00
+++ 1.92/support-files/mysql.spec.sh 2005-03-15 22:51:10 +03:00
@@ -429,9 +429,11 @@
# (safe_mysqld will be gone in MySQL 4.1)
ln -sf ./mysqld_safe $RBR%{_bindir}/safe_mysqld
-# Touch the place where the my.cnf config file might be located
+# Touch the place where the my.cnf config file and mysqlmanager.passwd
+# (MySQL Instance Manager password file) might be located
# Just to make sure it's in the file list and marked as a config file
touch $RBR%{_sysconfdir}/my.cnf
+touch $RBR%{_sysconfdir}/mysqlmanager.passwd
%pre server
# Shut down a previously installed server first
@@ -551,6 +553,7 @@
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
+%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/myisamchk
@@ -579,6 +582,7 @@
%attr(755, root, root) %{_bindir}/safe_mysqld
%attr(755, root, root) %{_sbindir}/mysqld
+%attr(755, root, root) %{_sbindir}/mysqlmanager
%attr(755, root, root) %{_sbindir}/rcmysql
%attr(644, root, root) %{_libdir}/mysql/mysqld.sym
@@ -690,9 +694,14 @@
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Sun Feb 20 2005 Petr Chardin <petr@stripped>
+
+- Install MySQL Instance Manager together with mysqld, toch mysqlmanager
+ password file
+
* Mon Feb 14 2005 Lenz Grimmer <lenz@stripped>
-* Fixed the compilation comments and moved them into the separate build sections
+- Fixed the compilation comments and moved them into the separate build sections
for Max and Standard
* Mon Feb 7 2005 Tomas Ulin <tomas@stripped>
| Thread |
|---|
| • bk commit into 5.0 tree (petr:1.1810) | Petr Chardin | 15 Mar |