mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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.
This commit is contained in:
parent
762fe015c1
commit
ecc93c9824
3 changed files with 47 additions and 0 deletions
|
@ -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]);
|
||||
|
|
12
mysql-test/suite/mariabackup/full_backup_win.result
Normal file
12
mysql-test/suite/mariabackup/full_backup_win.result
Normal file
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# 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
|
||||
#
|
24
mysql-test/suite/mariabackup/full_backup_win.test
Normal file
24
mysql-test/suite/mariabackup/full_backup_win.test
Normal file
|
@ -0,0 +1,24 @@
|
|||
--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 #
|
Loading…
Reference in a new issue