hi all

i started working with the innodb databasel. after reading the manual i am not sure 
how i shall use transctions. say i have the following case:

SELECT read some row
UPDATE depending on the select
COMMIT

to make the command sequence safe, the select has to lock the table. it would be nice 
to have something like:

START TRANSACTION
SELECT read some row
UPDATE depending on the select
COMMIT

any row accessed between START TRANSACTION and COMMIT automatically locks the rows. 
but the manual does not exactly describe the behavior of the commands START 
TRANSACTION, BEGIN etc. It only denotes that it servers for ad-hoc transactions. i 
know that i can use the LOCK IN SHARE MODE with the SELECT command, but is this the 
only way?

best regards
benny


Reply via email to