* Now we take into account the call hierarchy when use SQL SECURITY
option.
Added new context variable in SYSTEM namespace - EFFICIENT_USER which is
returns user name in which context a code works.
We change efficient user before call procedure and function, fetch a
record from selective procedure and before execute a trigger.
* Renamed new context variable to EFFECTIVE_USER. Fixed nested calls.
* Improved error messages to print effective user when there is no permission.
* Added description of new context variable EFFECTIVE_USER. Improved description of SQL SECURITY clause.
With this feature it's possible to create parallel (via different attachments) processes reading consistent data from a database.
For example, a backup process may create multiple threads paralleling read data from the database.
Also a web service may dispatch distributed sub services paralleling doing some processing.
That is accomplished creating a transaction with SET TRANSACTION SNAPSHOT [ AT NUMBER <snapshot number> ] or isc_tpb_at_snapshot_number.
The <snapshot number> from the first transaction may be obtained with RDB$GET_CONTEXT('SYSTEM', 'SNAPSHOT_NUMBER') or transaction info call with fb_info_tra_snapshot_number.
Also added CORE-6017 - Add transaction info fb_info_tra_snapshot_number.
* Release objects of external engine
1. Added explicit destruction of procedures and functions, because it
should execute external routines destructor to avoid leaks inside
external engine
2. Add explicit destruction of trigger and destruction of linked
external trigger
3. Release external engine after use
* Fix external engine procedures leaking, when creating new procedure