Kbase P122120: When does the RELEASE statement commit a record to the database?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/24/2009 |
|
Status: Verified
GOAL:
When does the RELEASE statement commit a record to the database?
GOAL:
When does the RELEASE statement not commit a record to the database?
GOAL:
How the RELEASE statement affects locks?
GOAL:
Does the RELEASE statement release locks?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
The RELEASE statement is intended to release a buffer, not the locks on records contained in them.
Depending on the state of the buffer, release can have several side effects, including changes in the lock status:
1.) If a record in a buffer has been updated, or if the buffer contains a newly created record and the record has not yet been written to the database, it will get sent to the server where it will be written to the database.
Note that the database block containing the record (or blocks if the record is fragmented) will be updated, but the block is not written to disk at this point. Index entries will also be created or updated if needed.
2.) If there is a lock on the record in a buffer, and you are in a transaction, the lock cannot be dropped yet.
The server will be notified so it will know to release the lock at the end of the transaction.
The lock becomes a "limbo" lock at this point.
3.) If there is a (share) lock on the record in the buffer, and you are not in a transaction, the lock will be dropped
4.) Finally, the buffer contents are discarded after any of the relevant situations above have been taken care of.