myisamchk and Incorrect key file

2001-06-15 Thread Kyle Cronan

Hello all,

I was getting the following error trying to clean out a large table of
call logs for a long distance billing system:

mysql delete from calls where calltime'2001-02-01';
ERROR 1034: Incorrect key file for table: 'calls'. Try to repair it

But then myisamchk finds nothing, even using extended-check:

angelina:/usr/var/devel# myisamchk -e calls
Checking MyISAM file: calls
Data records:  457423   Deleted blocks:   0
myisamchk: warning: 1 clients is using or hasn't closed the table properly
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check records and index references
MyISAM-table 'calls' is usable but should be fixed

My suspicion is that this is because I inproperly copied the table from
our main database server.  The reason I say so is that the above warning
seems invalid; SHOW processlist reports no client threads accessing this
table.

Even so, why would this cause the problem running the DELETE query?  And
attempting to repair the table with myisamchk gets rid of the above
warning but doesn't fix the problem with the query.  Any thoughts?

Thanks,
Kyle Cronan
[EMAIL PROTECTED]

P.S. Here is the table description:

+---+
| Field  | Type| Null | Key | Default | Extra | Privileges  |
++-+--+-+-+---+-+
| id | varchar(64) | YES  | | NULL|   | s,i,u,r |
| customerid | int(11) | YES  | | NULL|   | s,i,u,r |
| accountid  | int(11) | YES  | MUL | NULL|   | s,i,u,r |
| orig_num   | varchar(64) | YES  | | NULL|   | s,i,u,r |
| dest_num   | varchar(64) | YES  | | NULL|   | s,i,u,r |
| orig_gw| varchar(64) | YES  | | NULL|   | s,i,u,r |
| dest_gw| varchar(64) | YES  | | NULL|   | s,i,u,r |
| calltime   | datetime| YES  | | NULL|   | s,i,u,r |
| duration   | int(11) | YES  | | NULL|   | s,i,u,r |
| charge | float(9,2)  | YES  | | NULL|   | s,i,u,r |
+---+


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: myisamchk and Incorrect key file

2001-06-15 Thread Kyle Cronan

Never mind.  This was simply my mistake.  mysqld had a different copy of
the table in it's cache, so the problem went away when I restarted the
server process.

Thanks anyway,
Kyle Cronan
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php