List:Internals« Previous MessageNext Message »
From:Paul Cadach Date:April 16 2001 12:52am
Subject:Re: INSERT/DELETE myisamchk reports table not closed or connection active
View as plain text  
Hi,
----- Original Message -----
From: "Michael Widenius" <monty@stripped>
To: <awysocki@stripped>; "Paul Cadach" <paul@stripped>
Cc: <internals@stripped>
Sent: Monday, April 16, 2001 4:17 AM
Subject: Re: INSERT/DELETE myisamchk reports table not closed or connection
active


>
> Hi!
>
> >>>>> "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
connection
> 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
right
> >> 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
images.
> >> 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
table
> 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
only
> >> catch that I can see is that I'm using a medium blob data type.  If I
run
> >> myisamchk right after my program finishes (returns to a command prompt)
I
> >> get the following error.
> >>
> >> myisamchk: MyISAM file .../photos.MYI
> >> myisamchk: warning: 1 clients is using or hasn't closed the table
properly
> >> 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
and
> Paul> guarantee no SQL questions will use this table until it's checked.
>
> Paul> To run myisamchk and server "in parallel" remove "--skip-locking"
argument
> Paul> to the mysqld (somewhere in safe_mysqld), but it will slow down your
server
> 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?


WBR,
Paul.


Thread
INSERT/DELETE myisamchk reports table not closed or connection activeawysocki14 Apr
  • Re: INSERT/DELETE myisamchk reports table not closed or connection activePaul Cadach14 Apr
    • Re: INSERT/DELETE myisamchk reports table not closed or connection activeMichael Widenius15 Apr
  • Re: INSERT/DELETE myisamchk reports table not closed or connection activePaul Cadach16 Apr
    • Re: INSERT/DELETE myisamchk reports table not closed or connection activeMichael Widenius16 Apr