Closed tanscorpio7 closed 2 months ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
contrib/babelfishpg_tds/src/backend/tds/tdscomm.c | 3 | 73.33% | ||
<!-- | Total: | 3 | --> |
Totals | |
---|---|
Change from base Build 9416708039: | -0.004% |
Covered Lines: | 42283 |
Relevant Lines: | 57876 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
contrib/babelfishpg_common/src/datetime.c | 52 | 92.57% | ||
<!-- | Total: | 52 | --> |
Totals | |
---|---|
Change from base Build 9416708039: | 0.0% |
Covered Lines: | 42284 |
Relevant Lines: | 57874 |
Description
Fix crash when we recursively execute a function or procedure and the call was made from the same line of the procedure. For ex:
In such recursive calls the plan in the outer call gets used by the inner call & at the end of execution we would free the plan even when the outer call is still active and using it. The cached plan is only available at statement level, hence the statement making the call should be same. As a fix we only free the plan in an exec stmt if we generated it in the first place. This is just a quick fix for now but a proper solution would be to adopt postgres method of caching the plan for exec calls.
Issues Resolved
[BABEL-4782]
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.