8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Fix problem with view WITH CHECK OPTION present since the introduction of ExprNode

This commit is contained in:
asfernandes 2010-09-17 14:42:11 +00:00
parent c1b5abfdf2
commit 57d222bb0a

View File

@ -7967,9 +7967,32 @@ dsql_nod* CreateAlterViewNode::replaceFieldNames(dsql_nod* input, dsql_nod* sear
if (!input || input->getType() != dsql_type_nod)
return input;
const dsql_nod* const* const endo = input->nod_arg + input->nod_count;
const dsql_nod* const* endo;
dsql_nod** ptr;
for (dsql_nod** ptr = input->nod_arg; ptr < endo; ++ptr)
Array<dsql_nod*> temp;
if (input->nod_type == nod_class_exprnode)
{
ExprNode* exprNode = reinterpret_cast<ExprNode*>(input->nod_arg[0]);
for (dsql_nod*** i = exprNode->dsqlChildNodes.begin();
i != exprNode->dsqlChildNodes.end(); ++i)
{
if (**i)
temp.add(**i);
}
endo = temp.end();
ptr = temp.begin();
}
else
{
endo = input->nod_arg + input->nod_count;
ptr = input->nod_arg;
}
for (; ptr < endo; ++ptr)
{
if ((*ptr)->nod_type == Dsql::nod_select_expr)
{