2835 Georgi Kodinov 2008-09-12
Bug#38342 -backup_myisam1 test fails on Windows
The problem is that this test, uses file locking and myisam unlocks
the same file region twice. Unix my_lock implementation based on fcntl()
does not return error in this case, but Windows UnlockFile() returns
ERROR_NOT_LOCKED.
Fixed by ignoring ERROR_NOT_LOCKED from UnlockFile(). This fix does
not make myisam better, but at least the implementation of my_lock()
compatible to *nix.
modified:
mysys/my_lock.c
2834 Georgi Kodinov 2008-09-12
added a missing result file (merge 6.0-main to 6.0-bugteam)
added:
mysql-test/suite/rpl/r/rpl_colSize.result
=== modified file 'mysys/my_lock.c'
--- a/mysys/my_lock.c 2008-07-23 08:52:08 +0000
+++ b/mysys/my_lock.c 2008-09-12 12:57:19 +0000
@@ -51,8 +51,17 @@ static int win_lock(File fd, int locktyp
if (locktype == F_UNLCK)
{
- if(UnlockFileEx(hFile, 0, liLength.LowPart, liLength.HighPart, &ov))
+ if (UnlockFileEx(hFile, 0, liLength.LowPart, liLength.HighPart, &ov))
DBUG_RETURN(0);
+ /*
+ For compatibility with fcntl implementation, ignore error,
+ if region was not locked
+ */
+ if (GetLastError() == ERROR_NOT_LOCKED)
+ {
+ SetLastError(0);
+ DBUG_RETURN(0);
+ }
goto error;
}
else if (locktype == F_RDLCK)
Thread |
---|
• bzr push into mysql-6.0 branch (kgeorge:2834 to 2835) Bug#38342 | Georgi Kodinov | 12 Sep |