mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
Cleanup.
This commit is contained in:
parent
e0567463bf
commit
93924e08f5
@ -8372,52 +8372,30 @@ DmlNode* StmtExprNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
|
||||
void StmtExprNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc)
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
expr->getDesc(tdbb, csb, desc);
|
||||
}
|
||||
|
||||
ValueExprNode* StmtExprNode::copy(thread_db* tdbb, NodeCopier& copier) const
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
StmtExprNode* node = FB_NEW(*tdbb->getDefaultPool()) StmtExprNode(*tdbb->getDefaultPool());
|
||||
node->stmt = copier.copy(tdbb, stmt);
|
||||
node->expr = copier.copy(tdbb, expr);
|
||||
return node;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ValueExprNode* StmtExprNode::pass1(thread_db* tdbb, CompilerScratch* csb)
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
doPass1(tdbb, csb, stmt.getAddress());
|
||||
return ValueExprNode::pass1(tdbb, csb);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ValueExprNode* StmtExprNode::pass2(thread_db* tdbb, CompilerScratch* csb)
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
StmtNode::doPass2(tdbb, csb, stmt.getAddress(), NULL);
|
||||
|
||||
ValueExprNode::pass2(tdbb, csb);
|
||||
|
||||
dsc desc;
|
||||
getDesc(tdbb, csb, &desc);
|
||||
impureOffset = CMP_impure(csb, sizeof(impure_value));
|
||||
|
||||
return this;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dsc* StmtExprNode::execute(thread_db* tdbb, jrd_req* request) const
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
EXE_looper(tdbb, request, stmt.getObject(), true);
|
||||
|
||||
dsc* desc = EVL_expr(tdbb, request, expr);
|
||||
|
||||
return (request->req_flags & req_null) ? NULL : desc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1237,7 +1237,7 @@ static void stuff_stack_trace(const jrd_req* request)
|
||||
}
|
||||
|
||||
|
||||
const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* node, bool stmtExpr)
|
||||
const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* node)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1268,13 +1268,8 @@ const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* no
|
||||
tdbb->setRequest(request);
|
||||
tdbb->setTransaction(request->req_transaction);
|
||||
|
||||
if (!stmtExpr)
|
||||
{
|
||||
fb_assert(request->req_caller == NULL);
|
||||
request->req_caller = exeState.oldRequest;
|
||||
}
|
||||
else
|
||||
request->req_operation = jrd_req::req_evaluate;
|
||||
fb_assert(request->req_caller == NULL);
|
||||
request->req_caller = exeState.oldRequest;
|
||||
|
||||
const SLONG save_point_number = (request->req_transaction->tra_save_point) ?
|
||||
request->req_transaction->tra_save_point->sav_number : 0;
|
||||
@ -1285,8 +1280,7 @@ const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* no
|
||||
|
||||
const JrdStatement* statement = request->getStatement();
|
||||
|
||||
while (node && !(request->req_flags & req_stall) &&
|
||||
(!stmtExpr || request->req_operation == jrd_req::req_evaluate))
|
||||
while (node && !(request->req_flags & req_stall))
|
||||
{
|
||||
try {
|
||||
if (request->req_operation == jrd_req::req_evaluate)
|
||||
@ -1369,7 +1363,7 @@ const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* no
|
||||
// request unless we are in the middle of processing an
|
||||
// asynchronous message
|
||||
|
||||
if (!stmtExpr && !node)
|
||||
if (!node)
|
||||
{
|
||||
// Close active cursors
|
||||
for (const Cursor* const* ptr = request->req_cursors.begin();
|
||||
@ -1388,11 +1382,8 @@ const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* no
|
||||
tdbb->setTransaction(exeState.oldTransaction);
|
||||
tdbb->setRequest(exeState.oldRequest);
|
||||
|
||||
if (!stmtExpr)
|
||||
{
|
||||
fb_assert(request->req_caller == exeState.oldRequest);
|
||||
request->req_caller = NULL;
|
||||
}
|
||||
fb_assert(request->req_caller == exeState.oldRequest);
|
||||
request->req_caller = NULL;
|
||||
|
||||
// Ensure the transaction hasn't disappeared in the meantime
|
||||
fb_assert(request->req_transaction);
|
||||
|
@ -41,7 +41,7 @@ void EXE_execute_db_triggers(Jrd::thread_db*, Jrd::jrd_tra*, enum Jrd::jrd_req::
|
||||
void EXE_execute_ddl_triggers(Jrd::thread_db* tdbb, Jrd::jrd_tra* transaction,
|
||||
bool preTriggers, int action);
|
||||
const Jrd::StmtNode* EXE_looper(Jrd::thread_db* tdbb, Jrd::jrd_req* request,
|
||||
const Jrd::StmtNode* in_node, bool stmtExpr = false);
|
||||
const Jrd::StmtNode* in_node);
|
||||
|
||||
void EXE_execute_triggers(Jrd::thread_db*, Jrd::trig_vec**, Jrd::record_param*, Jrd::record_param*,
|
||||
Jrd::jrd_req::req_ta, Jrd::StmtNode::WhichTrigger);
|
||||
|
Loading…
Reference in New Issue
Block a user