mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Portabilityfix in mysqladmin.c
Fix when using --localstatedir Cleaned up mysql.server
This commit is contained in:
parent
a6fac7c9fd
commit
c7499a1039
6 changed files with 31 additions and 11 deletions
|
@ -123,7 +123,7 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution)
|
|||
system("touch timestamp");
|
||||
sleep(2);
|
||||
system("touch timestamp2");
|
||||
system("find . -newer timestamp -print | xargs touch; rm -f timestamp");
|
||||
system("find . -newer timestamp -print | xargs touch; rm -f timestamp timestamp2");
|
||||
sleep(2);
|
||||
# Ensure that files we don't want to rebuild are newer than other files
|
||||
safe_cd($ver);
|
||||
|
|
|
@ -50318,6 +50318,10 @@ each individual 4.0.x release.
|
|||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Fixed problem with @code{configure ... --localstatedir=...}.
|
||||
@item
|
||||
Cleaned up @code{mysql.server} script.
|
||||
@item
|
||||
Fixed a bug in @code{mysqladmin shutdown} when pid file was modified
|
||||
while @code{mysqladmin} was still waiting for the previous one to
|
||||
disappear. This could happen during a very quick restart and caused
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifdef THREAD
|
||||
#include <my_pthread.h> /* because of signal() */
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define ADMIN_VERSION "8.37"
|
||||
#define MAX_MYSQL_VAR 128
|
||||
|
|
|
@ -120,7 +120,7 @@ $CP scripts/* $BASE/bin
|
|||
rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution $BASE/bin/setsomevars $BASE/support-files/Makefile* $BASE/support-files/*.sh
|
||||
|
||||
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
|
||||
$BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \@MYSQLD_USER\@ root \@localstatedir\@ /usr/local/mysql/data < $SOURCE/support-files/mysql.server.sh > $BASE/support-files/mysql.server
|
||||
$BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \@MYSQLD_USER\@ root \@localstatedir\@ /usr/local/mysql/data \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/support-files/mysql.server.sh > $BASE/support-files/mysql.server
|
||||
$BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/mysqld_safe
|
||||
|
||||
# Make safe_mysqld a symlink to mysqld_safe for backwards portability
|
||||
|
@ -128,7 +128,7 @@ $BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/mysqld_safe
|
|||
(cd $BASE/bin ; ln -s mysqld_safe safe_mysqld )
|
||||
|
||||
mv $BASE/support-files/binary-configure $BASE/configure
|
||||
chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* $BASE/configure
|
||||
chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* $BASE/support-files/mysql.server $BASE/configure
|
||||
$CP -r sql-bench/* $BASE/sql-bench
|
||||
rm -f $BASE/sql-bench/*.sh $BASE/sql-bench/Makefile* $BASE/lib/*.la
|
||||
|
||||
|
|
|
@ -2036,6 +2036,7 @@ int main(int argc, char **argv)
|
|||
start_signal_handler(); // Creates pidfile
|
||||
if (acl_init(opt_noacl))
|
||||
{
|
||||
abort_loop=1;
|
||||
select_thread_in_use=0;
|
||||
(void) pthread_kill(signal_thread,MYSQL_KILL_SIGNAL);
|
||||
#ifndef __WIN__
|
||||
|
@ -3893,7 +3894,7 @@ static void set_options(void)
|
|||
sys_charset.value= (char*) MYSQL_CHARSET;
|
||||
(void) strmake(language, LANGUAGE, sizeof(language)-1);
|
||||
(void) strmake(mysql_real_data_home, get_relative_path(DATADIR),
|
||||
sizeof(mysql_real_data_home-1));
|
||||
sizeof(mysql_real_data_home)-1);
|
||||
|
||||
/* Set default values for some variables */
|
||||
global_system_variables.table_type=DB_TYPE_MYISAM;
|
||||
|
|
|
@ -24,17 +24,27 @@
|
|||
# Description: MySQL is a very fast and reliable SQL database engine.
|
||||
### END INIT INFO
|
||||
|
||||
# If you install MySQL on some other places than @prefix@, then you
|
||||
# have to do one of the following thing for this script to work:
|
||||
#
|
||||
# - Run this script from the MySQL installation directory
|
||||
# - Create a /etc/my.cnf file with the following information:
|
||||
# [mysqld]
|
||||
# basedir=path-to-mysql-installation-directory
|
||||
# - Add the above to any other configuration file (for example ~/.my.ini)
|
||||
# and copy my_print_defaults to /usr/bin
|
||||
# - Add the path to the mysql-installation-directory to the basedir variable
|
||||
# below.
|
||||
#
|
||||
# If you want to affect other MySQL variables, you should make your changes
|
||||
# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
|
||||
|
||||
basedir=
|
||||
|
||||
# The following variables are only set for letting mysql.server find things.
|
||||
# If you want to affect other MySQL variables, you should make your changes
|
||||
# in the /etc/my.cnf or other configuration files.
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
export PATH
|
||||
|
||||
# Set some defaults
|
||||
datadir=@localstatedir@
|
||||
basedir=
|
||||
pid_file=
|
||||
if test -z "$basedir"
|
||||
then
|
||||
|
@ -43,6 +53,10 @@ then
|
|||
else
|
||||
bindir="$basedir/bin"
|
||||
fi
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
|
||||
export PATH
|
||||
|
||||
if test -z "$pid_file"
|
||||
then
|
||||
pid_file=$datadir/`@HOSTNAME@`.pid
|
||||
|
@ -123,7 +137,7 @@ case "$mode" in
|
|||
touch /var/lock/subsys/mysql
|
||||
fi
|
||||
else
|
||||
echo "Can't execute $bindir/mysqld_safe"
|
||||
echo "Can't execute $bindir/mysqld_safe from dir $basedir"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue