summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2022-12-05 15:07:50 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2022-12-07 14:26:10 +0100
commitd360fa6fa897d9556dc3813e6f3366e01df8e715 (patch)
treeced1943c1b3dde42d6438655d0ab86f8ca2e3e97 /mysql-test/main
parent2beede9ba48c270d94662f66c49c5129caaa1e8b (diff)
downloadmariadb-git-d360fa6fa897d9556dc3813e6f3366e01df8e715.tar.gz
MDEV-30162 Fix occasional "Permission denied" on Windows caused by buggy 3rd party
Add retry logic for CreateFile, DeleteFile, or MoveFile when GetLastError() is ERROR_SHARING_VIOLATION.
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/windows_debug.result10
-rw-r--r--mysql-test/main/windows_debug.test12
2 files changed, 18 insertions, 4 deletions
diff --git a/mysql-test/main/windows_debug.result b/mysql-test/main/windows_debug.result
index e6816cdd99b..797056b00a1 100644
--- a/mysql-test/main/windows_debug.result
+++ b/mysql-test/main/windows_debug.result
@@ -1,4 +1,10 @@
# mdev-23741 sharing violation when renaming .frm file in ALTER
-CREATE TABLE t(i int);
-SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
+SET @saved_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,file_sharing_violation';
+CREATE TABLE t(i int) ENGINE=ARIA;
+ALTER TABLE t ADD PRIMARY KEY (i);
+FLUSH TABLES t;
+SELECT * FROM t;
+i
DROP TABLE t;
+SET debug_dbug=@saved_dbug;
diff --git a/mysql-test/main/windows_debug.test b/mysql-test/main/windows_debug.test
index bb0880ddc55..32ea57552a7 100644
--- a/mysql-test/main/windows_debug.test
+++ b/mysql-test/main/windows_debug.test
@@ -4,8 +4,16 @@
--source include/windows.inc
--echo # mdev-23741 sharing violation when renaming .frm file in ALTER
-CREATE TABLE t(i int);
-SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
+
+SET @saved_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,file_sharing_violation';
+
+CREATE TABLE t(i int) ENGINE=ARIA;
+ALTER TABLE t ADD PRIMARY KEY (i);
+FLUSH TABLES t;
+SELECT * FROM t;
DROP TABLE t;
+SET debug_dbug=@saved_dbug;
+
#End of 10.3 tests