humanista (mruczus)
2008-07-25 06:35:24 UTC
One table in my interbase 6 open source database must not exceed
recordcount= 10, so I thought I could do
select count(*) from MyTable;
if count(*)<10
insert into MyTable
but another copy of my application could do the same between my "select"
and "insert" and so both copies would do an insert that way possibly
exceeding recordcount=10. Should I use a critical section inside my
transaction?
recordcount= 10, so I thought I could do
select count(*) from MyTable;
if count(*)<10
insert into MyTable
but another copy of my application could do the same between my "select"
and "insert" and so both copies would do an insert that way possibly
exceeding recordcount=10. Should I use a critical section inside my
transaction?