MySQL Forums
Forum List  »  General

"not locked" error on UNLOCK tables
Posted by: Arne Ludwig
Date: March 28, 2006 08:32AM

Hello,

I am trying to optimize the performance of a very simple application that does lots of inserts into a MyISAM table by adding a lock on the table but it doesn't seem to work. The mySQL server is 4.1.10a.

This is what the program looks like:

conn1 = open a connection to server (database A)
conn2 = open a connection to server (database B)

on conn1 select * from some_table;

on conn2 lock tables another_table write;

while rows in some_table:
on conn1 fetch a row;
on conn2 insert into another_table set ...;

on conn2 unlock tables;

Now all the inserts work fine, but the unlock(!) fails with error 1100
"table another_table was not locked with LOCK TABLE".

Is this the intended behaviour? Why? How can I work around the problem?

Thanks,

Arne

Options: ReplyQuote


Subject
Written By
Posted
"not locked" error on UNLOCK tables
March 28, 2006 08:32AM


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.