Bug #9512 | SELECT FOR UPDATE returns phantom rows | ||
---|---|---|---|
Submitted: | 31 Mar 2005 2:29 | Modified: | 4 Apr 2005 5:30 |
Reporter: | Peter Zaitsev (Basic Quality Contributor) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 4.1.10a | OS: | Any (All) |
Assigned to: | CPU Architecture: | Any |
[31 Mar 2005 2:29]
Peter Zaitsev
[4 Apr 2005 5:30]
Heikki Tuuri
Peter, this is the documented behavior of REPEATABLE READ. A normal consistent read SELECT in transaction T reads a consistent snapshot of the database at the time when the first SELECT in T was issued. SELECT ... FOR UPDATE is a normal read that reads all current data and locks it. The InnoDB manual states that if you want to read the latest data, you must use a locking read. Regards, Heikki