mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@@ -493,7 +493,7 @@ done
|
||||
|
||||
if test -n "$user"
|
||||
then
|
||||
if test -z "$srcdir" -a "$in_rpm" -eq 0
|
||||
if test -z "$srcdir" -a "$in_rpm" -eq 0 -a -d "$pamtooldir/auth_pam_tool_dir"
|
||||
then
|
||||
chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
|
||||
chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
|
||||
|
@@ -25,6 +25,7 @@
|
||||
# adding a 'SHOW WARNINGS' after the statement.
|
||||
|
||||
set sql_mode='';
|
||||
set sql_safe_updates='OFF';
|
||||
set default_storage_engine=Aria;
|
||||
set enforce_storage_engine=NULL;
|
||||
set alter_algorithm='DEFAULT';
|
||||
|
@@ -439,7 +439,7 @@ get_transfer()
|
||||
get_footprint()
|
||||
{
|
||||
cd "$DATA_DIR"
|
||||
local payload_data=$(find . \
|
||||
local payload_data=$(find $findopt . \
|
||||
-regex '.*undo[0-9]+$\|.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \
|
||||
-type f -print0 | du --files0-from=- --block-size=1 -c -s | \
|
||||
awk 'END { print $1 }')
|
||||
@@ -798,10 +798,20 @@ recv_joiner()
|
||||
local ltcmd="$tcmd"
|
||||
if [ $tmt -gt 0 ]; then
|
||||
if [ -n "$(commandex timeout)" ]; then
|
||||
if timeout --help | grep -qw -F -- '-k'; then
|
||||
local koption=0
|
||||
if [ "$OS" = 'FreeBSD' ]; then
|
||||
if timeout 2>&1 | grep -qw -F -- '-k'; then
|
||||
koption=1
|
||||
fi
|
||||
else
|
||||
if timeout --help | grep -qw -F -- '-k'; then
|
||||
koption=1
|
||||
fi
|
||||
fi
|
||||
if [ $koption -ne 0 ]; then
|
||||
ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd"
|
||||
else
|
||||
ltcmd="timeout -s9 $tmt $tcmd"
|
||||
ltcmd="timeout -s 9 $tmt $tcmd"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -1035,6 +1045,9 @@ setup_commands()
|
||||
get_stream
|
||||
get_transfer
|
||||
|
||||
findopt='-L'
|
||||
[ "$OS" = 'FreeBSD' ] && findopt="$findopt -E"
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
|
||||
|
||||
trap cleanup_at_exit EXIT
|
||||
@@ -1428,21 +1441,13 @@ else # joiner
|
||||
|
||||
wsrep_log_info \
|
||||
"Cleaning the existing datadir and innodb-data/log directories"
|
||||
if [ "$OS" = 'FreeBSD' ]; then
|
||||
find -E ${ib_home_dir:+"$ib_home_dir"} \
|
||||
${ib_undo_dir:+"$ib_undo_dir"} \
|
||||
${ib_log_dir:+"$ib_log_dir"} \
|
||||
${ar_log_dir:+"$ar_log_dir"} \
|
||||
"$DATA" -mindepth 1 -prune -regex "$cpat" \
|
||||
-o -exec rm -rf {} >&2 \+
|
||||
else
|
||||
find ${ib_home_dir:+"$ib_home_dir"} \
|
||||
${ib_undo_dir:+"$ib_undo_dir"} \
|
||||
${ib_log_dir:+"$ib_log_dir"} \
|
||||
${ar_log_dir:+"$ar_log_dir"} \
|
||||
"$DATA" -mindepth 1 -prune -regex "$cpat" \
|
||||
-o -exec rm -rf {} >&2 \+
|
||||
fi
|
||||
|
||||
find $findopt ${ib_home_dir:+"$ib_home_dir"} \
|
||||
${ib_undo_dir:+"$ib_undo_dir"} \
|
||||
${ib_log_dir:+"$ib_log_dir"} \
|
||||
${ar_log_dir:+"$ar_log_dir"} \
|
||||
"$DATA" -mindepth 1 -prune -regex "$cpat" \
|
||||
-o -exec rm -rf {} >&2 \+
|
||||
|
||||
TDATA="$DATA"
|
||||
DATA="$DATA/.sst"
|
||||
@@ -1464,7 +1469,7 @@ else # joiner
|
||||
exit 2
|
||||
fi
|
||||
|
||||
qpfiles=$(find "$DATA" -maxdepth 1 -type f -name '*.qp' -print -quit)
|
||||
qpfiles=$(find $findopt "$DATA" -maxdepth 1 -type f -name '*.qp' -print -quit)
|
||||
if [ -n "$qpfiles" ]; then
|
||||
wsrep_log_info "Compressed qpress files found"
|
||||
|
||||
@@ -1480,7 +1485,7 @@ else # joiner
|
||||
if [ -n "$progress" -a "$progress" != 'none' ] && \
|
||||
pv --help | grep -qw -F -- '--line-mode'
|
||||
then
|
||||
count=$(find "$DATA" -maxdepth 1 -type f -name '*.qp' | wc -l)
|
||||
count=$(find $findopt "$DATA" -maxdepth 1 -type f -name '*.qp' | wc -l)
|
||||
count=$(( count*2 ))
|
||||
pvopts='-f -l -N Decompression'
|
||||
pvformat="-F '%N => Rate:%r Elapsed:%t %e Progress: [%b/$count]'"
|
||||
@@ -1492,13 +1497,13 @@ else # joiner
|
||||
# Decompress the qpress files
|
||||
wsrep_log_info "Decompression with $nproc threads"
|
||||
timeit 'Joiner-Decompression' \
|
||||
"find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | \
|
||||
"find $findopt '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | \
|
||||
$dcmd"
|
||||
extcode=$?
|
||||
|
||||
if [ $extcode -eq 0 ]; then
|
||||
wsrep_log_info "Removing qpress files after decompression"
|
||||
find "$DATA" -type f -name '*.qp' -delete
|
||||
find $findopt "$DATA" -type f -name '*.qp' -delete
|
||||
if [ $? -ne 0 ]; then
|
||||
wsrep_log_error \
|
||||
"Something went wrong with deletion of qpress files." \
|
||||
|
@@ -564,6 +564,7 @@ FILTER="-f '- /lost+found'
|
||||
-f '- /.Trashes'
|
||||
-f '- /.pid'
|
||||
-f '- /.conf'
|
||||
-f '- /.snapshot/'
|
||||
-f '+ /wsrep_sst_binlog.tar'
|
||||
-f '- $ib_home_dir/ib_lru_dump'
|
||||
-f '- $ib_home_dir/ibdata*'
|
||||
@@ -672,8 +673,12 @@ FILTER="-f '- /lost+found'
|
||||
|
||||
cd "$DATA"
|
||||
|
||||
find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \
|
||||
-not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \
|
||||
findopt='-L'
|
||||
[ "$OS" = 'FreeBSD' ] && findopt="$findopt -E"
|
||||
|
||||
find $findopt . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \
|
||||
-not -name '.zfs' -not -name .snapshot -print0 \
|
||||
| xargs -I{} -0 -P $backup_threads \
|
||||
rsync ${STUNNEL:+--rsh="$STUNNEL"} \
|
||||
--owner --group --perms --links --specials --ignore-times \
|
||||
--inplace --recursive --delete --quiet $WHOLE_FILE_OPT \
|
||||
|
Reference in New Issue
Block a user