mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
This should fix known issues with MERGE and stable cursor (see CORE-3362).
Thanks to Dmitry for idea
This commit is contained in:
parent
ad6a44c0b0
commit
2dc879afca
@ -1653,6 +1653,9 @@ DmlNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
|
||||
if (csb->csb_currentForNode && csb->csb_currentForNode->parBlrBeginCnt <= 1)
|
||||
node->ownSavepoint = false;
|
||||
|
||||
if (csb->csb_currentDMLNode)
|
||||
node->ownSavepoint = false;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -9186,6 +9186,9 @@ DmlNode* SubQueryNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
|
||||
|
||||
if (csb->csb_currentForNode && csb->csb_currentForNode->parBlrBeginCnt <= 1)
|
||||
node->ownSavepoint = false;
|
||||
|
||||
if (csb->csb_currentDMLNode)
|
||||
node->ownSavepoint = false;
|
||||
}
|
||||
|
||||
return node;
|
||||
|
@ -5625,6 +5625,9 @@ DmlNode* ModifyNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* c
|
||||
ModifyNode* node = FB_NEW_POOL(pool) ModifyNode(pool);
|
||||
node->orgStream = orgStream;
|
||||
node->newStream = newStream;
|
||||
|
||||
AutoSetRestore<StmtNode*> autoCurrentDMLNode(&csb->csb_currentDMLNode, node);
|
||||
|
||||
node->statement = PAR_parse_stmt(tdbb, csb);
|
||||
|
||||
if (blrOp == blr_modify2)
|
||||
@ -6432,6 +6435,8 @@ DmlNode* StoreNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* cs
|
||||
{
|
||||
StoreNode* node = FB_NEW_POOL(pool) StoreNode(pool);
|
||||
|
||||
AutoSetRestore<StmtNode*> autoCurrentDMLNode(&csb->csb_currentDMLNode, node);
|
||||
|
||||
const UCHAR* blrPos = csb->csb_blr_reader.getPos();
|
||||
|
||||
node->relationSource = PAR_parseRecordSource(tdbb, csb)->as<RelationSourceNode>();
|
||||
|
@ -431,6 +431,7 @@ class CompilerScratch : public pool_alloc<type_csb>
|
||||
subFunctions(p),
|
||||
subProcedures(p),
|
||||
csb_currentForNode(NULL),
|
||||
csb_currentDMLNode(NULL),
|
||||
csb_rpt(p, len)
|
||||
{
|
||||
csb_dbg_info = FB_NEW_POOL(p) Firebird::DbgInfo(p);
|
||||
@ -530,6 +531,7 @@ public:
|
||||
Firebird::GenericMap<Firebird::Left<Firebird::MetaName, DeclareSubProcNode*> > subProcedures;
|
||||
|
||||
ForNode* csb_currentForNode;
|
||||
StmtNode* csb_currentDMLNode; // could be StoreNode or ModifyNode
|
||||
|
||||
struct csb_repeat
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user