mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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.) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20023 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -100,3 +100,9 @@ EXTRA_DIST = \
|
||||
|
||||
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}
|
||||
|
||||
|
||||
18
src/optional/python-bindings/sqlite3test.c
Normal file
18
src/optional/python-bindings/sqlite3test.c
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user