GDA Missing records in SQLite

Graham Leggett minfrin at
Wed Feb 20 03:44:13 EST 2008

Mark Johnson wrote:

> By examining which transactions, accounts, and splits were missing from 
> SQLite (as compared to MySQL), I was able to determine that anything 
> which had a single quote in a string (description, name, & memo fields) 
> failed to be inserted into SQLite.  This is a one-to-one 
> correspondence.  i.e. anything that had a single quote failed.  These 
> were the only records missing as compared to MySql.
> At the moment, I am guessing that the SQLite provider does not properly 
> escape such strings passed to it.  If so, the SQL INSERT statements 
> would be illegal and fail.  (I've built just such a bug myself once 
> using MySql.)
> More study of the SQLite provider is required.  I did not find any 
> existing bug reports regarding single quotes and the SQLite provider.  
> If  I can confirm my guess, I'll file the bug report.

This sounds more like a symptom of not using prepared statements in 
sqlite. This could be a GDA problem, or it could be sqlite not 
supporting prepared statements.

What is more worrying is that rows are being dropped and no error is 
being thrown. That looks to me like a more serious bug at this point, it 
means that strange data corruption errors are likely and the end user 
will never know.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3287 bytes
Desc: S/MIME Cryptographic Signature
Url : 

More information about the gnucash-devel mailing list