mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 4.1 -> 5.0
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union VC++Files/sql/mysqld.dsp: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/mysql_com.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/install_test_db.sh: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/subselect.test: Auto merged scripts/make_binary_distribution.sh: Auto merged scripts/mysql_install_db.sh: Auto merged sql/ha_berkeley.cc: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged sql/ha_berkeley.h: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/protocol.cc: Auto merged sql/records.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_acl.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_string.cc: Auto merged sql/sql_test.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged tests/client_test.c: Auto merged
This commit is contained in:
@ -17,6 +17,7 @@ DEBUG=0
|
||||
SILENT=0
|
||||
TMP=/tmp
|
||||
SUFFIX=""
|
||||
NDBCLUSTER=
|
||||
|
||||
parse_arguments() {
|
||||
for arg do
|
||||
@ -26,6 +27,7 @@ parse_arguments() {
|
||||
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
|
||||
--no-strip) STRIP=0 ;;
|
||||
--silent) SILENT=1 ;;
|
||||
--with-ndbcluster) NDBCLUSTER=1 ;;
|
||||
*)
|
||||
echo "Unknown argument '$arg'"
|
||||
exit 1
|
||||
@ -264,6 +266,18 @@ if [ -d $BASE/sql-bench/SCCS ] ; then
|
||||
find $BASE/sql-bench -name SCCS -print | xargs rm -r -f
|
||||
fi
|
||||
|
||||
# NDB Cluster
|
||||
if [ x$NDBCLUSTER = x1 ]; then
|
||||
if [ ! -f ndb/BinDist.sh ]; then
|
||||
echo "Missing ndb/BinDist.sh"; exit 1
|
||||
fi
|
||||
mkdir $BASE/ndb || exit 1
|
||||
# assume we have cpio..
|
||||
if (cd ndb && sh BinDist.sh | cpio -pdm $BASE/ndb); then :; else
|
||||
echo "Copy failed - missing files in ndb/BinDist.sh ?"; exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Change the distribution to a long descriptive name
|
||||
NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version-$system-$machine$SUFFIX
|
||||
BASE2=$TMP/$NEW_NAME
|
||||
|
@ -200,15 +200,28 @@ if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
||||
then
|
||||
echo "Installing all prepared tables"
|
||||
fi
|
||||
if (
|
||||
$scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows
|
||||
if test -n "$fill_help_tables"
|
||||
then
|
||||
cat $fill_help_tables
|
||||
fi
|
||||
) | eval "$mysqld $defaults $mysqld_opt --bootstrap --skip-grant-tables \
|
||||
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb $args"
|
||||
mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
|
||||
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
|
||||
--skip-bdb $args"
|
||||
if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
|
||||
| eval "$mysqld_install_cmd_line"
|
||||
then
|
||||
if test -n "$fill_help_tables"
|
||||
then
|
||||
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
||||
then
|
||||
echo "Fill help tables"
|
||||
fi
|
||||
if ! (echo "use mysql;
|
||||
"
|
||||
cat $fill_help_tables) | eval "$mysqld_install_cmd_line"
|
||||
then
|
||||
echo ""
|
||||
echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
|
||||
echo "The \"HELP\" command might not work properly"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
if test "$in_rpm" = 0 -a "$windows" = 0
|
||||
then
|
||||
echo ""
|
||||
@ -250,7 +263,7 @@ then
|
||||
fi
|
||||
exit 0
|
||||
else
|
||||
echo "Installation of grant tables failed!"
|
||||
echo "Installation of system tables failed!"
|
||||
echo
|
||||
echo "Examine the logs in $ldata for more information."
|
||||
echo "You can also try to start the mysqld daemon with:"
|
||||
|
@ -4,12 +4,12 @@ use Getopt::Long;
|
||||
use POSIX qw(strftime);
|
||||
|
||||
$|=1;
|
||||
$VER="2.6";
|
||||
$VER="2.7";
|
||||
|
||||
$opt_config_file = undef();
|
||||
$opt_example = 0;
|
||||
$opt_help = 0;
|
||||
$opt_log = "";
|
||||
$opt_log = undef();
|
||||
$opt_mysqladmin = "@bindir@/mysqladmin";
|
||||
$opt_mysqld = "@libexecdir@/mysqld";
|
||||
$opt_no_log = 0;
|
||||
@ -47,16 +47,39 @@ sub main
|
||||
print "MySQL distribution.\n";
|
||||
$my_print_defaults_exists= 0;
|
||||
}
|
||||
init_log();
|
||||
my @defops = `my_print_defaults mysqld_multi`;
|
||||
chop @defops;
|
||||
splice @ARGV, 0, 0, @defops;
|
||||
if ($my_print_defaults_exists)
|
||||
{
|
||||
foreach my $arg (@ARGV)
|
||||
{
|
||||
if ($arg =~ m/^--config-file=(.*)/)
|
||||
{
|
||||
if (!length($1))
|
||||
{
|
||||
die "Option config-file requires an argument\n";
|
||||
}
|
||||
elsif (!( -e $1 && -r $1))
|
||||
{
|
||||
die "Option file '$1' doesn't exists, or is not readable\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$opt_config_file= $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
my $com= "my_print_defaults ";
|
||||
$com.= "--config-file=$opt_config_file " if (defined($opt_config_file));
|
||||
$com.= "mysqld_multi";
|
||||
my @defops = `$com`;
|
||||
chop @defops;
|
||||
splice @ARGV, 0, 0, @defops;
|
||||
}
|
||||
GetOptions("help","example","version","mysqld=s","mysqladmin=s",
|
||||
"config-file=s","user=s","password=s","log=s","no-log","tcp-ip")
|
||||
"config-file=s","user=s","password=s","log=s","no-log","tcp-ip")
|
||||
|| die "Wrong option! See $my_progname --help for detailed information!\n";
|
||||
|
||||
init_log();
|
||||
$groupids = $ARGV[1];
|
||||
|
||||
if ($opt_version)
|
||||
{
|
||||
print "$my_progname version $VER by Jani Tolonen\n";
|
||||
@ -145,20 +168,48 @@ sub init_log
|
||||
}
|
||||
if (!defined($logdir))
|
||||
{
|
||||
$logdir= "/var/log" if (-d "/var/log" && -w "/var/log");
|
||||
# Log file was not specified and we could not log to a standard place,
|
||||
# so log file be disabled for now.
|
||||
print "WARNING: Log file disabled. Maybe directory/file isn't writable?\n";
|
||||
$opt_no_log= 1;
|
||||
}
|
||||
if (!defined($logdir))
|
||||
{
|
||||
if (-d "/tmp" && -w "/tmp" && ! -e "/tmp/mysqld_multi.log")
|
||||
else
|
||||
{
|
||||
$opt_log= "$logdir/mysqld_multi.log";
|
||||
}
|
||||
}
|
||||
|
||||
####
|
||||
#### Init log file. Check for appropriate place for log file, in the following
|
||||
#### order my_print_defaults mysqld datadir, @datadir@, /var/log, /tmp
|
||||
####
|
||||
|
||||
sub init_log
|
||||
{
|
||||
if ($my_print_defaults_exists)
|
||||
{
|
||||
@mysqld_opts= `my_print_defaults mysqld`;
|
||||
chomp @mysqld_opts;
|
||||
foreach my $opt (@mysqld_opts)
|
||||
{
|
||||
$logdir= "/tmp";
|
||||
if ($opt =~ m/^\-\-datadir[=](.*)/)
|
||||
{
|
||||
if (-d "$1" && -w "$1")
|
||||
{
|
||||
$logdir= $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!defined($logdir))
|
||||
{
|
||||
# We still couldn't get a default log file in place. Log file
|
||||
# will be disabled unless user sets it with an option
|
||||
|
||||
$logdir= "@datadir@" if (-d "@datadir@" && -w "@datadir@");
|
||||
}
|
||||
if (!defined($logdir))
|
||||
{
|
||||
# Log file was not specified and we could not log to a standard place,
|
||||
# so log file be disabled for now.
|
||||
print "WARNING: Log file disabled. Maybe directory/file isn't writable?\n";
|
||||
$opt_no_log= 1;
|
||||
}
|
||||
else
|
||||
@ -644,12 +695,9 @@ reported. Note that you must not have any white spaces in the GNR
|
||||
list. Anything after a white space are ignored.
|
||||
|
||||
Options:
|
||||
--config-file=... Alternative config file. NOTE: This will not affect
|
||||
this program's own options (group [mysqld_multi]),
|
||||
but only groups [mysqld#]. Without this option everything
|
||||
will be searched from the ordinary my.cnf file.
|
||||
--config-file=... Alternative config file.
|
||||
Using: $opt_config_file
|
||||
--example Give an example of a config file. (PLEASE DO CHECK THIS!)
|
||||
--example Give an example of a config file.
|
||||
--help Print this help and exit.
|
||||
--log=... Log file. Full path to and the name for the log file. NOTE:
|
||||
If the file exists, everything will be appended.
|
||||
|
@ -162,6 +162,8 @@ then
|
||||
echo "Please do a cd to the mysql installation directory and restart"
|
||||
echo "this script from there as follows:"
|
||||
echo "./bin/mysqld_safe".
|
||||
echo "See http://dev.mysql.com/doc/mysql/en/mysqld_safe.html for more"
|
||||
echo "information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user