summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorhe <he>2009-02-04 21:17:45 +0000
committerhe <he>2009-02-04 21:17:45 +0000
commitb457a0574a6f5016b9439a80dd53c5d03d8e408f (patch)
treee0e5482f36b1f6198bf3b197965126e4d57ac1a4 /databases
parentd4112091f521fe623e8008cab4793de66552f25a (diff)
downloadpkgsrc-b457a0574a6f5016b9439a80dd53c5d03d8e408f.tar.gz
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 (limited to 'databases')
-rw-r--r--databases/mysql5-server/Makefile4
-rw-r--r--databases/mysql5-server/files/mysqld.sh15
2 files changed, 14 insertions, 5 deletions
diff --git a/databases/mysql5-server/Makefile b/databases/mysql5-server/Makefile
index 2aaef357089..b0142aa8d5a 100644
--- a/databases/mysql5-server/Makefile
+++ b/databases/mysql5-server/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2008/09/18 11:51:37 taca Exp $
+# $NetBSD: Makefile,v 1.26 2009/02/04 21:17:45 he Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
-#PKGREVISION= 1
+PKGREVISION= 1
SVR4_PKGNAME= mysqs
COMMENT= MySQL 5, a free SQL database (server)
diff --git a/databases/mysql5-server/files/mysqld.sh b/databases/mysql5-server/files/mysqld.sh
index f222a72874a..b7305032654 100644
--- a/databases/mysql5-server/files/mysqld.sh
+++ b/databases/mysql5-server/files/mysqld.sh
@@ -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.3 2009/02/04 21:17:45 he Exp $
#
# PROVIDE: mysqld
# REQUIRE: DAEMON LOGIN mountall
@@ -27,13 +27,19 @@ procname="@PREFIX@/libexec/${name}"
: ${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 @@ mysqld_start()
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}