[elephant-devel] Small bug in PM-INDEXED-BTREE

Robert L. Read read at robertlread.net
Tue May 6 03:28:47 UTC 2008


OK, I have applied this patch.

I didn't run the tests.  Ordinarily I do before accepting a patch, but 
I assume if this causes a problem we will catch it quickly in our
current state.

Of course, please make sure you are all green before submitting a patch.


On Mon, 2008-05-05 at 14:07 +0200, Leslie P. Polzer wrote:
> Now don't ask me how a NIL value gets mapped to an OID key in the
> class index. It happened, and I wasn't able to remove those things
> because of a bug in PM-INDEXED-BTREE. Diff:
> 
> --- old-elephant/src/db-postmodern/pm-indexed-btree.lisp        2008-05-05
> 14:04:49.930108544 +0200
> +++ new-elephant/src/db-postmodern/pm-indexed-btree.lisp        2008-05-05
> 14:04:49.930108544 +0200
> @@ -74,8 +74,8 @@
>  (defmethod remove-kv (key (bt pm-indexed-btree))
>    "Remove a key / value pair, and update secondary indices."
>    (with-trans-and-vars (bt)
> -    (let ((value (get-value key bt)))
> -      (when value
> +    (multiple-value-bind (value found) (get-value key bt)
> +      (when found
>          (let ((indices (indices bt)))
>            (loop for index being the hash-value of indices do
>                  (multiple-value-bind (index? secondary-key)
> 
> Sorry it's not a Darcs patch. I find those patches pretty annoying
> to work with...
> 
>   Leslie
> 
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list