Lock problem in online 5.0
Posted in 1994
Topics: Error Codes & Troubleshooting, Clustering, Grid & MACH11
hi
I have a problem regarding the locking of rows in
the database and I am not able to understand what
is going on.
Can anybody throw some light on it ?
thanks
nataraj
-------------------------------------------------------
DATABASE set to unbuffered logging
Locking mode: is default (row level locking ?).
When the delete of the table is going on (the code
below does it ), and if an insert into the table is
made the following error is returned.
Note: There is no begin and commit work enclosing the
above delete.
ISAM error -154:Could not insert new row into table.
--------- code fragment ----------------------------------
$ SET LOCK MODE TO WAIT 45;
/* Delete records
* older than the number of days passed.
*/
for (hours=0; hours<24; ++hours)
{
sprintf (time_str, "%2d:59", hours);
$ DELETE
FROM opt
WHERE logot <= CURRENT YEAR TO SECOND - :days UNITS DAY
AND EXTEND (logot, HOUR to MINUTE) <= :time_str ;
}
--------------------TABLE -------------------------------------------
Column name Type Nulls
op_id char(10) no
logit datetime year to second no
logot datetime year to second no
totpg integer no
chart integer no
mesgln integer no
admin integer no
pin_no smallint yes
-------------------------INDEX------------------------------------------
Index name Owner Type Cluster Columns
110_13 informix unique No op_id
logit
logot