GNOME Bugzilla – Bug 592749
Does not save properly when using SQL option
Last modified: 2018-06-29 22:27:10 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.
Do you have a sample file you could either attach here or send me via email? I can't reproduce it.
(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.
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.
Created attachment 145478 [details] MySQL data that can reproduce the described issue
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.
Changing status from NEEDINFO back to UNCONFIRMED since I posted the SQL file.
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.
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.