Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

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

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

Bug Information
Severity: Normal
Broken in: 0.32
Fixed in: (no value)



Subject: db 4.6 breaks formerly valid flags 524289
A self contained test script is in the Encode::MAB2 package. The package contains a small database application that uses BerkeleyDB::Recno. When I upgrade from libdb 4.5 to 4.6 (currently 4.6.21) then the test fails with the message: t/dualdb.........Could not tie @recs: illegal flag specified to DB->open; Filename => kafka.dualdb, Subname => recno, Mode => 0664, Flags => 524289 at /home/sand/.cpan/build/MAB2-0.06-EfNVot/blib/lib/Tie/MAB2/Dualdb/Recno.pm line 28. Is this a known issue? Will there be a workaround from within BerleyDB? What do you think needs to be done? Thanks,
From: PMQS [...] cpan.org
On Fri Nov 23 02:00:32 2007, ANDK wrote: Show quoted text
> A self contained test script is in the Encode::MAB2 package. The
package Show quoted text
> contains a small database application that uses BerkeleyDB::Recno.
When Show quoted text
> I upgrade from libdb 4.5 to 4.6 (currently 4.6.21) then the test fails > with the message: > > t/dualdb.........Could not tie @recs: illegal flag specified to > DB->open; Filename => kafka.dualdb, Subname => recno, Mode => 0664, > Flags => 524289 at > /home/sand/.cpan/build/MAB2-0.06-
EfNVot/blib/lib/Tie/MAB2/Dualdb/Recno.pm Show quoted text
> line 28. > > > Is this a known issue? Will there be a workaround from within
BerleyDB? Show quoted text
> What do you think needs to be done?
Ok, I've reproduced the issue you are seeing. I need to check the berkeley db changelogs to see if this is now expected bahaviour. Paul
From: PMQS [...] cpan.org
Andreas, I had a look at you code & I think I see the problem. Starting with t/dualdb.t, the flags DB_CREATE & DB_INIT_MPOOL are passed into Tie/MAB2/Dualdb.pm where you use them to open the Berkeley DB environment my $env = BerkeleyDB::Env ->new( Home => $dir, Flags => $flags, ) or die "Could not create environment: $BerkeleyDB::Error; home [$dir]flags[$args{flags}]"; This same flags value gets used here a bit further down tie(@recs, "Tie::MAB2::Dualdb::Recno", filename => "$basename", flags => $flags, env => $env, ) or die "Could not tie \@recs: $BerkeleyDB::Error"; which calls this in lib/Tie/MAB2/Dualdb/Recno.pm my $flags = $args{flags}; my $db = tie(@recs, "BerkeleyDB::Recno", $args{env} ? (Env => $args{env}) : (), Filename => $args{filename}, Subname => "recno", Mode => 0664, Flags => $flags, ) The problem with that is you are using an environment flag DB_INIT_MPOOL in a database open call. That is not allowed. The reason this didn't cause a problem with db 4.5 is the value of DB_INIT_MPOOL changed from 0x0020000 to 0x0080000 between version 4.5 & 4.6. Paul
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #30926] db 4.6 breaks formerly valid flags 524289
Date: Tue, 04 Dec 2007 20:59:06 +0100
To: bug-BerkeleyDB [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Tue, 04 Dec 2007 08:16:38 -0500, "Paul Marquess via RT" <bug-BerkeleyDB@rt.cpan.org> said:
Show quoted text
Show quoted text
> Andreas,
Thank you Paul++ for analysis and advice. You're doing me a great, great favor, highly appreciated. Best Regards, -- andreas
No problem Andreas. I've marked this ticket as resolved - drop me a line if you have any more problems with my module. Paul