1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge 10.6 into 10.11

This commit is contained in:
Marko Mäkelä
2024-12-19 15:38:53 +02:00
129 changed files with 1398 additions and 1726 deletions

View File

@@ -1117,7 +1117,7 @@ get_openssl()
{
# If the OPENSSL_BINARY variable is already defined, just return:
if [ -n "${OPENSSL_BINARY+x}" ]; then
return
return 0
fi
# Let's look for openssl:
OPENSSL_BINARY=$(commandex 'openssl')
@@ -1556,7 +1556,7 @@ cleanup_pid()
fi
done
elif ps -p $pid >/dev/null 2>&1; then
wsrep_log_warning "Unable to kill PID=$pid ($pid_file)"
wsrep_log_warning "Unable to kill PID=$pid${pid_file:+ ($pid_file)}"
return 1
fi
fi
@@ -1863,6 +1863,8 @@ create_dirs()
cd "$OLD_PWD"
[ $simplify -ne 0 -a "$ar_log_dir" = "$DATA_DIR" ] && ar_log_dir=""
fi
return 0
}
wait_previous_sst()

View File

@@ -439,17 +439,30 @@ get_transfer()
get_footprint()
{
cd "$DATA_DIR"
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 }')
local payload_data
if [ "$OS" = 'Linux' ]; then
payload_data=$(find $findopt . \
-regex '.*undo[0-9]+$\|.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \
-type f -print0 | du --files0-from=- --bytes -c -s | \
awk 'END { print $1 }')
else
payload_data=$(find $findopt . \
-regex '.*undo[0-9]+$|.*\.ibd$|.*\.MYI$\.*\.MYD$|.*ibdata1$' \
-type f -print0 | xargs -0 stat -f '%z' | \
awk '{ sum += $1 } END { print sum }')
fi
local payload_undo=0
if [ -n "$ib_undo_dir" -a "$ib_undo_dir" != '.' -a \
"$ib_undo_dir" != "$DATA_DIR" -a -d "$ib_undo_dir" ]
then
cd "$ib_undo_dir"
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }')
if [ "$OS" = 'Linux' ]; then
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
du --files0-from=- --bytes -c -s | awk 'END { print $1 }')
else
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
xargs -0 stat -f '%z' | awk '{ sum += $1 } END { print sum }')
fi
fi
cd "$OLD_PWD"
@@ -676,24 +689,25 @@ cleanup_at_exit()
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
if [ $estatus -ne 0 ]; then
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
if [ "$WSREP_SST_OPT_ROLE" = 'donor' -o $estatus -ne 0 ]; then
if [ $estatus -ne 0 ]; then
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
fi
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" || :
[ -f "$DONOR_MAGIC_FILE" ] && rm -f "$DONOR_MAGIC_FILE" || :
[ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || :
fi
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
if [ -n "$BACKUP_PID" ]; then
if ps -p $BACKUP_PID >/dev/null 2>&1; then
wsrep_log_error \
"mariadb-backup process is still running. Killing..."
cleanup_pid $CHECK_PID
"SST streaming process is still running. Killing..."
cleanup_pid $BACKUP_PID
fi
fi
wsrep_log_info "Removing the sst_in_progress file"
wsrep_cleanup_progress_file
else
[ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || :
fi
if [ -n "$progress" -a -p "$progress" ]; then
@@ -1340,6 +1354,7 @@ else # joiner
[ -f "$DATA/xtrabackup_checkpoints" ] && rm -f "$DATA/xtrabackup_checkpoints"
[ -f "$DATA/xtrabackup_info" ] && rm -f "$DATA/xtrabackup_info"
[ -f "$DATA/xtrabackup_slave_info" ] && rm -f "$DATA/xtrabackup_slave_info"
[ -f "$DATA/xtrabackup_binlog_info" ] && rm -f "$DATA/xtrabackup_binlog_info"
[ -f "$DATA/xtrabackup_binlog_pos_innodb" ] && rm -f "$DATA/xtrabackup_binlog_pos_innodb"
TDATA="$DATA"