1 Interface differences between TDB1 and TDB2.
3 - tdb2 functions return 0 on success, and a negative error on failure,
4 whereas tdb1 functions returned 0 on success, and -1 on failure. tdb1
5 then used tdb_error() to determine the error.
7 - tdb2's tdb_fetch() returns an error, tdb1's returned the data directly
8 (or tdb_null, and you were supposed to check tdb_error() to find out why).
10 - tdb2's tdb_nextkey() frees the old key's dptr, in tdb2 you needed to do
13 - tdb1's tdb_open/tdb_open_ex took an explicit hash size. tdb2's hash table
16 - tdb2 uses a linked list of attribute structures to implement logging and
17 alternate hashes. tdb1 used tdb_open_ex, which was not extensible.
19 - tdb2 does locking on read-only databases (ie. O_RDONLY passed to tdb_open).
20 tdb1 did not: use the TDB_NOLOCK flag if you want to suppress locking.
22 - tdb2's log function is simpler than tdb1's log function. The string is
23 already formatted, and it takes an enum tdb_log_level not a tdb_debug_level,
24 and which has only three values: TDB_LOG_ERROR, TDB_LOG_USE_ERROR and
27 - tdb2 provides tdb_deq() for comparing two struct tdb_data.
29 - tdb2's tdb_name() returns a copy of the name even for TDB_INTERNAL dbs.