r20023 - gnucash/trunk/src/optional/python-bindings - Bug #636402: Add test case for DBI error: 1: table sqlite_sequence may not be dropped
Christian Stimming
cstim at code.gnucash.org
Sat Jan 1 16:04:31 EST 2011
Author: cstim
Date: 2011-01-01 16:04:31 -0500 (Sat, 01 Jan 2011)
New Revision: 20023
Trac: http://svn.gnucash.org/trac/changeset/20023
Added:
gnucash/trunk/src/optional/python-bindings/sqlite3test.c
Modified:
gnucash/trunk/src/optional/python-bindings/Makefile.am
Log:
Bug #636402: Add test case for DBI error: 1: table sqlite_sequence may not be dropped
Patch by Mark Jenkins:
The attached patch adds a test program demonstrating the problem in C, built in
src/optional/python-bindings
It pretty much shows the same calls that are being made to the C by the python
bindings (including initialization) and the example sqlite3 python script.
Running this small C program produces the same result.
(The program is built in check_PROGRAMS, not bin_PROGRAMS, to avoid having it installed.)
Modified: gnucash/trunk/src/optional/python-bindings/Makefile.am
===================================================================
--- gnucash/trunk/src/optional/python-bindings/Makefile.am 2011-01-01 20:57:33 UTC (rev 20022)
+++ gnucash/trunk/src/optional/python-bindings/Makefile.am 2011-01-01 21:04:31 UTC (rev 20023)
@@ -100,3 +100,9 @@
MAINTAINERCLEANFILES = gnucash_core.c
+
+check_PROGRAMS = sqlite3test
+sqlite3test_SOURCES = sqlite3test.c
+sqlite3test_LDADD = ${_gnucash_core_c_la_LIBADD}
+sqlite3test_CPPFLAGS = ${_gnucash_core_c_la_CPPFLAGS}
+
Added: gnucash/trunk/src/optional/python-bindings/sqlite3test.c
===================================================================
--- gnucash/trunk/src/optional/python-bindings/sqlite3test.c (rev 0)
+++ gnucash/trunk/src/optional/python-bindings/sqlite3test.c 2011-01-01 21:04:31 UTC (rev 20023)
@@ -0,0 +1,18 @@
+#include "config.h"
+#include "qofsession.h"
+
+int main()
+{
+ qof_log_init();
+ qof_init();
+ gnc_module_system_init();
+ char * no_args[1] = { NULL };
+ gnc_engine_init(0, no_args);
+
+ QofSession * s = qof_session_new();
+ qof_session_begin(s, "sqlite3:///tmp/blah.gnucash", 0, 1, 0);
+ qof_session_load(s, NULL);
+ qof_session_save(s, NULL);
+ qof_session_end(s);
+ return 0;
+}
Property changes on: gnucash/trunk/src/optional/python-bindings/sqlite3test.c
___________________________________________________________________
Added: svn:eol-style
+ LF
More information about the gnucash-changes
mailing list