Universal Server - Row Locking Problem
Posted in 1998
Dear IUS gurus,
I will briefly describe my problem with row locking on Universal
Server.
I created a database table with row locking. If I begin a transaction
and
update a row in this table, and then try to update a different row in
the
same table, the second update fails and I receive an error message that
row is locked.
As I understand it, setting the lock level to row means that I can
simultaneously update two different rows in the same table even if they
are located in the same disk page.
Is my assumption incorrect? If it is not, then what have I not done (or
done wrong).
The following describes my scenario. I am using INFORMIX Universal
Server
version 9.12.UC2 on a Sun sparc 5 with Solaris 2.5.1
1. Create and populate the database table.
create table tab1 (
col_id integer not null,
col_descn varchar(72),
primary key (col_id) constraint tab1_pk
) lock mode row;
insert into tab1 values (1,'First one.');
insert into tab1 values (2,'Second one.');
2. SQL USED TO GENERATE ERROR
First Session:
dbaccess test -
begin work
update tab1 set col_descn = 'Changed first one.' where col_id = 1;
Second Session:
dbaccess test -
update tab1 set col_descn = 'Changed second one.' where col_id = 2;
First I executed the statements in the first session and then the
statements in the second session and the second session gave me the
following error message:
244: Could not do a physical-order read to fetch next row.
107: ISAM error: record is locked.
Any help will be greatly appreciated.
Thankyou,
Avi.
--
************************************************************************
/\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd.
/__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL
/ \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il