Thread: Lock Tables??
View Single Post
  #1  
Old 08-16-2006, 06:49 AM
Bailee Bailee is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Bailee is on a distinguished road
Default Lock Tables??

Hi All,
There is a process that open a single connection and insert into several tables, found in several databases. The tables are all MyIsam and the databases are owned by a single MYSQL instance. The process implements a sort of hot backup of the tables in a database while inserting into the other tables.
It does this by:
- issuing LOCK TABLES on all interested tables
- FLUSH TABLE
- copy the tables
- UNLOCK TABLES

After locking the first table, any other insert fails with the message:
"Table 'xxx' was not locked with LOCK TABLES".
Clearly, 'xxx' is not locked because it does not have to.

Thanks! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - Lock Tables??
Thread: Lock Tables??
View Single Post
  #1  
Old 08-16-2006, 06:49 AM
Bailee Bailee is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Bailee is on a distinguished road
Default Lock Tables??

Hi All,
There is a process that open a single connection and insert into several tables, found in several databases. The tables are all MyIsam and the databases are owned by a single MYSQL instance. The process implements a sort of hot backup of the tables in a database while inserting into the other tables.
It does this by:
- issuing LOCK TABLES on all interested tables
- FLUSH TABLE
- copy the tables
- UNLOCK TABLES

After locking the first table, any other insert fails with the message:
"Table 'xxx' was not locked with LOCK TABLES".
Clearly, 'xxx' is not locked because it does not have to.

Thanks! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote