dbTalk Databases Forums  

Bug in sequences

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Bug in sequences in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
midfield@gmail.com
 
Posts: n/a

Default Bug in sequences - 02-14-2005 , 05:21 PM






first bug: typo in the docs, "init_value" should be "initial_value."

second: i think i've found a bug in the wrapping + caching behavior of
sequences. Create an sequence, set the increasing wrapping flags, set
the range from 0 to 5 and initial value 0.

if the cachevalue is not set, or set to 2, it works fine.

if the cachevalue is set to 5, it wraps at 4.

if the cachevalue is set to 10, it doesn't wrap at all.

it's a little hard to send code because i'm using a lisp interface to
the sleepycat library. it is possible that this is an artifact of my
code but i doubt it.

also i have a hard time setting the initial value if initial_value +
cachesize >= max value (i just get min value.)

not sure how this should be handled but an error or notes in the
documentation would be nice, as opposed to the silent behavior now.

let me know if you want more details, though again my code is all lisp.

take care, B


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: Bug in sequences - 02-15-2005 , 09:37 PM






midfield (AT) gmail (DOT) com wrote:
Quote:
first bug: typo in the docs, "init_value" should be "initial_value."

second: i think i've found a bug in the wrapping + caching behavior
of
sequences. Create an sequence, set the increasing wrapping flags,
set
the range from 0 to 5 and initial value 0.

if the cachevalue is not set, or set to 2, it works fine.

if the cachevalue is set to 5, it wraps at 4.

if the cachevalue is set to 10, it doesn't wrap at all.

it's a little hard to send code because i'm using a lisp interface to
the sleepycat library. it is possible that this is an artifact of my
code but i doubt it.

also i have a hard time setting the initial value if initial_value +
cachesize >= max value (i just get min value.)

not sure how this should be handled but an error or notes in the
documentation would be nice, as opposed to the silent behavior now.

let me know if you want more details, though again my code is all
lisp.

take care, B

Hi,

You have identified a bug. You can get this to work by making sure the
cachesize is divisible by the range of values specified by your min and
max.

Quote:
From your example above 0-5 (Range is 6) then set the cachesize to 6.
The cachesize should not be larger then the range of values. I tried
this using C++ and it worked for me.

Ron
Sleepycat Software



Reply With Quote
  #3  
Old   
midfield@gmail.com
 
Posts: n/a

Default Re: Bug in sequences - 02-17-2005 , 06:12 PM




Ron wrote:
Quote:
Hi,

You have identified a bug. You can get this to work by making sure
the
cachesize is divisible by the range of values specified by your min
and
max.
If I don't care about getting all the values of the sequence, it should
be safe for me to have a cachesize less than max - min, right?

Thanks,
Ben



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.