Patches item #1408584, was opened at 2006-01-17 17:55
Message generated for change (Comment added) made by jimjjewett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1408584&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: jross (j_ross)
Assigned to: Nobody/Anonymous (nobody)
Summary: Corrupt Berkeley DB using Modify bsddb.dbtables
Initial Comment:
OS: Windows 2000/Windows XP/Debian-based Linux
w/2.6.10 Kernel
When the Modify function from the dbtables.py module
is called on Berkeley DB it corrupts the file showing
an error caused by Line 445 of dbtables.py.
----------------------------------------------------------------------
Comment By: Jim Jewett (jimjjewett)
Date: 2006-01-19 17:35
Message:
Logged In: YES
user_id=764593
Correct, the values in the dictionaries should be callables
(usually a function) which take the old value and return the
new.
That said, the test case would still be useful, because
(1) calling a string should raise a TypeError
(2) making a mistake should not corrupt the database.
Perhaps the first except clause (which triggers a rollback)
needs to be a bare except? I'm guess the same is true of
some of the other abort() lines...
----------------------------------------------------------------------
Comment By: jross (j_ross)
Date: 2006-01-19 13:11
Message:
Logged In: YES
user_id=1429720
I'm new to Python so this may be the problem, does the
dbtables.Modify function require a function in the
mappings. i.e. tdb.Modify('mytable', conditions=
{'ID':dbtables.ExactCond('1')}, mappings={'ID':FUNCTION})
where the function returns the new value? (not mappings=
{'ID':'newvalue'})
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-01-18 01:14
Message:
Logged In: YES
user_id=33168
Can you create a test case for this? What is the trigger?
Just calling the function/method? Do you know if this
affects Python 2.4 and HEAD? What version of Berkeley DB?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1408584&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches