----- Original Message -----
From: "Michael Widenius" <monty@stripped>
To: <awysocki@stripped>; "Paul Cadach" <paul@stripped>
Sent: Monday, April 16, 2001 4:17 AM
Subject: Re: INSERT/DELETE myisamchk reports table not closed or connection
> >>>>> "Paul" == Paul Cadach <paul@stripped> writes:
> Paul> Hi,
> Paul> ----- Original Message -----
> Paul> From: <awysocki@stripped>
> Paul> To: <internals@stripped>
> Paul> Sent: Saturday, April 14, 2001 6:14 AM
> Paul> Subject: INSERT/DELETE myisamchk reports table not closed or
> Paul> active
> >> OS: Redhat Linux 7.0
> >> MySQL: 3.23.35
> >> Language: C & PHP
> >> I'm not sure this is the correct list, if so please point me in the
> >> direction
> >> I've been using MySQL for about a year or so now. I've just recently
> >> create my first MyISAM table. This table is used for JPG and PNG
> >> I can insert row, select row, delete row. It works just fine, but my
> >> myisamchk fails each night with an warning message saying that the
> Paul> it
> >> OK, but the table was not closed properly. My 'C' code is very simple,
> >> Open a handle to the database, insert the row, close the handle. The
> >> catch that I can see is that I'm using a medium blob data type. If I
> >> myisamchk right after my program finishes (returns to a command prompt)
> >> get the following error.
> >> myisamchk: MyISAM file .../photos.MYI
> >> myisamchk: warning: 1 clients is using or hasn't closed the table
> >> MyISAM-table '.../photos.MYI' is usable but should be fixed
> Paul> It's looks like your table still open by the server.
> >> How am I suppose to close a table? I don't see this on my isam tables
> Paul> Just try to do "FLUSH TABLES" immediately before running myisamchk
> Paul> guarantee no SQL questions will use this table until it's checked.
> Paul> To run myisamchk and server "in parallel" remove "--skip-locking"
> Paul> to the mysqld (somewhere in safe_mysqld), but it will slow down your
> Paul> a bit.
> As stated in the MySQL manual; You should NOT run myisamchk when the
> mysqld server is up and running. You should instead use CHECK table
> and REPAIR table!
If I could guarantee no usage of tables will be appeared from server while
myisamchk checks them - does it helps?