From 93924e08f5f84e60ee8b86c91fb9f28d778705ea Mon Sep 17 00:00:00 2001 From: asfernandes Date: Thu, 11 Apr 2013 16:04:25 +0000 Subject: [PATCH] Cleanup. --- src/dsql/ExprNodes.cpp | 30 ++++-------------------------- src/jrd/exe.cpp | 23 +++++++---------------- src/jrd/exe_proto.h | 2 +- 3 files changed, 12 insertions(+), 43 deletions(-) diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index 39f9bd5029..109d8236fe 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -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; } diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index f35c197746..bbbb0d2d4b 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -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); diff --git a/src/jrd/exe_proto.h b/src/jrd/exe_proto.h index 071d65a61e..592481e6a6 100644 --- a/src/jrd/exe_proto.h +++ b/src/jrd/exe_proto.h @@ -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);