GnuCash
Contact   Instructions
Bug 796117 - Connecting 3.1 to an existing mysql db drops all data
Summary: Connecting 3.1 to an existing mysql db drops all data
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Backend - SQL (show other bugs)
Version: 3.1
Hardware: Other Linux
: Normal major
Target Milestone: future
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-14 17:18 EDT by bondpp7_2
Modified: 2018-07-08 17:18 EDT (History)
4 users (show)

See Also:


Attachments

Description bondpp7_2 2018-05-14 17:18:33 EDT
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.
Comment 1 John Ralls 2018-05-26 21:05:18 EDT
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.
Comment 2 John Ralls 2018-05-29 13:11:15 EDT
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.
Comment 3 John Ralls 2018-06-02 19:35:41 EDT
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.
Comment 4 John Ralls 2018-07-08 17:18:09 EDT
Nothing heard about whether it works in 3.2 so I'll assume that it does and close this. By all means reopen it if the problem persists.

Note You need to log in before you can comment on or make changes to this bug.