You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2015/05/07 18:09:17 UTC

[Bug 57900] New: GDBM backend: error returned on fetch and delete for non-existing key

https://bz.apache.org/bugzilla/show_bug.cgi?id=57900

            Bug ID: 57900
           Summary: GDBM backend: error returned on fetch and delete for
                    non-existing key
           Product: APR
           Version: 1.5.2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR-util
          Assignee: bugs@apr.apache.org
          Reporter: Diego.SantaCruz@spinetix.com

Created attachment 32722
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32722&action=edit
Patch to fix the key not found issue with GDBM

The GDBM backend returns an error on apr_dbm_fetch() and apr_dbm_delete() when
the key does not exist.

This is different from the DB, SDBM and NDBM backends which return no error
when the key does not exist.

A consequence of this is that code which checks the error code on these calls
starts to fail when apr-util is built with GDBM (but not Berkeley), like
httpd's dav_fs locking (see bug #42977).

The GDBM documentation states that gdbm_errno is set to GDBM_ITEM_NOT_FOUND for
fetch and delete when the key is not found, but set_error() in apr_dbm_gdbm.c
does not special case this.

I experienced this with apr-util 1.5.2 but the code has not changed in the
1.5.x branch (just checked) nor in apr's trunk.

I attach a patch which fixes the problem (tested with mod_dav_fs in Apache
httpd 2.4.6).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 57900] GDBM backend: error returned on fetch and delete for non-existing key

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57900

Joe Orton <jo...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sh@bel.bc.ca

--- Comment #1 from Joe Orton <jo...@redhat.com> ---
*** Bug 42977 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org