sql,query

While working with record level locking on innodb tables we noted some
behavior that has us a bit befuddled.

The problem, in its simple form, is that I have two processes accessing the
same table.  Process A does the following:
begin;
select * from table1 for update limit 5;

Now process B comes along and does:
begin;
select * from table1 for update limit 5;

The behavior we are seeing, on both 3.23.49a and 3.23.52, is that process B
gets blocked and eventually times out if process A doesn't commit or
rollback.  In other words it appears that process A has the whole table
locked.  What we were expecting was that process B would skip over the
records locked by process A and get the next 5 records.

Any thoughts on what's really going on here?  Is there a (better?) way to do
what we want?

Carl McNamee
Systems Administrator
Billing Concepts
(210) 949-7282

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