Re: Informix vs. Sybase vs. Oracle vs. (gasp) MS SQL Server
Posted in 1997
Anthony Mandic wrote: > > Jean-Marc van Leerdam wrote: [....] > > Regardless, I think one should NOT be troubled by things being done to > > records that are of no concern to that user. With PLL you can (and > > will) be troubled in such a way. > > Except in the case where one user has one row locked with RLL > and another users want a summery of all rows including the > locked one. Then you have to introduce further mechanisms to > overcome this. But no lock, implies no problem and no further > complexity. > Anthony, this is what you've got wrong. OPENing an UPDATE cursor only puts an advisory lock on the selected row. That means that nobody is prevented from doing whatever they want with the locked row, except for UPDATing it, DELETing it, or trying to put another advisory lock (hmmm, well, ok, you won't be able to lock the table, much less alter it or -hugh!- drop it, but that's beside the point). Only when you do UPDATE the lock gets promoted to being an exclusive lock, and it stays that way till the COMMIT or ROLLBACK. Gee, doesn't Sybase use promotable locks? Ciao, Marco ______________________________________________________________________________ Marco Greco, Catania, Italy marcog@linux.ctonline.it rem radioterapia +39 95 447828 fax 446558 Informix faq http://www.iiug.org/techinfo/faq/informix.htm 4glworks http://www.ctonline.it/~marcog Informix on Linux http://www.ctonline.it/~marcog/ifmxlinux.htm