08.11.2021 16:50, Adriano dos Santos Fernandes wrote:

Despite its name, what MON$STATEMENTS show are requests (not statements).

True, but statement/request separation didn't exist when MON$STATEMENTS was implemented ;-) And end users deal with statements, they have no idea what "request" is.

Nevertheless, it would be good to find a way to separate cached statements from its running instances (aka requests), ideally without breaking backward compatibility. It will be important once we start caching user statements.

When a stored routine is executed, finished and executed again, its
request is re-used. Re-used request maintain its ID and is mapped to
MON$STATEMENTS.MON$STATEMENT_ID.

Looks like a bug.

Is it an important design of MON$STATEMENTS that this (subsequent
execution of a request maintain its ID) happens?

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


Dmitry


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

Reply via email to