List:General Discussion« Previous MessageNext Message »
From:V. M. Brasseur Date:April 6 2005 6:36pm
Subject:Re: Cannot execute query - Can't find file: (error: 9)
View as plain text  
According to perror:
perror 9
Error code   9:  Bad file number

This is an operating system error code:
http://dev.mysql.com/doc/mysql/en/operating-system-error-codes.html

Out of curiosity, have you tried running myisamchk or some CHECK TABLE 
commands yet?
http://dev.mysql.com/doc/mysql/en/table-maintenance.html

Cheers,

--V

Frank Bax wrote:
> At 10:07 AM 4/5/05, Frank Bax wrote:
> 
>> At 04:27 PM 4/4/05, Frank Bax wrote:
>>
>>> Cannot execute query.
>>>
>>> <snip my SQL statement>
>>>
>>> Can't find file: './donor/list_lst.frm' (errno: 9)
>>>
>>> -----     -----
>>>
>>> I got the same error last week on a different table.  Today I notice 
>>> that there is a table in another database on same system producing 
>>> the same error.  I attempted to access mysql cli, but it just locked 
>>> up after entering password.  Start/stop mysql and mysql cli at least 
>>> started but issued errors about some tables even before I entered a 
>>> command.  I decided to reboot and the problem goes away (for a while).
>>>
>>> MySQL 4.0.20 - OpenBSD 3.6
>>
>>
>>
>> Forgot to mention a couple of things:
>>
>> 1) The file that mysql complains about does exist.
>> # ls -ltr donor/list*.frm
>> -rw-rw----  1 _mysql  _mysql 8694 Jan 15 09:43 donor/list_lst.frm
>>
>> 2) When problem recurs (as it did on both databases this morning), the 
>> same file in each database is affected each time error appears.
>>
>> 3) In both databases (on same system) it is frm files in the error 
>> message.
> 
> 
> 
> Since OpenBSD 2.8, there is a default limit of 128 open files for daemon 
> processes.
> Add --open-files-limit=2048 to mysql startup.
>        http://dev.mysql.com/doc/mysql/en/openbsd-2-8.html
> The suggested changes to /etc/login.conf were not necessary on my system.
> 
> Does MySQL ever close the file(s) associated with table(s), or once open 
> do they stay open until shutdown?
> 
> Frank 
> 
Thread
Cannot execute query - Can't find file: (error: 9)Frank Bax4 Apr
  • Re: Cannot execute query - Can't find file: (error: 9)Gleb Paharenko5 Apr
  • Re: Cannot execute query - Can't find file: (error: 9)Frank Bax5 Apr
    • Re: Cannot execute query - Can't find file: (error: 9)Frank Bax6 Apr
      • Re: Cannot execute query - Can't find file: (error: 9)V. M. Brasseur6 Apr
        • Re: Cannot execute query - Can't find file: (error: 9)Frank Bax7 Apr
          • Re: Cannot execute query - Can't find file: (error: 9)Gleb Paharenko8 Apr
          • Re: Cannot execute query - Can't find file: (error: 9)Michael Stassen9 Apr