On 14/12/2019 14:43, Mark Rotteveel wrote:
I'm implementing timeout support in Jaybird, but ran into a problem with
the native implementation. Calling fb_dsql_set_timeout (old API) doesn't
seem to have any effect: the executed statement had no timeout applied.
Before I spend too much time verifying things in Jaybird: is this
expected to work, or are there obvious states of the client that will
prevent the timeout to be set?
I called fb_dsql_set_timeout after a prepare and before isc_dsql_execute.
I have attached a debugger to Firebird 4 (build 1694) with a breakpoint
on line `statement->rsr_iface->setTimeout(&status_vector,
sqldata->p_sqldata_timeout);` (line 3739 in server.cpp in method
execute_statement), and I see the timeout value arriving in the server.
I also added a breakpoint in method fetch in server.cpp, and in my Java
code on the fetch, and I noticed that the call to execute only arrived
on the server when the fetch was called in my Java code.
I wasn't aware that the execute would be deferred in this case, which
means I have to rethink how I trigger the timeout in my test.
Mark
--
Mark Rotteveel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel