Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Lodewijk Duymaer van Twist-2

Hi,

I'm tracing queries that my application makes using sqlite3_trace_v2 and sqlite3_expanded_sql in the callback. The application uses sqlite 3.22.0.

At some point the software will call sqlite3_exec with the following statement:
BEGIN TRANSACTION;
DELETE FROM call_lists WHERE id = 11;
END TRANSACTION;

The output of sqlite3_expanded_sql is:
BEGIN TRANSACTION;
DELETE FROM call_lists WHERE id = 11;
DELETE FROM call_lists WHERE id = 11;
DELETE FROM call_lists WHERE id = 11;
DELETE FROM call_lists WHERE id = 11;
END TRANSACTION;

Is this normal explaiable behaviour or should I try to provide a repo?

Kind regards,

Lodewijk



_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Clemens Ladisch
Lodewijk Duymaer van Twist wrote:

> I'm tracing queries that my application makes using sqlite3_trace_v2 and
> sqlite3_expanded_sql in the callback. The application uses sqlite 3.22.0.
>
> At some point the software will call sqlite3_exec with the following statement:
> BEGIN TRANSACTION;
> DELETE FROM call_lists WHERE id = 11;
> END TRANSACTION;
>
> The output of sqlite3_expanded_sql is:
> BEGIN TRANSACTION;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> END TRANSACTION;
>
> Is this normal explaiable behaviour or should I try to provide a repo?

Are you tracing multiple SQLITE_TRACE_xxx events?

And <https://www.sqlite.org/c3ref/c_trace.html> says:
| An SQLITE_TRACE_STMT callback is invoked when a prepared statement first
| begins running and possibly at other times during the execution of the
| prepared statement, such as at the start of each trigger subprogram.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Richard Hipp-3
In reply to this post by Lodewijk Duymaer van Twist-2
On 6/22/18, Lodewijk Duymaer van Twist <[hidden email]> wrote:
>
> Is this normal explaiable behaviour or should I try to provide a repo?
>

It would be helpful if you could provide a repro.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Lodewijk Duymaer van Twist-2
In reply to this post by Clemens Ladisch
Hi Clemens and Richard,

I have not read the SQLITE_TRACE_STMT documentation well enough they where triggers containt in (X)..

Thanks.

Lodewijk


Van: "Clemens Ladisch" <[hidden email]>
Aan: "sqlite-users" <[hidden email]>
Verzonden: Vrijdag 22 juni 2018 12:19:18
Onderwerp: Re: [sqlite] Unexpected sqlite3_trace_v2 sqlite3_expanded_sql output.

Lodewijk Duymaer van Twist wrote:

> I'm tracing queries that my application makes using sqlite3_trace_v2 and
> sqlite3_expanded_sql in the callback. The application uses sqlite 3.22.0.
>
> At some point the software will call sqlite3_exec with the following statement:
> BEGIN TRANSACTION;
> DELETE FROM call_lists WHERE id = 11;
> END TRANSACTION;
>
> The output of sqlite3_expanded_sql is:
> BEGIN TRANSACTION;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> DELETE FROM call_lists WHERE id = 11;
> END TRANSACTION;
>
> Is this normal explaiable behaviour or should I try to provide a repo?

Are you tracing multiple SQLITE_TRACE_xxx events?

And <https://www.sqlite.org/c3ref/c_trace.html> says:
| An SQLITE_TRACE_STMT callback is invoked when a prepared statement first
| begins running and possibly at other times during the execution of the
| prepared statement, such as at the start of each trigger subprogram.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users 
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users