|
Posted by Andy Hassall on 09/07/05 23:15
On 7 Sep 2005 12:56:51 -0700, himilecyclist@yahoo.com wrote:
>
>Andy Hassall wrote:
>
>> Why are you expecting the files to be unlocked?
>
>I assumed when the application closed the database, the files would be
>released.
The application only sees the view of the database that the MySQL daemon
offers it, through SQL. The files are an implementation detail handled by the
daemon itself; the client application can't open or close them.
>> The MySQL server daemon will have them open, and there's no reason for it to
>> close the files whilst it's running.
>
>Even after closing MySQL and the Apache server, the files are still
>locked.
After closing MySQL? As in stopping the MySQL daemon? That would be more
unusual - only MySQL itself has any business accessing those files, so if you
stop the MySQL service completely then nothing else should have them open.
Could you expand on what you mean by "closing MySQL"?
You can find what has files open with a tool like Process Explorer
(http://www.sysinternals.com/Utilities/ProcessExplorer.html)
>> Why are you renaming the files via the filesystem? To rename a table you use
>> the RENAME SQL command.
>>
>I bumped into this by accident. I'm not concerned about renaming them,
>just the fact that the connection still seems to be open.
PHP will have closed its connection, as you were using mysql_connect rather
than mysql_pconnect (which does persistent connections).
That doesn't have any implication that the MySQL daemon will close files in
response - there's no particular reason it should, it'd only have to open them
again later.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|