Bug #40128 drop-no_root fails under windows in 6.0-rpl
Submitted: 18 Oct 2008 16:22 Modified: 12 Nov 2009 18:37
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S7 (Test Cases)
Version:6.0-rpl OS:Windows
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: 6.0-rpl-green, drop-no_root, pushbuild, test failure, windows

[18 Oct 2008 16:22] Sven Sandberg
Description:
This pushbuild failure happens consistently in drop-no_root in all windows platforms. It was introduced after a big merge in 6.0-rpl. The test succeeded in all pushes up to and including this revision:
  revid:'hezx@mysql.com-20080822084003-ik5re9jhvieifdb6'
And failed starting in the next revision:
  revid:'sven@mysql.com-20080822170903-w1zor81zbp0e697c'

The test was not modified in the push.

The failure is:

main.drop-no_root                        [ fail ]

CURRENT_TEST: main.drop-no_root
mysqltest: At line 33: query 'DROP DATABASE mysql_test' failed with wrong errno 6: 'Error on delete of '.\mysql_test\t1.frm' (Errcode: 13)', instead of 1010...

The result from queries just before the failure was:

# --
# -- Bug#26704: Failing DROP DATABASE brings mysql-client out of sync.
# --

DROP DATABASE IF EXISTS mysql_test;

CREATE DATABASE mysql_test;
CREATE TABLE mysql_test.t1(c INT);
use mysql_test;

chmod 000 mysql_test/t1.frm

 - saving 'e:/var-n_mix-100/log/main.drop-no_root/' to 'e:/var-n_mix-100/log/main.drop-no_root/'

Retrying test, attempt(2/3)...

How to repeat:
E.g., https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=88 vm-win2003-32-a/n_mix
xref: http://tinyurl.com/66aag5
[19 Nov 2008 23:44] Vladislav Vaintroub
Just a comment on test-case. It uses 
chmod 000 <file>
and chmod will not do what you would expect to do on Unix, due to quite different security model. chmod would only set attribute read-only on the file and will also prevent deletion of the file.
[19 Dec 2008 14:38] 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/62108

2758 Magnus Svensson	2008-12-19
      Bug#40128 drop-no_root fails under windows in 6.0-rpl
       - Disable test to run on windows until real problem fixed.
[20 Jan 2009 20:44] 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/63633

2785 Alexander Nozdrin	2009-01-20
      Fix for Bug#40128: drop-no_root fails under windows in 6.0-rpl.
      
      The problem was that directories with no permission (000) files
      are deleted differently on UNIX and on Windows.
      
      On UNIX, 000-permission file is deleted perfectly, but other files
      are left in the directory.
      
      On Windows, 000-permission file is not deleted, but other files
      are deleted.
      
      Also, the fix needed a change in mysqltest.c: 'chmod' directive
      should return a positive error code (in order to be handled).
      It's decided to return a constant '1' for all error codes
      just to be OS-independent.
[21 Jan 2009 11:25] Bjørn Munch
Magnus and Bjorn say that it looks OK (we're both in my office now :-)
[21 Jan 2009 12:34] 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/63706

2789 Alexander Nozdrin	2009-01-21
      Fix for Bug#40128: drop-no_root fails under windows in 6.0-rpl.
      
      The problem was that directories with no permission (000) files
      are deleted differently on UNIX and on Windows.
      
      On UNIX, 000-permission file is deleted perfectly, but other files
      are left in the directory.
      
      On Windows, 000-permission file is not deleted, but other files
      are deleted.
      
      Also, the fix needed a change in mysqltest.c: 'chmod' directive
      should return a positive error code (in order to be handled).
      It's decided to return a constant '1' for all error codes
      just to be OS-independent.
[21 Jan 2009 13:28] Alexander Nozdrin
The patch pushed into 6.0-rpl.
[30 Jan 2009 13:30] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 17:40] Paul DuBois
Test suite changes. No changelog entry needed.
[9 Oct 2009 14:59] Alexander Nozdrin
Pushed into 5.5.0.
[9 Oct 2009 23:37] Paul DuBois
Test suite changes. No changelog entry needed.
[31 Oct 2009 8:19] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091031081410-qkxmjsdzjmj840aq) (version source revid:guilhem@mysql.com-20091010123356-qfouds7ucvkvbczt) (merge vers: 6.0.14-alpha) (pib:13)
[12 Nov 2009 8:20] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:mikael@mysql.com-20091102100915-a2nbfxaqprpgptfw) (merge vers: 5.5.0-beta) (pib:13)