MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Diana Soares Date:January 15 2003 1:02pm
Subject:Re: myisamchk warnings -- open tables
View as plain text  
Hi,
Some time ago i've read that we shouldn't use myisamchk while the mysql
server was running. Now, i don't find where in the manual says something
about it. 
I think you should do a "FLUSH TABLES" and ensure that no one touches
the tables (including mysqld) before using myisamchk.
Coudn't you use "CHECK/OPTIMIZE/REPAIR TABLES" (or whatever you're doing
with myisamchk) instead of myisamchk ? 
I think it's safer... :-)

This short text is more specific:

http://www.mysql.com/doc/en/myisamchk_syntax.html
"
Note that if you get an error like:

myisamchk: warning: 1 clients is using or hasn't closed the table
properly

This means that you are trying to check a table that has been updated by
the another program (like the mysqld server) that hasn't yet closed the
file or that has died without closing the file properly.

If you mysqld is running, you must force a sync/close of all tables with
FLUSH TABLES and ensure that no one is using the tables while you are
running myisamchk. In MySQL Version 3.23 the easiest way to avoid this
problem is to use CHECK TABLE instead of myisamchk to check tables. 
"

On Mon, 2003-01-13 at 17:09, havoc wrote:
> Since the http://lists.mysql.com/ archives site is down, I'll have to 
> ask this question without the benifit of the archives...
> 
> I have a (very large) Perl script that has a bad tendency to cause the 
> following warning from myisamchk:
> 
> myisamchk: MyISAM file /var/lib/mysql/YYYY/table_name.MYI
> myisamchk: warning: 1 clients is using or hasn't closed the table properly
> MyISAM-table '/var/lib/mysql/YYYY/table_name.MYI' is usable but should 
> be fixed
> 
> It does this for table after table (I'm running multiple instances of 
> the same database for diffrerent sites).
> 
> It's fine to go back and run myisamchk --recover -- quick, but I'd 
> rather stop the bleeding than continue applying bandages.
> 
> I have started through the code making sure there is a $sth->finish(); 
> after every table query/insert/update, but I seem to have made the 
> problem worse!
> 
> Is there something I should be paying special attention to?  Is there 
> something that I might just plain be missing?
> 
> Many thanks in advance!
> 
> Jody Harris
> -- 
-- 
Diana Soares

Thread
myisamchk warnings -- open tableshavoc13 Jan
  • Re: myisamchk warnings -- open tablesDiana Soares15 Jan