Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: jeffw [...] smoe.org
Cc:
AdminCc:

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



Date: Tue, 19 Mar 2002 13:30:49 -0500
From: Jeff Wasilko <jeffw [...] smoe.org>
To: Paul.Marquess [...] btinternet.com
Cc: bug-berkeleydb [...] rt.cpan.org
Subject: BerkeleyDB module question
Hi Paul: I'm seeing some strange errors from db_close() and c_close(), and I was wondering if you might be able to offer some guidance as I try to figure out what's wrong. Firstly, this is what I'm running: mila{jwasilko}337: perl -MBerkeleyDB -e 'print "BerkeleyDB ver $BerkeleyDB::VERSION\n"' BerkeleyDB ver 0.18 mila{jwasilko}338: perl -MBerkeleyDB -e 'print BerkeleyDB::DB_VERSION_STRING."\n"' Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001) As far as db_close, I've got a little test program that always fails to close the database: #!/local/bin/perl -w use BerkeleyDB; $env = new BerkeleyDB::Env -Home => "/var/db/jwasilko/active_probe", -Verbose => 1, -Flags => DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL; $db1 = new BerkeleyDB::Btree -Filename => "test.db", -Env => $env, -Flags => DB_CREATE; $db1->db_put("one", $ARGV[0]); $db1->db_close() or die "Cannot close file test.db: $! $BerkeleyDB::Error\n" ; **** mila{jwasilko}196: ./db1.pl hiddd Cannot close file test.db: ******* The other thing I'm chasing is that in my app, when I call c_close to close a cursor using: $cursor->c_close() or warn "Cannot close cursor $cursor: $! $BerkeleyDB::Error\n" ; I often get a similar error: Cannot close cursor BerkeleyDB::Cursor=ARRAY(0x10b900): Both of these seem to be caused by the library not returning anything on success (if it is really succeeding). Lastly, I'm getting "Write attempted on read-only cursor" errors when I call c_close() or db_close(), but I'm not sure why. I don't have a simple example that reproduces it yet, but I was wondering if you had any suggestions? Thanks! -jeff
Date: Tue, 19 Mar 2002 15:31:37 -0500
From: Jeff Wasilko <jeffw [...] smoe.org>
To: BerkeleyDB <bug-BerkeleyDB [...] rt.cpan.org>
Cc: Paul.Marquess [...] btinternet.com
Subject: Re: [cpan #377] AutoReply: BerkeleyDB module question
On Tue, Mar 19, 2002 at 01:30:54PM -0500, BerkeleyDB wrote: Show quoted text
> Lastly, I'm getting "Write attempted on read-only cursor" errors > when I call c_close() or db_close(), but I'm not sure why. I > don't have a simple example that reproduces it yet, but I was > wondering if you had any suggestions?
This was pilot error. I had forgotten to call db_cursor() with DB_WRITECURSOR. Time for more caffeine... -j
From: "Paul Marquess" <paul_marquess [...] yahoo.co.uk>
To: <bug-BerkeleyDB [...] rt.cpan.org>, <'AdminCc ofcpanTicket#377': [...] fsck.com>
Subject: RE: [cpan #377] AutoReply: BerkeleyDB module question
Date: Tue, 19 Mar 2002 20:38:42 -0000
Phew! Show quoted text
> -----Original Message----- > From: Jeff Wasilko via RT [mailto:bug-BerkeleyDB@rt.cpan.org] > Sent: 19 March 2002 20:32 > To: 'AdminCc of cpan Ticket #377': > Subject: Re: [cpan #377] AutoReply: BerkeleyDB module question > > > > > This message about BerkeleyDB was sent to you by jeffw@smoe.org > via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=377 > > > On Tue, Mar 19, 2002 at 01:30:54PM -0500, BerkeleyDB wrote:
> > Lastly, I'm getting "Write attempted on read-only cursor" errors > > when I call c_close() or db_close(), but I'm not sure why. I > > don't have a simple example that reproduces it yet, but I was > > wondering if you had any suggestions?
> > This was pilot error. I had forgotten to call db_cursor() with > DB_WRITECURSOR. Time for more caffeine... > > -j >
Show quoted text
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
From: jeffw [...] smoe.org
[paul_marquess@yahoo.co.uk - Tue Mar 19 15:48:15 2002]: Show quoted text
> Phew!
Any ideas on why db_close and c_close aren't returning an exit value?
From: "Paul Marquess" <paul_marquess [...] yahoo.co.uk>
To: <bug-BerkeleyDB [...] rt.cpan.org>
Subject: RE: [cpan #377] BerkeleyDB module question
Date: Sat, 23 Mar 2002 16:26:00 -0000
Show quoted text
>
> > Phew!
> > Any ideas on why db_close and c_close aren't returning an exit > value?
Nope :-) Paul Show quoted text
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com