[pybsddb] The BTREE comparison function get's truncated data
xcorat
xcorat at gmail.com
Thu Sep 12 05:35:29 CEST 2013
I'm pretty sure there are no null bytes, I tried the same using a string of
a floating point number.
the comparison function gets,
'13789346362'
instead of supposed
'1378934636286548.8'
I will post a test case soon.
Thank you,
Sachi
On Wed, Sep 11, 2013 at 7:48 PM, Jesus Cea <jcea at jcea.es> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/09/13 21:12, xcorat wrote:
> > Hi
> >
> > I'm not sure where to find the problem. I'm saving pickled
> > (cPickle) datetime keys in the database, and set the comparison
> > function to load those keys and compare. When I call the set_range
> > function, the right_key value the comparison function gets is
> > **sometimes** truncated. Left key (the one I send) is always fine.
> > The data in the database is fine too.
> >
> > Ex. Left key
> >
> "datetime\ndatetime\np1\n(S'\\x07\\xdd\\x08\\x1f\\x17\\x1f\\x1f\\x0f\\x10\\x02'\ntRp2\n."
> >
> > right key (truncated)
> > "cdatetime\ndatetime\np1\n(S'\\x07\\xdd\\t\\x04\\x1642\\x"
> >
> > Do you know why? any fixes?
>
> Could you possibly verify if the truncated data has any "\0" on it
> (null byte)?. Could you post a testcase?.
>
> - --
> Jesús Cea Avión _/_/ _/_/_/ _/_/_/
> jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
> Twitter: @jcea _/_/ _/_/ _/_/_/_/_/
> jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/ _/_/ _/_/
> "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
> "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQCVAwUBUjErjZlgi5GaxT1NAQLwYgP/UCSwGlj6WtarxhX5taQCMLzWf7twvd6X
> RGZoEgow2o9YiMWxYbFqDvnDuvgkzUnGqlCj4C0KBmbg059aOTe4VoEFGlJv8eSp
> P3jng/xoFPmW1iAhIsZgEXdeH3+X/LQuEyXgayUnkA+JhZcaYp47Kz8Svm+osB9P
> QH1Xm1JxGe4=
> =zHvB
> -----END PGP SIGNATURE-----
> _______________________________________________
> pybsddb mailing list
> pybsddb at jcea.es
> https://mailman.jcea.es/listinfo/pybsddb
> http://www.jcea.es/programacion/pybsddb.htm
--
Xcorat :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20130911/a776ed5b/attachment.html>
More information about the pybsddb
mailing list