ctdbFindDatabaseByUID
Get the name and path of a database by its unique identifier.
Declaration
CTDBRET ctdbFindDatabaseByUID(CTHANDLE Handle, ULONG uid, pTEXT Name,
VRLEN NameSize, pTEXT Path, VRLEN PathSize)
where:
Description
ctdbFindDatabaseByUID() retrieves the name and path of any database in a session dictionary by its unique identifier. It is important to remember that the UID of a database is set when the database is created (which automatically adds it to a session dictionary), and when an existing database is added to a session dictionary. Dropping a database from a session dictionary and then adding it again will likely result in the database being assigned a different UID.
Use ctdbFindDatabase() to get the path of a database by name.
Use ctdbGetDatabaseUID() or ctdbGetActiveDatabaseUID() to retrieve the database UID.
Returns
ctdbFindDatabaseByUID() returns CTDBRET_OK on success, or INOT_ERR (101) if the database is not in the session dictionary, or a c-tree error code on failure. Note: If the database is not found in the session dictionary, then the UID must be considered invalid.
See also
ctdbFindDatabase(), ctdbGetDatabaseUID(), ctdbGetActiveDatabaseUID()