/
- Original Message -
From: Zeltser, Alex [EMAIL PROTECTED]
Newsgroups: mailing.database.myodbc
Sent: Tuesday, January 20, 2004 9:20 PM
Subject: RE: InnoDB locking 'non-existence' of a row
Hi Joe,
Thanks for your reply. Actually, in my experience (and according to the =
docs), if you select
', but the
results were the
same.
Is there any way to make the second session block when both it and the first one are
'locking'
non-existence of a row?
Thanks in advance,
Alex
-Original Message-
From: Chris Nolan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 4:55 PM
To: Zeltser, Alex
Cc
]
Sent: Tuesday, January 20, 2004 11:00 AM
To: Zeltser, Alex
Cc: [EMAIL PROTECTED]
Subject: RE: InnoDB locking 'non-existence' of a row
hi,
Selecting a non-existent row won't acquire any locks that prevents inserts from
happening. One way
to accomplish what you want is to create a separate insert
Hi,
I wanted to take advantage of the InnoDB 'gap' locking to lock 'non-existence' of a
row, the way the
manual recommends. I tried to do this by using 'select ... for update', using the
'mysql' client
from two separate sessions as shown below:
Session 1:
set AUTOCOMMIT=0;
begin;
select *