diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-12-29 13:23:18 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-29 13:23:18 +0100 |
commit | 4a5d25c338a5d1d2cc16343380193d6bf25ae6ae (patch) | |
tree | 73b84a9c8f3d5e3e3383fa79465b11f9ded512d3 /scripts | |
parent | 48dc7cc66ef5b69fcf28ec0b2ecf0338c188cf4e (diff) | |
parent | c13b5011629b5ff7b969d648265002e4d1ba94c2 (diff) | |
download | mariadb-git-4a5d25c338a5d1d2cc16343380193d6bf25ae6ae.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_install_db.pl.in | 48 | ||||
-rw-r--r-- | scripts/mysql_install_db.sh | 28 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 7 | ||||
-rw-r--r-- | scripts/wsrep_sst_xtrabackup-v2.sh | 2 | ||||
-rw-r--r-- | scripts/wsrep_sst_xtrabackup.sh | 2 |
5 files changed, 46 insertions, 41 deletions
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index d1b299d9ef5..3ad733884fb 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -297,17 +297,19 @@ parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV); # ---------------------------------------------------------------------- # FIXME $extra_bindir is not used -my ($bindir,$extra_bindir,$mysqld,$pkgdatadir,$mysqld_opt,$scriptdir); +my ($bindir,$extra_bindir,$mysqld,$srcpkgdatadir,$buildpkgdatadir,$mysqld_opt, + $scriptdir); if ( $opt->{srcdir} ) { - $opt->{basedir} = $opt->{builddir}; - $bindir = "$opt->{basedir}/client"; - $extra_bindir = "$opt->{basedir}/extra"; - $mysqld = "$opt->{basedir}/sql/mysqld"; - $mysqld_opt = "--language=$opt->{srcdir}/sql/share/english"; - $pkgdatadir = "$opt->{srcdir}/scripts"; - $scriptdir = "$opt->{srcdir}/scripts"; + $opt->{basedir} = $opt->{builddir}; + $bindir = "$opt->{basedir}/client"; + $extra_bindir = "$opt->{basedir}/extra"; + $mysqld = "$opt->{basedir}/sql/mysqld"; + $mysqld_opt = "--language=$opt->{srcdir}/sql/share/english"; + $srcpkgdatadir = "$opt->{srcdir}/scripts"; + $buildpkgdatadir = "$opt->{builddir}/scripts"; + $scriptdir = "$opt->{srcdir}/scripts"; } elsif ( $opt->{basedir} ) { @@ -317,18 +319,20 @@ elsif ( $opt->{basedir} ) "libexec","sbin","bin") || # ,"sql" find_in_basedir($opt,"file","mysqld-nt", "bin"); # ,"sql" - $pkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql", + $srcpkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql", "share","share/mysql"); # ,"scripts" + $buildpkgdir = $srcpkgdatadir; $scriptdir = "$opt->{basedir}/scripts"; } else { - $opt->{basedir} = '@prefix@'; - $bindir = '@bindir@'; - $extra_bindir = $bindir; - $mysqld = '@libexecdir@/mysqld'; - $pkgdatadir = '@pkgdatadir@'; - $scriptdir = '@scriptdir@'; + $opt->{basedir} = '@prefix@'; + $bindir = '@bindir@'; + $extra_bindir = $bindir; + $mysqld = '@libexecdir@/mysqld'; + $srcpkgdatadir = '@pkgdatadir@'; + $buildpkgdatadir = '@pkgdatadir@'; + $scriptdir = '@scriptdir@'; } unless ( $opt->{ldata} ) @@ -336,19 +340,15 @@ unless ( $opt->{ldata} ) $opt->{ldata} = '@localstatedir@'; } -if ( $opt->{srcdir} ) -{ - $pkgdatadir = "$opt->{srcdir}/scripts"; -} # ---------------------------------------------------------------------- # Set up paths to SQL scripts required for bootstrap # ---------------------------------------------------------------------- -my $fill_help_tables = "$pkgdatadir/fill_help_tables.sql"; -my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; -my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; -my $maria_add_gis_sp = "$pkgdatadir/maria_add_gis_sp_bootstrap.sql"; +my $fill_help_tables = "$srcpkgdatadir/fill_help_tables.sql"; +my $create_system_tables = "$srcpkgdatadir/mysql_system_tables.sql"; +my $fill_system_tables = "$srcpkgdatadir/mysql_system_tables_data.sql"; +my $maria_add_gis_sp = "$buildpkgdatadir/maria_add_gis_sp_bootstrap.sql"; foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables,$maria_add_gis_sp ) { @@ -508,7 +508,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) # FIXME > /dev/null ? if ( open(PIPE, "| $mysqld_install_cmd_line") ) { - print PIPE "use test;\n"; + print PIPE "use mysql;\n"; while ( <SQL> ) { print PIPE $_; diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index e5502301d9c..3b48dad649c 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -271,7 +271,8 @@ then extra_bindir="$basedir/extra" mysqld="$basedir/sql/mysqld" langdir="$basedir/sql/share/english" - pkgdatadir="$srcdir/scripts" + srcpkgdatadir="$srcdir/scripts" + buildpkgdatadir="$builddir/scripts" scriptdir="$srcdir/scripts" elif test -n "$basedir" then @@ -289,8 +290,9 @@ then cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english exit 1 fi - pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` - if test -z "$pkgdatadir" + srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` + buildpkgdatadir=$srcpkgdatadir + if test -z "$srcpkgdatadir" then cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql exit 1 @@ -301,16 +303,17 @@ else bindir="@bindir@" extra_bindir="$bindir" mysqld="@libexecdir@/mysqld" - pkgdatadir="@pkgdatadir@" + srcpkgdatadir="@pkgdatadir@" + buildpkgdatadir="@pkgdatadir@" scriptdir="@scriptdir@" fi # Set up paths to SQL scripts required for bootstrap -fill_help_tables="$pkgdatadir/fill_help_tables.sql" -create_system_tables="$pkgdatadir/mysql_system_tables.sql" -create_system_tables2="$pkgdatadir/mysql_performance_tables.sql" -fill_system_tables="$pkgdatadir/mysql_system_tables_data.sql" -maria_add_gis_sp="$pkgdatadir/maria_add_gis_sp_bootstrap.sql" +fill_help_tables="$srcpkgdatadir/fill_help_tables.sql" +create_system_tables="$srcpkgdatadir/mysql_system_tables.sql" +create_system_tables2="$srcpkgdatadir/mysql_performance_tables.sql" +fill_system_tables="$srcpkgdatadir/mysql_system_tables_data.sql" +maria_add_gis_sp="$buildpkgdatadir/maria_add_gis_sp_bootstrap.sql" for f in "$fill_help_tables" "$create_system_tables" "$create_system_tables2" "$fill_system_tables" "$maria_add_gis_sp" do @@ -463,7 +466,6 @@ else exit 1 fi - # Don't output verbose information if running inside bootstrap or using # --srcdir for testing. In such cases, there's no end user looking at # the screen. @@ -506,10 +508,8 @@ then echo "The latest information about MariaDB is available at http://mariadb.org/." echo "You can find additional information about the MySQL part at:" echo "http://dev.mysql.com" - echo "Support MariaDB development by buying support/new features from MariaDB" - echo "Corporation Ab. You can contact us about this at sales@mariadb.com." - echo "Alternatively consider joining our community based development effort:" - echo "http://mariadb.com/kb/en/contributing-to-the-mariadb-project/" + echo "Consider joining MariaDB's strong and vibrant community:" + echo "https://mariadb.org/get-involved/" echo fi diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index e37f512b0f3..000271f7808 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -754,7 +754,7 @@ if [ ! -d $mysql_unix_port_dir ] then if ! `mkdir -p $mysql_unix_port_dir` then - echo "Fatal error Can't create database directory '$mysql_unix_port'" + log_error "Fatal error Can't create database directory '$mysql_unix_port'" exit 1 fi chown $user $mysql_unix_port_dir @@ -969,9 +969,14 @@ do done cmd="$cmd $args" [ $dry_run -eq 1 ] && return + # Avoid 'nohup: ignoring input' warning test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" +# close stdout and stderr, everything goes to $logging now +exec 1>&- +exec 2>&- + log_notice "Starting $MYSQLD daemon with databases from $DATADIR" # variable to track the current number of "fast" (a.k.a. subsecond) restarts diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 63febe556da..565e62e4dbe 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -176,7 +176,7 @@ get_transfer() fi wsrep_log_info "Using netcat as streamer" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - if nc -h | grep -q ncat;then + if nc -h 2>&1 | grep -q ncat;then tcmd="nc -l ${TSST_PORT}" else tcmd="nc -dl ${TSST_PORT}" diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 22923ab3e88..ca3c0129837 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -149,7 +149,7 @@ get_transfer() fi wsrep_log_info "Using netcat as streamer" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - if nc -h | grep -q ncat;then + if nc -h 2>&1 | grep -q ncat;then tcmd="nc -l ${TSST_PORT}" else tcmd="nc -dl ${TSST_PORT}" |