On Thursday 12 December 2002 14:06, Greg_Cope at sandwich dot pfizer dot com 
wrote:

> 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:
>
> 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.

If you read the above section of the manual you can see:
        When you use LOCK TABLES, you must lock all tables that you are going to use 
and you must use the same alias that you are going to use in your queries! If 
you are using a table multiple times in a query (with aliases), you must get 
a lock for each alias!




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to