Locking with concurrent 4GL cursors in unlogged databases

In databases that are created without transaction logging, a 4GL program can declare two Update cursors on the same table. But if the cursor that the second DECLARE statement defines is on a column that is also the key to an index on the table, the database server releases the lock that the first cursor held on the table.

For Informix® 4GL programs in databases created without transaction logging,
  • if the DECLARE statement places a lock on a table by defining a cursor,
  • and another DECLARE statement defines a second cursor on the same table,
  • and if the column referenced by the second cursor is also an index key,
then when the second cursor is declared on the indexed column, the database server automatically releases the lock associated with the first cursor.
The lock that the first DECLARE statement created is typically not released, however, under the following circumstances:
  • The database supports transaction logging.
  • The column referenced by the second cursor is not indexed.
  • The application is not an Informix 4GL program.

But there might be other scenarios in which a concurrent lock that the DECLARE statement created in a 4GL program could be released for reasons other than an index partition.


Copyright© 2021 HCL Technologies Limited