MySQL Forums
Forum List  »  General

How do deletes and updates affect fetching of rows?
Posted by: Ken Resander
Date: October 17, 2009 03:01AM

Suppose user A has issued a select and is sitting scrolling through the first couple of matching rows of 500 matches say. Then user B deletes half of the table including some of the rows user A is looking at and some of the rows that user A has not yet fetched.

What happens when user A wants to get the unfetched rows? Will MySQL know about the state of A's fetching and remove the deleted rows from A's resultset?

Then the same scenario with user B updating rows. This may cause A's WHERE expression to be false when originally it was true and vice versa. Will MySQL reevaluate A's WHERE expression and create a new resultset?

If not, will user A's program be informed that the resultset has changed, for example when FETCH NEXT is called?

Options: ReplyQuote

Written By
How do deletes and updates affect fetching of rows?
October 17, 2009 03:01AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.