> "Gordon Burditt" <gordonb.obk92burditt.org> wrote in message
>> What was the exact text of the error message?
>> What was the query that got this error message?
> See bellow.
>> For example, mysqldump with the --lock-tables option potentially locks
>> tables for a long time if there's a lot of data to dump or it's
>> going to a slow destination.
>> If some types "flush tables with read lock" at a mysql command prompt
>> and goes on coffee break, that can lock things up until he comes back.
> No, we had no one using the command prompt at the time, the problem was with
> the php code.
>> A single query that does a 5-way join on tables with 10 million rows
>> with an accidentally forgotten WHERE clause might take days. Or
> We have no such queries. The more complex query is a SELECT on 3 tables at
> the same time, that query is used for 000's of page views a day.
>>> So, what could flag a table as "IN USE"?
>> What TOLD you a table was in use?
> First of all, all our warning messages are not displayed, so no error
> message actually makes it to the browser.
> But we noticed a problem in the display, and we also noticed that we could
> no longer log on.
> So I immediately used phpmyadmin to check what the problem might be.
> When I looked at the database structure, the "user" table was simply flagged
> as "In use".
> I selected that table and chose the "repair" option.
> I don't know if that helped, but after the table was repaired, the table was
> no longer "In Use" and everything was back to normal.
> The whole thing took about 15 minutes.
> That is why I don't know what caused the problem in the first place. We only
> have about 100 queries in the whole site, almost all of them are "select".
> But I never heard of the "In Use" case. I don't think a "select" statement
> can do that, maybe an "update" or "Insert" that didn't work.