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 13:04:23 EDT 2009


Well, until now, my testing has been to actually use gnucash, look for problems, and look for error messages in the gnucash.trace file.  This wasn't very exhaustive, though.  Now, I'm working at ensuring that the full range of legal cases is handled properly (create session with examples of legal cases, save, load and compare with original).  It won't handle catching illegal cases, though, but I want to test those in the near future.

I'll finish the core test this week, and move onto the business objects next.  Any chance you'd like to create a XML gnucash file with test case business objects for me to use?

Phil




________________________________
From: Derek Atkins <warlord at MIT.EDU>
To: Phil Longstaff <plongstaff at rogers.com>
Cc: gnucash-devel at gnucash.org
Sent: Wednesday, September 2, 2009 12:39:16 PM
Subject: Re: r18288 - gnucash/trunk/src/backend/dbi - Doubles weren't being loaded properly from sqlite3. Fix that problem by examine more closely

Hi,

Phil Longstaff <plongstaff at rogers.com> writes:

> 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.

Ah, fair enough.  Yes, the KVPs can store doubles.  I did sorta remember
that. ;)

> Discovered by the automated dbi backend tests I'm working on.  Gee, they're
> useful after all ;)

Excellent!  Yes, testing is always useful.  :-D

> Phil

-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


More information about the gnucash-devel mailing list