ctdbSetAutoCommit
Sets the c-treeDB API auto commit mode.
Declaration
CTDBRET ctdbDECL ctdbSetAutoCommit(CTHANDLE Handle, CTBOOL flag);
Description
ctdbSetAutoCommit() sets the c-treeDB API auto commit mode. The auto commit of transactions are invoked automatically when records are added or updated by a ctdbWriteRecord() call. Automatic transactions may increase performance by reducing network traffic for single record updates since this is equivalent of performing the following functions:
ctdbBegin();
if (ctdbWriteRecord() == CTDBRET_OK)
ctdbCommit();
else
ctdbAbort();
The following apply when an automatic transaction is performed:
Return Values
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
No Error |
See Also
ctdbGetAutoCommit() ctdbSetOperationState() ctdbGetOperationState()