Skip to content

Fix #8185 - SIGSEGV with WHERE CURRENT OF statement with statement cache turned on - #8191

Closed
asfernandes wants to merge 1 commit into
v5.0-releasefrom
work/gh-8185-cursor-cache
Closed

Fix #8185 - SIGSEGV with WHERE CURRENT OF statement with statement cache turned on#8191
asfernandes wants to merge 1 commit into
v5.0-releasefrom
work/gh-8185-cursor-cache

Conversation

@asfernandes

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/dsql/DsqlRequests.cpp
childStatement->addFlags(DsqlStatement::FLAG_ORPHAN);
childStatement->setParentRequest(nullptr);
childStatement->setParentDbKey(nullptr);
childStatement->setParentRecVersion(nullptr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it pointless to clean fields of statement which is going to be removed from cache and thus destructed? FLAG_ORPHAN already prevent any usage of the statement.

@aafemt

aafemt commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

BTW, where FLAG_ORPHAN is reset so reused statement won't throw "invalid handle" error?

@asfernandes

Copy link
Copy Markdown
Member Author

BTW, where FLAG_ORPHAN is reset so reused statement won't throw "invalid handle" error?

Statement link to the cursor is established at prepare time.
Once the cursor request is disposed, links are broken forever, until someone compiles another statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants