CVS GnuCash fails on assertion in postgres backend

Derek Atkins warlord@MIT.EDU
22 Sep 2002 10:34:30 -0400


As I've said a number of times (but I'll repeat myself), it is quite
likely that the postgres backend has bitrotted in CVS.  I can
certainly tell you 100% that it will not work for Scheduled
Transactions or Business Accounting purposes.

Having said that....

Matthew Vanecek <mevanecek@yahoo.com> writes:

> Info: sqlQuery_build: term is QUERYCORE_GUID
> 	Info: sqlQuery_build: GUID param is      book
> 	Info: sqlQuery_build: GUID next param is guid
> 	Info: sqlQuery_build: GUID options is    1
> Info: sqlQuery_build: Unknown GUID parameter, book

This warning corresponds to this code:

	     PINFO ("Unknown GUID parameter, %s", (char*)path->data);

	     /* XXX: Need to support the Book GUID? (gncAccount.bookGUID) */

It probably needs to get supported, but frankly I don't know what to
test for.  Hopefully during the postgres re-write this will get fixed.

> Info: sqlQuery_build: term is QUERYCORE_GUID
> 	Info: sqlQuery_build: GUID param is      account
> 	Info: sqlQuery_build: GUID next param is guid
> 	Info: sqlQuery_build: GUID options is    1
> 
> ** ERROR **: file gncquery.c: line 897 (sqlQuery_build): assertion
> failed: (pdata->options != GUID_MATCH_ANY)
> aborting...
> Aborted (core dumped)

Interesting.  pdata->options _is_ GUID_MATCH_ANY, which is perfectly
legal...

> The above line number should be 890 in the CVS-original source.  I
> haven't tracked down what pdata->options is *supposed* to be at this
> point (i.e., point being loading Splits/Transactions/Whatever from the
> backend to put into the Register).  Any suggestions on how to proceed
> would be a benefit.  Is there a particular reason pdata->options is not
> supposed to be GUID_MATCH_ANY here?

Ahh.. I see the problem.  This was a braino on my part when converting
to the new query type.  The fix: change all four assertions for
"GUID_MATCH_ANY" to "GUID_MATCH_ALL" in that section of code.  I was
testing against the wrong option type.  Sorry.  I've fixed this in
CVS.

-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@MIT.EDU                        PGP key available