mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +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:
|
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
|
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
|
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.
|
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.
|
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
|
variables. You can define and set value for variable with any name in this
|
||||||
context. USER_TRANSACTION namespace offers the same possibilities for
|
context. USER_TRANSACTION namespace offers the same possibilities for
|
||||||
individual transactions.
|
individual transactions.
|
||||||
@ -56,12 +56,12 @@ Usage:
|
|||||||
NETWORK_PROTOCOL | The network protocol used by client to connect. Currently
|
NETWORK_PROTOCOL | The network protocol used by client to connect. Currently
|
||||||
| used values: "TCPv4", "TCPv6", "WNET", "XNET" and NULL
|
| used values: "TCPv4", "TCPv6", "WNET", "XNET" and NULL
|
||||||
|
|
|
|
||||||
WIRE_COMPRESSED | Compression status of current connection.
|
WIRE_COMPRESSED | Compression status of current connection.
|
||||||
| If connection is compressed - returns "TRUE", if it is
|
| If connection is compressed - returns "TRUE", if it is
|
||||||
| not compressed - returns "FALSE".
|
| not compressed - returns "FALSE".
|
||||||
| If connection is embedded - returns NULL.
|
| 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.
|
| Value is the same as for compression status above.
|
||||||
|
|
|
|
||||||
CLIENT_ADDRESS | The wire protocol address and port number of remote client
|
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
|
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
|
| "FALSE" otherwise
|
||||||
|
|
|
|
||||||
SESSION_ID | Numeric ID for current session. Returned value is the
|
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
|
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),
|
| 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.
|
| transaction). NULL, if snapshot is not exist.
|
||||||
|
|
|
|
||||||
SESSION_IDLE_TIMEOUT | Current value of idle connection timeout
|
SESSION_IDLE_TIMEOUT | Current value of idle connection timeout
|
||||||
|
|
|
|
||||||
STATEMENT_TIMEOUT | Current value of statement execution timeout
|
STATEMENT_TIMEOUT | Current value of statement execution timeout
|
||||||
|
|
|
|
||||||
REPLICATION_SEQUENCE | Current replication sequence (number of the latest segment
|
REPLICATION_SEQUENCE | Current replication sequence (number of the latest segment
|
||||||
| written to the replication journal)
|
| written to the replication journal)
|
||||||
|
|
|
|
||||||
EXT_CONN_POOL_SIZE | Pool size (number of connections inside the pool)
|
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
|
CREATE TRIGGER UI_JOURNAL FOR JOURNAL BEFORE INSERT OR UPDATE
|
||||||
as
|
as
|
||||||
begin
|
begin
|
||||||
new.jrn_lastuser = rdb$get_context('USER_TRANSACTION', 'User_ID');
|
new.jrn_lastuser = rdb$get_context('USER_TRANSACTION', 'User_ID');
|
||||||
new.jrn_lastaddr = rdb$get_context('SYSTEM', 'CLIENT_ADDRESS');
|
new.jrn_lastaddr = rdb$get_context('SYSTEM', 'CLIENT_ADDRESS');
|
||||||
|
@ -340,7 +340,7 @@ const char
|
|||||||
ISOLATION_LEVEL_NAME[] = "ISOLATION_LEVEL",
|
ISOLATION_LEVEL_NAME[] = "ISOLATION_LEVEL",
|
||||||
LOCK_TIMEOUT_NAME[] = "LOCK_TIMEOUT",
|
LOCK_TIMEOUT_NAME[] = "LOCK_TIMEOUT",
|
||||||
READ_ONLY_NAME[] = "READ_ONLY",
|
READ_ONLY_NAME[] = "READ_ONLY",
|
||||||
SNAPSHOT_CN_NAME[] = "SNAPSHOT_CN",
|
SNAPSHOT_NUMBER_NAME[] = "SNAPSHOT_NUMBER",
|
||||||
// DDL_TRIGGER namespace
|
// DDL_TRIGGER namespace
|
||||||
DDL_EVENT_NAME[] = "DDL_EVENT",
|
DDL_EVENT_NAME[] = "DDL_EVENT",
|
||||||
EVENT_TYPE_NAME[] = "EVENT_TYPE",
|
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;
|
resultStr = (transaction->tra_flags & TRA_readonly) ? TRUE_VALUE : FALSE_VALUE;
|
||||||
else if (nameStr == GLOBAL_CN_NAME)
|
else if (nameStr == GLOBAL_CN_NAME)
|
||||||
resultStr.printf("%" SQUADFORMAT, dbb->dbb_tip_cache->getGlobalCommitNumber());
|
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))
|
if (!(transaction->tra_flags & TRA_read_committed))
|
||||||
resultStr.printf("%" SQUADFORMAT, transaction->tra_snapshot_number);
|
resultStr.printf("%" SQUADFORMAT, transaction->tra_snapshot_number);
|
||||||
|
Loading…
Reference in New Issue
Block a user