MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM

This commit is contained in:
Sergei Golubchik
2025-03-30 12:43:35 +02:00
parent 8363d05f4d
commit 7d17ee97c2
3 changed files with 40 additions and 2 deletions

View File

@ -64,8 +64,10 @@ Table::copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock, bool, unsigned thread_num)
for (const auto &fname : m_fnames) {
File file = mysql_file_open(0, fname.c_str(),O_RDONLY | O_SHARE, MYF(0));
if (file < 0) {
msg(thread_num, "Error on file %s open during %s table copy",
fname.c_str(), full_tname.c_str());
char buf[MYSYS_STRERROR_SIZE];
msg(thread_num, "Error %i on file %s open during %s table copy: %s",
errno, fname.c_str(), full_tname.c_str(),
my_strerror(buf, sizeof(buf), errno));
goto exit;
}
files.push_back(file);

View File

@ -0,0 +1,11 @@
#
# MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM
#
create table t1 (
id bigint(20) not null auto_increment,
primary key (id)
) engine=myisam
partition by hash (id)
partitions 600;
FOUND 1 /Error 24 on file ./test/t1#P#p\d+\.MY[DI] open during `test`.`t1` table copy: Too many open files/ in backup.log
drop table t1;

View File

@ -0,0 +1,25 @@
source include/not_windows.inc;
source include/have_partition.inc;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $log=$MYSQL_TMP_DIR/backup.log;
--echo #
--echo # MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM
--echo #
create table t1 (
id bigint(20) not null auto_increment,
primary key (id)
) engine=myisam
partition by hash (id)
partitions 600;
error 1;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $log 2>&1;
let SEARCH_FILE=$log;
let SEARCH_PATTERN=Error 24 on file ./test/t1#P#p\d+\.MY[DI] open during `test`.`t1` table copy: Too many open files;
source include/search_pattern_in_file.inc;
rmdir $targetdir;
#remove_file $log;
drop table t1;