mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 15:23:03 +01:00
Task CORE-6016 - Rename RDB$GET_CONTEXT('SYSTEM', 'SNAPSHOT_CN') to RDB$GET_CONTEXT('SYSTEM', 'SNAPSHOT_NUMBER').
This commit is contained in:
parent
e38999f658
commit
05b5d16c44
@ -28,7 +28,7 @@ Declared as:
|
||||
|
||||
Usage:
|
||||
|
||||
RDB$SET_CONTEXT and RDB$GET_CONTEXT set and retrieve current value for the
|
||||
RDB$SET_CONTEXT and RDB$GET_CONTEXT set and retrieve current value for the
|
||||
context variables. Namespace name identifies a group of context variables with
|
||||
similar properties. Access rules such as the fact if variables may be read and
|
||||
written to and by whom are determined by namespace which they belong to.
|
||||
@ -44,7 +44,7 @@ Usage:
|
||||
|
||||
Currently, there is a fixed number of pre-defined namespaces you may use.
|
||||
|
||||
USER_SESSION namespace offers access to session-specific user-defined
|
||||
USER_SESSION namespace offers access to session-specific user-defined
|
||||
variables. You can define and set value for variable with any name in this
|
||||
context. USER_TRANSACTION namespace offers the same possibilities for
|
||||
individual transactions.
|
||||
@ -56,12 +56,12 @@ Usage:
|
||||
NETWORK_PROTOCOL | The network protocol used by client to connect. Currently
|
||||
| used values: "TCPv4", "TCPv6", "WNET", "XNET" and NULL
|
||||
|
|
||||
WIRE_COMPRESSED | Compression status of current connection.
|
||||
| If connection is compressed - returns "TRUE", if it is
|
||||
| not compressed - returns "FALSE".
|
||||
WIRE_COMPRESSED | Compression status of current connection.
|
||||
| If connection is compressed - returns "TRUE", if it is
|
||||
| not compressed - returns "FALSE".
|
||||
| If connection is embedded - returns NULL.
|
||||
|
|
||||
WIRE_ENCRYPTED | Encryption status of current connection.
|
||||
WIRE_ENCRYPTED | Encryption status of current connection.
|
||||
| Value is the same as for compression status above.
|
||||
|
|
||||
CLIENT_ADDRESS | The wire protocol address and port number of remote client
|
||||
@ -89,7 +89,7 @@ Usage:
|
||||
|
|
||||
LOCK_TIMEOUT | Lock timeout value specified for current transaction
|
||||
|
|
||||
READ_ONLY | Returns "TRUE" if current transaction is read-only and
|
||||
READ_ONLY | Returns "TRUE" if current transaction is read-only and
|
||||
| "FALSE" otherwise
|
||||
|
|
||||
SESSION_ID | Numeric ID for current session. Returned value is the
|
||||
@ -105,17 +105,17 @@ Usage:
|
||||
|
|
||||
GLOBAL_CN | Most current value of global Commit Number counter
|
||||
|
|
||||
SNAPSHOT_CN | Value of Commit Number of currently database snapshot: either
|
||||
SNAPSHOT_NUMBER | Value of Snapshot Number of currently database snapshot: either
|
||||
| transaction level (for SNAPSHOT or CONSISTENCY transaction),
|
||||
| or request level (for READ COMMITTED READ CONSISTENCY
|
||||
| or request level (for READ COMMITTED READ CONSISTENCY
|
||||
| transaction). NULL, if snapshot is not exist.
|
||||
|
|
||||
SESSION_IDLE_TIMEOUT | Current value of idle connection timeout
|
||||
|
|
||||
STATEMENT_TIMEOUT | Current value of statement execution timeout
|
||||
|
|
||||
REPLICATION_SEQUENCE | Current replication sequence (number of the latest segment
|
||||
| written to the replication journal)
|
||||
REPLICATION_SEQUENCE | Current replication sequence (number of the latest segment
|
||||
| written to the replication journal)
|
||||
|
|
||||
EXT_CONN_POOL_SIZE | Pool size (number of connections inside the pool)
|
||||
|
|
||||
@ -145,7 +145,7 @@ create table journal (
|
||||
);
|
||||
|
||||
CREATE TRIGGER UI_JOURNAL FOR JOURNAL BEFORE INSERT OR UPDATE
|
||||
as
|
||||
as
|
||||
begin
|
||||
new.jrn_lastuser = rdb$get_context('USER_TRANSACTION', 'User_ID');
|
||||
new.jrn_lastaddr = rdb$get_context('SYSTEM', 'CLIENT_ADDRESS');
|
||||
|
@ -340,7 +340,7 @@ const char
|
||||
ISOLATION_LEVEL_NAME[] = "ISOLATION_LEVEL",
|
||||
LOCK_TIMEOUT_NAME[] = "LOCK_TIMEOUT",
|
||||
READ_ONLY_NAME[] = "READ_ONLY",
|
||||
SNAPSHOT_CN_NAME[] = "SNAPSHOT_CN",
|
||||
SNAPSHOT_NUMBER_NAME[] = "SNAPSHOT_NUMBER",
|
||||
// DDL_TRIGGER namespace
|
||||
DDL_EVENT_NAME[] = "DDL_EVENT",
|
||||
EVENT_TYPE_NAME[] = "EVENT_TYPE",
|
||||
@ -3947,7 +3947,7 @@ dsc* evlGetContext(thread_db* tdbb, const SysFunction*, const NestValueArray& ar
|
||||
resultStr = (transaction->tra_flags & TRA_readonly) ? TRUE_VALUE : FALSE_VALUE;
|
||||
else if (nameStr == GLOBAL_CN_NAME)
|
||||
resultStr.printf("%" SQUADFORMAT, dbb->dbb_tip_cache->getGlobalCommitNumber());
|
||||
else if (nameStr == SNAPSHOT_CN_NAME)
|
||||
else if (nameStr == SNAPSHOT_NUMBER_NAME)
|
||||
{
|
||||
if (!(transaction->tra_flags & TRA_read_committed))
|
||||
resultStr.printf("%" SQUADFORMAT, transaction->tra_snapshot_number);
|
||||
|
Loading…
Reference in New Issue
Block a user