Skip to content

Commit

Permalink
Fixed the problem reported in CORE-4403 comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
asfernandes committed May 26, 2014
1 parent aae182c commit db03538
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dsql/StmtNodes.cpp
Expand Up @@ -1200,6 +1200,8 @@ DeclareCursorNode* DeclareCursorNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)

dsqlScratch->putDebugCursor(cursorNumber, dsqlName);

++dsqlScratch->scopeLevel;

return this;
}

Expand Down Expand Up @@ -4362,13 +4364,17 @@ ForNode* ForNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)

if (statement)
{
++dsqlScratch->scopeLevel;

// CVC: Let's add the ability to BREAK the for_select same as the while,
// but only if the command is FOR SELECT, otherwise we have singular SELECT
++dsqlScratch->loopLevel;
node->dsqlLabelNumber = dsqlPassLabel(dsqlScratch, false, dsqlLabelName);
node->statement = statement->dsqlPass(dsqlScratch);
--dsqlScratch->loopLevel;
dsqlScratch->labels.pop();

--dsqlScratch->scopeLevel;
}

dsqlScratch->context->clear(base);
Expand Down

0 comments on commit db03538

Please sign in to comment.