List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:May 4 2004 12:01pm
Subject:Re: DROP DATABASE problem on Linux 2.6, patch included
View as plain text  
Hi!

On May 04, David Tymon wrote:
> Hi,
> 
> I have been having problems dropping databases using development snapshots
> from the MySQL 4.1 codebase. The problem is more fundamental than those
> experienced recently by others with the foreign key constraints.
> 
> 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

Yes, that's true.

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

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

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

Could you elaborate how did you get this result ?

> This results in no files being deleted at all from the database directory.
> 
> I have included a simple patch that skips the . and .. entries regardless of
> their position in the directory entries list which seems to fix the problem.
> This patch was based on a snapshot around the 4th May.
> 
> I hope it is of some use to you.

Though I failed to repeat this strange behaviour, I don't think it's
impossible. Fixing, thanks!
 
Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com
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