Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Simon
GOT IT. Well, I found my mistake that lead to all this. I'm sorry to have wasted your time. Here's what happened for those who struggle with similar issues... I originally opted to make sqlite3_module a member of my C++ "module" class. My C++ constructor was therefore assigning all the xFuncti

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Simon
The option was already on for my own stuff but not sqlite. However, I just had to recompile libSqlite3 with debug option to get more details and it's a bit scary... SQL query using sqlite3_exec() and stmt: create virtual table foo using vtable_module1; -Calling sqlite3_prepare_v2()... -Calling sq

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Richard Hipp
On Fri, Oct 4, 2013 at 2:22 PM, Simon wrote: > Hi Richard, > > That helped a lot and got me passed that point. However, I didn't go very > far from where I were... > > It now compiles fine, however the program segfaults within the > sqlite3_step() of the "create virtual table foo using vtable_mo

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Simon
Hi Richard, That helped a lot and got me passed that point. However, I didn't go very far from where I were... It now compiles fine, however the program segfaults within the sqlite3_step() of the "create virtual table foo using vtable_module1;" statement. Using valgrind, I get this interesting

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Richard Hipp
On Fri, Oct 4, 2013 at 10:07 AM, Simon wrote: > > 3) I call sqlite3_create_module() with module name "vtable1" > > 4) I call sqlite3_declare_vtab() with this statement: "CREATE TABLE foo ( x > integer, y integer );" > The application must never invoke sqlite3_declare_vtab(). The sqlite3_declar

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Max Vlasov
Simon, don't know what exactly wrong in your particular case, but I'd suggest setting debugger breakpoints everywhere in your x-handlers and notice the moment after which calls are ceased (or you get a error code). Max On Fri, Oct 4, 2013 at 6:07 PM, Simon wrote: > Hi there, > > I'm currently

[sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Simon
Hi there, I'm currently building my own virtual table implementation. I've built a dummy vtable that returns the string "1" to all queries for all columns but I'm having trouble getting started (getting a 'misuse' error). Can someone help me get in the right direction? > 1) I fi