Hi Heikki, Thanks for picking up on this again. After the help from you and Mark last week, we removed ALL instances of the lock tables from our application. We used the idea Mark provided for getting our next sequence number without using any locks. In the past this was the only thing we where using table locks for. In this application we are not even doing anything with begin/end transaction, we are totally dependent on each SQL statement standing on its own. We do use a connection pool and have modified our code to always set the autocommitt level = 1 before handing any connections out of the pool. Do you think we are missing some basic setting in our MySql.ini file ? Again the thing which makes this so hard to debug is it is intermittent and only in production, and not always on the same table or SQL statement. :( Do you know of any log files we can run which will only log errors or exceptions? This might limit the volume of the logs to something manageable and still let us see what connection has the error. Alternatively do you know what state the MySql connection thinks it is in, in order for it to want to through this kind of error? Can we test for the state from within our code ?
Thanks again for your patience and assistance. I really want to be able to make MySql work for this application. Thanks Steff Steff, > We have our connection set to Autocommitt=1, and No table locks > are ever explicitly being done on this table anyplace in any of our > code modules. in MySQL you have to do LOCK TABLES on EVERY table you use inside a LOCK TABLES. You cannot lock just some table and use others unlocked. I repeat that the error could be caused if your application has a bug and uses the same connection to do the SELECT as it has used to LOCK some other table. Are you absolutely sure you do not mix connections in your application? Did you have the general query log running at the time of the error? If yes, can you check from it what was the number of the connection that issued the query resulting in an error, and did that same connection earlier issue a LOCK TABLES? Regards, Heikki Innobase Oy sql query -- Steff McGonagle Envisage Information Systems, Inc. Phone (315) 497-9202 x16 www.EnvisageSystems.com www.Enveritus.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php