r19755 - gnucash/trunk/src/backend - Fix the errors, reduce the noise when testing the dbi backend
John Ralls
jralls at code.gnucash.org
Thu Nov 4 14:37:36 EDT 2010
Author: jralls
Date: 2010-11-04 14:37:36 -0400 (Thu, 04 Nov 2010)
New Revision: 19755
Trac: http://svn.gnucash.org/trac/changeset/19755
Modified:
gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c
gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
gnucash/trunk/src/backend/sql/gnc-backend-sql.c
Log:
Fix the errors, reduce the noise when testing the dbi backend
* Check for a null gdate before attempting to make it a string. Fixes a bunch
of CRIT errors.
* Comment out the log debug setting in dbi. It's stable enough that it
shouldn't be needed routinely. It can, of course, be enabled from the command
line.
* Add a notice to ignore the warnings about there being no lock on the
database when session 3 is closed. Session 3 has to be run with ignore
locking or it won't run at all.
Modified: gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2010-11-04 17:31:18 UTC (rev 19754)
+++ gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2010-11-04 18:37:36 UTC (rev 19755)
@@ -1418,9 +1418,9 @@
qof_backend_register_provider( prov );
}
- /* For now, set log level to DEBUG so that SQl statements will be put into
+ /* If needed, set log level to DEBUG so that SQl statements will be put into
the gnucash.trace file. */
- qof_log_set_level( log_module, QOF_LOG_DEBUG );
+ /* qof_log_set_level( log_module, QOF_LOG_DEBUG ); */
}
#ifndef GNC_NO_LOADABLE_MODULES
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c 2010-11-04 17:31:18 UTC (rev 19754)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-business-stuff.c 2010-11-04 18:37:36 UTC (rev 19755)
@@ -213,6 +213,7 @@
qof_session_destroy( session_1 );
qof_session_end( session_2 );
qof_session_destroy( session_2 );
+ g_print(" You may ignore the warning about the lock file having no entries: We had to ignore locking to run two sessions on the same database\n");
qof_session_end( session_3 );
qof_session_destroy( session_3 );
}
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2010-11-04 17:31:18 UTC (rev 19754)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2010-11-04 18:37:36 UTC (rev 19755)
@@ -166,6 +166,7 @@
qof_session_destroy( session_1 );
qof_session_end( session_2 );
qof_session_destroy( session_2 );
+ g_print(" You may ignore the warning about the lock file having no entries: We had to ignore locking to run two sessions on the same database\n");
qof_session_end( session_3 );
qof_session_destroy( session_3 );
}
Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2010-11-04 17:31:18 UTC (rev 19754)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c 2010-11-04 18:37:36 UTC (rev 19755)
@@ -2122,7 +2122,7 @@
date = (GDate*)(*getter)( pObject, NULL );
}
}
- if ( g_date_valid( date ) )
+ if ( date && g_date_valid( date ) )
{
buf = g_strdup_printf( "%04d%02d%02d",
g_date_get_year( date ), g_date_get_month( date ), g_date_get_day( date ) );
More information about the gnucash-changes
mailing list