r18288 - gnucash/trunk/src/backend/dbi - Doubles weren't being loaded properly from sqlite3. Fix that problem by examine more closely
Phil Longstaff
plongstaff at rogers.com
Wed Sep 2 11:29:35 EDT 2009
At this point, I don't know that anything is stored as a double. However, a slot can hold a double value. When I save that value and reload it, it is corrupted. Seems to be a float/double alignment/endianness problem in dbi with sqlite3, but there's a workaround I can put in (check size of value, then ask for float or double). Not a problem on mysql (don't know about pgsql). Hmmm... that might mean there's a precision issue where a double might be converted to a float and lose significant digits on sqlite3.
Discovered by the automated dbi backend tests I'm working on. Gee, they're useful after all ;)
Phil
________________________________
From: Derek Atkins <warlord at MIT.EDU>
To: gnucash-devel at gnucash.org
Sent: Wednesday, September 2, 2009 11:05:44 AM
Subject: Re: r18288 - gnucash/trunk/src/backend/dbi - Doubles weren't being loaded properly from sqlite3. Fix that problem by examine more closely
Phil,
Phil Longstaff <plongstaff at code.gnucash.org> writes:
> Modified:
> gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
> Log:
> Doubles weren't being loaded properly from sqlite3. Fix that problem by examine more closely
> the type information returned by libdbi.
What's being stored as a "double"?
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
_______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
More information about the gnucash-devel
mailing list