On Wed, Jan 11, 2012 at 11:17 AM, John Elrick <john.elr...@fenestra.com>wrote:

> I'm still debugging the issue I reported earlier concerning upgrading
> from 3.6.17 to 3.7.9.  One solution we are examining would be to
> create a log of all SQL commands executed and then replay the log
> using the different versions.  As an example, if I were to execute
> (psuedo-code)
>
> command := db.prepareExec('insert into foo values (:bar)');
>
> for i := 0 to 100 do
>  begin
>    command.bind(':bar', i);
>    command.execute;
>  end;
>
> the log would produce:
>
> insert into foo values(1);
> insert into foo values(2);
> ...
> insert into foo values(100);
>
> From my examination of Sqlite, there doesn't appear to be a built in
> mechanism for creating this type of log.  Is this correct or am I
> missing something?
>

The sqlite3_trace() <http://www.sqlite.org/c3ref/profile.html> interface
will do this.  You just have to supply it with a callback that will write
the text to a file.

In version 3.7.9, the sqlite3_trace() output has the bound values filled
in.  In version 3.6.7, the parameter name is print instead.  You probably
want to use 3.7.9, therefore, to create your log.


>
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to