MySQL Forums
Forum List  »  MyISAM

Odd behaviour with LOCK TABLES
Posted by: David Lombardi
Date: January 13, 2006 09:04AM

Hi All,
I have a rather weird behaviour if I issue a LOCK TABLES (I am using C API for sake of completeness).

There is one process (thread) that open a single connection and insert into several tables, found in several databases. The tables are all MyIsam and the databases are all 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 (read lock)
- FLUSH TABLE
- copy the tables
- UNLOCK TABLES

Right after locking the first table, any other insert (on different tables) fails with the message:
"Table 'xxx' was not locked with LOCK TABLES".
Clearly, 'xxx' is not locked because it does not have to.

I am running MySQL 5.0.16-nt on Windows XP SP2.

Thanks
David Lombardi

Options: ReplyQuote


Subject
Views
Written By
Posted
Odd behaviour with LOCK TABLES
2493
January 13, 2006 09:04AM
1728
January 16, 2006 12:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.