Hi,

Imagine the scenario of the following happening in quick succession:

user1: select * from table                 --- ticks away, doing the select
user2: select * from table                 --- also ticks away
user3: insert into table ...               --- locked!, waiting for selects
to finish, so as not to disrupt them
user4: select * from othertable            --- ticks away, doing the select
user4: select * from table                 --- locked!, has to wait for
insert to finish, because result will depend on what the insert does

This is why the later select (#13) is locked.

Regards

Quentin

-----Original Message-----
From: Justin [mailto:[EMAIL PROTECTED]]
Sent: Friday, 9 March 2001 2:45 p.m.
To: [EMAIL PROTECTED]
Subject: locking oddity


Hi, 
Can someone explain this?

| 13 | XX | chrome | XX | Query | 1 | Locked | SELECT name FROM users WHERE
uid=288950 |
| 376 | XX | chrome | XX | Query | 1 | Sending data | SELECT uid FROM users
WHERE name like '%Fuzzster' limit 1 |
| 397 | XX | chrome | XX | Query | 1 | Locked | SELECT uid,flags,aseclev,
... etc
| 479 | XX | blue-private | XX | Query | 0 | NULL | show processlist |
| 542 | XX | chrome | XX | Query | 1 | Locked | update users set
lllogin=llogin,visits=visits+1,llogin=NOW() where uid=333705 |

I removed all the sleeping processes from the processlist

 * connection #397 is 'sending data' from a select. Fine.

 * connection #542 (an update) is "Locked" on that. Fine.

 * But ... why is connection #13 (another select) locked???

 And .. other examples show any other new selects also lock
 when there that or other pending locked updates are waiting...
 at least this is my interpretation..

-Justin

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

The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended 
recipient, you are asked to respect that confidentiality and not 
disclose, copy or make use of its contents. If received in error 
you are asked to destroy this email and contact the sender immediately. 
Your assistance is appreciated.

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