Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

search-sets: incorrect range

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


talanchor at mail

Aug 6, 2013, 7:25 AM

Post #1 of 2 (25 views)
Permalink
search-sets: incorrect range

dbmail fails to pass last of search-sets' test:

ok uid search uid $uidnext:4294967295

because left and right values of the input range are incorrectly reassigned:

if (l == 0xffffffff) l = hi; // outlook
...
if (r == 0xffffffff) r = hi; // outlook
...
if (r > hi) r = hi;
if (r < lo) r = lo;

So, for example, if hi == 1601 and we execute following search:
ok uid search uid 1602:4294967295
then we get l == 1602 and r == 1601, so instead of empty result we get 1601, which is incorrect.

Possible workaround could be like this:

if (l == 0xffffffff && hi != l) l = hi+1; // outlook
...
if (r == 0xffffffff && hi != r) r = hi+1; // outlook
...
//if (r > hi) r = hi; // <--- throw away this code
//if (r < lo) r = lo; // <--- throw away this code


paul at nfg

Aug 7, 2013, 1:20 AM

Post #2 of 2 (18 views)
Permalink
Re: search-sets: incorrect range [In reply to]

On 06-08-13 16:25, . . wrote:

> //if (r > hi) r = hi; // <--- throw away this code
> //if (r < lo) r = lo; // <--- throw away this code

this appears to be enough.


--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.