mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:40:38 +01:00
Fixed bug #7713
stability of implicit cursor could be broken, if cursor's select expression is based on view with sub-query in select list, or on table with sub-query in computed field.
This commit is contained in:
parent
25b76bb26c
commit
a5131e63ee
@ -11068,6 +11068,12 @@ DmlNode* SubQueryNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
|
|||||||
|
|
||||||
if (csb->csb_currentDMLNode)
|
if (csb->csb_currentDMLNode)
|
||||||
node->ownSavepoint = false;
|
node->ownSavepoint = false;
|
||||||
|
|
||||||
|
if (!csb->csb_currentForNode && !csb->csb_currentDMLNode &&
|
||||||
|
(csb->csb_g_flags & csb_computed_field))
|
||||||
|
{
|
||||||
|
node->ownSavepoint = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
@ -103,6 +103,7 @@ const int csb_validation = 64; // we're in a validation expression (RDB hack)
|
|||||||
const int csb_reuse_context = 128; // allow context reusage
|
const int csb_reuse_context = 128; // allow context reusage
|
||||||
const int csb_subroutine = 256; // sub routine
|
const int csb_subroutine = 256; // sub routine
|
||||||
const int csb_reload = 512; // request's BLR should be loaded and parsed again
|
const int csb_reload = 512; // request's BLR should be loaded and parsed again
|
||||||
|
const int csb_computed_field = 1024; // computed field expression
|
||||||
|
|
||||||
// CompilerScratch.csb_rpt[].csb_flags's values.
|
// CompilerScratch.csb_rpt[].csb_flags's values.
|
||||||
const int csb_active = 1; // stream is active
|
const int csb_active = 1; // stream is active
|
||||||
|
@ -4234,8 +4234,8 @@ void MET_scan_relation(thread_db* tdbb, jrd_rel* relation)
|
|||||||
|
|
||||||
DmlNode* nod = dependencies ?
|
DmlNode* nod = dependencies ?
|
||||||
MET_get_dependencies(tdbb, relation, p, length, csb, NULL, NULL, NULL,
|
MET_get_dependencies(tdbb, relation, p, length, csb, NULL, NULL, NULL,
|
||||||
field->fld_name, obj_computed, 0, depTrans) :
|
field->fld_name, obj_computed, csb_computed_field, depTrans) :
|
||||||
PAR_blr(tdbb, relation, p, length, csb, NULL, NULL, false, 0);
|
PAR_blr(tdbb, relation, p, length, csb, NULL, NULL, false, csb_computed_field);
|
||||||
|
|
||||||
field->fld_computation = static_cast<ValueExprNode*>(nod);
|
field->fld_computation = static_cast<ValueExprNode*>(nod);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user