Set transaction-specific options that apply only for the duration of the current transaction.
typedef enum {
MCO_BTREE_HOLD_LOCKS = 1 /* Hold B-Tree cursor locks until the end of traversal */
} MCO_TRANS_OPTIONS;
MCO_RET mco_trans_set_options(
/*IN*/ mco_trans_h t,
/*IN*/ int options_mask
);
t
options_mask
MCO_TRANS_OPTIONS enum. Multiple options can be combined
using bitwise OR (|). Set to 0 to disable all options.This function configures runtime options that affect the behavior of the current transaction. The settings are valid only until the transaction is committed or rolled back; they do not persist across transactions.
Currently, the only supported option is:
MCO_BTREE_HOLD_LOCKS— when set, B-Tree cursor locks are held until the end of the cursor traversal (instead of being released after each step). This can improve consistency during complex traversals but may increase lock contention.Options must be set after the transaction is started and before performing operations that depend on them.
MCO_S_OK
MCO_E_INVALID_HANDLE
MCO_E_TRANS_NOT_ACTIVE