MySQL Forums
Forum List  »  Backup

[SOLVED] Error: 1016 Can't open file (errno: 24) when using LOCK TABLES
Posted by: Michael White
Date: July 18, 2007 03:47AM

Dear Sirs,

I am developing an import tool which imports certain documents into the SQL database.

After a full import of all files, the database contains 2670 tables, all on MyISAM engine.

When I try to run the mysqldump to make a backup, I encounter the following error-exception:

C:\>mysqldump -h localhost -u root -p database > "C:\db_backup.sql"
Enter password: ********
mysqldump: Got error: 1016: Can't open file: '.\database\certain_table.frm' (errno: 24) when using LOCK TABLES

Now the strange thing, if I use the Force parameter it turns out the same:

C:\>mysqldump -h localhost -u root -p -f database > "C:\db_backup.sql"
Enter password: ********
mysqldump: Got error: 1016: Can't open file: '.\database\certain_table.frm' (errno: 24) when using LOCK TABLES

but in the final backup-file, the certain_table is backup-ed correctly, with all column-names and values.

Is this a bug or anything uncommon?

My system is Windows XP Pro, SQL runs on the HDD, MySQL version is 5.0.45 and all tables are MyISAM tables.

I hope this info can help some.

Thanks for any help in advance.

Yours sincerely,

Michael White
dSPACE Germany

Edit:

OK, i guess this is a serious problem.

After some checks i discovered this problem. I try to backup with Force parameter:

C:\>mysqldump -h localhost -u root -p -f database > "C:\db_backup.sql"
Enter Password: ********
mysqldump: Got error: 1016: Can't open file: '.\database\certain_table_01.frm' (errno: 24) when using LOCK TABLES
C:\>

So he gets an error while trying to backup 'certain_table_01.frm', and it's the only error he gets. Now this:

mysql> drop table certain_table_01;
Query OK, 0 rows affected (0.02 sec)

C:\>mysqldump -h localhost -u root -p -f database > "C:\db_backup.sql"
Enter Password: ********
mysqldump: Got error: 1016: Can't open file: '.\database\certain_table_02.frm' (errno: 24) when using LOCK TABLES
C:\>

So after deleting 'certain_table_01', he gets an error on 'certain_table_02' which was backup-ed without error while 'certain_table_01' was still in the database. Furthermore, the table is backup-ed in the backup file, no matter if he gives an error-exception or not.

Should I write a Bug-Report to MySQL or is it enough to discuss it here in the forum?

Thanks for any help in advance

Yours sincerely,

Michael White
dSPACE Germany


Edit_2:

Seems like I solved the problem somehow. I set open-files-limit=20000, now he isn't throwing the error anymore.
Now I get Error 1017 Can't find file: '.\database\certain_table.frm' (errno: 22) when using LOCK TABLES but the file is existing and i can use SELECT on the table without any error...



Edited 4 time(s). Last edit at 07/19/2007 02:06AM by Michael White.

Options: ReplyQuote


Subject
Views
Written By
Posted
[SOLVED] Error: 1016 Can't open file (errno: 24) when using LOCK TABLES
52869
July 18, 2007 03:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.