tdb_transaction_cancel
Taj Khattra
taj.khattra at gmail.com
Wed Apr 11 01:28:05 GMT 2007
take two...
here's a contrived test case. it aborts with the latest tdb in svn,
but works ok with the tdb in samba4-tp4.
could someone please confirm if this is a bug, or a
misunderstanding/misuse of the tdb api on my part?
thanks.
--cut--
#include <fcntl.h>
#include "tdb.h"
#include <assert.h>
main()
{
TDB_CONTEXT *tdb = tdb_open("test.tdb", 0, 0, O_CREAT|O_RDWR, 0644);
TDB_DATA key = {"hi", 2};
tdb_transaction_start(tdb);
assert(tdb_chainlock(tdb, key) == 0);
tdb_transaction_cancel(tdb); /* should
release all locks??? */
assert(tdb_chainunlock(tdb, key) == -1);
}
More information about the samba-technical
mailing list