mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.3' into 11.4
This commit is contained in:
@@ -701,7 +701,7 @@ then
|
||||
then
|
||||
echo
|
||||
echo "You can start the MariaDB daemon with:"
|
||||
echo "cd '$basedir' ; $bindir/mariadb-safe --datadir='$ldata'"
|
||||
echo "cd '$basedir' ; $bindir/mariadbd-safe --datadir='$ldata'"
|
||||
echo
|
||||
echo "You can test the MariaDB daemon with mariadb-test-run.pl"
|
||||
echo "cd '$basedir/@INSTALL_MYSQLTESTDIR@' ; perl mariadb-test-run.pl"
|
||||
|
@@ -42,7 +42,7 @@ trap '' 1 2 3 15 # we shouldn't let anyone kill us
|
||||
|
||||
case "$0" in
|
||||
*mysqld_safe)
|
||||
echo "$0: Deprecated program name. It will be removed in a future release, use 'mariadb-safe' instead" 1>&2
|
||||
echo "$0: Deprecated program name. It will be removed in a future release, use 'mariadbd-safe' instead" 1>&2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@@ -192,21 +192,38 @@ $opt{quiet} = 0 if $opt{debug};
|
||||
$opt{allowold} = 1 if $opt{keepold};
|
||||
|
||||
# --- connect to the database ---
|
||||
## Socket takes precedence.
|
||||
my $dsn;
|
||||
$dsn = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost");
|
||||
$dsn .= ";port=$opt{port}" if $opt{port};
|
||||
$dsn .= ";mariadb_socket=$opt{socket}" if $opt{socket};
|
||||
my $prefix= 'mysql';
|
||||
|
||||
if (eval {DBI->install_driver("MariaDB")}) {
|
||||
$dsn ="DBI:MariaDB:;";
|
||||
$prefix= 'mariadb';
|
||||
}
|
||||
else {
|
||||
$dsn = "DBI:mysql:;";
|
||||
}
|
||||
|
||||
if ($opt{socket} and -S $opt{socket})
|
||||
{
|
||||
$dsn .= "${prefix}_socket=$opt{socket}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$dsn .= "host=" . $opt{host};
|
||||
if ($opt{host} ne "localhost")
|
||||
{
|
||||
$dsn .= ";port=". $opt{port};
|
||||
}
|
||||
}
|
||||
|
||||
$dsn .= ";mariadb_read_default_group=mysqlhotcopy";
|
||||
|
||||
# use mariadb_read_default_group=mysqlhotcopy so that [client] and
|
||||
# [mysqlhotcopy] groups will be read from standard options files.
|
||||
|
||||
my $dbh = DBI->connect("DBI:MariaDB:$dsn;mariadb_read_default_group=mysqlhotcopy",
|
||||
$opt{user}, $opt{password},
|
||||
{
|
||||
RaiseError => 1,
|
||||
PrintError => 0,
|
||||
AutoCommit => 1,
|
||||
});
|
||||
# make the connection to MariaDB
|
||||
my $dbh= DBI->connect($dsn, $opt{user}, $opt{password}, { RaiseError => 1, PrintError => 0}) ||
|
||||
die("Can't make a connection to the MariaDB server.\n The error: $DBI::errstr");
|
||||
|
||||
# --- check that checkpoint table exists if specified ---
|
||||
if ( $opt{checkpoint} ) {
|
||||
@@ -274,6 +291,8 @@ if ( defined $opt{regexp} ) {
|
||||
$sth_dbs->execute;
|
||||
while ( my ($db_name) = $sth_dbs->fetchrow_array ) {
|
||||
next if $db_name =~ m/^information_schema$/i;
|
||||
next if $db_name =~ m/^performance_schema$/i;
|
||||
next if $db_name =~ m/^sys$/i;
|
||||
push @db_desc, { 'src' => $db_name, 't_regex' => $t_regex } if ( $db_name =~ m/$opt{regexp}/o );
|
||||
}
|
||||
}
|
||||
|
@@ -1166,9 +1166,9 @@ is_local_ip()
|
||||
# the domain name check:
|
||||
if [ "${2:-0}" -eq 0 ]; then
|
||||
# We consider all the names of a given host to be local addresses:
|
||||
[ "$1" = "$(hostname -s)" -o \
|
||||
"$1" = "$(hostname -f)" -o \
|
||||
"$1" = "$(hostname -d)" ] && return 0
|
||||
[ "$1" = "$(hostname -s 2>/dev/null)" -o \
|
||||
"$1" = "$(hostname -f 2>/dev/null)" -o \
|
||||
"$1" = "$(hostname -d 2>/dev/null)" ] && return 0
|
||||
fi
|
||||
# If the address contains anything other than digits
|
||||
# and separators, it is not a local address:
|
||||
|
@@ -475,9 +475,9 @@ EOF
|
||||
# Preparing binlog files for transfer:
|
||||
wsrep_log_info "Preparing binlog files for transfer:"
|
||||
tar_type=0
|
||||
if tar --help | grep -qw -F -- '--transform'; then
|
||||
if tar --help 2>/dev/null | grep -qw -F -- '--transform'; then
|
||||
tar_type=1
|
||||
elif tar --version | grep -qw -E '^bsdtar'; then
|
||||
elif tar --version 2>/dev/null | grep -qw -E '^bsdtar'; then
|
||||
tar_type=2
|
||||
fi
|
||||
if [ $tar_type -eq 2 ]; then
|
||||
@@ -980,7 +980,7 @@ EOF
|
||||
fi
|
||||
# Extracting binlog files:
|
||||
wsrep_log_info "Extracting binlog files:"
|
||||
if tar --version | grep -qw -E '^bsdtar'; then
|
||||
if tar --version 2>/dev/null | grep -qw -E '^bsdtar'; then
|
||||
tar -tf "$BINLOG_TAR_FILE" > "$tmpfile" && \
|
||||
tar -xvf "$BINLOG_TAR_FILE" > /dev/null || RC=$?
|
||||
else
|
||||
|
Reference in New Issue
Block a user