Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbSetOperationState

Sets the c-tree operation modes for special performance-related functionality.

Declaration

CTDBRET ctdbDECL ctdbSetOperationState(CTHANDLE Handle, CTOPS_MODE mode, CTOPS_STATE state);

Description

ctdbSetOperationState() sets the c-tree operation modes for special performance-related functionality and test operational states for critical events.

  • Handle is a session handle.
  • mode uses a combination of the following values:

    Operations Mode

    Description

    OPS_READLOCK

    Enable automatic, low level, blocking read locks on each record access that does not already have a lock.

    OPS_LOCKON_GET

    Lock next fetch only.

    OPS_UNLOCK_ADD

    Automatic unlock on add.

    OPS_UNLOCK_RWT

    Automatic unlock on rewrite.

    OPS_UNLOCK_UPD

    (OPS_UNLOCK_ADD | OPS_UNLOCK_RWT)

    OPS_LOCKON_BLK

    Blocking lock on next fetch only.

    OPS_LOCKON_ADD_BLK

    Enable blocking write lock mode during record add call then restore original lock mode.

    OPS_FUNCTION_MON

    Toggle function monitor. (Server)

    OPS_LOCK_MON

    Toggle lock monitor. (Server)

    OPS_TRACK_MON

    Toggle memory track monitor. (Server)

    OPS_MIRROR_NOSWITCH

    Don’t continue if mirror or primary fails. (Server)

    OPS_MIRROR_TRM

    A primary or mirror has been shutdown.

    OPS_MEMORY_SWP

    Memory swapping active.

    OPS_AUTOISAM_TRN

    Automatic ISAM transactions.

    OPS_KEEPLOK_TRN

    Keep locks involved in automatic transactions on record adds and updates after commit.

    OPS_SERIAL_UPD

    Changes GetSerialNbr() operation.

    OPS_DEFER_CLOSE

    Defer file closes or deletes during transactions.

    OPS_CONV_STRING

    Change all CT_STRING fields having a non-zero field length in the fixed length portion of the record buffer to CT_FSTRING fields. (Client)

    OPS_DISK_IO

    Set sysiocod on disk reads and writes.

state must be set with one of the following state values:

Operation State

Description

OPS_STATE_OFF

Turn a status bit off.

OPS_STATE_SET

Set the entire status word.

OPS_STATE_ON

Turn a status bit on.

OPS_STATE_RET

Return the entire status word.

ctdbSetOperationState() returns CTDBRET_OK on success.

Return Values

Value

Symbolic Constant

Explanation

0

CTDBRET_OK

No error occurred.

See Also

ctdbGetOperationState() ctdbGetAutoCommit() ctdbSetAutoCommit()

TOCIndex