----- Original Message -----
From: ""Vinay"" <vinay@stripped>
Sent: Thursday, March 02, 2006 12:20 AM
Subject: Enforcing Isolation in MySQL database
> Content-Type: text/plain;
> Content-Transfer-Encoding: quoted-printable
> Hello ,
> I suppose the InnoDB tables in Mysql have REPEATABLE-READ as =
> the default isolation. Is the concurrency enforced automatically by the =
> database or is there anything=20
> the application programmer has to do to make sure the data consistent.
> How does the REPEATABLE-READ resolve the following scenario.
> User1 opens a application and reads a row on the screen.
> User2 opens the same application and read the same row on the screen.
> User2 updates a field (and commits ,as the autocommit is on),
> User1 still is reading the non-updated row , and updates the same field =
> updated by the User2 to different value.
> How does it affect the database when normal select , update queries are =
you should use SELECT ... FOR UPDATE in this case. A normal plain SELECT in
InnoDB does not lock the rows it reads.
> What should the application programmer to enforce database concurrency.
> Thank you,
Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM