summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb/python
Commit message (Collapse)AuthorAgeFilesLines
* tdb: Sync to tdb 1.2.11 from upstreamAmitay Isaacs2013-05-291-2/+7
| | | | (This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
* lib/tdb: Sync tdb from samba git treeAmitay Isaacs2012-04-131-21/+49
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
* pytdb: Add __version__ attribute.Jelmer Vernooij2010-10-071-0/+6
| | | | (This used to be ctdb commit 2b81314eb94d31f4efadd2a3dcf2f6e176338d3f)
* pytdb: Add support for tdb_repack()Kirill Smelkov2010-10-071-0/+6
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit ce84abcc6be31554da73920280e6bfc5b63b1464)
* pytdb: Make filename argument optional.Jelmer Vernooij2010-10-071-8/+4
| | | | (This used to be ctdb commit 3cc73c51caff51e0cba688aefd6f37e632c0e8d4)
* pytdb: Add support for tdb_freelist_size()Kirill Smelkov2010-10-071-0/+3
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit dcdd83e6d6786f0857acdf9aa04bca74a7ccf14d)
* pytdb: Add support for tdb_transaction_prepare_commit()Kirill Smelkov2010-10-071-0/+8
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit fd16bcc1434841d84fdf78f80163c97c0b52b3fe)
* pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and ↵Kirill Smelkov2010-10-071-0/+7
| | | | | | | | | | tdb_increment_seqnum_nonblock Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 1778fd02eec6e64737167c46173c0c76c85cc4d9)
* pytdb: Fix repr segfault for internal dbKirill Smelkov2010-10-071-0/+8
| | | | | | | | | | | | | | | | | The problem was tdb->name is NULL for TDB_INTERNAL databases, and so it was crashing ... #0 0xb76944f3 in strlen () from /lib/i686/cmov/libc.so.6 #1 0x0809862b in PyString_FromFormatV (format=0xb72b6a26 "Tdb('%s')", vargs=0xbfc26a94 "") at ../Objects/stringobject.c:211 #2 0x08098888 in PyString_FromFormat (format=0xb72b6a26 "Tdb('%s')") at ../Objects/stringobject.c:358 #3 0xb72b65f2 in tdb_object_repr (self=0xb759e060) at ./pytdb.c:439 Cc: 597089@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 3ff413baf04ce28eb54a80141250ae1284b2a521)
* pytdb: Add support for tdb_add_flags() & tdb_remove_flags()Kirill Smelkov2010-10-071-0/+4
| | | | | | | | | | | Note, unlike tdb_open where flags is `int', tdb_{add,remove}_flags want flags as `unsigned', so instead of "i" I used "I" in PyArg_ParseTuple. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 7389f8a8a634c2fe0f068831326d92e6bfa0d046)
* python: use '#!/usr/bin/env python' to cope with varying install locationsAndrew Tridgell2010-04-222-2/+2
| | | | | | | | this should be much more portable (Imported from commit 088096d1bad51428a2e2d487214995d4fdfc7ccc) (This used to be ctdb commit 7f1330adc690360a4a8ce85352df0908a93684a5)
* tdb: add tests for double .close() in pytdbKirill Smelkov2009-12-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason I do it is that when using older python-tdb as shipped in Debian Lenny, python interpreter crashes on this test: (gdb) bt #0 0xb7f8c424 in __kernel_vsyscall () #1 0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6 #2 0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6 #3 0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6 #4 0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6 #5 0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6 #6 0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1 #7 0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so #8 0x0a038d08 in ?? () #9 0x00000000 in ?? () master's pytdb does not (we have a check for self->closed in obj_close()), but still... Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from samba commit 71a21393dd1bb61bded82b1581ac6d5bd3b0153c) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 03372b4ea8ba2938468a5c0fc234d604966ce070)
* Implement missing functions in pytdb. (cherry picked from samba commit ↵Jelmer Vernooij2009-12-161-32/+4
| | | | | | | | 2da551bbcc6cab296769c193b0b82aaa6256cece) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 3a671b11770057c91e0ae646499d4714f52bc5c0)
* Add simple manually written replacement for the tdb module. (cherry picked ↵Stefan Metzmacher2009-12-161-0/+152
| | | | | | | | from samba commit 2a61fd41e9d4d2e3d7b47a816544c88bb369bc03) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 2231ee0aa163d68383dd9636f25f033fe7c1f3e7)
* tdb: Add simple reimplementation of tdbdump in Python as an example of the ↵Jelmer Vernooij2009-12-161-0/+12
tdb Python bindings. (This used to be commit 47d797f7885b1e7bcff724496ecb1990e8440eea) (cherry picked from samba commit 6bdd1425b75c8931965f0e5627f5a63dc6820a7c) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 363c34d4bb488609317794cd3153d85c12643110)