Hi Clemens.

Found the problem.  My IDE is picking up other installed libsqlite3.so.  It
was wrong to think that uninstalling the distro's SQLite package would
purge it from /usr/lib.  Other copies still exist.  I'm sure glad the
project is now linking the correct library file!

Regarding sqlite3_trace_v2(db, SQLITE_TRACE_PROFILE,...).  Calls to
sqlite3_sql() on the third trace callback parameter (cast to sqlite_stmt*)
do retrieve the correct part of the the original sqlite3_exec input SQL
string except for ill formed SQL.  Apparently the SQLITE_TRACE_PROFILE
event is not generated for the failed statement.

It would have been helpful to see the event and the parse point of the
failed statement.

At the same time, I found that setting PRAGMA empty_result_callbacks=1 also
has the desired effect of causing sqlite3_exec callbacks on every statement
including create/drop.  However, there is no way of accessing the statement
sql at all that way.

Thanks for your help so far.  This was worth it just to straighten out my
linker issues!

Do you have further thoughts on getting the parse point of the failed
statement from sqlite3_exec on a multiple statement SQL string?

Peter





On Mon, Jun 19, 2017 at 1:30 PM, Clemens Ladisch <clem...@ladisch.de> wrote:

> petern wrote:
> > linker says -> "undefined reference to `sqlite3_trace_v2'"
>
> Then your distribution's package appears to be compiled with
> SQLITE_OMIT_TRACE.
>
> Just add sqlite3.c to your project.
>
>
> Regards,
> Clemens
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to