Hi Steven, Just one UNLOCK TABLES. :-) From http://www.mysql.com/doc/en/LOCK_TABLES.html
"LOCK TABLES locks tables for the current thread. UNLOCK TABLES releases any locks held by the current thread. All tables that are locked by the current thread are implicitly unlocked when the thread issues another LOCK TABLES, or when the connection to the server is closed." BTW, you can't do INSERTs when the table(s) are locked with a READ lock. ;-) Need a WRITE lock for that. Hope that helps. Matt ----- Original Message ----- From: "Steven Wu" Sent: Friday, September 05, 2003 4:57 PM Subject: question about lock tables and unlock table > Hi Need some help here: > > if I have two tables, alertLog, videoLog needed to lock during some > processing as: > > mysql> LOCK TABLE alertLog READ, videoLog READ > > after two tables are lock and do some INSERT, > > mysql> INSERT INTO alertLog(alert); > mysql> INSERT INTO videoLog(video); > > > My question is DO I NEED ONE OR TWO "UNLOCK TABLES" to > release the locking ? so > > Is the answer ? > mysql>UNLOCK TABLES > mysql>UNLOCK TABLES > > or just > > mysql>UNLOCK TABLES > > > thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]