gnucash maint: Bug 797983 - v4.2 report numbers change over gnucash restarts; ...
jralls at code.gnucash.org
Sun Oct 18 19:12:32 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/94a68dca (commit)
from https://github.com/Gnucash/gnucash/commit/e255a7bf (commit)
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Oct 18 15:04:06 2020 -0700
Bug 797983 - v4.2 report numbers change over gnucash restarts;...
Price Database dropping user:price-editor entries.
A wider problem: QofInstance was unmarking itself dirty as long as the
backend raised an error and unconditionally marking itself non-infant.
This matters because the SQL backend depends on infant status to decide
whether to do an insert or update query; either will fail if the infant
status is wrong.
The price editor dialog clones a price having only its commodity set and
GncSqlPriceBackend declines to save if the currency isn't set. Since the
instance marked itself non-infant even though it wasn't saved subsequent
commits tried to use an update query and since the price wasn't in the
table that inevitably failed.
Requiring that QofBackend::commit should doing the marking-clean
required implementing it in the backends where it wasn't already.
Summary of changes:
libgnucash/backend/xml/gnc-xml-backend.cpp | 7 +++++++
libgnucash/backend/xml/gnc-xml-backend.hpp | 1 +
libgnucash/engine/qof-backend.cpp | 7 +++++++
libgnucash/engine/qof-backend.hpp | 2 +-
libgnucash/engine/qofinstance.cpp | 5 ++---
libgnucash/engine/test/test-qofinstance.cpp | 9 +++++++--
6 files changed, 25 insertions(+), 6 deletions(-)
More information about the gnucash-patches