List:Internals« Previous MessageNext Message »
From:David Tymon Date:May 4 2004 11:37pm
Subject:Re: DROP DATABASE problem on Linux 2.6, patch included
View as plain text  
>>>>> Sergei Golubchik <serg@stripped> writes:

 >> It appears that in mysql_rm_known_files() in sql_db.cc there is an
 >> assumption that the directory entries for . and .. will be in the first
 >> and second

 SG> Yes, that's true.

 >> positions. This does not seem to be the case, at least under Linux 2.6
 >> ext3.

 SG> Hmm, we tried it on SuSE 9, 2.6.5, ext3 - . and .. were the first two
 SG> entries.

 SG> Also I tried it on all our zoo of different hardware/software
 SG> combinations and didn't find a single case where were not the first.

 SG> Could you elaborate how did you get this result ?

Hi Sergei,

We started experiencing this behaviour after moving to Fedora Core Test 2. The
MySQL datadir is set to /var/lib/mysql which is on an ext3 filesystem and
InnoDB is configured to use raw disks (probably irrelevant anyway). We are
running 2.6.4 with extended attributes, POSIX ACLs and security labels
configured for ext3.

Until recent snapshots, DROP DATABASE was silently failing. No errors were
reported but no files or directories were removed. In the last week or so, we
are now getting errno 17 (File exists). I had a suspicion it was going to be .
and .. as some of the tests for our software started failed too due to
assumptions about their position in the dir entries.

I ran with debug enabled and sure enough I got:

    Examining: .
    Examining: ..

from the debug around line 471.

I admit it seems a bit strange because "ls -Ua" shows . and .. in positions 0
and 1.

Anyway, thanks for looking into it.

David
-- 
David Tymon
Senior Software Engineer                       mailto:dtymon@stripped
Clarity Visual Intelligence                    http://www.clarityvi.com
Tel: +61 3 9417 4466 Fax: +61 3 9417 5566
Thread
DROP DATABASE problem on Linux 2.6, patch includedDavid Tymon4 May
  • Re: DROP DATABASE problem on Linux 2.6, patch includedSergei Golubchik4 May
    • Re: DROP DATABASE problem on Linux 2.6, patch includedDavid Tymon5 May