pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2008Q4]: pkgsrc/databases/mysql5-server Pullup ticket #2685 - ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b33c87b3f64a
branches:  pkgsrc-2008Q4
changeset: 552315:b33c87b3f64a
user:      tron <tron%pkgsrc.org@localhost>
date:      Sat Feb 07 19:49:37 2009 +0000

description:
Pullup ticket #2685 - requested by he
mysql5-server: bug fixes

Revisions pulled up:
- databases/mysql5-server/Makefile              1.26
- databases/mysql5-server/files/mysqld.sh       1.3
---
Module Name:    pkgsrc
Committed By:   he
Date:           Wed Feb  4 21:17:45 UTC 2009

Modified Files:
        pkgsrc/databases/mysql5-server: Makefile
        pkgsrc/databases/mysql5-server/files: mysqld.sh

Log Message:
Upgrade from version 5.0.67 to 5.0.67nb1.

Two changes to the rc.d script:
 1) Move the setting of pidfile to a place so that setting mysqld_datadir
    in rc.conf will actually work; otherwise, if you use a non-default
    mysqld_datadir, mysqld will not start.
 2) ad@ pointed me to http://bugs.mysql.com/bug.php?id=18526, and said
    that --skip-thread-priority should not be used on NetBSD, and the
    PR spoke about Darwin / OS/X.  I'm guessing that this might work
    if the host platform is Linux or SunOS (the latter is unconfirmed).
    So add that option to the startup in all other cases.

diffstat:

 databases/mysql5-server/Makefile        |   4 ++--
 databases/mysql5-server/files/mysqld.sh |  15 ++++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 8044fb8a3e68 -r b33c87b3f64a databases/mysql5-server/Makefile
--- a/databases/mysql5-server/Makefile  Fri Feb 06 14:02:28 2009 +0000
+++ b/databases/mysql5-server/Makefile  Sat Feb 07 19:49:37 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2008/09/18 11:51:37 taca Exp $
+# $NetBSD: Makefile,v 1.25.4.1 2009/02/07 19:49:37 tron Exp $
 
 PKGNAME=               ${DISTNAME:S/-/-server-/}
-#PKGREVISION=          1
+PKGREVISION=           1
 SVR4_PKGNAME=          mysqs
 COMMENT=               MySQL 5, a free SQL database (server)
 
diff -r 8044fb8a3e68 -r b33c87b3f64a databases/mysql5-server/files/mysqld.sh
--- a/databases/mysql5-server/files/mysqld.sh   Fri Feb 06 14:02:28 2009 +0000
+++ b/databases/mysql5-server/files/mysqld.sh   Sat Feb 07 19:49:37 2009 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: mysqld.sh,v 1.2 2007/06/13 13:24:07 xtraeme Exp $
+# $NetBSD: mysqld.sh,v 1.2.18.1 2009/02/07 19:49:37 tron Exp $
 #
 # PROVIDE: mysqld
 # REQUIRE: DAEMON LOGIN mountall
@@ -27,13 +27,19 @@
 : ${mysqld_user:=@MYSQL_USER@}
 : ${mysqld_group:=@MYSQL_GROUP@}
 : ${mysqld_datadir:=@MYSQL_DATADIR@}
-pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
 
 extra_commands="initdb"
 initdb_cmd="mysqld_initdb"
 start_precmd="mysqld_precmd"
 start_cmd="mysqld_start"
 
+# Don't drop thread priority unless on Linux or SunOS
+# ref. http://bugs.mysql.com/bug.php?id=18526
+case $(uname -s) in
+       Linux|SunOS)    thread_flags="";;
+       *)              thread_flags="--skip-thread-priority"
+esac
+
 mysqld_precmd()
 {
        if [ ! -d ${mysqld_datadir}/mysql ]; then
@@ -75,16 +81,19 @@
        ulimit -n 4096
        cd @PREFIX@
        ${command} --user=${mysqld_user} --datadir=${mysqld_datadir} \
-                  --pid-file=${pidfile} ${mysqld_flags} &
+                  --pid-file=${pidfile} ${mysqld_flags} \
+                  ${thread_flags} &
 }
 
 if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
        load_rc_config $name
+       pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
        run_rc_command "$1"
 else
        if [ -f /etc/rc.conf ]; then
                . /etc/rc.conf
        fi
+       pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
        case "$1" in
        initdb)
                eval ${initdb_cmd}



Home | Main Index | Thread Index | Old Index