ctdbInsSegmentEx
Insert a new extended index segment before the segment indicated.
Declaration
CTHANDLE ctdbInsSegmentEx(CTHANDLE Handle, NINT SegNumber, NINT offset,
NINT length, CTSEG_MODE SegMode)
Description
ctdbInsSegmentEx() inserts a new extended index segment before the segment SegNumber. A segment is denominated extended if it is based on the segment offset. This function handles the segment handle allocation. Segment handle deallocation is automatically handled by ctdbCloseTable() and ctdbCloseAll().
After the segments, indexes, and fields have been defined, the table can be created or altered with ctdbCreateTable() or ctdbAlterTable().
Returns
ctdbInsSegmentEx() returns the segment handle on success, or NULL on failure
Example
pMyIndex = ctdbGetIndex(pMyTable, 0); // retrieve first index handle
pMyNewIseg = ctdbInsSegmentEx(pMyIndex, 0, 32, 4, CTSEG_ UREGSEG);
RetVal = ctdbAlterTable(pMyTable, 0);
See also
ctdbInsSegmentByName(), ctdbInsSegment(), ctdbInsSegmentByNbr(), ctdbAddSegmentEx()