Hi
We are in the process of converting old applications code
(informix 1.10.03F/2.10.03F & xenix 2.3.2) to on line (informix 4.00.UD2 and
sco unix 3.2).
After having some troubles of concurrency with a large application we decided
to test them with a smaller one.
We used db4glgen to generate a 4gl program for the following table:
create table dummy
(
d_type char(2),
d_area char(8),
d_number char(6),
d_year char(4),
d_rcpt date,
d_area_in char(8),
) EXTENT SIZE 1431
NEXT SIZE 475
LOCK MODE ROW;
create index dummy1 on dummy (d_type, d_area, d_number, d_year);
The database originally has transactions so we modified the 4gl source to
support transactions too.
Ie:
BEGIN WORK
INSERT INTO dummy VALUES (w_record.*)
IF sqlca.sqlcode THEN
DISPLAY sqlca.sqlcode AT 23,1
DISPLAY sqlca.sqlerrd[2] AT 23,20
SLEEP 10
CALL err_print(sqlca.sqlcode)
ROLLBACK WORK
RETURN
END IF
LET w_rowid = SQLCA.sqlerrd[6]
SLEEP 10
COMMIT WORK
When at least four users are trying to insert new rows at the same time
some of them get:
sqlcode: -271 (could not insert new row in the table)
c-isam error: -144 (key value locked)
The same application in xenix works fine.
Are we doing something wrong ?
Thanks in advance
===============================================================================
Francisco Javier Lopez | internet: javier@lucas.mrec.ar
United Nations Development Programme | uucp: ...!uunet!atina!lucas!javier
Argentine Foreign Office | Phone: (Home) +54-1-757-2122
| (Office) +54-1-313-8082
Reconquista 1088 1er. Piso | Fax: +54-1-814-4824
(1003) Buenos Aires
Republica Argentina