[elephant-cvs] CVS elephant/src/db-bdb
ieslick
ieslick at common-lisp.net
Sun Feb 4 10:08:27 UTC 2007
Update of /project/elephant/cvsroot/elephant/src/db-bdb
In directory clnet:/tmp/cvs-serv7647/src/db-bdb
Modified Files:
bdb-collections.lisp
Log Message:
Fixed all but one outstanding bug in test suite; cur-del2 on SBCL with SQL backend fails; duplicate sorting dependencies removed from test suite
--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp 2007/02/04 04:34:56 1.15
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp 2007/02/04 10:08:27 1.16
@@ -318,13 +318,14 @@
(deserialize val sc)))
(setf (cursor-initialized-p cursor) nil))))))
-;;A bit of a hack.....
(defmethod cursor-last ((cursor bdb-cursor))
+ "A fast cursor last, but a bit 'hackish' by exploiting oid ordering"
(let ((sc (get-con (cursor-btree cursor))))
(with-buffer-streams (key-buf value-buf)
+ ;; Go to the first element of the next btree
(buffer-write-oid (+ (cursor-oid cursor) 1) key-buf)
- (if (db-cursor-set-buffered (cursor-handle cursor)
- key-buf value-buf :set-range t)
+ (if (db-cursor-set-buffered (cursor-handle cursor)
+ key-buf value-buf :set-range t)
(progn (reset-buffer-stream key-buf)
(reset-buffer-stream value-buf)
(multiple-value-bind (key val)
More information about the Elephant-cvs
mailing list