[Zodb-checkins] CVS: Zope/lib/python/BDBStorage - BDBFullStorage.py:1.79

Barry Warsaw barry at zope.com
Mon Dec 29 18:34:16 EST 2003


Update of /cvs-repository/Zope/lib/python/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv11659

Modified Files:
	BDBFullStorage.py 
Log Message:
_search_before(): My brain told me to fix the calculation of the start_tid for
when we're looking at version data.


=== Zope/lib/python/BDBStorage/BDBFullStorage.py 1.78 => 1.79 ===
--- Zope/lib/python/BDBStorage/BDBFullStorage.py:1.78	Mon Dec 29 17:03:00 2003
+++ Zope/lib/python/BDBStorage/BDBFullStorage.py	Mon Dec 29 18:34:15 2003
@@ -972,10 +972,19 @@
         vid, nvrevid, lrevid = unpack(">8s8s8s", rec[:24])
         if vid == ZERO:
             revid = lrevid
+            start_tid = key[8:]
         else:
-            revid = nvrevid
+            revid = start_tid = nvrevid
+            while True:
+                rec = c.next()
+                if rec is None or rec[0][:8] <> oid:
+                    end_tid = None
+                    break
+                vid = rec[1][:8]
+                if vid == ZERO:
+                    end_tid = rec[0][8:]
+                    break
         data = self._pickles[oid+revid]
-        start_tid = key[8:]
         return data, start_tid, end_tid
 
     def _getTidMissingOk(self, oid):




More information about the Zodb-checkins mailing list