After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789594 - Unable to overwrite sqlite3 database file or sql database on dbserver
Unable to overwrite sqlite3 database file or sql database on dbserver
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Backend - SQL
2.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-28 14:54 UTC by Bob
Modified: 2018-06-30 00:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bob 2017-10-28 14:54:12 UTC
This cropped up while doing some tests...
Start Gnucash with --nofile, take all default options and when saving use
sqlite3 option and appropriate file name, close Gnucash.
Start Gnucash again with --nofile, again take all default options and when
saving use sqlite3 again with the same file name, dialogue appears asking
if you want to overwrite, say yes and then this dialogue appears..

"The server URL at /root/unstable-sql3-1.gnucash experienced an error or
encountered bad or corrupt data", close

In the trace file entries like these are present...

* 13:30:11  CRIT <gnc.engine.sx> gnc_sx_get_sxes_referencing_account:
assertion 'sxactions != NULL' failed
* 13:30:21  WARN <gnc.backend.dbi> [GncDbiBackend<Type>::session_begin()]
Might clobber, no force
* 13:30:24  CRIT <gnc.backend.dbi> [error_handler()] DBI error: 1: table
versions already exists
* 13:30:24  CRIT <gnc.backend.dbi> [GncDbiSqlConnection::create_table()]
Error in dbi_result_free() result
* 13:30:24  CRIT <gnc.backend.dbi> [error_handler()] DBI error: 19: UNIQUE
constraint failed: versions.table_name
* 13:30:24  CRIT <gnc.backend.dbi>
[GncDbiSqlConnection::execute_nonselect_statement()] Error executing SQL
INSERT INTO versions VALUES('Gnucash',2070000)
* 13:30:24  CRIT <gnc.backend.sql>
[GncSqlBackend::execute_nonselect_statement()] SQL error: INSERT INTO
versions VALUES('Gnucash',2070000)
* 13:30:24  CRIT <gnc.backend.sql> [GncSqlBackend::set_table_version()] SQL
error: INSERT INTO versions VALUES('Gnucash',2070000)
* 13:30:24  CRIT <gnc.backend.dbi> [error_handler()] DBI error: 19: UNIQUE
constraint failed: versions.table_name
* 13:30:24  CRIT <gnc.backend.dbi>
[GncDbiSqlConnection::execute_nonselect_statement()] Error executing SQL
INSERT INTO versions VALUES('Gnucash-Resave',19920)
Comment 1 Geert Janssens 2018-06-25 08:35:57 UTC
For testing another issue I tried to overwrite an existing gnucash mysql book and ran into similar errors. So this likely affects all db backends.
Comment 2 John Ralls 2018-06-30 00:00:20 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=789594. Please continue processing the bug there and please update any external references or bookmarks.