Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 84179
Status: resolved
Priority: 0/
Queue: BerkeleyDB

People
Owner: Nobody in particular
Requestors: gortan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.51
Fixed in: 0.52



Subject: $env->lock_detect dies due to incorrect version check
When I try to call lock_detect, my program dies with: $env->lock_detect needs Berkeley DB 2.2.x or better Since I'm using DB 4.8, the error is bogus. Looking at BerkeleyDB.xs, the cause seems to be a #ifndef check of macro AT_LEAST_DB_2_2, which is never set anywhere - so this method can never be called sucessfully. set/get_tx_max might also be affected. To reproduce: 1. Build BerkeleyDB against version 3/4/5 of the BerkeleyDB C API. 2. Call $ perl -MBerkeleyDB -e '$e = BerkeleyDB::Env->new(-Home => "/tmp", -Flags => DB_CREATE | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_RECOVER); $e->lock_detect()' BerkeleyDB Aborting: $env->lock_detect needs Berkeley DB 2.2.x or better at -e line 1.
Excellent timimg. I'm putting a new release together for releas ein the next few weeks. In the meantime you can get around the issue by adding #define AT_LEAST_DB_2_2 iun BerkeleyDB.xs, the rebuild. Paul
Tested, works!