GNOME Bugzilla – Bug 626451
Error dialog report on saving to mysql
Last modified: 2018-06-29 22:42:50 UTC
On saving to a new empty mysql database I get an error dialog with the following message. The server at URL mysql://USER:PASSWORD@localhost/gnucash experienced an error or encountered bad or corrupt data. System is Fedora 12 with libdbi-dbd-sqlite-0.8.3-5.fc12.i686 and libdbi-dbd-mysql-0.8.3-5.fc12.i686. GnuCash svn r19403. Despite the error message the data appear to have been saved and can be re-opened with data intact. There are some CRIT warnings in the log file however. output from grep CRIT mysql.log (from --logto mysql.log) is: * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <GLib> g_date_get_julian: assertion `g_date_valid (d)' failed * 16:41:54 CRIT <GLib> g_date_new_julian: assertion `g_date_valid_julian (j)' failed * 16:41:54 CRIT <GLib> g_date_valid: assertion `d != NULL' failed * 16:41:54 CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 1048: Column 'account' cannot be null * 16:41:54 CRIT <gnc.backend.dbi> [conn_execute_nonselect_statement()] Error executing SQL INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('7f7e68136249868a939fe0e0fb714743',NULL,800000,100000,2) * 16:41:54 CRIT <gnc.backend.sql> [gnc_sql_do_db_operation()] SQL error: INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('7f7e68136249868a939fe0e0fb714743',NULL,800000,100000,2) * 16:42:01 CRIT <GLib-GObject> g_signal_handlers_destroy: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed * 16:42:01 CRIT <GLib-GObject> g_object_unref: assertion `G_IS_OBJECT (object)' failed
Reading your error log, this seems to be an issue with the taxtable part of GnuCash. This is the relevant bit here: * 16:41:54 CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 1048: Column 'account' cannot be null * 16:41:54 CRIT <gnc.backend.dbi> [conn_execute_nonselect_statement()] Error executing SQL INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('7f7e68136249868a939fe0e0fb714743',NULL,800000,100000,2) * 16:41:54 CRIT <gnc.backend.sql> [gnc_sql_do_db_operation()] SQL error: INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('7f7e68136249868a939fe0e0fb714743',NULL,800000,100000,2) For some reason mysql tries to store a taxtable entry for which the account field is not set, while the database definition requires the account field to be set. Two things can be wrong here: * the database definition. If it should be ok to have an empty account field, the database definition should be fixed. * your source data can be inconsistent. For some reason you have an empty account field in the taxtable entries in your xml file, while this should not be. This would signal a potential bug in the taxtable code. As a side-note: can't reproduce this problem as I am not using the tax tables. I do the glib critical messages regarding g_date_valid_julian as well on Fedora 13. Not sure where they come from, but so far they don't seem to cause issues.
Problem appears to be my fault again. I have since obtained a clean SVN snapshot and the fault disappears. I think I'll take a holiday somewhere without an internet access. I apologise for wasting peoples time.
:) No problem, time is not wasted. Your feedback and testing is invaluable to us !
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=626451. Please update any external references or bookmarks.