clear lock on the origin SQL book.
GncDbiSqlConnection::unlock_database function errored out if the last
dbi interaction resulted in an error, even if it was a harmless index
out of range. Ignore index out of range errors.
Not quite true, it just takes a really long time for a large database.
The underlying problem is gnc_file_do_save_as reloads the data to make
sure that the save-as saves everything. On the SQL backend that
triggers a scrub. The scrub itseld doesn't take long, but every
transaction commit was logged in the transaction log and did a refresh
of the registers. So:
* Suspend logging while doing the scrub.
* Suspend UI refreshes and QOF events while reloading the data.
CAMT.053.001.02 via aqbanking
Deduplicate the description inputs when joining them by creating a
variant of gnc_g_list_stringjoin named gnc_g_list_stringjoin_nodups
that tests each string against the agregate string and adds it only if
it's not already included. Note that while it uses g_utf8_normalize to
ensure that non-ascii strings are consistently composed it has to do a
bytewise comparison with strstr as glib doesn't provide a UTF-8
equivalent. strnocasestr would work only with ASCII strings so it's
not suitable.
If a user has set environment variable GNC_DATA_HOME
to a valid directory (containing real gnucash metadata)
the test would fail. It expects to follow the code path
to set up a gnucash data home directory in the temporary
directory, but the directory pointed to in GNC_DATA_HOME
is used instead.
Fix this by also setting environment variable GNC_DATA_HOME
to something invalid during the test.
Scrubbing during SQL load can't commit the changes from the scrub
because the backend's m_loading member is true so disable scrubbing
during database load and edit/commit all transactions again after
loading is complete.
If the accounting period start-choice is anything but absolute instead
of matching the accounting period month and day to the present month and
day. The latter is a non-obvious hack that depends on
gnc_accounting_period_fiscal_start() returning the present day if it's
not set.
1. Add dateformat "Locale" with ICU; uses current locale for date
parsing. ICU's locale date parser may parse "3 May 2023" or
"2024年9月13日" (LC_TIME=zh_TW.utf8) and maybe others.
2. Augment d-m-y m-d-y and y-m-d with boost UK/US/ISO parsers. This allows
CSV import of dates with months as words as "30 Sep 2023" or
"May 4, 1978" or "2023-Dec-25". Note boost parser cannot recognise
2-digit years, therefore "30 Sep 24" is invalid.
Destroying the split vector from front->back crashes halfway through
because the iterators aren't updated as we remove items from the
vector. Iterating in reverse works because the remaining elements
aren't moved as we delete.