diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-12-21 03:04:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-12-21 03:04:37 +0000 |
commit | c2c42b8694be0b2ce271613153cca71dc8e83a9f (patch) | |
tree | 8c068082fa8b9010c61f06c7285f05ffe1a3d8f9 /source3/tdb/README | |
parent | e004340f715743e16f599bd0be3e9dad4c53bf2d (diff) | |
download | samba-c2c42b8694be0b2ce271613153cca71dc8e83a9f.tar.gz samba-c2c42b8694be0b2ce271613153cca71dc8e83a9f.tar.bz2 samba-c2c42b8694be0b2ce271613153cca71dc8e83a9f.zip |
first pass at the database code for Samba. This also includes a test
suite and a very simple tool for manuipulating the databases.
the main code is in tdb/tdb.c and includes both mmap and file based
IO. All databases auto-expand and allow multiple simultaneous writers.
the next step is using this new capability in lots of places in Samba
where we have existing ad-hoc databases
(This used to be commit c89d29cc5e3b6d568928acace01144059f1668b3)
Diffstat (limited to 'source3/tdb/README')
-rw-r--r-- | source3/tdb/README | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source3/tdb/README b/source3/tdb/README new file mode 100644 index 0000000000..fc99a68acc --- /dev/null +++ b/source3/tdb/README @@ -0,0 +1,33 @@ +This is a simple database API. It was inspired by the realisation that +in Samba we have several ad-hoc bits of code that essentially +implement small databases for sharing structures between parts of +Samba. As I was about to add another I realised that a generic +database module was called for to replace all the ad-hoc bits. + +I based the interface on gdbm. I couldn't use gdbm as we need to be +able to have multiple writers to the databases at one time. + +Compilation +----------- + +add HAVE_MMAP=1 to use mmap instead of read/write +add TDB_DEBUG for verbose debug info +add NOLOCK=1 to disable locking code + +Testing +------- + +Compile tdbtest.c and link with gdbm for testing. tdbtest will perform +identical operations via tdb and gdbm then make sure the result is the +same + +Interface +--------- + +The interface is very similar to gdbm except for the following: + +- different open interface. The tdb_open call is more similar to a + traditional open() +- no tdbm_reorganise() function +- no tdbm_sync() function. No operations are cached in the library anyway +- added a tdb_traverse() function for traversing the whole database |