GNOME Bugzilla – Bug 796117
Connecting 3.1 to an existing mysql db drops all data
Last modified: 2018-06-30 00:10:10 UTC
When running with "--debug", the only output is: Gtk-Message: 17:14:35.419: GtkDialog mapped without a transient parent. This is discouraged. However, I see all my data has been removed from every table (other than accounts_back), while the tables themselves are still present. Fortunately, my database was backed up.
What version of GnuCash before 3.1 did you last use to open the DB? If you're willing, please try again, this time with --log gnc.backend.dbi=debug. That will record all of the sql queries and may point to where in the process it failed.
I just managed to reproduce this by creating an accounts_back table. It looks like the failed-backup-recovery code is a bit too aggressive. You can probably work around the problem by removing any %_back tables after restoring your backup. Please let me know if that solves the problem.
I've fixed the problem of clearing all tables if any backup tables are found, that will be in 3.2. If you can confirm that was the problem we can close this.
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=796117. Please continue processing the bug there and please update any external references or bookmarks.