On 2021-11-08 17:54, Adriano dos Santos Fernandes wrote:
On 08/11/2021 12:11, Dmitry Yemanov wrote:
08.11.2021 17:54, Dimitry Sibiryakov wrote:

Nope, I believe the new ID must be generated also by findRequest() if
the clone was found in the cache.

Will it make impossible to detect repeatable execution of a prepared
statement as opposite for execution of a new one every time?

findRequest() is not used for user DSQL requests, only for
procedures/functions. So the top-level statement ID will be always
stable, as before.


The solution does not work for the profiler then.

Every request start must have its own ID, even DSQL ones.

And preferable one ID link-able to MON$.

Also, if DSQL requests have stable ID, it's weird that more than one
called routines would be linked to it (even if not at the same time)
through MON$CALL_STACK (where request IDs are more correctly used).

I'm confused about the case, or maybe I don't understand the problem you have. As far as I understand, the statement id in MON$STATEMENTS represents the statement handle. So, if a statement handle has a statement prepared, it should be the same for each execution of that statement handle. If the statement handle is unprepared, it should still have the same idea, same when it gets a new statement text.

Mark



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to