summaryrefslogtreecommitdiff
path: root/source4/lib/tdb
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r10465: separate out a read_only db from a read-only traversal to ensure weAndrew Tridgell6-12/+13
don't end up doing a mmap read only (This used to be commit 294ccfd46a0c4e1af9365d028acdabec03c41ad3)
2007-10-10r10463: consider it an error if tdbtorture produces any log messagesAndrew Tridgell1-1/+10
(This used to be commit d9ee0e8b59ee52ed1e41865cffe97e32b504e7e7)
2007-10-10r10462: cope better with compilers that don't put the object file in the ↵Andrew Tridgell1-0/+4
same directory as the source (This used to be commit 312491b2511039f3d6308e70c849810c35a3259c)
2007-10-10r10461: fixed tdb build on systems without stdint.hAndrew Tridgell1-2/+2
(This used to be commit 83168c7e76c7e3adcdb0eec1611827d4db09f858)
2007-10-10r10460: fixed portability of transaction code to systems with integerAndrew Tridgell1-6/+7
alignment constraints (like sparc) (This used to be commit bce35ad237a55376b6af98416eec92a7c4b422a6)
2007-10-10r10459: fixed some portability problemsAndrew Tridgell3-0/+6
(This used to be commit 03942dd54b31e7a4cf9c6270b26ccf68a3234b40)
2007-10-10r10424: for caller convenience, automatically turn a tdb_traverse() into aAndrew Tridgell1-0/+4
tdb_traverse_read() for read only databases (This used to be commit 9b53e04377d2ff652c4a9496798d2e3aa0dccab3)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell10-32/+130
allowing searches to proceed while another process is in a transaction, then only upgrading the transaction lock to a write lock on commit. The solution is: - split tdb_traverse() into two calls, called tdb_traverse() and tdb_traverse_read(). The _read() version only gets read locks, and will fail any write operations made in the callback from the traverse. - the normal tdb_traverse() call allows for read or write operations in the callback, but gets the transaction lock, preventing transastions from starting inside the traverse In addition we enforce the following rule that you may not start a transaction within a traverse callback, although you can start a traverse within a transaction With these rules in place I believe all the deadlock possibilities are removed, and we can now allow for searches to happen in parallel with transactions (This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
2007-10-10r10420: Two minor scons fixesJelmer Vernooij1-1/+1
(This used to be commit 749b19d34f6105c696a07cc2cd39d5acecfc735b)
2007-10-10r10415: The ldb and tdb libraries are bad examples to test out the make protoTim Potter1-6/+4
code as they are marked as NOPROTO in the config.mk files. (This used to be commit 5f530eacbae073e9df6adde316404f70ecfe9122)
2007-10-10r10410: blindly update the scons file for tdb. I'm not sure how this works,Andrew Tridgell1-1/+1
but it definately needs transaction.c now (This used to be commit fa353a5bc562fa1ace0daf6586c42d1d5698c6e4)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell17-113/+1323
samba-technical posting for more details on the transactions design. This also adds a number of command line arguments to tdbtorture, making it more flexible, and fixes some lock deadlock conditions in the tdbtorture code. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10385: removed obsolete commentAndrew Tridgell1-1/+0
(This used to be commit 40a8ad2d1eb26d1635b8f188036b04319ffd41b4)
2007-10-10r10384: add _GNU_SOURCE in tdb configureAndrew Tridgell1-0/+1
(This used to be commit 21e5c328a033a4b452b3fd696069ad8bbfa6b9cc)
2007-10-10r10379: Add files for ldb and tdb to proto_files. The tool for building proto.hTim Potter1-5/+9
is busted though. (This used to be commit 54882f88cad1427b6adcb4c956a63e534e7d13e4)
2007-10-10r10336: Add sconscript for a couple more subsystems.Jelmer Vernooij1-1/+0
(This used to be commit 59d4450453c25f5cce9b67b808ff0c4433c1d194)
2007-10-10r10335: Build tdb tools into bin directory.Tim Potter1-4/+5
(This used to be commit f35c4763d5c681a74af1f59e75a2f93e99d645cb)
2007-10-10r10330: Add SConscript to more subsystems. Some of the tdb tools build now.Jelmer Vernooij2-1/+14
Start on custom Samba scons tools (for handling proto generation, pidl, etc) (This used to be commit 4bffe4435944fffa3f9680b5a2fe63f2bdd98003)
2007-10-10r10258: Fix an unused/duplicate local variable.Tim Potter1-2/+0
(This used to be commit 360be7028c2244391cdd9ed6d156cec8dab9e9e9)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell24-2578/+2231
just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r9774: r11605@blu: tridge | 2005-08-30 12:02:19 +1000Andrew Tridgell1-0/+3
make sure we don't walk off the end of the hash array (This used to be commit 3c32f24e2c6a99ec294fb16e1684cd22b08f2df4)
2007-10-10r9773: r11599@blu: tridge | 2005-08-30 11:55:57 +1000Andrew Tridgell1-5/+13
optimise this case a bit more. The total speedup using non-indexed ldbtest is now around a factor of 80x. The code is ugly as hell, but I think this speed is worth it. Of course, if we only ever do indexed searches in ldb then this doesn't help, but it seems all too common that we get unindexable searches, so the optimisation is worthwhile (This used to be commit 2e14fb893dd9815cdb2488c630131dc549e5c361)
2007-10-10r9769: r11592@blu: tridge | 2005-08-30 10:40:19 +1000Andrew Tridgell1-0/+37
added a tdb optimisation that speeds up non-indexed ldb by a large margin (often 10x or more). I'd be interested in any comments on the safety of this optimisation. See the comment in the code for an explanation. (This used to be commit 7f9efaceb6d6dfc0c82923344cc45ec34493f2ed)
2007-10-10r9455: Support for reading the policy databaseJelmer Vernooij1-0/+2
(This used to be commit 7548a5012aad41bde0652d4532d184545997be86)
2007-10-10r9448: Work on reading the secrets tdb. Build tdbsam support by default.Jelmer Vernooij1-0/+2
(This used to be commit 9ea601c0a675767f8ea5f316c9355572dffbc4c0)
2007-10-10r8966: Simplify the makefile generation system a bit.Jelmer Vernooij1-0/+4
Autogenerate list of binaries (rather then having them hardcoded in build/smb_build/makefile.pm) Add INSTALLDIR keyword to .mk files (This used to be commit ce0935112b846486cf705ec69f12350be9c4c89d)
2007-10-10r8624: removed valgrind comment on tdb that no longer appliesAndrew Tridgell1-19/+0
(This used to be commit 8f222c8c7a750c739d3288da0b1edb1efc3b1ffc)
2007-10-10r8448: - added a test target for tdbAndrew Tridgell2-2/+9
- reduced the torture size so it doesn't kill the build farm hosts (This used to be commit 7a88a9f06cbe5c125edad0da7908b94bcedfe4fc)
2007-10-10r8447: fixed make install in the farmAndrew Tridgell1-0/+3
(This used to be commit 4a61a5c70efdf3842e19ae74a2b56c4b10e8e294)
2007-10-10r8442: remove tdbtest from our build. If you want it, then doAndrew Tridgell1-10/+0
'make bin/tdbtest' manually in the tdb tree (This used to be commit 28dd79587df523c5622d09bd6d59305ae79af479)
2007-10-10r8441: don't build tdbtest by default as there are too many systems thatAndrew Tridgell2-17/+1
don't have libgdbm, and the configure test for gdbm is broken (This used to be commit 5c4c3e9a8d9d853028271f228ad36388f4cb2012)
2007-10-10r7641: Fix based on work from "Shlomi Yaakobovich" <Shlomi@exanet.com> to catchJeremy Allison1-6/+7
loops in corrupted tdb files. Jeremy. (This used to be commit f9f3037d6855259edd56fd5a23d63dbb37f0a751)
2007-10-10r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can beDerrell Lipman1-1/+10
called from multiple backends. (ldb_sqlite3 needs it too.) Added parameter for a callback function that determines whether an attribute needs case folding. - begin to prepare for sqlite3 in build process - work-in-progress updates, on ldb_sqlite3 (This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)
2007-10-10r6546: Fix ldb standalone buildJelmer Vernooij2-2/+19
Add autoconf to tdb (This used to be commit 95fed657f458a856feec2fb256edd642e4179979)
2007-10-10r6528: - in tdb_fetch() we effectively disallowed zero length records byAndrew Tridgell1-7/+4
returning NULL/0, which is the same as we used for a failure. Having to look at tdb->ecode (which we never do) is too error prone. Instead, tdb_fetch() should behave like malloc() and talloc(), where zero length is not special and malloc(0) returns a valid pointer. - similarly in data_blob(), asking for data_blob(NULL, 0) should return a zero blob, but asking for data_blob(ptr, 0) should return a zero length blob with a valid pointer, just like talloc() and malloc() This change fixes the SummaryInformation stream stored in the tdb backend when manipulated from w2k. The w2k client was using SET_EOF_INFORMATION to create a zero-length stream, which we return STATUS_NOT_FOUND on, as the tdb_fetch() gave us back a NULL/0 blob, which we returned as not-found (This used to be commit 162bbe4402b9de6ac06103df904b9fc204fbff29)
2007-10-10r6487: Use autoconf for standalone build of tdbJelmer Vernooij2-0/+17
(This used to be commit 78bf8026bde34b7accc78f07c940ef1dcfc0dea7)
2007-10-10r6238: Ensure if realloc fails on an internalJeremy Allison1-3/+8
tdb we fail gracefully. Jeremy. (This used to be commit d69f7c05468ae54e0474b188fedabe14e7297d53)
2007-10-10r5780: Remove unused arguments.Tim Potter2-7/+7
(This used to be commit 1ee84e373e2b44c96f9353f194b766d6a144e7ce)
2007-10-10r5779: Remove signal and timeout gubbage from tdb.Tim Potter3-127/+4
(This used to be commit dbb56e9a59cf00d57b09ded6d60bf9424d5f1f4c)
2007-10-10r5533: Patch to detect infinite loops when traversing a tdb from "Shlomi ↵Jeremy Allison1-0/+7
Yaakobovich" <Shlomi@exanet.com> Jeremy. (This used to be commit 84f6d2b3dd29c1aa478708db9617a79382158f64)
2007-10-10r5330: Remove #include <sys/time.h> from includes.h.Andrew Bartlett1-0/+1
Add #include "system/time.h" back (it was removed in some of these places because the definitions were provided by <sys/time.h> on tridge's platform.) Andrew Bartlett (This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5)
2007-10-10r5300: more uint32 and system/filesys.h build fixes when developer mode is ↵Andrew Tridgell1-0/+1
enabled (This used to be commit 93931b1a741a3722c311ada80c4c9d3d670f91b2)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell4-0/+5
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell8-2/+10
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5143: don't generate prototypes for lib/tdb/Stefan Metzmacher3-1/+12
metze (This used to be commit 1c48c30aaf58d069cdba2f59b5c012bc4bdd3efc)
2007-10-10r4467: - tdb standalone build doesn't need -DSTANDALONE any moreAndrew Tridgell2-3/+3
- fixed standalone build (This used to be commit ade0b71e4194f99d807d26276592bc041d46df7b)
2007-10-10r4466: rather than defining "STANDALONE" for building tdb, ldb and tallocAndrew Tridgell6-8/+8
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba build. This makes it easier to pull code out of Samba for external use. (This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
2007-10-10r3968: fix compiler warningsStefan Metzmacher1-1/+1
metze (This used to be commit 6440476f7f2fd5776ec4a21240e7482603000d19)
2007-10-10r3737: - Get rid of the register_subsystem() and register_backend() functions.Jelmer Vernooij1-0/+1
- Re-disable tdbtool (it was building fine on my Debian box but other machines were having problems) (This used to be commit 0d7bb2c40b7a9ed59df3f8944133ea562697e814)
2007-10-10r3733: More build system fixes/features:Jelmer Vernooij2-13/+1
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities) (This used to be commit 64826da834e26ee0488674e27a0eae36491ee179)