Re: adjacent key locking
Posted in 1997
On 5 Jun 1997, Nicholas Allon wrote: > Could anyone please explain the problem of adjacent key locking when it > occurs and any possible solutions. The informix error code was -243. We are > using AIX 3.5, with informix online 7.12 What makes you think that this is adjacent row locking? Adjacent row locking, apart from being old news (fixed by 5.05 and 7.v.early I believe) was the condition where the engine would lock the row after a row being inserted, in case you were about to insert another one. This is a badly worded example, but its one of those days -- correct me if I'm wrong[0]. What's more likely is that some other process was locking the data that you were attempting to select/modify/whatever. Are you set to lock mode row? If not, then you may have ran into another problem where processes accessing physically-close data can have you locked. The majority of locking problems may be fixed with the careful application of a SET LOCK MODE TO WAIT 1 statement to the top of the code. You can increase the 1 upwards (its in seconds) but even a 1 will retry numerous times, and eliminates most of the momentary-lock type problems. -Richard [0] Not that I'd expect people not to if I did'nt ask them to...