Bug #26333 | Nested select statement is not locking in shared mode | ||
---|---|---|---|
Submitted: | 13 Feb 2007 16:42 | Modified: | 13 Feb 2007 16:46 |
Reporter: | Bas Joosten | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.0.24 | OS: | MacOS (Mac OS X) |
Assigned to: | Heikki Tuuri | CPU Architecture: | Any |
[13 Feb 2007 16:42]
Bas Joosten
[13 Feb 2007 16:46]
Heikki Tuuri
Bas, this is not a bug. This is how the non-locking consistent read of InnoDB, Oracle, PostgreSQL, etc. works. To set locks in a SELECT statement, you need to use the FOR UPDATE or LOCK IN SHARE MODE clause, or SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE. Regards, Heikki