gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Feb 4 20:37:11 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/93301cd2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a70637f3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/979e6397 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/db73c39b (commit)
	from  https://github.com/Gnucash/gnucash/commit/b682fe6b (commit)



commit 93301cd285a88eb5b58b2902d23118bfa9edbc44
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Feb 4 17:36:09 2017 -0800

    Make gnc_dbi_safe_sync_all safer.
    
    Creates a new safe_sync function in struct provider and a new
    gnc_db_do_safe_sync_all function with the guts of gnc_dbi_do_safe_sync_all.
    The last calls the provider’s safe_sync function, which for SQLite3 and
    PGSql wraps the call to gnc_dbi_do_safe_sync_all in a SQL transaction.
    Unfortunately MySQL commits the transaction on the first schema-altering
    query (CREATE_TABLE in this case) without decrementing sql_savepoint, so
    raising an error when we try to release the (non-existent) save point at
    the end of writing the tables.
    
    Add a gnc_dbi_check_and_rollback_failed_save() to restore the database
    after a failed safe_save; this is performed at the next connection.

commit a70637f34d48461cb8551d205935d8b3663869af
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Feb 4 09:58:27 2017 -0800

    Move the transaction-lock on obtaining the database lock earlier.
    
    So that opening/creating the table is included. Also modify the condition
    to reduce code nesting.

commit 979e6397c15290550231d3c8ce18a1097157ccc0
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Feb 4 09:50:50 2017 -0800

    Add SAVEPOINT support to enable nested gnc_dbi_transaction calls.

commit db73c39bf182904d01b3531524481aa274a2462a
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Feb 4 09:41:45 2017 -0800

    Extract static gnc_dbi_transaction functions.
    
    To enable local calls (as opposed to just virtual calls via
    GncDbiSqlConnection) and replace all direct transaction queries with the
    new functions.



Summary of changes:
 src/backend/dbi/gnc-backend-dbi-priv.h |   2 +
 src/backend/dbi/gnc-backend-dbi.c      | 603 ++++++++++++++++++++-------------
 2 files changed, 363 insertions(+), 242 deletions(-)



More information about the gnucash-patches mailing list