http://qs321.pair.com?node_id=943364

elgato has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I'm using BerkeleyDB module with BerkeleyDB4. Syntax like:
our %h; tie %h, "BerkeleyDB::Btree", -Filename => '/tmp/ads_export.bdb', -Flags => DB_CREATE, -Cachesize => 250 * 1024 * 1024 or die "$! $BerkeleyDB::Error\n" ; $h{aaa} = $somevalue untie %h;
Ant noticed that if value size is big (more then 500kb for example), than it's truncated, value from %h is the end of $somevalue. Are there any limits on value's size? Or some prefferences in class creation? Thanks, in advance.

Replies are listed 'Best First'.
Re: BerkeleyDB values have limit?
by Anonymous Monk on Dec 13, 2011 at 15:38 UTC

    The code you have posted does not demonstrate (prove) that value is truncated

    You need to prove it

    Moify Re: re-tie the previous db to store/retrieve 500kb value, check the length, check for equality

      I checked for equality, utf string with about 430kb, after retrieve was about 420kb, utf symbols were ok, but not null size.

        And where is your code which proves this?

        The documentation discusses a common pitfalls with nulls.