Commit 956453d0 authored by Barry Warsaw's avatar Barry Warsaw

pack(): Do not pack away object 0 since it's the root object. We do

this by not adding oid == ZERO to the set of oids to process.
parent 1c8e39fa
...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support ...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning. undo or versioning.
""" """
__version__ = '$Revision: 1.22 $'[-2:][0] __version__ = '$Revision: 1.23 $'[-2:][0]
import struct import struct
import time import time
...@@ -976,8 +976,9 @@ class Full(BerkeleyBase): ...@@ -976,8 +976,9 @@ class Full(BerkeleyBase):
self._txnMetadata[tid] = PROTECTED_TRANSACTION + meta[1:] self._txnMetadata[tid] = PROTECTED_TRANSACTION + meta[1:]
tidmarks[tid] = 1 tidmarks[tid] = 1
# For now, just remember which objects are touched by the # For now, just remember which objects are touched by the
# packable # packable
oids[oid] = 1 if oid <> ZERO:
oids[oid] = 1
# Now look at every object revision metadata record for the # Now look at every object revision metadata record for the
# objects that have been touched in the packable transactions. If # objects that have been touched in the packable transactions. If
# the metadata record points at the current revision of the # the metadata record points at the current revision of the
......
...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support ...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning. undo or versioning.
""" """
__version__ = '$Revision: 1.22 $'[-2:][0] __version__ = '$Revision: 1.23 $'[-2:][0]
import struct import struct
import time import time
...@@ -976,8 +976,9 @@ class Full(BerkeleyBase): ...@@ -976,8 +976,9 @@ class Full(BerkeleyBase):
self._txnMetadata[tid] = PROTECTED_TRANSACTION + meta[1:] self._txnMetadata[tid] = PROTECTED_TRANSACTION + meta[1:]
tidmarks[tid] = 1 tidmarks[tid] = 1
# For now, just remember which objects are touched by the # For now, just remember which objects are touched by the
# packable # packable
oids[oid] = 1 if oid <> ZERO:
oids[oid] = 1
# Now look at every object revision metadata record for the # Now look at every object revision metadata record for the
# objects that have been touched in the packable transactions. If # objects that have been touched in the packable transactions. If
# the metadata record points at the current revision of the # the metadata record points at the current revision of the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment