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 592749 - Does not save properly when using SQL option
Does not save properly when using SQL option
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Backend - SQL
2.3.x
Other Windows
: Normal critical
: ---
Assigned To: Phil Longstaff
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2009-08-22 21:20 UTC by Kenneth Ballard
Modified: 2018-06-29 22:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MySQL data that can reproduce the described issue (502.85 KB, text/x-sql)
2009-10-15 04:27 UTC, Kenneth Ballard
Details

Description Kenneth Ballard 2009-08-22 21:20:40 UTC
Client OS: Windows XP SP3
Server OS: openSUSE 11.1
SQL Server: MySQL 5.0.61

The upgrade instructions for upgrading from 2.3.3 to 2.3.4 when using the SQL saving option required:

* data be saved to an XML file prior to the upgrade, then
* upgrade to GnuCash 2.3.4 (I completely removed 2.3.3 first)
* save from XML back to the SQL database

After saving back to the SQL server, I closed GnuCash and re-opened. It did not properly load information from the back-end, and I'm unsure if it saved properly to the back-end. Many accounts were not showing any transactions at all and were showing $0 balances.

I've seen this when also SQLite3 as a save option, and I've been able to reproduce this on multiple computers.
Comment 1 Phil Longstaff 2009-09-14 14:27:33 UTC
Do you have a sample file you could either attach here or send me via email?  I can't reproduce it.
Comment 2 Kenneth Ballard 2009-09-15 15:10:00 UTC
(In reply to comment #1)
> Do you have a sample file you could either attach here or send me via email?  I
> can't reproduce it.

I'll scrub the MySQL backup I made prior to reporting this and attach it when I get a chance.
Comment 3 Kenneth Ballard 2009-09-17 06:26:28 UTC
I'm still working on figuring out how to scrub the data, but in the mean time, I tried saving my data to a new MySQL database. I tried saving the data to two MySQL database servers, one running on Linux and the other on Windows. Here's some of the details:

The transactions table is showing only 5 records of 821 originally, and the splits table is showing only 21 records of 1,868 originally. No invoices or vendors were written out, though it appears all accounts were written to the database.

The data was originally created on a MySQL database, then backed up to a file prior to the upgrade mentioned in my original comments.
Comment 4 Christian Stimming 2009-10-07 12:36:30 UTC
Do you have a sample file you could either attach here or send me via email?  I
can't reproduce it.
Comment 5 Kenneth Ballard 2009-10-15 04:27:43 UTC
Created attachment 145478 [details]
MySQL data that can reproduce the described issue
Comment 6 Kenneth Ballard 2009-10-15 04:29:15 UTC
I've attached a scrubbed data file containing data dumped from a GnuCash 2.3.3 database. The issue as described is still reproducible with the scrubbed filed on 2.3.7.

Import the data into a new MySQL database and follow the directions in the original description. Issue should be reproducible.
Comment 7 Kenneth Ballard 2009-10-29 03:08:57 UTC
Changing status from NEEDINFO back to UNCONFIRMED since I posted the SQL file.
Comment 8 Phil Longstaff 2009-11-01 21:21:56 UTC
The SQL dump contains lots of duplicate US Dollar commodities.  This would definitely cause problems when saving/reloading because the extras will be discarded (in memory, not in the db) when the sql file is loaded.  However, this will leave whatever objects in the db refer to these extra commodities with no commodity.

There were some bugs in 2.3.0/2.3.1/2.3.2 which could result in duplicated commodities.  What is needed is a utility which will check and scrub a database.  I'll submit a bug report for this.

Without more information about why the SQL file has duplicate currencies, nothing can be done.  If you want to try to reproduce what you did to get this set of duplicate currencies, feel free.  For now, I think this bug report should be closed.
Comment 9 John Ralls 2018-06-29 22:27:10 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=592749. Please update any external references or bookmarks.