"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > On 6/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Mikey C <[EMAIL PROTECTED]> wrote: > > > > > > Please implement table and row level locking. :-) > > > > > > If you think you know a way to implement row-level > > locking that does not impose one of the above > > limitations, then please tell me and I will look > > into the matter. > > Out of curiosity why won't flock() work?
Process A wants to modify the database, so it flock()s the rows it needs to changes and starts changing them. But half way in the middle of the change, somebody sends process A a SIGKILL and it dies. The OS automatically releases the flocks as process A dies, leaving the database half-way updated and in an inconsistent state, with no locks. Process B comes along and opens the database, see the inconsistent state, and reports database corruption. -- D. Richard Hipp <[EMAIL PROTECTED]>