Re: Table locks
Posted in 1995
marco greco (mar.greco@agora.stm.it) wrote: : On two different NCR towers, each equipped with online 4.10UC1, the : following 4gl code behaves strangely : lock table tbl in <whatever> mode : declare curs1 cursor for : select * from tbl #It's just an example, Mark! : foreach curs1 into some_var : .. : end foreach : .. : unlock table tbl : Right after the foreach, the lock is gone (!!!): that is any process can : access the table. The funny thing is that the following unlock table does : not report a "Table not locked by current user" error. Looks like bug 11374: LOCK IS FREED AFTER EXECUTION OF SQL STATEMENT BUT BEFORE UNLOCK In a 4gl program, when a table is locked in exclusive mode, the lock is released after the execution of an SQL statement, even though it has not yet executed the UNLOCK TABLE statement and the program has not terminated. another user can now lock the table in exclusive mode. Fixed in 4.11.UC1 and 5.00.UC1. That's why it doesn't happen when you run it on a system with 5.00. It's completely in the engine, which is why you don't have to recompile your 4GL code. : On one of the two towers, We have installed V5.00 and the problem is : gone without even bothering to recompile th 4gl code. : Before you say, I know that 4.10 is no longer supported, but I never got : replied to this (and most of my other queryes) by the Italian Informix : distributor, and since I am in a bad mood today, I just feel like : reporting this bug. Sorry, too late ;) It's already reported (and fixed). June ---- June Tong Informix Software ---- ---- junet@informix.com (415) 926-6140 ----