Monday, June 27, 2011

Mysql Problems with error 1100: Table ... was not locked with LOCK TABLES

When you use LOCK TABLES, you must lock all tables that you are going
to use in your queries. Because LOCK TABLES will not lock views, if
the operation that you are performing uses any views, you must
also lock all of the base tables on which those views depend.
While the locks obtained with a LOCK TABLES statement are in effect,
you cannot access any tables that were not locked by the statement.
Also, you cannot use a locked table multiple times in a single
query. 

Reference                           
  1. http://hi.baidu.com/kennlee/blog/item/e839db66246e0520aa184c25.html 
  2. http://forums.mysql.com/read.php?21,134450,144180#msg-144180

No comments:

Post a Comment