ctdbUnlockRecord
Unlock the current record.
Declaration
CTDBRET ctdbUnlockRecord(CTHANDLE Handle)
Description
ctdbUnlockRecord() unlocks the current record, regardless of whether the record was automatically locked via the session-wide record locking mechanism (call ctdbLock() and then read a record), or manually locked by calling ctdbLockRecord() on an individual record. There is one exception to this - any new/modified/deleted records that were locked (via either of the locking methods) in a transaction, in a CTCREATE_TRNLOG / CTCREATE_PREIMG table, are NOT unlocked by this function. (But locks on records in a CTCREATE_NORMAL table ARE unlocked.) Later, when the transaction is finished (by calling ctdbCommit() or ctdbAbort()), the locks on those still-locked records will be released. This function has no effect on the session-wide record locking mode (it does not turn it on or off, or suspend it, etc.) Use ctdbUnlockTable() to unlock ALL the locked records (with certain exceptions) in a given table.
Returns
ctdbUnlockRecord() returns CTDBRET_OK on success, or FairCom DB API C API error code on failure.
See also
ctdbLockRecord(), ctdbUnlock(), Locking