Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/746#discussion_r82224007 --- Diff: core/sql/cli/Statement.cpp --- @@ -4517,61 +3343,58 @@ RETCODE Statement::execute(CliGlobals * cliGlobals, Descriptor * input_desc, } } - - - } - // done deciding if this query needs to be monitored and - // registered with WMS. - // now execute it. - if (masterStats != NULL) - { - masterStats->setIsBlocking(); - masterStats->setStmtState(STMT_EXECUTE_); - } - Int32 rc = root_tcb->execute(cliGlobals, statementGlobals_, - input_desc, diagsPtr, reExecute); - - if (masterStats != NULL) - masterStats->setNotBlocking(); - if (rc < 0) - retcode = ERROR; - // "diagsPtr" is modified by the foregoing call. - // If "diagsPtr" is NULL, there are no diags to merge - // into "diagsArea". Otherwise, "diagsPtr" is not NULL and does - // point to a diags area from which we: 1) avoid the SQL function - // 2) copy the ComCondition objects over. Then we decrement - // the reference count to indicate we're done with that - // ComDiagsArea. + // done deciding if this query needs to be monitored and + // registered with WMS. + // now execute it. + if (masterStats != NULL) + { + masterStats->setIsBlocking(); + masterStats->setStmtState(STMT_EXECUTE_); + } + + Int32 rc = root_tcb->execute(cliGlobals, statementGlobals_, + input_desc, diagsPtr, reExecute); + + if (masterStats != NULL) + masterStats->setNotBlocking(); + if (rc < 0) + retcode = ERROR; + // "diagsPtr" is modified by the foregoing call. + // If "diagsPtr" is NULL, there are no diags to merge + // into "diagsArea". Otherwise, "diagsPtr" is not NULL and does + // point to a diags area from which we: 1) avoid the SQL function + // 2) copy the ComCondition objects over. Then we decrement + // the reference count to indicate we're done with that + // ComDiagsArea. - if (diagsPtr) - { - diagsArea.mergeAfter(*diagsPtr); - diagsPtr->decrRefCount(); - diagsPtr = NULL; - } + if (diagsPtr) + { + diagsArea.mergeAfter(*diagsPtr); + diagsPtr->decrRefCount(); + diagsPtr = NULL; + } - if (retcode == ERROR) - { - root_tcb->cancel(statementGlobals_,diagsPtr); - state_ = ERROR_; - break; - } - else - { - if (retcode == 0 && diagsArea.mainSQLCODE() > 0) - // It's a warning. So return 1. - retcode = (RETCODE)1; - setState(OPEN_); - readyToReturn = TRUE; - break; - } - } - break; - - case RE_EXECUTE_: // on error 60 - case RE_EXECUTE_AFTER_RECOMPILE_: // on plan version error + if (retcode == ERROR) + { + root_tcb->cancel(statementGlobals_,diagsPtr); + state_ = ERROR_; + break; + } + else + { + if (retcode == 0 && diagsArea.mainSQLCODE() > 0) + // It's a warning. So return 1. + retcode = (RETCODE)1; + setState(OPEN_); + readyToReturn = TRUE; + break; + } + } + break; + + case RE_EXECUTE_: { // save lnil & stuff --- End diff -- I'm guessing "lnil" refers to late name input list? Perhaps the comment should be updated.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---