List:General Discussion« Previous MessageNext Message »
From:Nick Arnett Date:February 18 2005 5:48pm
Subject:Can't get table lock (4.0.23 and InnoDB)
View as plain text  
We have something I can't figure out happening on one of our servers.  It's running 4.0.23
on OSX.
One of the InnoDB tables is locked even though we can't see any process that is even
active that
could have locked it.  SHOW OPEN TABLES doesn't show it as in use or locked.  We've tried
all sorts
of things to get access to it, short of bouncing the server, but it keeps saying it's
locked.  When
we try to acquire a lock on that table, the process list says "SYSTEM LOCK" and we get the
good old
"Lock wait timeout exceeded; Try restarting transaction" message after 30 seconds.

I've tried this with AUTOCOMMIT on and off, with LOCK TABLES and with START TRANSACTION...
nothing
seems to help.  Strangely, FLUSH TABLES WITH READ LOCK seems to succeed, but after
unlocking them,
we still can't get a lock for this table.

I've never been able to see how we can find out which connection has the lock on a given
table.  If
that's possible, I'd like to know that, too, so I could at least know how it got locked in
the first
place.

Could a misbehaving client do this in a way that would cause the lock to persist even
after the
client has disconnected?  If so, ugh.

Any help appreciated.

Nick



Thread
Can't get table lock (4.0.23 and InnoDB)Nick Arnett18 Feb
Re: Can't get table lock (4.0.23 and InnoDB)Heikki Tuuri20 Feb