List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:December 10 2002 2:36am
Subject:Re: locking issues
View as plain text  
At 19:52 +0000 12/9/02, Greg_Cope@stripped wrote:
>Hi All,
>
>I may be confused here but it would appear that when you issue a LOCK TABLES
>tbl_name { READ|WRITE }; You cannot read from another unlocked table in the
>same connection eg:

You're supposed to lock all the tables that you'll need until you
issue the UNLOCK TABLES statement.  Not just some of them.

>
>mysql>  LOCK TABLES users read;
>Query OK, 0 rows affected (0.00 sec)
>
>mysql> select * from Logger limit 1;
>ERROR 1100: Table 'Logger' was not locked with LOCK TABLES
>
>I've read section 6.7.2 of the Manual:
>http://www.mysql.com/documentation/mysql/bychapter/index.html#LOCK_TABLES
>
>This is on 3.23.43.
>
>I assume this is expected behaviour?  Although at the moment it seems a
>little odd that this thread cannot read from another (unlocked) table whilst
>it has a lock.
>
>Does anyone have a solution that I may be missing?  We are locking tables to
>do a "fake" transaction so that we can update a number of tables without
>interference from other threads.
>
>Thanks for any replies.
>
>Greg Cope
>JITC

Thread
locking issuesGreg_Cope10 Dec
Re: locking issuesPaul DuBois10 Dec