myisamchk and Incorrect key file
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
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
Re: Thread safe client with C api
Hi there, On Wed, 17 Jan 2001, Sinisa Milivojevic wrote: First of all, you should not over-complicated things. Even in our server we do not call fork, as we have threads. I don't want to call fork, because there are advantages of using threads in this process (not involving mysql) that I then loose. I was just trying to show that the problem only occurs when the thread is in a process with other threads with connections to the mysql server. The error is possibly in your db_connect() wrapper. You must use each time a different MYSQL * pointer for each mysql_real_connect and separate query , result and row pointers too. Yes, I'm doing this. The dbm structure I pass to that wrapper (stands for database module) contains the MYSQL * pointer within it. I'm now thinking that the problem must stem from calling dlopen() on libmysqlclient_r from different threads is the most likely cause of the problem. I'm going to investigate with calling it just once in the original thread and see if that corrects the problem. By the way, this is mysql 3.23.28-gamma on a Solaris 8 box using pthreads in the client lib, server, and my program. Kyle Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - 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