Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbUpdateCreateMode

Update the table create mode.

Declaration

CTDBRET ctdbUpdateCreateMode(CTHANDLE Handle, CTCREATE_MODE mode)

Description

ctdbUpdateCreateMode() updates the table create mode (which was specified when the table was created with the ctdbCreateTable() function). ctdbUpdateCreateMode() changes critical file mode attributes, such as the level of transaction control. This function is intended for use by experts, and should not be used unless you really understand all the implications. Since calling this function can cause the settings stored in the table handle to get out of sync with the table dictionary, the programmer should close and then re-open the table after using this function (see ctdbCloseTable(), ctdbOpenTable()).

No check is made to determine if the mode change will damage data. No check is made if the new mode is valid.

Note: Use this function with caution, as data may be lost. For example, changing a data file from transaction processing to no transaction processing makes automatic recovery unavailable.

  • Handle [in] the Table Handle.
  • mode [in] the new table create mode. It must be perfectly formed, as it will replace the current table create mode. Use the function ctdbGetTableCreateMode() to retrieve the current create mode and apply the changes on a fully qualified create mode. Update only the following create table modes:
    • CTCREATE_PREIMG
    • CTCREATE_TRNLOG
    • CTCREATE_WRITETHRU
    • CTCREATE_CHECKLOCK
    • CTCREATE_CHECKREAD
    • CTCREATE_HUGEFILE

Returns

ctdbUpdateCreateMode() returns CTDBRET_OK on success, or FairCom DB API C API error code on failure.

See also

ctdbCreateTable()

TOCIndex