mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:43:04 +01:00
Comments.
This commit is contained in:
parent
d100a4742b
commit
1816523040
132
src/jrd/exe.h
132
src/jrd/exe.h
@ -56,7 +56,7 @@
|
||||
DEFINE_TRACE_ROUTINE(cmp_trace);
|
||||
#define CMP_TRACE(args) cmp_trace args
|
||||
#else
|
||||
#define CMP_TRACE(args) /* nothing */
|
||||
#define CMP_TRACE(args) // nothing
|
||||
#endif
|
||||
|
||||
class VaryingString;
|
||||
@ -89,11 +89,11 @@ class jrd_node_base : public pool_alloc_rpt<jrd_nod*, type_nod>
|
||||
{
|
||||
public:
|
||||
jrd_nod* nod_parent;
|
||||
SLONG nod_impure; /* Inpure offset from request block */
|
||||
nod_t nod_type; /* Type of node */
|
||||
USHORT nod_flags;
|
||||
SCHAR nod_scale; /* Target scale factor */
|
||||
USHORT nod_count; /* Number of arguments */
|
||||
SLONG nod_impure; // Inpure offset from request block
|
||||
nod_t nod_type; // Type of node
|
||||
USHORT nod_flags;
|
||||
SCHAR nod_scale; // Target scale factor
|
||||
USHORT nod_count; // Number of arguments
|
||||
};
|
||||
|
||||
|
||||
@ -113,25 +113,25 @@ public:
|
||||
jrd_nod* nod_arg[1];
|
||||
};
|
||||
|
||||
const int nod_comparison = 1;
|
||||
const int nod_id = 1; /* marks a field node as a blr_fid guy */
|
||||
const int nod_quad = 2; /* compute in quad (default is long) */
|
||||
const int nod_double = 4;
|
||||
const int nod_date = 8;
|
||||
const int nod_value = 16; /* full value area required in impure space */
|
||||
const int nod_deoptimize = 32; /* boolean which requires deoptimization */
|
||||
const int nod_agg_dbkey = 64; /* dbkey of an aggregate */
|
||||
const int nod_invariant = 128; /* node is recognized as being invariant */
|
||||
const int nod_recurse = 256; /* union node is a recursive union */
|
||||
const int nod_unique_sort = 512; // sorts using unique key - for distinct and group by
|
||||
const int nod_comparison = 1;
|
||||
const int nod_id = 1; // marks a field node as a blr_fid guy
|
||||
const int nod_quad = 2; // compute in quad (default is long)
|
||||
const int nod_double = 4;
|
||||
const int nod_date = 8;
|
||||
const int nod_value = 16; // full value area required in impure space
|
||||
const int nod_deoptimize = 32; // boolean which requires deoptimization
|
||||
const int nod_agg_dbkey = 64; // dbkey of an aggregate
|
||||
const int nod_invariant = 128; // node is recognized as being invariant
|
||||
const int nod_recurse = 256; // union node is a recursive union
|
||||
const int nod_unique_sort = 512; // sorts using unique key - for distinct and group by
|
||||
|
||||
/* Special RecordSelExpr node */
|
||||
// Special RecordSelExpr node
|
||||
|
||||
class RecordSelExpr : public jrd_node_base
|
||||
{
|
||||
public:
|
||||
USHORT rse_count;
|
||||
USHORT rse_jointype; /* inner, left, full */
|
||||
USHORT rse_jointype; // inner, left, full
|
||||
bool rse_writelock;
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
RecordSource* rse_rsb;
|
||||
@ -141,11 +141,11 @@ public:
|
||||
jrd_nod* rse_boolean;
|
||||
jrd_nod* rse_sorted;
|
||||
jrd_nod* rse_projection;
|
||||
jrd_nod* rse_aggregate; /* singleton aggregate for optimizing to index */
|
||||
jrd_nod* rse_plan; /* user-specified access plan */
|
||||
VarInvariantArray *rse_invariants; /* Invariant nodes bound to top-level RSE */
|
||||
jrd_nod* rse_aggregate; // singleton aggregate for optimizing to index
|
||||
jrd_nod* rse_plan; // user-specified access plan
|
||||
VarInvariantArray *rse_invariants; // Invariant nodes bound to top-level RSE
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
jrd_nod* rse_async_message; /* asynchronous message to send for scrolling */
|
||||
jrd_nod* rse_async_message; // asynchronous message to send for scrolling
|
||||
#endif
|
||||
jrd_nod* rse_relation[1];
|
||||
};
|
||||
@ -153,8 +153,8 @@ public:
|
||||
|
||||
// First one is obsolete: was used for PC_ENGINE
|
||||
//const int rse_stream = 1; // flags RecordSelExpr-type node as a blr_stream type
|
||||
const int rse_singular = 2; /* flags RecordSelExpr-type node as from a singleton select */
|
||||
const int rse_variant = 4; /* flags RecordSelExpr as variant (not invariant?) */
|
||||
const int rse_singular = 2; // flags RecordSelExpr-type node as from a singleton select
|
||||
const int rse_variant = 4; // flags RecordSelExpr as variant (not invariant?)
|
||||
|
||||
// Number of nodes may fit into nod_arg of normal node to get to rse_relation
|
||||
const size_t rse_delta = (sizeof(RecordSelExpr) - sizeof(jrd_nod)) / sizeof(jrd_nod::blk_repeat_type);
|
||||
@ -165,7 +165,7 @@ const int rse_nulls_first = 1;
|
||||
const int rse_nulls_last = 2;
|
||||
|
||||
|
||||
/* Literal value */
|
||||
// Literal value
|
||||
|
||||
class Literal : public jrd_node_base
|
||||
{
|
||||
@ -177,28 +177,28 @@ public:
|
||||
const size_t lit_delta = ((sizeof(Literal) - sizeof(jrd_nod) - sizeof(SINT64)) / sizeof(jrd_nod**));
|
||||
|
||||
|
||||
/* Aggregate Sort Block (for DISTINCT aggregates) */
|
||||
// Aggregate Sort Block (for DISTINCT aggregates)
|
||||
|
||||
class AggregateSort : public pool_alloc<type_asb>
|
||||
{
|
||||
public:
|
||||
jrd_nod* nod_parent;
|
||||
SLONG nod_impure; /* Impure offset from request block */
|
||||
nod_t nod_type; /* Type of node */
|
||||
SLONG nod_impure; // Impure offset from request block
|
||||
nod_t nod_type; // Type of node
|
||||
UCHAR nod_flags;
|
||||
SCHAR nod_scale;
|
||||
USHORT nod_count;
|
||||
dsc asb_desc;
|
||||
USHORT asb_length;
|
||||
bool asb_intl;
|
||||
sort_key_def* asb_key_desc; /* for the aggregate */
|
||||
sort_key_def* asb_key_desc; // for the aggregate
|
||||
UCHAR asb_key_data[1];
|
||||
};
|
||||
|
||||
const size_t asb_delta = ((sizeof(AggregateSort) - sizeof(jrd_nod)) / sizeof (jrd_nod**));
|
||||
|
||||
|
||||
/* Various structures in the impure area */
|
||||
// Various structures in the impure area
|
||||
|
||||
struct impure_state
|
||||
{
|
||||
@ -265,7 +265,7 @@ const int VLU_computed = 1; // An invariant sub-query has been computed
|
||||
const int VLU_null = 2; // An invariant sub-query computed to null
|
||||
const int VLU_checked = 4; // Constraint already checked in first read or assignment to argument/variable
|
||||
|
||||
/* Inversion (i.e. nod_index) impure area */
|
||||
// Inversion (i.e. nod_index) impure area
|
||||
|
||||
struct impure_inversion
|
||||
{
|
||||
@ -273,7 +273,7 @@ struct impure_inversion
|
||||
};
|
||||
|
||||
|
||||
/* AggregateSort impure area */
|
||||
// AggregateSort impure area
|
||||
|
||||
struct impure_agg_sort
|
||||
{
|
||||
@ -584,10 +584,10 @@ struct Resource
|
||||
};
|
||||
|
||||
enum rsc_s rsc_type;
|
||||
USHORT rsc_id; /* Id of the resource */
|
||||
jrd_rel* rsc_rel; /* Relation block */
|
||||
jrd_prc* rsc_prc; /* Procedure block */
|
||||
Collation* rsc_coll; /* Collation block */
|
||||
USHORT rsc_id; // Id of the resource
|
||||
jrd_rel* rsc_rel; // Relation block
|
||||
jrd_prc* rsc_prc; // Procedure block
|
||||
Collation* rsc_coll; // Collation block
|
||||
|
||||
static bool greaterThan(const Resource& i1, const Resource& i2)
|
||||
{
|
||||
@ -851,25 +851,27 @@ public:
|
||||
|
||||
BlrReader csb_blr_reader;
|
||||
jrd_nod* csb_node;
|
||||
ExternalAccessList csb_external; /* Access to outside procedures/triggers to be checked */
|
||||
AccessItemList csb_access; /* Access items to be checked */
|
||||
vec<jrd_nod*>* csb_variables; /* Vector of variables, if any */
|
||||
ResourceList csb_resources; /* Resources (relations and indexes) */
|
||||
NodeStack csb_dependencies; /* objects this request depends upon */
|
||||
Firebird::Array<RecordSource*> csb_fors; /* stack of fors */
|
||||
ExternalAccessList csb_external; // Access to outside procedures/triggers to be checked
|
||||
AccessItemList csb_access; // Access items to be checked
|
||||
vec<jrd_nod*>* csb_variables; // Vector of variables, if any
|
||||
ResourceList csb_resources; // Resources (relations and indexes)
|
||||
NodeStack csb_dependencies; // objects this request depends upon
|
||||
Firebird::Array<RecordSource*> csb_fors; // stack of fors
|
||||
Firebird::Array<jrd_nod*> csb_exec_sta; // Array of exec_into nodes
|
||||
Firebird::Array<jrd_nod*> csb_invariants; /* stack of invariant nodes */
|
||||
Firebird::Array<jrd_node_base*> csb_current_nodes; /* RecordSelExpr's and other invariant candidates within whose scope we are */
|
||||
Firebird::Array<jrd_nod*> csb_invariants; // stack of invariant nodes
|
||||
Firebird::Array<jrd_node_base*> csb_current_nodes; // RecordSelExpr's and other invariant
|
||||
// candidates within whose scope we are
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
RecordSelExpr* csb_current_rse; /* this holds the RecordSelExpr currently being processed;
|
||||
unlike the current_rses stack, it references any expanded view RecordSelExpr */
|
||||
jrd_nod* csb_async_message; /* asynchronous message to send to request */
|
||||
RecordSelExpr* csb_current_rse; // this holds the RecordSelExpr currently being processed;
|
||||
// unlike the current_rses stack, it references any
|
||||
// expanded view RecordSelExpr
|
||||
jrd_nod* csb_async_message; // asynchronous message to send to request
|
||||
#endif
|
||||
USHORT csb_n_stream; /* Next available stream */
|
||||
USHORT csb_msg_number; /* Highest used message number */
|
||||
SLONG csb_impure; /* Next offset into impure area */
|
||||
USHORT csb_n_stream; // Next available stream
|
||||
USHORT csb_msg_number; // Highest used message number
|
||||
SLONG csb_impure; // Next offset into impure area
|
||||
USHORT csb_g_flags;
|
||||
MemoryPool& csb_pool; // Memory pool to be used by csb
|
||||
MemoryPool& csb_pool; // Memory pool to be used by csb
|
||||
Firebird::DbgInfo csb_dbg_info; // Debug information
|
||||
MapFieldInfo csb_map_field_info; // Map field name to field info
|
||||
MapItemInfo csb_map_item_info; // Map item to item info
|
||||
@ -903,24 +905,24 @@ public:
|
||||
csb_rsb_ptr(0)
|
||||
{}
|
||||
|
||||
UCHAR csb_stream; /* Map user context to internal stream */
|
||||
UCHAR csb_view_stream; /* stream number for view relation, below */
|
||||
UCHAR csb_stream; // Map user context to internal stream
|
||||
UCHAR csb_view_stream; // stream number for view relation, below
|
||||
USHORT csb_flags;
|
||||
USHORT csb_indices; /* Number of indices */
|
||||
USHORT csb_indices; // Number of indices
|
||||
|
||||
jrd_rel* csb_relation;
|
||||
Firebird::string* csb_alias; /* SQL alias name for this instance of relation */
|
||||
Firebird::string* csb_alias; // SQL alias name for this instance of relation
|
||||
jrd_prc* csb_procedure;
|
||||
jrd_rel* csb_view; /* parent view */
|
||||
jrd_rel* csb_view; // parent view
|
||||
|
||||
IndexDescAlloc* csb_idx; /* Packed description of indices */
|
||||
jrd_nod* csb_message; /* Msg for send/receive */
|
||||
Format* csb_format; /* Default Format for stream */
|
||||
UInt32Bitmap* csb_fields; /* Fields referenced */
|
||||
float csb_cardinality; /* Cardinality of relation */
|
||||
jrd_nod* csb_plan; /* user-specified plan for this relation */
|
||||
UCHAR* csb_map; /* Stream map for views */
|
||||
RecordSource** csb_rsb_ptr; /* point to rsb for nod_stream */
|
||||
IndexDescAlloc* csb_idx; // Packed description of indices
|
||||
jrd_nod* csb_message; // Msg for send/receive
|
||||
Format* csb_format; // Default Format for stream
|
||||
UInt32Bitmap* csb_fields; // Fields referenced
|
||||
float csb_cardinality; // Cardinality of relation
|
||||
jrd_nod* csb_plan; // user-specified plan for this relation
|
||||
UCHAR* csb_map; // Stream map for views
|
||||
RecordSource** csb_rsb_ptr; // point to rsb for nod_stream
|
||||
};
|
||||
|
||||
|
||||
|
215
src/jrd/req.h
215
src/jrd/req.h
@ -54,7 +54,7 @@ class Savepoint;
|
||||
class RecordSource;
|
||||
class thread_db;
|
||||
|
||||
/* record parameter block */
|
||||
// record parameter block
|
||||
|
||||
struct record_param
|
||||
{
|
||||
@ -62,31 +62,31 @@ struct record_param
|
||||
rpb_relation(0),
|
||||
rpb_window(DB_PAGE_SPACE, -1)
|
||||
{}
|
||||
RecordNumber rpb_number; /* record number in relation */
|
||||
SLONG rpb_transaction_nr; /* transaction number */
|
||||
jrd_rel* rpb_relation; /* relation of record */
|
||||
Record* rpb_record; /* final record block */
|
||||
Record* rpb_prior; /* prior record block if this is a delta record */
|
||||
SaveRecordParam* rpb_copy; /* record_param copy for singleton verification */
|
||||
Record* rpb_undo; /* our first version of data if this is a second modification */
|
||||
USHORT rpb_format_number; /* format number in relation */
|
||||
RecordNumber rpb_number; // record number in relation
|
||||
SLONG rpb_transaction_nr; // transaction number
|
||||
jrd_rel* rpb_relation; // relation of record
|
||||
Record* rpb_record; // final record block
|
||||
Record* rpb_prior; // prior record block if this is a delta record
|
||||
SaveRecordParam* rpb_copy; // record_param copy for singleton verification
|
||||
Record* rpb_undo; // our first version of data if this is a second modification
|
||||
USHORT rpb_format_number; // format number in relation
|
||||
|
||||
SLONG rpb_page; // page number
|
||||
USHORT rpb_line; // line number on page
|
||||
SLONG rpb_page; // page number
|
||||
USHORT rpb_line; // line number on page
|
||||
|
||||
SLONG rpb_f_page; /* fragment page number */
|
||||
USHORT rpb_f_line; /* fragment line number on page */
|
||||
SLONG rpb_f_page; // fragment page number
|
||||
USHORT rpb_f_line; // fragment line number on page
|
||||
|
||||
SLONG rpb_b_page; /* back page */
|
||||
USHORT rpb_b_line; /* back line */
|
||||
SLONG rpb_b_page; // back page
|
||||
USHORT rpb_b_line; // back line
|
||||
|
||||
UCHAR* rpb_address; /* address of record sans header */
|
||||
USHORT rpb_length; /* length of record */
|
||||
USHORT rpb_flags; /* record ODS flags replica */
|
||||
USHORT rpb_stream_flags; /* stream flags */
|
||||
SSHORT rpb_org_scans; /* relation scan count at stream open */
|
||||
UCHAR* rpb_address; // address of record sans header
|
||||
USHORT rpb_length; // length of record
|
||||
USHORT rpb_flags; // record ODS flags replica
|
||||
USHORT rpb_stream_flags; // stream flags
|
||||
SSHORT rpb_org_scans; // relation scan count at stream open
|
||||
|
||||
FB_UINT64 rpb_ext_pos; // position in external file
|
||||
FB_UINT64 rpb_ext_pos; // position in external file
|
||||
|
||||
inline WIN& getWindow(thread_db* tdbb)
|
||||
{
|
||||
@ -101,7 +101,7 @@ private:
|
||||
struct win rpb_window;
|
||||
};
|
||||
|
||||
/* Record flags must be an exact replica of ODS record header flags */
|
||||
// Record flags must be an exact replica of ODS record header flags
|
||||
|
||||
const USHORT rpb_deleted = 1;
|
||||
const USHORT rpb_chained = 2;
|
||||
@ -113,7 +113,7 @@ const USHORT rpb_damaged = 128; // record is busted
|
||||
const USHORT rpb_gc_active = 256; // garbage collecting dead record version
|
||||
const USHORT rpb_uk_modified= 512; // record key field values are changed
|
||||
|
||||
/* Stream flags */
|
||||
// Stream flags
|
||||
|
||||
const USHORT RPB_s_refetch = 0x1; // re-fetch required due to sort
|
||||
const USHORT RPB_s_update = 0x2; // input stream fetched for update
|
||||
@ -123,16 +123,16 @@ const USHORT RPB_s_no_data = 0x4; // nobody is going to access the data
|
||||
#define CLEAR_NULL(record, id) record->rec_data [id >> 3] &= ~(1 << (id & 7))
|
||||
#define TEST_NULL(record, id) record->rec_data [id >> 3] & (1 << (id & 7))
|
||||
|
||||
const int MAX_DIFFERENCES = 1024; /* Max length of generated Differences string
|
||||
between two records */
|
||||
const int MAX_DIFFERENCES = 1024; // Max length of generated Differences string
|
||||
// between two records
|
||||
|
||||
/* Store allocation policy types. Parameter to DPM_store() */
|
||||
// Store allocation policy types. Parameter to DPM_store()
|
||||
|
||||
const USHORT DPM_primary = 1; /* New primary record */
|
||||
const USHORT DPM_secondary = 2; /* Chained version of primary record */
|
||||
const USHORT DPM_other = 3; /* Independent (or don't care) record */
|
||||
const USHORT DPM_primary = 1; // New primary record
|
||||
const USHORT DPM_secondary = 2; // Chained version of primary record
|
||||
const USHORT DPM_other = 3; // Independent (or don't care) record
|
||||
|
||||
/* Record block (holds data, remember data?) */
|
||||
// Record block (holds data, remember data?)
|
||||
|
||||
class Record : public pool_alloc_rpt<SCHAR, type_rec>
|
||||
{
|
||||
@ -141,35 +141,35 @@ public:
|
||||
// ASF: Record is memcopied in realloc_record (vio.cpp), starting at rec_format.
|
||||
// rec_precedence has destructor, so don't move it to after rec_format.
|
||||
MemoryPool& rec_pool; // pool where record to be expanded
|
||||
PageStack rec_precedence; /* stack of higher precedence pages */
|
||||
const Format* rec_format; /* what the data looks like */
|
||||
USHORT rec_length; /* how much there is */
|
||||
PageStack rec_precedence; // stack of higher precedence pages
|
||||
const Format* rec_format; // what the data looks like
|
||||
USHORT rec_length; // how much there is
|
||||
const Format* rec_fmt_bk; // backup format to cope with Borland's ill null signaling
|
||||
UCHAR rec_flags; /* misc record flags */
|
||||
RecordNumber rec_number; /* original record_param number - used for undoing multiple updates */
|
||||
double rec_dummy; /* this is to force next field to a double boundary */
|
||||
UCHAR rec_data[1]; /* THIS VARIABLE MUST BE ALIGNED ON A DOUBLE BOUNDARY */
|
||||
UCHAR rec_flags; // misc record flags
|
||||
RecordNumber rec_number; // original record_param number - used for undoing multiple updates
|
||||
double rec_dummy; // this is to force next field to a double boundary
|
||||
UCHAR rec_data[1]; // THIS VARIABLE MUST BE ALIGNED ON A DOUBLE BOUNDARY
|
||||
};
|
||||
|
||||
// rec_flags
|
||||
|
||||
const UCHAR REC_same_tx = 1; /* record inserted/updated and deleted by same tx */
|
||||
const UCHAR REC_gc_active = 2; /* relation garbage collect record block in use */
|
||||
const UCHAR REC_new_version = 4; /* savepoint created new record version and deleted it */
|
||||
const UCHAR REC_same_tx = 1; // record inserted/updated and deleted by same tx
|
||||
const UCHAR REC_gc_active = 2; // relation garbage collect record block in use
|
||||
const UCHAR REC_new_version = 4; // savepoint created new record version and deleted it
|
||||
|
||||
/* save record_param block */
|
||||
// save record_param block
|
||||
|
||||
class SaveRecordParam : public pool_alloc<type_srpb>
|
||||
{
|
||||
public:
|
||||
record_param srpb_rpb[1]; /* record parameter blocks */
|
||||
record_param srpb_rpb[1]; // record parameter blocks
|
||||
};
|
||||
|
||||
/* List of active blobs controlled by request */
|
||||
// List of active blobs controlled by request
|
||||
|
||||
typedef Firebird::BePlusTree<ULONG, ULONG, MemoryPool> TempBlobIdTree;
|
||||
|
||||
/* Affected rows counter class */
|
||||
// Affected rows counter class
|
||||
|
||||
class AffectedRows
|
||||
{
|
||||
@ -190,7 +190,7 @@ private:
|
||||
int modifiedRows;
|
||||
};
|
||||
|
||||
/* request block */
|
||||
// request block
|
||||
|
||||
class jrd_req : public pool_alloc_rpt<record_param, type_req>
|
||||
{
|
||||
@ -204,11 +204,11 @@ public:
|
||||
req_map_field_info(*pool), req_map_item_info(*pool), req_auto_trans(*pool)
|
||||
{}
|
||||
|
||||
Attachment* req_attachment; // database attachment
|
||||
SLONG req_id; // request identifier
|
||||
USHORT req_count; // number of streams
|
||||
USHORT req_incarnation; // incarnation number
|
||||
ULONG req_impure_size; // size of impure area
|
||||
Attachment* req_attachment; // database attachment
|
||||
SLONG req_id; // request identifier
|
||||
USHORT req_count; // number of streams
|
||||
USHORT req_incarnation; // incarnation number
|
||||
ULONG req_impure_size; // size of impure area
|
||||
MemoryPool* req_pool;
|
||||
Firebird::MemoryStats req_memory_stats;
|
||||
vec<jrd_req*>* req_sub_requests; // vector of sub-requests
|
||||
@ -219,50 +219,50 @@ public:
|
||||
jrd_req* req_tra_next;
|
||||
jrd_req* req_tra_prev;
|
||||
|
||||
jrd_req* req_request; /* next request in Database */
|
||||
jrd_req* req_caller; // Caller of this request
|
||||
// This field may be used to reconstruct the whole call stack
|
||||
TempBlobIdTree req_blobs; // Temporary BLOBs owned by this request
|
||||
ExternalAccessList req_external; /* Access to procedures/triggers to be checked */
|
||||
AccessItemList req_access; /* Access items to be checked */
|
||||
//vec<jrd_nod*>* req_variables; // Vector of variables, if any CVC: UNUSED
|
||||
ResourceList req_resources; /* Resources (relations and indices) */
|
||||
jrd_nod* req_message; /* Current message for send/receive */
|
||||
jrd_req* req_request; // next request in Database
|
||||
jrd_req* req_caller; // Caller of this request
|
||||
// This field may be used to reconstruct the whole call stack
|
||||
TempBlobIdTree req_blobs; // Temporary BLOBs owned by this request
|
||||
ExternalAccessList req_external; // Access to procedures/triggers to be checked
|
||||
AccessItemList req_access; // Access items to be checked
|
||||
//vec<jrd_nod*>* req_variables; // Vector of variables, if any CVC: UNUSED
|
||||
ResourceList req_resources; // Resources (relations and indices)
|
||||
jrd_nod* req_message; // Current message for send/receive
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
jrd_nod* req_async_message; /* Asynchronous message (used in scrolling) */
|
||||
jrd_nod* req_async_message; // Asynchronous message (used in scrolling)
|
||||
#endif
|
||||
jrd_prc* req_procedure; /* procedure, if any */
|
||||
Firebird::MetaName req_trg_name; /* name of request (trigger), if any */
|
||||
jrd_prc* req_procedure; // procedure, if any
|
||||
Firebird::MetaName req_trg_name; // name of request (trigger), if any
|
||||
//USHORT req_length; // message length for send/receive
|
||||
//USHORT req_nmsgs; // number of message types
|
||||
//USHORT req_mmsg; // highest message type
|
||||
//USHORT req_msend; // longest send message
|
||||
//USHORT req_mreceive; // longest receive message
|
||||
|
||||
ULONG req_records_selected; /* count of records selected by request (meeting selection criteria) */
|
||||
ULONG req_records_inserted; /* count of records inserted by request */
|
||||
ULONG req_records_updated; /* count of records updated by request */
|
||||
ULONG req_records_deleted; /* count of records deleted by request */
|
||||
ULONG req_records_selected; // count of records selected by request (meeting selection criteria)
|
||||
ULONG req_records_inserted; // count of records inserted by request
|
||||
ULONG req_records_updated; // count of records updated by request
|
||||
ULONG req_records_deleted; // count of records deleted by request
|
||||
RuntimeStatistics req_stats;
|
||||
RuntimeStatistics req_base_stats;
|
||||
AffectedRows req_records_affected; /* records affected by the last statement */
|
||||
AffectedRows req_records_affected; // records affected by the last statement
|
||||
|
||||
USHORT req_view_flags; /* special flags for virtual ops on views */
|
||||
jrd_rel* req_top_view_store; /* the top view in store(), if any */
|
||||
jrd_rel* req_top_view_modify;/* the top view in modify(), if any */
|
||||
jrd_rel* req_top_view_erase; /* the top view in erase(), if any */
|
||||
USHORT req_view_flags; // special flags for virtual ops on views
|
||||
jrd_rel* req_top_view_store; // the top view in store(), if any
|
||||
jrd_rel* req_top_view_modify; // the top view in modify(), if any
|
||||
jrd_rel* req_top_view_erase; // the top view in erase(), if any
|
||||
|
||||
jrd_nod* req_top_node; /* top of execution tree */
|
||||
jrd_nod* req_next; /* next node for execution */
|
||||
Firebird::Array<RecordSource*> req_fors; /* Vector of for loops, if any */
|
||||
jrd_nod* req_top_node; // top of execution tree
|
||||
jrd_nod* req_next; // next node for execution
|
||||
Firebird::Array<RecordSource*> req_fors; // Vector of for loops, if any
|
||||
Firebird::Array<jrd_nod*> req_exec_sta; // Array of exec_into nodes
|
||||
EDS::Statement* req_ext_stmt; // head of list of active dynamic statements
|
||||
vec<RecordSource*>* req_cursors; /* Vector of named cursors, if any */
|
||||
Firebird::Array<jrd_nod*> req_invariants; /* Vector of invariant nodes, if any */
|
||||
USHORT req_label; /* label for leave */
|
||||
ULONG req_flags; /* misc request flags */
|
||||
Savepoint* req_proc_sav_point; /* procedure savepoint list */
|
||||
Firebird::TimeStamp req_timestamp; /* Start time of request */
|
||||
EDS::Statement* req_ext_stmt; // head of list of active dynamic statements
|
||||
vec<RecordSource*>* req_cursors; // Vector of named cursors, if any
|
||||
Firebird::Array<jrd_nod*> req_invariants; // Vector of invariant nodes, if any
|
||||
USHORT req_label; // label for leave
|
||||
ULONG req_flags; // misc request flags
|
||||
Savepoint* req_proc_sav_point; // procedure savepoint list
|
||||
Firebird::TimeStamp req_timestamp; // Start time of request
|
||||
Firebird::RefStrPtr req_sql_text; // SQL text
|
||||
Firebird::Array<UCHAR> req_blr; // BLR for non-SQL query
|
||||
|
||||
@ -290,7 +290,7 @@ public:
|
||||
req_trigger_trans_start = 6,
|
||||
req_trigger_trans_commit = 7,
|
||||
req_trigger_trans_rollback = 8
|
||||
} req_trigger_action; /* action that caused trigger to fire */
|
||||
} req_trigger_action; // action that caused trigger to fire
|
||||
|
||||
enum req_s {
|
||||
req_evaluate,
|
||||
@ -300,11 +300,11 @@ public:
|
||||
req_proceed,
|
||||
req_sync,
|
||||
req_unwind
|
||||
} req_operation; /* operation for next node */
|
||||
} req_operation; // operation for next node
|
||||
|
||||
StatusXcp req_last_xcp; /* last known exception */
|
||||
StatusXcp req_last_xcp; // last known exception
|
||||
|
||||
record_param req_rpb[1]; /* record parameter blocks */
|
||||
record_param req_rpb[1]; // record parameter blocks
|
||||
|
||||
void adjustCallerStats()
|
||||
{
|
||||
@ -324,7 +324,7 @@ public:
|
||||
// to manage impure area and array of record parameter blocks
|
||||
const size_t REQ_SIZE = sizeof(jrd_req) - sizeof(jrd_req::blk_repeat_type);
|
||||
|
||||
/* Flags for req_flags */
|
||||
// Flags for req_flags
|
||||
const ULONG req_active = 0x1L;
|
||||
const ULONG req_stall = 0x2L;
|
||||
const ULONG req_leave = 0x4L;
|
||||
@ -337,25 +337,26 @@ const ULONG req_abort = 0x40L;
|
||||
const ULONG req_internal = 0x80L;
|
||||
const ULONG req_warning = 0x100L;
|
||||
const ULONG req_in_use = 0x200L;
|
||||
const ULONG req_sys_trigger = 0x400L; /* request is a system trigger */
|
||||
const ULONG req_count_records = 0x800L; /* count records accessed */
|
||||
const ULONG req_proc_fetch = 0x1000L; /* Fetch from procedure in progress */
|
||||
const ULONG req_ansi_any = 0x2000L; /* Request is processing ANSI ANY */
|
||||
const ULONG req_same_tx_upd = 0x4000L; /* record was updated by same transaction */
|
||||
const ULONG req_ansi_all = 0x8000L; /* Request is processing ANSI ANY */
|
||||
const ULONG req_ansi_not = 0x10000L; /* Request is processing ANSI ANY */
|
||||
const ULONG req_reserved = 0x20000L; /* Request reserved for client */
|
||||
const ULONG req_ignore_perm = 0x40000L; /* ignore permissions checks */
|
||||
const ULONG req_fetch_required = 0x80000L; /* need to fetch next record */
|
||||
const ULONG req_error_handler = 0x100000L; /* looper is called to handle error */
|
||||
const ULONG req_blr_version4 = 0x200000L; /* Request is of blr_version4 */
|
||||
/* Mask for flags preserved in a clone of a request */
|
||||
const ULONG req_sys_trigger = 0x400L; // request is a system trigger
|
||||
const ULONG req_count_records = 0x800L; // count records accessed
|
||||
const ULONG req_proc_fetch = 0x1000L; // Fetch from procedure in progress
|
||||
const ULONG req_ansi_any = 0x2000L; // Request is processing ANSI ANY
|
||||
const ULONG req_same_tx_upd = 0x4000L; // record was updated by same transaction
|
||||
const ULONG req_ansi_all = 0x8000L; // Request is processing ANSI ANY
|
||||
const ULONG req_ansi_not = 0x10000L; // Request is processing ANSI ANY
|
||||
const ULONG req_reserved = 0x20000L; // Request reserved for client
|
||||
const ULONG req_ignore_perm = 0x40000L; // ignore permissions checks
|
||||
const ULONG req_fetch_required = 0x80000L; // need to fetch next record
|
||||
const ULONG req_error_handler = 0x100000L; // looper is called to handle error
|
||||
const ULONG req_blr_version4 = 0x200000L; // Request is of blr_version4
|
||||
|
||||
// Mask for flags preserved in a clone of a request
|
||||
const ULONG REQ_FLAGS_CLONE_MASK = (req_sys_trigger | req_internal | req_ignore_perm | req_blr_version4);
|
||||
|
||||
/* Mask for flags preserved on initialization of a request */
|
||||
// Mask for flags preserved on initialization of a request
|
||||
const ULONG REQ_FLAGS_INIT_MASK = (req_in_use | req_internal | req_sys_trigger | req_ignore_perm | req_blr_version4);
|
||||
|
||||
/* Flags for req_view_flags */
|
||||
// Flags for req_view_flags
|
||||
enum {
|
||||
req_first_store_return = 0x1,
|
||||
req_first_modify_return = 0x2,
|
||||
@ -363,16 +364,16 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
/* Index lock block */
|
||||
// Index lock block
|
||||
|
||||
class IndexLock : public pool_alloc<type_idl>
|
||||
{
|
||||
public:
|
||||
IndexLock* idl_next; /* Next index lock block for relation */
|
||||
Lock* idl_lock; /* Lock block */
|
||||
jrd_rel* idl_relation; /* Parent relation */
|
||||
USHORT idl_id; /* Index id */
|
||||
USHORT idl_count; /* Use count */
|
||||
IndexLock* idl_next; // Next index lock block for relation
|
||||
Lock* idl_lock; // Lock block
|
||||
jrd_rel* idl_relation; // Parent relation
|
||||
USHORT idl_id; // Index id
|
||||
USHORT idl_count; // Use count
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user