1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-23741 Windows : error when renaming file in ALTER TABLE

The presumed reason for the error is that the file was opened
by 3rd party antivirus or backup program, causing ERROR_SHARING_VIOLATION
on rename.

The fix, actually a workaround, is to retry MoveFileEx couple of times
before finally giving up. We expect 3rd party programs not to hold file
for extended time.
This commit is contained in:
Vladislav Vaintroub
2020-09-17 22:27:45 +02:00
parent 7e07e38cf6
commit ade782c001
3 changed files with 71 additions and 3 deletions

View File

@ -0,0 +1,4 @@
# mdev-23741 sharing violation when renaming .frm file in ALTER
CREATE TABLE t(i int);
SET STATEMENT debug_dbug='+d, win_simulate_rename_error' FOR ALTER TABLE t ADD PRIMARY KEY (i);
DROP TABLE t;