Subject Server Threading Again
Author Dmitry Yemanov

One more question about the server threading. Ibserver.exe spawns several
threads for each database connection. Does all actual selects/inserts/etc
within a connection belong to only one thread or a few ones? And in which
situations does server switch threads during the query execution, if it does?

One of my databases on Windows uses the result of GetCurrentThreadId (via
UDF) as a client connection identifier. This id is mapped to the set (host,
user name, role, stamp, duration) which is provided by the client
application (which calls special stored procedures after connect/before
disconnect). This application hasn't been released to customers yet, but it
works fine during the development. But will it always work? In all
situations? I don't think it's a safe to use this trick, but there aren't
essential variables in the engine yet and I couldn't find another way to do
the same thing.

Could anyone comment this?

BTW, is anybody working to implement additional language variables in the
engine? As far as I remember, it has been regurarly requested by the
community members, hasn't it?

Best regards,