Skip to content

Commit 5bd5172

Browse files
committed
MDEV-25815 mariabackup crash or debug assert with --backup --databases-exclude
Fix regression (debug assertion or division by 0) caused by cfd3d70
1 parent a70a553 commit 5bd5172

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4048,7 +4048,7 @@ xb_register_filter_entry(
40484048
strncpy(dbname, name, p - name);
40494049
dbname[p - name] = 0;
40504050

4051-
if (databases_hash) {
4051+
if (databases_hash && databases_hash->array) {
40524052
HASH_SEARCH(name_hash, databases_hash,
40534053
ut_fold_string(dbname),
40544054
xb_filter_entry_t*,

mysql-test/suite/mariabackup/xbstream.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mkdir $targetdir;
88
let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
99

1010
echo # xtrabackup backup to stream;
11-
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
11+
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
1212
echo # xbstream extract;
1313
--disable_result_log
1414
exec $XBSTREAM -x -C $targetdir < $streamfile;

0 commit comments

Comments
 (0)