25 Commits

Author SHA1 Message Date
Gregory P. Smith
05a24d7fec * closes SF bug/patch 967763
- fixes various memory leaks found by valgrind and a follup closer
    code inspection of the bsddb module.  (merges r1.32 of _bsddb.c
    and an associated test case)
  - also merges the one line r1.37 _bsddb.c fix that fixes a leak on
    the rare DBEnv creation failed error path.
2004-12-19 23:59:51 +00:00
Gregory P. Smith
923fae44e0 In 1.17.6.4 part of the patch committed in 1.17.6.3 got reapplied to
the end of a second function whos code was identical enough for patch
not to reject the patch.  this reverses that misapplication (only the
DBC_set_range method needed modification, not DBC_set as well).  This
problem only exists in the release32-maint branch.
2004-12-19 23:27:48 +00:00
Gregory P. Smith
139af5593b redo this patch on release23-maint rather than release23-branch:
revision 1.17.4.1
  date: 2003/11/03 21:37:43;  author: greg;  state: Exp;  lines: +9 -9
  * SF patch 835100 - C++ // comments are not allowed.  use /* */
2004-12-19 22:39:01 +00:00
Gregory P. Smith
a3731c7734 SF bug 1017405: DB keys() values() and items() methods were ignoring
their txn argument.
2004-09-04 01:41:01 +00:00
Gregory P. Smith
8d9363f711 fix bug related to SF bug id 788421 where DBC.set_range() could call
free() on something it did not allocate for non B-Tree based databases.
2004-03-16 07:47:45 +00:00
Gregory P. Smith
dd5f37301e Fixes SF bsddb module bug 788421:
* Fixed a bug in the compatibility interface set_location() method
   where it would not properly search to the next nearest key when
   used on BTree databases.  [SF bug id 788421]
 * Fixed a bug in the compatibility interface set_location() method
   where it could crash when looking up keys in a hash or recno
   format database due to an incorrect free().
2004-02-26 10:21:13 +00:00
Gregory P. Smith
c52e257eb9 support for compiling with BerkeleyDB 4.2.x (soon to be released). this
is a partial version of the 1.18->1.19 patch.  i left out the ability for
the module to also load as _pybsddb in addition to _bsddb as that applies
more to pybsddb than python.
2003-09-21 23:10:23 +00:00
Gregory P. Smith
e9155da191 port of 1.17->1.18 change. adds DBEnv.set_shm_key method. 2003-09-21 23:06:20 +00:00
Martin v. Löwis
35c38eaeae heck environment closed status before closing a cursors. Fixes #763928. 2003-07-15 19:12:54 +00:00
Gregory P. Smith
455d46f0d9 bsddb 4.1.6:
* Extended DB & DBEnv set_get_returns_none functionality to take a
   "level" instead of a boolean flag.  The boolean 0 and 1 values still
   have the same effect.  A value of 2 extends the "return None instead
   of raising an exception" behaviour to the DBCursor set methods.
   This will become the default behaviour in pybsddb 4.2.
 * Fixed a typo in DBCursor.join_item method that made it crash instead
   of returning a value.  Obviously nobody uses it.  Wrote a test case
   for join and join_item.
2003-07-09 04:45:59 +00:00
Gregory P. Smith
84261d2f13 Fix a typo/cut-n-paste error in DBCursor.join_item so that it doesn't
return a tuple.  (this also implies that nobody uses this method; the
bug has been here for a long time)
2003-07-07 19:06:45 +00:00
Gregory P. Smith
f655dff807 DB.remove() needs to set the internal DB handle to NULL after being called.
(sourceforge pybsddb bug #737970).

Also: don't allow other threads to run during calls that invalidate the
DB handle.
2003-05-15 00:13:18 +00:00
Barry Warsaw
c74e4a5351 Added a comment about backward compatibility requirements and a link
to the PyBSDDB project at SourceForge.
2003-04-24 14:28:08 +00:00
Mark Hammond
a69d409f05 Update to the new PyGILState APIs to simplify and correct thread-state
management.  Old code still #ifdef'd out - I may remove this in a sec,
but for now, let's get it in and things passing the tests again!
2003-04-22 23:13:27 +00:00
Barry Warsaw
1baa982c31 init_bsddb(): Added a few symbols that Greg forgot. 2003-03-31 19:51:29 +00:00
Gregory P. Smith
6e5c1792d9 4.1.5 2003-03-27 17:25:10 +00:00
Gregory P. Smith
fe11d3e0d4 Adds support for the DBEnv->set_timeout() method. 2003-03-27 17:23:29 +00:00
Gregory P. Smith
3ed7b03224 version 4.1.4 (4.1.3 just released) 2003-02-03 04:28:26 +00:00
Barry Warsaw
7871154c2e Bump the version number 2003-01-28 17:30:46 +00:00
Gregory P. Smith
b6c9f78074 bugfix: do not double-close DB cursor during deallocation when the
underlying DB has already been closed (and thus all of its cursors).
        This fixes a potential segfault.
        SF pybsddb bug id 667343
bugfix: close the DB object when raising an exception due to an error
        during DB.open.  This prevents an exception when closing the
        environment about not all databases being closed.
        SF pybsddb bug id 667340
2003-01-17 08:42:50 +00:00
Gregory P. Smith
aa71f5f2b4 bugfix: allow the module to work with python compiled without thread support.
closes sourceforge pybsddb bug id 669533.
2003-01-17 07:56:16 +00:00
Gregory P. Smith
c25fd3fb48 bugfix: disallow use of DB_TXN after commit() or abort(), prevents a
coredump or segmentation violation.

Sourceforge patch ID 664896:
http://sourceforge.net/tracker/index.php?func=detail&aid=664896&group_id=13900&atid=313900

The bug was reported on the pybsddb-users mailing list.
2003-01-17 07:52:59 +00:00
Barry Warsaw
9a0d779c7d Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now at
version 4.1.1 and works with up to BerkeleyDB 4.1.25.
2002-12-30 20:53:52 +00:00
Martin v. Löwis
b2c7affbaa Merge with bsddb3 2002.11.23.10.42.36 2002-11-23 11:26:07 +00:00
Martin v. Löwis
6aa4a1f29c Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185. 2002-11-19 08:09:52 +00:00