Commit ecc93c98 authored by Daniel Black's avatar Daniel Black

MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'

Normalize innodb_flush_method, the same as the service, before
attempting to print it.
parent 762fe015
......@@ -1896,6 +1896,17 @@ xb_get_one_option(int optid,
break;
case OPT_INNODB_FLUSH_METHOD:
#ifdef _WIN32
/* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */
switch (srv_file_flush_method) {
case SRV_ALL_O_DIRECT_FSYNC + 1 /* "async_unbuffered"="unbuffered" */:
srv_file_flush_method= SRV_ALL_O_DIRECT_FSYNC;
break;
case SRV_ALL_O_DIRECT_FSYNC + 2 /* "normal"="fsync" */:
srv_file_flush_method= SRV_FSYNC;
break;
}
#endif
ut_a(srv_file_flush_method
<= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC));
ADD_PRINT_PARAM_OPT(innodb_flush_method_names[srv_file_flush_method]);
......
#
# MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'
#
# xtrabackup backup
# xtrabackup prepare
# shutdown server
# remove datadir
# xtrabackup move back
# restart
#
# End of 10.4 tests
#
--source include/windows.inc
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--echo #
--echo # MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'
--echo #
echo # xtrabackup backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb_flush_method=normal --backup --target-dir=$targetdir;
--enable_result_log
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --innodb-flush-method=async_unbuffered --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
rmdir $targetdir;
--echo #
--echo # End of 10.4 tests
--echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment