【标题】 修复I8HWKW所示的断言问题.

【实现内容】: 修复I8HWKW所示的断言问题
【根因分析】: 其实主要是因为between and的时候,应该会访问两次context->refcount++的,但是事实上只访问了一次,因此最后context->refcount=-1触发了断言。
【实现方案】: 修复between and时候只访问context->refcount一次的问题。
【关联需求或issue】: https://e.gitee.com/opengaussorg/dashboard?issue=I8HWKW
This commit is contained in:
wangfeihuo
2023-11-24 11:49:20 +08:00
parent 4a497cb66e
commit 8a1716ebc0
5 changed files with 128 additions and 6 deletions

View File

@ -1925,12 +1925,6 @@ static void inline_cte(PlannerInfo *root, CommonTableExpr *cte)
(void) inline_cte_walker((Node*)root->parse, &context);
/*
* We would expect the reference number to be zero after inline, however, the
* reference count of cte are not accurate for re-entry issues at parsing stage
* Until fixed, we only check for non-negative refcnt result.
*/
Assert(context.refcount >= 0);
/* Mark this CTE as inlined */
cte->cterefcount = -1;
}