I am confused. (innodb table type)

Client 1.
starts transaction
selects balance from table where id=1 for update
update table set balance=100
#At this point from what i have read the balance could be selected by anther
user.

committ



I have read that a select balance from table where id=1 lock in share mode
will wait for the committ statement,  but client 2 would be wanting to
update the balance the same way client 1 does sO i do not see how client 2
could use the lock in share mode because the script is the same for client 2
as it is in client one.

so how would i ensure that client 2 waits for client 1 to committ before
processing their select  and update?



Randy

sql,quary



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