Commit 63fe89cd authored by Barry Warsaw's avatar Barry Warsaw

_RecordsIterator.__init__(): Port transaction extension fix from

ZODB4.  We need to return the unpickled extension data.
parent 36c6b8f1
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"""Berkeley storage with full undo and versioning support. """Berkeley storage with full undo and versioning support.
""" """
__version__ = '$Revision: 1.58 $'.split()[-2:][0] __version__ = '$Revision: 1.59 $'.split()[-2:][0]
import time import time
import cPickle as pickle import cPickle as pickle
...@@ -1816,7 +1816,10 @@ class _RecordsIterator(_GetItemBase): ...@@ -1816,7 +1816,10 @@ class _RecordsIterator(_GetItemBase):
self.status = ' ' self.status = ' '
self.user = user self.user = user
self.description = desc self.description = desc
self._extension = ext try:
self._extension = pickle.loads(ext)
except EOFError:
self._extension = {}
# Internal pointer # Internal pointer
self._oids = self._storage._alltxnoids(self.tid) self._oids = self._storage._alltxnoids(self.tid)
# To make .pop() more efficient # To make .pop() more efficient
...@@ -1867,7 +1870,6 @@ class _Autopack(_WorkThread): ...@@ -1867,7 +1870,6 @@ class _Autopack(_WorkThread):
self._packtime = packtime self._packtime = packtime
self._classicpack = classicpack self._classicpack = classicpack
# Bookkeeping # Bookkeeping
self._stop = False
self._lastclassic = 0 self._lastclassic = 0
def _dowork(self): def _dowork(self):
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"""Berkeley storage with full undo and versioning support. """Berkeley storage with full undo and versioning support.
""" """
__version__ = '$Revision: 1.58 $'.split()[-2:][0] __version__ = '$Revision: 1.59 $'.split()[-2:][0]
import time import time
import cPickle as pickle import cPickle as pickle
...@@ -1816,7 +1816,10 @@ class _RecordsIterator(_GetItemBase): ...@@ -1816,7 +1816,10 @@ class _RecordsIterator(_GetItemBase):
self.status = ' ' self.status = ' '
self.user = user self.user = user
self.description = desc self.description = desc
self._extension = ext try:
self._extension = pickle.loads(ext)
except EOFError:
self._extension = {}
# Internal pointer # Internal pointer
self._oids = self._storage._alltxnoids(self.tid) self._oids = self._storage._alltxnoids(self.tid)
# To make .pop() more efficient # To make .pop() more efficient
...@@ -1867,7 +1870,6 @@ class _Autopack(_WorkThread): ...@@ -1867,7 +1870,6 @@ class _Autopack(_WorkThread):
self._packtime = packtime self._packtime = packtime
self._classicpack = classicpack self._classicpack = classicpack
# Bookkeeping # Bookkeeping
self._stop = False
self._lastclassic = 0 self._lastclassic = 0
def _dowork(self): def _dowork(self):
......
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