ctdbAllocTable
Allocate a new table handle.
Declaration
CTHANDLE ctdbAllocTable(CTHANDLE Handle)
Description
ctdbAllocTable() allocates memory and initializes a new table handle and associates that handle with the database specified by Handle. Before any operation on a table can take place, the application must allocate a table handle.
The next step after calling this function is generally to call ctdbOpenTable(). The table handle is released by calling ctdbFreeTable(). Do not release the table handle by calling the C runtime library function free().
Returns
ctdbAllocTable() returns the table handle on success or NULL on failure.
Example
CTSESSION_TYPE ctdbsess=CTSESSION_CTDB;
CTHANDLE hSession = ctdbAllocSession(ctdbsess);
CTHANDLE hDatabase = ctdbAllocDatabase(hSession);
CTHANDLE hTable = ctdbAllocTable(hDatabase);
See also
ctdbAllocDatabase(), ctdbFreeTable()