mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merging 4.1 to 5.0.
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union client/mysqltest.c: Auto merged configure.in: Auto merged include/my_sys.h: Auto merged include/mysql_com.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/rpl_server_id2.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_relayrotate.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/rpl_server_id2.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/variables.test: Auto merged mysys/my_pthread.c: Auto merged netware/BUILD/compile-netware-all: Auto merged netware/BUILD/compile-netware-standard: Auto merged netware/BUILD/mwenv: Auto merged netware/Makefile.am: Auto merged netware/my_manage.c: Auto merged netware/my_manage.h: Auto merged netware/mysql_test_run.c: Auto merged scripts/mysql_install_db.sh: Auto merged sql/Makefile.am: Auto merged sql/ha_berkeley.cc: 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_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.cc: Auto merged sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: 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_insert.cc: Auto merged sql/sql_parse.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_string.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_yacc.yy: Auto merged tests/client_test.c: Auto merged
This commit is contained in:
@ -87,25 +87,8 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# Non platform-specific doc files:
|
||||
DOC_FILES=" \
|
||||
COPYING README LICENSE.doc \
|
||||
Docs/mysqlbug.txt \
|
||||
";
|
||||
|
||||
# Platform-specific doc files:
|
||||
if [ $BASE_SYSTEM = "netware" ] ; then
|
||||
DOC_FILES="$DOC_FILES \
|
||||
README.NW \
|
||||
";
|
||||
# For all other platforms:
|
||||
else
|
||||
DOC_FILES="$DOC_FILES \
|
||||
Docs/INSTALL-BINARY MySQLEULA.txt \
|
||||
";
|
||||
fi
|
||||
|
||||
for i in $DOC_FILES
|
||||
for i in COPYING COPYING.LIB README Docs/INSTALL-BINARY \
|
||||
MySQLEULA.txt LICENSE.doc README.NW
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
@ -170,6 +153,7 @@ done
|
||||
|
||||
if [ $BASE_SYSTEM = "netware" ] ; then
|
||||
$CP -r netware/*.pl $BASE/scripts
|
||||
$CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl
|
||||
fi
|
||||
|
||||
for i in \
|
||||
@ -186,7 +170,7 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# convert the libs to .lib for NetWare
|
||||
# convert the .a to .lib for NetWare
|
||||
if [ $BASE_SYSTEM = "netware" ] ; then
|
||||
for i in $BASE/lib/*.a
|
||||
do
|
||||
@ -241,6 +225,7 @@ $CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*
|
||||
$CP mysql-test/r/*result mysql-test/r/*.require $BASE/mysql-test/r
|
||||
|
||||
if [ $BASE_SYSTEM != "netware" ] ; then
|
||||
chmod a+x $BASE/bin/*
|
||||
$CP scripts/* $BASE/bin
|
||||
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ @HOSTNAME@ \@pkgdatadir\@ ./support-files < $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 \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/support-files/mysql.server.sh > $BASE/support-files/mysql.server
|
||||
@ -254,6 +239,16 @@ fi
|
||||
|
||||
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
|
||||
|
||||
|
||||
#
|
||||
# Remove system dependent files
|
||||
#
|
||||
if [ $BASE_SYSTEM = "netware" ] ; then
|
||||
rm -f $BASE/MySQLEULA.txt
|
||||
else
|
||||
rm -f $BASE/README.NW
|
||||
fi
|
||||
|
||||
# Make safe_mysqld a symlink to mysqld_safe for backwards portability
|
||||
# To be removed in MySQL 4.1
|
||||
if [ $BASE_SYSTEM != "netware" ] ; then
|
||||
@ -329,19 +324,7 @@ which_1 ()
|
||||
exit 1
|
||||
}
|
||||
|
||||
cd $TMP
|
||||
|
||||
if [ $BASE_SYSTEM = "netware" ] ; then
|
||||
|
||||
#
|
||||
# Create a zip file for NetWare users
|
||||
#
|
||||
|
||||
if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi
|
||||
zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME
|
||||
echo "$NEW_NAME.zip created"
|
||||
|
||||
else
|
||||
if [ $BASE_SYSTEM != "netware" ] ; then
|
||||
|
||||
#
|
||||
# Create the result tar file
|
||||
@ -354,6 +337,7 @@ else
|
||||
fi
|
||||
|
||||
echo "Using $tar to create archive"
|
||||
cd $TMP
|
||||
|
||||
OPT=cvf
|
||||
if [ x$SILENT = x1 ] ; then
|
||||
@ -362,15 +346,25 @@ else
|
||||
|
||||
$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
|
||||
cd $SOURCE
|
||||
|
||||
echo "Compressing archive"
|
||||
rm -f $NEW_NAME.tar.gz
|
||||
gzip -9 $NEW_NAME.tar
|
||||
echo "Removing temporary directory"
|
||||
rm -r -f $BASE
|
||||
|
||||
echo "$NEW_NAME.tar.gz created"
|
||||
else
|
||||
|
||||
#
|
||||
# Create a zip file for NetWare users
|
||||
#
|
||||
|
||||
cd $TMP
|
||||
if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi
|
||||
zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME
|
||||
echo "Removing temporary directory"
|
||||
rm -r -f $BASE
|
||||
|
||||
echo "$NEW_NAME.zip created"
|
||||
|
||||
fi
|
||||
|
||||
echo "Removing temporary directory"
|
||||
rm -r -f $BASE
|
||||
|
||||
|
||||
|
@ -326,6 +326,10 @@ fi
|
||||
if [ -f scripts/mysql_install_db ]; then
|
||||
print_debug "Initializing the 'data' directory"
|
||||
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
|
||||
if test "$?" = 1
|
||||
then
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -10,6 +10,8 @@
|
||||
in_rpm=0
|
||||
windows=0
|
||||
defaults=""
|
||||
tmp_file=/tmp/mysql_install_db.$$
|
||||
|
||||
case "$1" in
|
||||
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
||||
defaults="$1"; shift
|
||||
@ -212,9 +214,11 @@ then
|
||||
then
|
||||
echo "Fill help tables"
|
||||
fi
|
||||
if ! (echo "use mysql;
|
||||
"
|
||||
cat $fill_help_tables) | eval "$mysqld_install_cmd_line"
|
||||
echo "use mysql;" > $tmp_file
|
||||
cat $tmp_file $fill_help_tables | eval "$mysqld_install_cmd_line"
|
||||
res=$?
|
||||
rm $tmp_file
|
||||
if test $res != 0
|
||||
then
|
||||
echo ""
|
||||
echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
|
||||
|
@ -7,6 +7,7 @@ use File::Basename;
|
||||
use File::Path;
|
||||
use DBI;
|
||||
use Sys::Hostname;
|
||||
use File::Copy;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
@ -230,6 +231,10 @@ elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) {
|
||||
elsif ( $opt{suffix} ) {
|
||||
print "Using copy suffix '$opt{suffix}'\n" unless $opt{quiet};
|
||||
}
|
||||
elsif ( ($^O =~ m/^(NetWare)$/) && defined($tgt_name) && ($tgt_name =~ m:\\: || $tgt_name eq '.'))
|
||||
{
|
||||
$tgt_dirname = $tgt_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tgt_name="" if (!defined($tgt_name));
|
||||
@ -421,8 +426,11 @@ foreach my $rdb ( @db_desc ) {
|
||||
else {
|
||||
mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n"
|
||||
unless -d $tgt_dirpath;
|
||||
if ($^O !~ m/^(NetWare)$/)
|
||||
{
|
||||
my @f_info= stat "$datadir/$rdb->{src}";
|
||||
chown $f_info[4], $f_info[5], $tgt_dirpath;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -578,7 +586,15 @@ sub copy_files {
|
||||
my @cmd;
|
||||
print "Copying ".@$files." files...\n" unless $opt{quiet};
|
||||
|
||||
if ($method =~ /^s?cp\b/) { # cp or scp with optional flags
|
||||
if ($^O =~ m/^(NetWare)$/) # on NetWare call PERL copy (slower)
|
||||
{
|
||||
foreach my $file ( @$files )
|
||||
{
|
||||
copy($file, $target."/".basename($file));
|
||||
}
|
||||
}
|
||||
elsif ($method =~ /^s?cp\b/) # cp or scp with optional flags
|
||||
{
|
||||
my $cp = $method;
|
||||
# add option to preserve mod time etc of copied files
|
||||
# not critical, but nice to have
|
||||
@ -717,7 +733,7 @@ sub retire_directory {
|
||||
|
||||
if ( -d $tgt_oldpath ) {
|
||||
print "Deleting previous 'old' hotcopy directory ('$tgt_oldpath')\n" unless $opt{quiet};
|
||||
rmtree([$tgt_oldpath])
|
||||
rmtree([$tgt_oldpath],0,1);
|
||||
}
|
||||
rename($dir, $tgt_oldpath)
|
||||
or die "Can't rename $dir=>$tgt_oldpath: $!\n";
|
||||
|
Reference in New Issue
Block a user