mariadb/mysql-test/suite/mariabackup/binlog_dir_missing.test
Kristian Nielsen adfb5d7c27 MDEV-38810: MariaBackup crashes in common_engine::BackupImpl::copy_engine_binlogs
Fix a missing error check when opendir() returns NULL, leading to
SIGSEGV when the directory does not exist or otherwise cannot be read.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-02-11 01:44:14 +01:00

15 lines
494 B
Text

# MDEV-38810: MariaBackup crashes in common_engine::BackupImpl::copy_engine_binlogs
# The server has --binlog-directory configured, but is running without binlogs,
# so the directory does not exist.
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t(a varchar(60));
INSERT INTO t VALUES(1);
SHOW VARIABLES like 'log_bin';
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
rmdir $basedir;
DROP TABLE t;