Setting a "profile" callback cause empty result

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting a "profile" callback cause empty result

Eric Boudaillier
Using the Tcl interface with the "profile" callback set, "onecolumn" and
"exists" returns empty result.

In the code, in DB_EXISTS/DB_ONECOLUMN branch, Tcl_SetObjResult() is called
before dbEvalFinalize(), inlike in the DB_EVAL branch.

The profile callback is probably called inside dbEvalFinalize(), which then
erase the interp result.

A temporary Tcl_Obj must be set when computing the result, dbEvalFinalize()
called, then Tcl_SetObjResult called.
_______________________________________________
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: Setting a "profile" callback cause empty result

Richard Hipp-3
On 6/13/16, Eric Boudaillier <[hidden email]> wrote:
> Using the Tcl interface with the "profile" callback set, "onecolumn" and
> "exists" returns empty result.

Tnx for the bug report.  Fixed by
https://www.sqlite.org/src/info/d362ba157f993fc7

>
> In the code, in DB_EXISTS/DB_ONECOLUMN branch, Tcl_SetObjResult() is called
> before dbEvalFinalize(), inlike in the DB_EVAL branch.
>
> The profile callback is probably called inside dbEvalFinalize(), which then
> erase the interp result.
>
> A temporary Tcl_Obj must be set when computing the result, dbEvalFinalize()
> called, then Tcl_SetObjResult called.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users