mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 23:23:04 +01:00
Cleanup - switch from pointer arithmetics to sane way to get impure places
This commit is contained in:
parent
0de75b17e4
commit
5ac2130415
@ -313,7 +313,7 @@ ExprNode* AggNode::pass2(thread_db* tdbb, CompilerScratch* csb)
|
||||
|
||||
void AggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->vlux_count = 0;
|
||||
|
||||
if (distinct)
|
||||
@ -322,7 +322,7 @@ void AggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
Database* database = request->req_attachment->att_database;
|
||||
|
||||
impure_agg_sort* asbImpure = (impure_agg_sort*) ((SCHAR*) request + asb->nod_impure);
|
||||
impure_agg_sort* asbImpure = request->getImpure<impure_agg_sort>(asb->nod_impure);
|
||||
const sort_key_def* sortKey = asb->asb_key_desc;
|
||||
|
||||
// Get rid of the old sort areas if this request has been used already.
|
||||
@ -350,7 +350,7 @@ void AggNode::aggPass(thread_db* tdbb, jrd_req* request) const
|
||||
fb_assert(asb);
|
||||
|
||||
// "Put" the value to sort.
|
||||
impure_agg_sort* asbImpure = (impure_agg_sort*) ((SCHAR*) request + asb->nod_impure);
|
||||
impure_agg_sort* asbImpure = request->getImpure<impure_agg_sort>(asb->nod_impure);
|
||||
UCHAR* data;
|
||||
asbImpure->iasb_sort->put(tdbb, reinterpret_cast<ULONG**>(&data));
|
||||
|
||||
@ -386,7 +386,7 @@ void AggNode::aggFinish(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
if (asb)
|
||||
{
|
||||
impure_agg_sort* const asbImpure = (impure_agg_sort*) ((SCHAR*) request + asb->nod_impure);
|
||||
impure_agg_sort* const asbImpure = request->getImpure<impure_agg_sort>(asb->nod_impure);
|
||||
delete asbImpure->iasb_sort;
|
||||
asbImpure->iasb_sort = NULL;
|
||||
}
|
||||
@ -394,7 +394,7 @@ void AggNode::aggFinish(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
dsc* AggNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (impure->vlu_blob)
|
||||
{
|
||||
@ -404,7 +404,7 @@ dsc* AggNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
if (distinct)
|
||||
{
|
||||
impure_agg_sort* asbImpure = (impure_agg_sort*) ((SCHAR*) request + asb->nod_impure);
|
||||
impure_agg_sort* asbImpure = request->getImpure<impure_agg_sort>(asb->nod_impure);
|
||||
dsc* desc = &asb->asb_desc;
|
||||
|
||||
// Sort the values already "put" to sort.
|
||||
@ -578,7 +578,7 @@ void AvgAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (dialect1)
|
||||
{
|
||||
@ -595,7 +595,7 @@ void AvgAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
void AvgAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlux_count;
|
||||
|
||||
if (dialect1)
|
||||
@ -606,7 +606,7 @@ void AvgAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
|
||||
dsc* AvgAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (!impure->vlux_count)
|
||||
return NULL;
|
||||
@ -626,7 +626,7 @@ dsc* AvgAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
temp.makeDouble(&d);
|
||||
}
|
||||
|
||||
impure_value_ex* impureTemp = (impure_value_ex*) ((SCHAR*) request + tempImpure);
|
||||
impure_value_ex* impureTemp = request->getImpure<impure_value_ex>(tempImpure);
|
||||
EVL_make_value(tdbb, &temp, impureTemp);
|
||||
|
||||
return &impureTemp->vlu_desc;
|
||||
@ -696,14 +696,14 @@ void ListAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
// We don't know here what should be the sub-type and text-type.
|
||||
// Defer blob creation for when first record is found.
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->vlu_blob = NULL;
|
||||
impure->vlu_desc.dsc_dtype = 0;
|
||||
}
|
||||
|
||||
void ListAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (!impure->vlu_blob)
|
||||
{
|
||||
@ -740,7 +740,7 @@ void ListAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
|
||||
dsc* ListAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (distinct)
|
||||
{
|
||||
@ -819,19 +819,19 @@ void CountAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->make_long(0);
|
||||
}
|
||||
|
||||
void CountAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* /*desc*/) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlu_misc.vlu_long;
|
||||
}
|
||||
|
||||
dsc* CountAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (!impure->vlu_desc.dsc_dtype)
|
||||
return NULL;
|
||||
@ -1054,7 +1054,7 @@ void SumAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (dialect1)
|
||||
impure->make_long(0);
|
||||
@ -1068,7 +1068,7 @@ void SumAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
|
||||
void SumAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlux_count;
|
||||
|
||||
if (dialect1)
|
||||
@ -1079,7 +1079,7 @@ void SumAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
|
||||
dsc* SumAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (!impure->vlux_count)
|
||||
return NULL;
|
||||
@ -1137,13 +1137,13 @@ void MaxMinAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->vlu_desc.dsc_dtype = 0;
|
||||
}
|
||||
|
||||
void MaxMinAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
++impure->vlux_count;
|
||||
if (!impure->vlu_desc.dsc_dtype)
|
||||
@ -1160,7 +1160,7 @@ void MaxMinAggNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* desc) const
|
||||
|
||||
dsc* MaxMinAggNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
if (!impure->vlux_count)
|
||||
return NULL;
|
||||
|
@ -246,7 +246,7 @@ dsc* ConcatenateNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
if (request->req_flags & req_null)
|
||||
return NULL;
|
||||
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
dsc desc;
|
||||
|
||||
if (value1->dsc_dtype == dtype_dbkey && value2->dsc_dtype == dtype_dbkey)
|
||||
@ -787,7 +787,7 @@ dsc* SubstringSimilarNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
UCHAR* escapeStr;
|
||||
int escapeLen = MOV_make_string2(tdbb, escapeDesc, textType, &escapeStr, escapeBuffer);
|
||||
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
|
||||
AutoPtr<BaseSimilarToMatcher> autoEvaluator; // deallocate non-invariant evaluator
|
||||
BaseSimilarToMatcher* evaluator;
|
||||
@ -1010,7 +1010,7 @@ ExprNode* SysFuncCallNode::pass2(thread_db* tdbb, CompilerScratch* csb)
|
||||
|
||||
dsc* SysFuncCallNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
return function->evlFunc(tdbb, function, args, impure);
|
||||
}
|
||||
|
||||
@ -1275,7 +1275,7 @@ ExprNode* UdfCallNode::pass2(thread_db* tdbb, CompilerScratch* csb)
|
||||
|
||||
dsc* UdfCallNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
return function->execute(tdbb, args, impure);
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ InAutonomousTransactionNode* InAutonomousTransactionNode::pass2(thread_db* tdbb,
|
||||
jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
Jrd::Attachment* attachment = request->req_attachment;
|
||||
SLONG* savNumber = (SLONG*) ((char*) request + savNumberOffset);
|
||||
SLONG* savNumber = request->getImpure<SLONG>(savNumberOffset);
|
||||
|
||||
if (request->req_operation == jrd_req::req_evaluate)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ void DenseRankWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->make_int64(0, 0);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ void DenseRankWinNode::aggPass(thread_db* /*tdbb*/, jrd_req* /*request*/, dsc* /
|
||||
|
||||
dsc* DenseRankWinNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlu_misc.vlu_int64;
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
@ -179,25 +179,25 @@ void RankWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->make_int64(1, 0);
|
||||
impure->vlux_count = 0;
|
||||
}
|
||||
|
||||
void RankWinNode::aggPass(thread_db* tdbb, jrd_req* request, dsc* /*desc*/) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlux_count;
|
||||
}
|
||||
|
||||
dsc* RankWinNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
|
||||
dsc temp;
|
||||
temp.makeInt64(0, &impure->vlu_misc.vlu_int64);
|
||||
|
||||
impure_value_ex* impureTemp = (impure_value_ex*) ((SCHAR*) request + tempImpure);
|
||||
impure_value_ex* impureTemp = request->getImpure<impure_value_ex>(tempImpure);
|
||||
EVL_make_value(tdbb, &temp, impureTemp);
|
||||
|
||||
impure->vlu_misc.vlu_int64 += impure->vlux_count;
|
||||
@ -245,7 +245,7 @@ void RowNumberWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->make_int64(0, 0);
|
||||
}
|
||||
|
||||
@ -255,13 +255,13 @@ void RowNumberWinNode::aggPass(thread_db* /*tdbb*/, jrd_req* /*request*/, dsc* /
|
||||
|
||||
dsc* RowNumberWinNode::aggExecute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
|
||||
dsc* RowNumberWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* /*window*/) const
|
||||
{
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
++impure->vlu_misc.vlu_int64;
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
@ -306,7 +306,7 @@ void LagLeadWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
AggNode::aggInit(tdbb, request);
|
||||
|
||||
impure_value_ex* impure = (impure_value_ex*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(node->nod_impure);
|
||||
impure->make_int64(0, 0);
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ dsc* EVL_assign_to(thread_db* tdbb, jrd_nod* node)
|
||||
DEV_BLKCHK(node, type_nod);
|
||||
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
|
||||
// The only nodes that can be assigned to are: argument, field and variable.
|
||||
|
||||
@ -202,8 +202,8 @@ dsc* EVL_assign_to(thread_db* tdbb, jrd_nod* node)
|
||||
format = (Format*) message->nod_arg[e_msg_format];
|
||||
arg_number = (int) (IPTR) node->nod_arg[e_arg_number];
|
||||
desc = &format->fmt_desc[arg_number];
|
||||
impure->vlu_desc.dsc_address =
|
||||
(UCHAR *) request + message->nod_impure + (IPTR) desc->dsc_address;
|
||||
impure->vlu_desc.dsc_address = request->getImpure<UCHAR>(
|
||||
message->nod_impure + (IPTR) desc->dsc_address);
|
||||
impure->vlu_desc.dsc_dtype = desc->dsc_dtype;
|
||||
impure->vlu_desc.dsc_length = desc->dsc_length;
|
||||
impure->vlu_desc.dsc_scale = desc->dsc_scale;
|
||||
@ -244,7 +244,7 @@ dsc* EVL_assign_to(thread_db* tdbb, jrd_nod* node)
|
||||
case nod_variable:
|
||||
// Calculate descriptor
|
||||
node = node->nod_arg[e_var_variable];
|
||||
impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
return &impure->vlu_desc;
|
||||
|
||||
default:
|
||||
@ -301,7 +301,7 @@ RecordBitmap** EVL_bitmap(thread_db* tdbb, jrd_nod* node, RecordBitmap* bitmap_a
|
||||
|
||||
case nod_bit_dbkey:
|
||||
{
|
||||
impure_inversion* impure = (impure_inversion*) ((SCHAR*) tdbb->getRequest() + node->nod_impure);
|
||||
impure_inversion* impure = tdbb->getRequest()->getImpure<impure_inversion>(node->nod_impure);
|
||||
RecordBitmap::reset(impure->inv_bitmap);
|
||||
const dsc* desc = EVL_expr(tdbb, node->nod_arg[0]);
|
||||
|
||||
@ -325,11 +325,10 @@ RecordBitmap** EVL_bitmap(thread_db* tdbb, jrd_nod* node, RecordBitmap* bitmap_a
|
||||
|
||||
case nod_index:
|
||||
{
|
||||
impure_inversion* impure = (impure_inversion*) ((SCHAR*) tdbb->getRequest() + node->nod_impure);
|
||||
impure_inversion* impure = tdbb->getRequest()->getImpure<impure_inversion>(node->nod_impure);
|
||||
RecordBitmap::reset(impure->inv_bitmap);
|
||||
BTR_evaluate(tdbb,
|
||||
reinterpret_cast<IndexRetrieval*>(node->nod_arg[e_idx_retrieval]),
|
||||
&impure->inv_bitmap, bitmap_and);
|
||||
BTR_evaluate(tdbb, reinterpret_cast<IndexRetrieval*>(node->nod_arg[e_idx_retrieval]),
|
||||
&impure->inv_bitmap, bitmap_and);
|
||||
return &impure->inv_bitmap;
|
||||
}
|
||||
|
||||
@ -355,7 +354,7 @@ bool EVL_boolean(thread_db* tdbb, jrd_nod* node)
|
||||
dsc* desc[2];
|
||||
bool value;
|
||||
SSHORT comparison;
|
||||
impure_value* impure;
|
||||
impure_value* impure;
|
||||
bool computed_invariant = false;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -401,7 +400,7 @@ bool EVL_boolean(thread_db* tdbb, jrd_nod* node)
|
||||
// Currently only nod_like, nod_contains, nod_starts and nod_similar may be marked invariant
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure = reinterpret_cast<impure_value*>((SCHAR *)request + node->nod_impure);
|
||||
impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
|
||||
// Check that data type of operand is still the same.
|
||||
// It may change due to multiple formats present in stream
|
||||
@ -578,7 +577,7 @@ bool EVL_boolean(thread_db* tdbb, jrd_nod* node)
|
||||
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
invariant_flags = & impure->vlu_flags;
|
||||
if (*invariant_flags & VLU_computed)
|
||||
{
|
||||
@ -700,7 +699,7 @@ bool EVL_boolean(thread_db* tdbb, jrd_nod* node)
|
||||
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
invariant_flags = & impure->vlu_flags;
|
||||
if (*invariant_flags & VLU_computed)
|
||||
{
|
||||
@ -785,7 +784,7 @@ dsc* EVL_expr(thread_db* tdbb, jrd_nod* const node)
|
||||
JRD_reschedule(tdbb, 0, true);
|
||||
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
impure_value* const impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* const impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
request->req_flags &= ~req_null;
|
||||
|
||||
// Do a preliminary screen for either simple nodes or nodes that are special cased elsewhere
|
||||
@ -1057,7 +1056,7 @@ dsc* EVL_expr(thread_db* tdbb, jrd_nod* const node)
|
||||
{
|
||||
const jrd_nod* node2 = node->nod_arg[e_var_variable];
|
||||
|
||||
impure_value* impure2 = (impure_value*) ((SCHAR *) request + node2->nod_impure);
|
||||
impure_value* impure2 = request->getImpure<impure_value>(node2->nod_impure);
|
||||
if (impure2->vlu_desc.dsc_flags & DSC_null)
|
||||
request->req_flags |= req_null;
|
||||
|
||||
@ -2331,7 +2330,6 @@ static dsc* dbkey(thread_db* tdbb, const jrd_nod* node, impure_value* impure)
|
||||
// Get request, record parameter block, and relation for stream
|
||||
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
const record_param* rpb = &request->req_rpb[(int) (IPTR) node->nod_arg[0]];
|
||||
|
||||
const jrd_rel* relation = rpb->rpb_relation;
|
||||
@ -2393,7 +2391,7 @@ static dsc* eval_statistical(thread_db* tdbb, jrd_nod* node, impure_value* impur
|
||||
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
invariant_flags = & impure->vlu_flags;
|
||||
invariant_flags = &impure->vlu_flags;
|
||||
if (*invariant_flags & VLU_computed)
|
||||
{
|
||||
// An invariant node has already been computed.
|
||||
@ -2411,7 +2409,7 @@ static dsc* eval_statistical(thread_db* tdbb, jrd_nod* node, impure_value* impur
|
||||
impure->vlu_misc.vlu_int64 = 0;
|
||||
impure->vlu_desc.dsc_dtype = dtype_int64;
|
||||
impure->vlu_desc.dsc_length = sizeof(SINT64);
|
||||
impure->vlu_desc.dsc_address = (UCHAR *) & impure->vlu_misc.vlu_int64;
|
||||
impure->vlu_desc.dsc_address = (UCHAR*) &impure->vlu_misc.vlu_int64;
|
||||
impure->vlu_desc.dsc_scale = 0;
|
||||
}
|
||||
else
|
||||
@ -2419,7 +2417,7 @@ static dsc* eval_statistical(thread_db* tdbb, jrd_nod* node, impure_value* impur
|
||||
impure->vlu_misc.vlu_long = 0;
|
||||
impure->vlu_desc.dsc_dtype = dtype_long;
|
||||
impure->vlu_desc.dsc_length = sizeof(SLONG);
|
||||
impure->vlu_desc.dsc_address = (UCHAR *) & impure->vlu_misc.vlu_long;
|
||||
impure->vlu_desc.dsc_address = (UCHAR*) &impure->vlu_misc.vlu_long;
|
||||
}
|
||||
|
||||
Cursor* const rsb = (Cursor*) node->nod_arg[e_stat_rsb];
|
||||
@ -2753,7 +2751,7 @@ static dsc* extract(thread_db* tdbb, jrd_nod* node, impure_value* impure)
|
||||
part = 0;
|
||||
}
|
||||
|
||||
*(USHORT *) impure->vlu_desc.dsc_address = part;
|
||||
*(USHORT*) impure->vlu_desc.dsc_address = part;
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
|
||||
@ -3469,8 +3467,6 @@ static dsc* record_version(thread_db* tdbb, const jrd_nod* node, impure_value* i
|
||||
// Get request, record parameter block for stream
|
||||
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
// Already set by the caller
|
||||
//impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
const record_param* rpb = &request->req_rpb[(int) (IPTR) node->nod_arg[0]];
|
||||
|
||||
/* If the current transaction has updated the record, the record version
|
||||
@ -3498,11 +3494,11 @@ static dsc* record_version(thread_db* tdbb, const jrd_nod* node, impure_value* i
|
||||
|
||||
// Initialize descriptor
|
||||
|
||||
impure->vlu_misc.vlu_long = rpb->rpb_transaction_nr;
|
||||
impure->vlu_desc.dsc_address = (UCHAR *) & impure->vlu_misc.vlu_long;
|
||||
impure->vlu_desc.dsc_dtype = dtype_text;
|
||||
impure->vlu_desc.dsc_length = 4;
|
||||
impure->vlu_desc.dsc_ttype() = ttype_binary;
|
||||
impure->vlu_misc.vlu_long = rpb->rpb_transaction_nr;
|
||||
impure->vlu_desc.dsc_address = (UCHAR *) &impure->vlu_misc.vlu_long;
|
||||
impure->vlu_desc.dsc_dtype = dtype_text;
|
||||
impure->vlu_desc.dsc_length = 4;
|
||||
impure->vlu_desc.dsc_ttype() = ttype_binary;
|
||||
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
@ -3751,7 +3747,7 @@ static bool string_boolean(thread_db* tdbb, jrd_nod* node, dsc* desc1,
|
||||
{
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
impure->vlu_flags |= VLU_computed;
|
||||
impure->vlu_flags |= VLU_null;
|
||||
}
|
||||
@ -3784,7 +3780,7 @@ static bool string_boolean(thread_db* tdbb, jrd_nod* node, dsc* desc1,
|
||||
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
|
||||
if (!(impure->vlu_flags & VLU_computed))
|
||||
{
|
||||
@ -3839,7 +3835,7 @@ static bool string_boolean(thread_db* tdbb, jrd_nod* node, dsc* desc1,
|
||||
PatternMatcher* evaluator;
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
if (!(impure->vlu_flags & VLU_computed))
|
||||
{
|
||||
delete impure->vlu_misc.vlu_invariant;
|
||||
@ -3920,7 +3916,7 @@ static bool string_function(thread_db* tdbb,
|
||||
{
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
PatternMatcher* evaluator;
|
||||
if (!(impure->vlu_flags & VLU_computed))
|
||||
{
|
||||
@ -3972,7 +3968,7 @@ static bool string_function(thread_db* tdbb,
|
||||
{
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
impure->vlu_flags |= VLU_computed;
|
||||
impure->vlu_flags |= VLU_null;
|
||||
}
|
||||
@ -3999,7 +3995,7 @@ static bool string_function(thread_db* tdbb,
|
||||
|
||||
if (node->nod_flags & nod_invariant)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(node->nod_impure);
|
||||
PatternMatcher* evaluator;
|
||||
|
||||
if (!(impure->vlu_flags & VLU_computed))
|
||||
@ -4118,7 +4114,7 @@ static dsc* string_length(thread_db* tdbb, jrd_nod* node, impure_value* impure)
|
||||
length = 0;
|
||||
}
|
||||
|
||||
*(ULONG*)impure->vlu_desc.dsc_address = length;
|
||||
*(ULONG*) impure->vlu_desc.dsc_address = length;
|
||||
|
||||
BLB_close(tdbb, blob);
|
||||
|
||||
@ -4161,7 +4157,7 @@ static dsc* string_length(thread_db* tdbb, jrd_nod* node, impure_value* impure)
|
||||
length = 0;
|
||||
}
|
||||
|
||||
*(ULONG *) impure->vlu_desc.dsc_address = length;
|
||||
*(ULONG*) impure->vlu_desc.dsc_address = length;
|
||||
return &impure->vlu_desc;
|
||||
}
|
||||
|
||||
|
@ -324,8 +324,8 @@ void EXE_assignment(thread_db* tdbb, jrd_nod* to, dsc* from_desc, bool from_null
|
||||
reinterpret_cast<const ItemInfo*>(to->nod_arg[e_var_info]),
|
||||
from_desc, null == -1);
|
||||
}
|
||||
impure_flags = &((impure_value*) ((SCHAR *) request +
|
||||
to->nod_arg[e_var_variable]->nod_impure))->vlu_flags;
|
||||
impure_flags = &request->getImpure<impure_value>(
|
||||
to->nod_arg[e_var_variable]->nod_impure)->vlu_flags;
|
||||
break;
|
||||
|
||||
case nod_argument:
|
||||
@ -337,7 +337,7 @@ void EXE_assignment(thread_db* tdbb, jrd_nod* to, dsc* from_desc, bool from_null
|
||||
reinterpret_cast<const ItemInfo*>(to->nod_arg[e_arg_info]),
|
||||
from_desc, null == -1);
|
||||
}
|
||||
impure_flags = (USHORT*) ((UCHAR *) request +
|
||||
impure_flags = request->getImpure<USHORT>(
|
||||
(IPTR) to->nod_arg[e_arg_message]->nod_arg[e_msg_impure_flags] +
|
||||
(sizeof(USHORT) * (IPTR) to->nod_arg[e_arg_number]));
|
||||
break;
|
||||
@ -788,7 +788,7 @@ void EXE_receive(thread_db* tdbb,
|
||||
if (length != format->fmt_length)
|
||||
ERR_post(Arg::Gds(isc_port_len) << Arg::Num(length) << Arg::Num(format->fmt_length));
|
||||
|
||||
memcpy(buffer, (SCHAR*) request + message->nod_impure, length);
|
||||
memcpy(buffer, request->getImpure<UCHAR>(message->nod_impure), length);
|
||||
|
||||
// ASF: temporary blobs returned to the client should not be released
|
||||
// with the request, but in the transaction end.
|
||||
@ -915,7 +915,7 @@ void EXE_send(thread_db* tdbb, jrd_req* request, USHORT msg, USHORT length, cons
|
||||
ERR_post(Arg::Gds(isc_port_len) << Arg::Num(length) << Arg::Num(format->fmt_length));
|
||||
}
|
||||
|
||||
memcpy((SCHAR*) request + message->nod_impure, buffer, length);
|
||||
memcpy(request->getImpure<UCHAR>(message->nod_impure), buffer, length);
|
||||
|
||||
for (USHORT i = 0; i < format->fmt_count; ++i)
|
||||
{
|
||||
@ -924,7 +924,8 @@ void EXE_send(thread_db* tdbb, jrd_req* request, USHORT msg, USHORT length, cons
|
||||
// ASF: I'll not test for dtype_cstring because usage is only internal
|
||||
if (desc->dsc_dtype == dtype_text || desc->dsc_dtype == dtype_varying)
|
||||
{
|
||||
const UCHAR* p = (UCHAR*)request + message->nod_impure + (ULONG)(IPTR)desc->dsc_address;
|
||||
const UCHAR* p = request->getImpure<UCHAR>(message->nod_impure) +
|
||||
(ULONG)(IPTR) desc->dsc_address;
|
||||
USHORT len;
|
||||
|
||||
switch (desc->dsc_dtype)
|
||||
@ -948,8 +949,8 @@ void EXE_send(thread_db* tdbb, jrd_req* request, USHORT msg, USHORT length, cons
|
||||
{
|
||||
if (desc->getCharSet() != CS_NONE && desc->getCharSet() != CS_BINARY)
|
||||
{
|
||||
const Jrd::bid* bid = (Jrd::bid*) ((UCHAR*)request +
|
||||
message->nod_impure + (ULONG)(IPTR)desc->dsc_address);
|
||||
const Jrd::bid* bid = request->getImpure<Jrd::bid>(
|
||||
message->nod_impure + (ULONG)(IPTR) desc->dsc_address);
|
||||
|
||||
if (!bid->isEmpty())
|
||||
{
|
||||
@ -1039,7 +1040,7 @@ void EXE_start(thread_db* tdbb, jrd_req* request, jrd_tra* transaction)
|
||||
jrd_nod **ptr, **end;
|
||||
for (ptr = request->req_invariants.begin(), end = request->req_invariants.end(); ptr < end; ++ptr)
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) request + (*ptr)->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>((*ptr)->nod_impure);
|
||||
impure->vlu_flags = 0;
|
||||
}
|
||||
|
||||
@ -1108,7 +1109,7 @@ void EXE_unwind(thread_db* tdbb, jrd_req* request)
|
||||
for (size_t i = 0; i < request->req_exec_sta.getCount(); ++i)
|
||||
{
|
||||
jrd_nod* node = request->req_exec_sta[i];
|
||||
ExecuteStatement* impure =(ExecuteStatement*) ((char*) request + node->nod_impure);
|
||||
ExecuteStatement* impure = request->getImpure<ExecuteStatement>(node->nod_impure);
|
||||
impure->close(tdbb);
|
||||
}
|
||||
|
||||
@ -1483,7 +1484,7 @@ static void execute_procedure(thread_db* tdbb, jrd_nod* node)
|
||||
{
|
||||
const Format* format = (Format*) in_message->nod_arg[e_msg_format];
|
||||
in_msg_length = format->fmt_length;
|
||||
in_msg = (UCHAR*) request + in_message->nod_impure;
|
||||
in_msg = request->getImpure<UCHAR>(in_message->nod_impure);
|
||||
}
|
||||
|
||||
const Format* format = NULL;
|
||||
@ -1494,7 +1495,7 @@ static void execute_procedure(thread_db* tdbb, jrd_nod* node)
|
||||
{
|
||||
format = (Format*) out_message->nod_arg[e_msg_format];
|
||||
out_msg_length = format->fmt_length;
|
||||
out_msg = (UCHAR*) request + out_message->nod_impure;
|
||||
out_msg = request->getImpure<UCHAR>(out_message->nod_impure);
|
||||
}
|
||||
|
||||
jrd_req* proc_request = EXE_find_request(tdbb, procedure->getRequest(), false);
|
||||
@ -1585,7 +1586,7 @@ static jrd_nod* execute_statement(thread_db* tdbb, jrd_req* request, jrd_nod* no
|
||||
SET_TDBB(tdbb);
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
EDS::Statement** stmt_ptr = (EDS::Statement**) ((char*) request + node->nod_impure);
|
||||
EDS::Statement** stmt_ptr = request->getImpure<EDS::Statement*>(node->nod_impure);
|
||||
EDS::Statement* stmt = *stmt_ptr;
|
||||
|
||||
const int inputs = (SSHORT)(IPTR) node->nod_arg[node->nod_count + e_exec_stmt_extra_inputs];
|
||||
@ -1971,7 +1972,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
fb_assert(outMsgNode->nod_type == nod_message);
|
||||
|
||||
const Format* outFormat = (Format*) outMsgNode->nod_arg[e_msg_format];
|
||||
UCHAR* outMsg = (UCHAR*) request + outMsgNode->nod_impure;
|
||||
UCHAR* outMsg = request->getImpure<UCHAR>(outMsgNode->nod_impure);
|
||||
|
||||
if (!request->resultSet)
|
||||
{
|
||||
@ -1987,12 +1988,12 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
const Format* format = (Format*) inMsgNode->nod_arg[e_msg_format];
|
||||
|
||||
// clear the flags from the input message
|
||||
USHORT* impure_flags = (USHORT*) ((UCHAR*) request +
|
||||
USHORT* impure_flags = request->getImpure<USHORT>(
|
||||
(IPTR) request->req_message->nod_arg[e_msg_impure_flags]);
|
||||
memset(impure_flags, 0, sizeof(USHORT) * format->fmt_count);
|
||||
|
||||
// clear the flags from the output message
|
||||
impure_flags = (USHORT*) ((UCHAR*) request +
|
||||
impure_flags = request->getImpure<USHORT>(
|
||||
(IPTR) outMsgNode->nod_arg[e_msg_impure_flags]);
|
||||
memset(impure_flags, 0, sizeof(USHORT) * outFormat->fmt_count);
|
||||
|
||||
@ -2002,7 +2003,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
if (!request->inputParams)
|
||||
{
|
||||
UCHAR* inMsg = (UCHAR*) request + request->req_message->nod_impure;
|
||||
UCHAR* inMsg = request->getImpure<UCHAR>(request->req_message->nod_impure);
|
||||
|
||||
request->inputParams = FB_NEW(*request->req_pool) ValuesImpl(
|
||||
*request->req_pool, format, inMsg,
|
||||
@ -2079,7 +2080,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
case nod_dcl_variable:
|
||||
{
|
||||
impure_value* variable = (impure_value*) ((SCHAR*) request + node->nod_impure);
|
||||
impure_value* variable = request->getImpure<impure_value>(node->nod_impure);
|
||||
variable->vlu_desc = *(DSC*) (node->nod_arg + e_dcl_desc);
|
||||
variable->vlu_desc.dsc_flags = 0;
|
||||
variable->vlu_desc.dsc_address = (UCHAR*) &variable->vlu_misc;
|
||||
@ -2319,7 +2320,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
VIO_start_save_point(tdbb, transaction);
|
||||
const Savepoint* save_point = transaction->tra_save_point;
|
||||
count = save_point->sav_number;
|
||||
memcpy((SCHAR*) request + node->nod_impure, &count, sizeof(SLONG));
|
||||
memcpy(request->getImpure<SLONG>(node->nod_impure), &count, sizeof(SLONG));
|
||||
}
|
||||
node = node->nod_arg[e_blk_action];
|
||||
break;
|
||||
@ -2336,7 +2337,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
if (transaction != sysTransaction)
|
||||
{
|
||||
memcpy(&count, (SCHAR*) request + node->nod_impure, sizeof(SLONG));
|
||||
memcpy(&count, request->getImpure<SLONG>(node->nod_impure), sizeof(SLONG));
|
||||
|
||||
for (const Savepoint* save_point = transaction->tra_save_point;
|
||||
save_point && count <= save_point->sav_number;
|
||||
@ -2351,7 +2352,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
}
|
||||
if (transaction != sysTransaction)
|
||||
{
|
||||
memcpy(&count, (SCHAR*) request + node->nod_impure, sizeof(SLONG));
|
||||
memcpy(&count, request->getImpure<SLONG>(node->nod_impure), sizeof(SLONG));
|
||||
// Since there occurred an error (req_unwind), undo all savepoints
|
||||
// up to, but not including, the savepoint of this block. The
|
||||
// savepoint of this block will be dealt with below.
|
||||
@ -2460,7 +2461,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
case jrd_req::req_return:
|
||||
if (transaction != sysTransaction)
|
||||
{
|
||||
memcpy(&count, (SCHAR*) request + node->nod_impure, sizeof(SLONG));
|
||||
memcpy(&count, request->getImpure<SLONG>(node->nod_impure), sizeof(SLONG));
|
||||
|
||||
for (const Savepoint* save_point = transaction->tra_save_point;
|
||||
save_point && count <= save_point->sav_number;
|
||||
@ -2527,7 +2528,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
case nod_list:
|
||||
{
|
||||
impure_state* impure = (impure_state*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_state* impure = request->getImpure<impure_state>(node->nod_impure);
|
||||
switch (request->req_operation)
|
||||
{
|
||||
case jrd_req::req_evaluate:
|
||||
@ -2578,7 +2579,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
case nod_modify:
|
||||
{
|
||||
impure_state* impure = (impure_state*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_state* impure = request->getImpure<impure_state>(node->nod_impure);
|
||||
if (request->req_operation == jrd_req::req_unwind) {
|
||||
node = node->nod_parent;
|
||||
}
|
||||
@ -2641,7 +2642,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
case nod_exec_into:
|
||||
{
|
||||
ExecuteStatement* impure = (ExecuteStatement*) ((SCHAR*) request + node->nod_impure);
|
||||
ExecuteStatement* impure = request->getImpure<ExecuteStatement>(node->nod_impure);
|
||||
|
||||
switch (request->req_operation)
|
||||
{
|
||||
@ -2673,8 +2674,8 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
if (request->req_operation == jrd_req::req_evaluate)
|
||||
{
|
||||
const Format* format = (Format*) node->nod_arg[e_msg_format];
|
||||
USHORT* impure_flags =
|
||||
(USHORT*) ((UCHAR*) request + (IPTR) node->nod_arg[e_msg_impure_flags]);
|
||||
USHORT* impure_flags = request->getImpure<USHORT>(
|
||||
(IPTR) node->nod_arg[e_msg_impure_flags]);
|
||||
memset(impure_flags, 0, sizeof(USHORT) * format->fmt_count);
|
||||
request->req_operation = jrd_req::req_return;
|
||||
}
|
||||
@ -2691,7 +2692,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
|
||||
case nod_store:
|
||||
{
|
||||
impure_state* impure = (impure_state*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_state* impure = request->getImpure<impure_state>(node->nod_impure);
|
||||
if ((request->req_operation == jrd_req::req_return) &&
|
||||
(!impure->sta_state) && (node->nod_arg[e_sto_sub_store]))
|
||||
{
|
||||
@ -2768,7 +2769,7 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
if (itemInfo)
|
||||
{
|
||||
jrd_nod* var_node = node->nod_arg[e_init_var_variable];
|
||||
DSC* to_desc = &((impure_value*) ((SCHAR *) request + var_node->nod_impure))->vlu_desc;
|
||||
DSC* to_desc = &request->getImpure<impure_value>(var_node->nod_impure)->vlu_desc;
|
||||
|
||||
to_desc->dsc_flags |= DSC_null;
|
||||
|
||||
@ -2967,7 +2968,7 @@ static jrd_nod* modify(thread_db* tdbb, jrd_nod* node, SSHORT which_trig)
|
||||
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
jrd_tra* transaction = request->req_transaction;
|
||||
impure_state* impure = (impure_state*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_state* impure = request->getImpure<impure_state>(node->nod_impure);
|
||||
|
||||
const SSHORT org_stream = (USHORT)(IPTR) node->nod_arg[e_mod_org_stream];
|
||||
record_param* org_rpb = &request->req_rpb[org_stream];
|
||||
@ -3423,7 +3424,7 @@ static jrd_nod* store(thread_db* tdbb, jrd_nod* node, SSHORT which_trig)
|
||||
|
||||
jrd_req* request = tdbb->getRequest();
|
||||
jrd_tra* transaction = request->req_transaction;
|
||||
impure_state* impure = (impure_state*) ((SCHAR *) request + node->nod_impure);
|
||||
impure_state* impure = request->getImpure<impure_state>(node->nod_impure);
|
||||
SSHORT stream = (USHORT)(IPTR) node->nod_arg[e_sto_relation]->nod_arg[e_rel_stream];
|
||||
record_param* rpb = &request->req_rpb[stream];
|
||||
jrd_rel* relation = rpb->rpb_relation;
|
||||
|
@ -3852,7 +3852,7 @@ ISC_STATUS GDS_TRANSACT_REQUEST(ISC_STATUS* user_status,
|
||||
Arg::Num(len));
|
||||
}
|
||||
|
||||
memcpy((SCHAR*) request + in_message->nod_impure, in_msg, in_msg_length);
|
||||
memcpy(request->getImpure<UCHAR>(in_message->nod_impure), in_msg, in_msg_length);
|
||||
}
|
||||
|
||||
EXE_start(tdbb, request, transaction);
|
||||
@ -3873,7 +3873,7 @@ ISC_STATUS GDS_TRANSACT_REQUEST(ISC_STATUS* user_status,
|
||||
}
|
||||
|
||||
if (out_msg_length) {
|
||||
memcpy(out_msg, (SCHAR*) request + out_message->nod_impure, out_msg_length);
|
||||
memcpy(out_msg, request->getImpure<UCHAR>(out_message->nod_impure), out_msg_length);
|
||||
}
|
||||
|
||||
check_autocommit(request, tdbb);
|
||||
|
@ -68,7 +68,7 @@ AggregatedStream::AggregatedStream(CompilerScratch* csb, UCHAR stream, jrd_nod*
|
||||
void AggregatedStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -85,7 +85,7 @@ void AggregatedStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -99,7 +99,7 @@ bool AggregatedStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
@ -318,7 +318,7 @@ AggregatedStream::State AggregatedStream::evaluateGroup(thread_db* tdbb, Aggrega
|
||||
for (ptr = m_group->nod_arg, end = ptr + m_group->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
jrd_nod* from = *ptr;
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + from->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(from->nod_impure);
|
||||
desc = EVL_expr(tdbb, from);
|
||||
if (request->req_flags & req_null)
|
||||
impure->vlu_desc.dsc_address = NULL;
|
||||
@ -332,7 +332,7 @@ AggregatedStream::State AggregatedStream::evaluateGroup(thread_db* tdbb, Aggrega
|
||||
for (ptr = m_order->nod_arg, end = ptr + m_order->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
jrd_nod* from = *ptr;
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + from->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(from->nod_impure);
|
||||
desc = EVL_expr(tdbb, from);
|
||||
if (request->req_flags & req_null)
|
||||
impure->vlu_desc.dsc_address = NULL;
|
||||
@ -361,7 +361,7 @@ AggregatedStream::State AggregatedStream::evaluateGroup(thread_db* tdbb, Aggrega
|
||||
for (ptr = m_group->nod_arg, end = ptr + m_group->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
jrd_nod* from = *ptr;
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + from->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(from->nod_impure);
|
||||
|
||||
if (impure->vlu_desc.dsc_address)
|
||||
EVL_make_value(tdbb, &impure->vlu_desc, &vtemp);
|
||||
@ -398,7 +398,7 @@ AggregatedStream::State AggregatedStream::evaluateGroup(thread_db* tdbb, Aggrega
|
||||
for (ptr = m_order->nod_arg, end = ptr + m_order->nod_count; ptr < end; ptr++)
|
||||
{
|
||||
jrd_nod* from = *ptr;
|
||||
impure_value* impure = (impure_value*) ((SCHAR*) request + from->nod_impure);
|
||||
impure_value* impure = request->getImpure<impure_value>(from->nod_impure);
|
||||
|
||||
if (impure->vlu_desc.dsc_address)
|
||||
EVL_make_value(tdbb, &impure->vlu_desc, &vtemp);
|
||||
|
@ -48,7 +48,7 @@ void BitmapTableScan::open(thread_db* tdbb)
|
||||
{
|
||||
//Database* const dbb = tdbb->getDatabase();
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
impure->irsb_bitmap = EVL_bitmap(tdbb, m_inversion, NULL);
|
||||
@ -65,7 +65,7 @@ void BitmapTableScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -83,7 +83,7 @@ bool BitmapTableScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ BufferedStream::BufferedStream(CompilerScratch* csb, RecordSource* next)
|
||||
void BufferedStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open | irsb_mustread;
|
||||
|
||||
@ -128,7 +128,7 @@ void BufferedStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -144,7 +144,7 @@ void BufferedStream::close(thread_db* tdbb)
|
||||
bool BufferedStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
@ -332,7 +332,7 @@ void BufferedStream::restoreRecords(thread_db* tdbb)
|
||||
void BufferedStream::locate(thread_db* tdbb, FB_UINT64 position)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
// If we haven't fetched and cached the underlying stream completely, do it now
|
||||
if (impure->irsb_flags & irsb_mustread)
|
||||
@ -347,6 +347,6 @@ void BufferedStream::locate(thread_db* tdbb, FB_UINT64 position)
|
||||
|
||||
FB_UINT64 BufferedStream::getCount(jrd_req* request) const
|
||||
{
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
return impure->irsb_buffer ? impure->irsb_buffer->getCount() : 0;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ Cursor::Cursor(CompilerScratch* csb, RecordSource* rsb,
|
||||
void Cursor::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_active = true;
|
||||
impure->irsb_state = BOS;
|
||||
@ -58,7 +58,7 @@ void Cursor::open(thread_db* tdbb)
|
||||
{
|
||||
for (const SLONG* iter = m_invariants->begin(); iter < m_invariants->end(); iter++)
|
||||
{
|
||||
impure_value* const invariant_impure = (impure_value*) ((SCHAR*) request + *iter);
|
||||
impure_value* const invariant_impure = request->getImpure<impure_value>(*iter);
|
||||
invariant_impure->vlu_flags = 0;
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ void Cursor::open(thread_db* tdbb)
|
||||
void Cursor::close(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_active)
|
||||
{
|
||||
@ -86,7 +86,7 @@ bool Cursor::fetchNext(thread_db* tdbb)
|
||||
}
|
||||
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!impure->irsb_active)
|
||||
{
|
||||
@ -149,7 +149,7 @@ bool Cursor::fetchPrior(thread_db* tdbb)
|
||||
}
|
||||
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!impure->irsb_active)
|
||||
{
|
||||
@ -224,7 +224,7 @@ bool Cursor::fetchAbsolute(thread_db* tdbb, SINT64 offset)
|
||||
}
|
||||
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!impure->irsb_active)
|
||||
{
|
||||
@ -269,7 +269,7 @@ bool Cursor::fetchRelative(thread_db* tdbb, SINT64 offset)
|
||||
}
|
||||
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!impure->irsb_active)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ void ExternalTableScan::open(thread_db* tdbb)
|
||||
{
|
||||
Database* const dbb = tdbb->getDatabase();
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -80,7 +80,7 @@ void ExternalTableScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -92,7 +92,7 @@ bool ExternalTableScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ FilteredStream::FilteredStream(CompilerScratch* csb, RecordSource* next, jrd_nod
|
||||
void FilteredStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -60,7 +60,7 @@ void FilteredStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -73,7 +73,7 @@ void FilteredStream::close(thread_db* tdbb)
|
||||
bool FilteredStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ FirstRowsStream::FirstRowsStream(CompilerScratch* csb, RecordSource* next, jrd_n
|
||||
void FirstRowsStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = 0;
|
||||
|
||||
@ -74,7 +74,7 @@ void FirstRowsStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -87,7 +87,7 @@ void FirstRowsStream::close(thread_db* tdbb)
|
||||
bool FirstRowsStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ FullOuterJoin::FullOuterJoin(CompilerScratch* csb, RecordSource* arg1, RecordSou
|
||||
void FullOuterJoin::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open | irsb_first;
|
||||
|
||||
@ -62,7 +62,7 @@ void FullOuterJoin::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -82,7 +82,7 @@ void FullOuterJoin::close(thread_db* tdbb)
|
||||
bool FullOuterJoin::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ void FullTableScan::open(thread_db* tdbb)
|
||||
Database* const dbb = tdbb->getDatabase();
|
||||
Attachment* const attachment = tdbb->getAttachment();
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -90,7 +90,7 @@ void FullTableScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -109,7 +109,7 @@ bool FullTableScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ HashJoin::HashJoin(CompilerScratch* csb, size_t count,
|
||||
void HashJoin::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open | irsb_mustread;
|
||||
|
||||
@ -208,7 +208,7 @@ void HashJoin::open(thread_db* tdbb)
|
||||
void HashJoin::close(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
@ -231,7 +231,7 @@ void HashJoin::close(thread_db* tdbb)
|
||||
bool HashJoin::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ void IndexTableScan::open(thread_db* tdbb)
|
||||
{
|
||||
//Database* const dbb = tdbb->getDatabase();
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_first | irsb_open;
|
||||
|
||||
@ -77,7 +77,7 @@ void IndexTableScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -110,7 +110,7 @@ bool IndexTableScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ LockedStream::LockedStream(CompilerScratch* csb, RecordSource* next)
|
||||
void LockedStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -59,7 +59,7 @@ void LockedStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -72,7 +72,7 @@ void LockedStream::close(thread_db* tdbb)
|
||||
bool LockedStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ MergeJoin::MergeJoin(CompilerScratch* csb, size_t count,
|
||||
void MergeJoin::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -100,7 +100,7 @@ void MergeJoin::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -130,7 +130,7 @@ void MergeJoin::close(thread_db* tdbb)
|
||||
bool MergeJoin::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
@ -488,7 +488,7 @@ UCHAR* MergeJoin::getData(thread_db* tdbb, MergeFile* mfb, SLONG record)
|
||||
SLONG MergeJoin::getRecord(thread_db* tdbb, size_t index)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
SortedStream* const sort_rsb = m_args[index];
|
||||
Impure::irsb_mrg_repeat* const tail = &impure->irsb_mrg_rpt[index];
|
||||
@ -528,7 +528,7 @@ SLONG MergeJoin::getRecord(thread_db* tdbb, size_t index)
|
||||
bool MergeJoin::fetchRecord(thread_db* tdbb, size_t index)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
Impure::irsb_mrg_repeat* tail = &impure->irsb_mrg_rpt[index];
|
||||
|
||||
const SSHORT m = tail->irsb_mrg_order;
|
||||
|
@ -65,7 +65,7 @@ NestedLoopJoin::NestedLoopJoin(CompilerScratch* csb, RecordSource* outer, Record
|
||||
void NestedLoopJoin::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open | irsb_first | irsb_mustread;
|
||||
}
|
||||
@ -76,7 +76,7 @@ void NestedLoopJoin::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -92,7 +92,7 @@ void NestedLoopJoin::close(thread_db* tdbb)
|
||||
bool NestedLoopJoin::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ ProcedureScan::ProcedureScan(CompilerScratch* csb, const Firebird::string& name,
|
||||
void ProcedureScan::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -79,7 +79,7 @@ void ProcedureScan::open(thread_db* tdbb)
|
||||
request->req_operation = saved_state;
|
||||
const Format* const format = (Format*) m_message->nod_arg[e_msg_format];
|
||||
iml = format->fmt_length;
|
||||
im = (UCHAR*) request + m_message->nod_impure;
|
||||
im = request->getImpure<UCHAR>(m_message->nod_impure);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -122,7 +122,7 @@ void ProcedureScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -147,7 +147,7 @@ bool ProcedureScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define JRD_RECORD_SOURCE_H
|
||||
|
||||
#include "../common/classes/array.h"
|
||||
#include "../jrd/req.h"
|
||||
#include "../jrd/rse.h"
|
||||
#include "../jrd/inf_pub.h"
|
||||
|
||||
@ -716,7 +717,7 @@ namespace Jrd
|
||||
|
||||
FB_UINT64 getPosition(jrd_req* request) const
|
||||
{
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
return impure->irsb_position;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ RecursiveStream::RecursiveStream(CompilerScratch* csb, UCHAR stream, UCHAR mapSt
|
||||
void RecursiveStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -99,8 +99,8 @@ void RecursiveStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const saveImpure = (Impure*) ((UCHAR*) request + m_saveOffset);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
Impure* const saveImpure = request->getImpure<Impure>(m_saveOffset);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -124,8 +124,8 @@ void RecursiveStream::close(thread_db* tdbb)
|
||||
bool RecursiveStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const saveImpure = (Impure*) ((UCHAR*) request + m_saveOffset);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
Impure* const saveImpure = request->getImpure<Impure>(m_saveOffset);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ SingularStream::SingularStream(CompilerScratch* csb, RecordSource* next)
|
||||
void SingularStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -56,7 +56,7 @@ void SingularStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -69,7 +69,7 @@ void SingularStream::close(thread_db* tdbb)
|
||||
bool SingularStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ SkipRowsStream::SkipRowsStream(CompilerScratch* csb, RecordSource* next, jrd_nod
|
||||
void SkipRowsStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -71,7 +71,7 @@ void SkipRowsStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -84,7 +84,7 @@ void SkipRowsStream::close(thread_db* tdbb)
|
||||
bool SkipRowsStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ SortedStream::SortedStream(CompilerScratch* csb, RecordSource* next, SortMap* ma
|
||||
void SortedStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -68,7 +68,7 @@ void SortedStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -84,7 +84,7 @@ void SortedStream::close(thread_db* tdbb)
|
||||
bool SortedStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
@ -295,7 +295,7 @@ Sort* SortedStream::init(thread_db* tdbb)
|
||||
UCHAR* SortedStream::getData(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
ULONG* data = NULL;
|
||||
impure->irsb_sort->get(tdbb, &data);
|
||||
|
@ -69,7 +69,7 @@ Union::Union(CompilerScratch* csb, UCHAR stream,
|
||||
void Union::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -93,7 +93,7 @@ void Union::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -109,7 +109,7 @@ void Union::close(thread_db* tdbb)
|
||||
bool Union::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
@ -145,7 +145,7 @@ bool Union::getRecord(thread_db* tdbb)
|
||||
bool Union::refetchRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_count >= m_args.getCount())
|
||||
{
|
||||
@ -158,7 +158,7 @@ bool Union::refetchRecord(thread_db* tdbb)
|
||||
bool Union::lockRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_count >= m_args.getCount())
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ VirtualTableScan::VirtualTableScan(CompilerScratch* csb, const string& name, UCH
|
||||
void VirtualTableScan::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -79,7 +79,7 @@ void VirtualTableScan::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -92,7 +92,7 @@ bool VirtualTableScan::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
record_param* const rpb = &request->req_rpb[m_stream];
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ namespace
|
||||
void locate(thread_db* tdbb, FB_UINT64 position)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
impure->irsb_position = position;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ namespace
|
||||
|
||||
FB_UINT64 getPosition(jrd_req* request) const
|
||||
{
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
return impure->irsb_position;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ namespace
|
||||
void BufferedStreamWindow::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
impure->irsb_position = 0;
|
||||
@ -157,7 +157,7 @@ namespace
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
impure->irsb_flags &= ~irsb_open;
|
||||
@ -166,7 +166,7 @@ namespace
|
||||
bool BufferedStreamWindow::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
return false;
|
||||
@ -241,7 +241,7 @@ namespace
|
||||
void WindowJoin::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -264,7 +264,7 @@ namespace
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -278,7 +278,7 @@ namespace
|
||||
bool WindowJoin::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
return false;
|
||||
@ -533,7 +533,7 @@ WindowedStream::WindowedStream(CompilerScratch* csb, const jrd_nod* nodWindows,
|
||||
void WindowedStream::open(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
impure->irsb_flags = irsb_open;
|
||||
|
||||
@ -547,7 +547,7 @@ void WindowedStream::close(thread_db* tdbb)
|
||||
|
||||
invalidateRecords(request);
|
||||
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (impure->irsb_flags & irsb_open)
|
||||
{
|
||||
@ -560,7 +560,7 @@ void WindowedStream::close(thread_db* tdbb)
|
||||
bool WindowedStream::getRecord(thread_db* tdbb)
|
||||
{
|
||||
jrd_req* const request = tdbb->getRequest();
|
||||
Impure* const impure = (Impure*) ((UCHAR*) request + m_impure);
|
||||
Impure* const impure = request->getImpure<Impure>(m_impure);
|
||||
|
||||
if (!(impure->irsb_flags & irsb_open))
|
||||
return false;
|
||||
|
@ -308,6 +308,11 @@ public:
|
||||
|
||||
record_param req_rpb[1]; // record parameter blocks
|
||||
|
||||
template <typename T> T* getImpure(unsigned offset)
|
||||
{
|
||||
return reinterpret_cast<T*>(((SCHAR*) this) + offset);
|
||||
}
|
||||
|
||||
void adjustCallerStats()
|
||||
{
|
||||
if (req_caller) {
|
||||
|
@ -310,14 +310,15 @@ void TraceProcedureImpl::JrdParamsImpl::fillParams()
|
||||
{
|
||||
case nod_argument:
|
||||
{
|
||||
//const impure_value* impure = (impure_value*) ((SCHAR*) m_request + prm->nod_impure);
|
||||
//const impure_value* impure = request->getImpure<impure_value>(prm->nod_impure)
|
||||
const jrd_nod* message = prm->nod_arg[e_arg_message];
|
||||
const Format* format = (Format*) message->nod_arg[e_msg_format];
|
||||
const int arg_number = (int) (IPTR) prm->nod_arg[e_arg_number];
|
||||
|
||||
desc = format->fmt_desc[arg_number];
|
||||
from_desc = &desc;
|
||||
from_desc->dsc_address = (UCHAR *) m_request + message->nod_impure + (IPTR) desc.dsc_address;
|
||||
from_desc->dsc_address = const_cast<jrd_req*>(m_request)->getImpure<UCHAR>(
|
||||
message->nod_impure + (IPTR) desc.dsc_address);
|
||||
|
||||
// handle null flag if present
|
||||
if (prm->nod_arg[e_arg_flag])
|
||||
@ -332,7 +333,8 @@ void TraceProcedureImpl::JrdParamsImpl::fillParams()
|
||||
|
||||
case nod_variable:
|
||||
{
|
||||
impure_value* impure = (impure_value*) ((SCHAR *) m_request + prm->nod_impure);
|
||||
impure_value* impure = const_cast<jrd_req*>(m_request)->getImpure<impure_value>(
|
||||
prm->nod_impure);
|
||||
from_desc = &impure->vlu_desc;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user