Bug #38342 backup_myisam1 test fails on Windows
Submitted: 24 Jul 2008 10:22 Modified: 17 Nov 2008 20:41
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:mysql-6.0-wtf OS:Microsoft Windows
Assigned to: Vladislav Vaintroub
Tags: pushbuild, sporadic, test failure
Triage: Triaged: D3 (Medium)

[24 Jul 2008 10:22] Vladislav Vaintroub
Description:
Test fails on pushbuild in mysql-6.0-wtf repository, the reason is my_lock is called on a temp file that has never been locked (I tracked the lock/unlock sequences for that). 

Please note, that in the past there used to be a bug in Windows my_lock(), that prevented this bug to show up (file  was locked after failing unlock). This bug has been fixed recently in -wtf branch

How to repeat:
Run the test

Suggested fix:
do not unlock file if it had not been locked.
[16 Aug 2008 14:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51805

2669 Vladislav Vaintroub	2008-08-16
      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.
[16 Aug 2008 14:05] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51808

2669 Vladislav Vaintroub	2008-08-16
      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.
[12 Sep 2008 12:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/53976

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.
[12 Sep 2008 12:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/53977

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.
[15 Sep 2008 8:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54062

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.
[17 Oct 2008 16:45] Bugs System
Pushed into 6.0.8-alpha  (revid:kgeorge@mysql.com-20080912125719-d0so0f00bdlksolr) (version source revid:kpettersson@mysql.com-20080915213305-1ljm3tx7tgsdrne9) (pib:5)
[17 Nov 2008 20:41] Paul Dubois
Noted in 6.0.8 changelog.

On Windows, starting the server with the --external-locking=1 option
caused BACKUP DATABASE to fail.
[11 Dec 2008 17:57] Bugs System
Pushed into 6.0.7-alpha  (revid:vvaintroub@mysql.com-20080816140429-2f5wwzozx9ig3dke) (version source revid:vvaintroub@mysql.com-20080822233536-swf5hqfw5gz6nxay) (pib:5)