From db0782243c3cae80491b7483c6fb11ba00520be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 29 Apr 2021 22:17:37 +0300 Subject: [PATCH] MDEV-25524 fixup for Windows In commit 54e2e70194b9374543fdfc81a47d583e34771fac we relaxed a debug assertion in the POSIX version of os_file_rename_func() only. Let us relax it also on Windows, so that the test innodb.truncate_crash will pass. --- storage/innobase/os/os0file.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 2e5a15498d8..9800c445cfb 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -2831,7 +2831,8 @@ os_file_rename_func( /* New path must not exist. */ ut_ad(os_file_status(newpath, &exists, &type)); - ut_ad(!exists); + /* MDEV-25506 FIXME: Remove the strstr() */ + ut_ad(!exists || strstr(oldpath, "/" TEMP_FILE_PREFIX_INNODB)); /* Old path must exist. */ ut_ad(os_file_status(oldpath, &exists, &type));