Skip to content

Do not allow to cancel other running stmts (1.3)#268

Merged
staticlibs merged 1 commit intoduckdb:v1.3-ossivalisfrom
staticlibs:cancel_statement_check_13
Jun 15, 2025
Merged

Do not allow to cancel other running stmts (1.3)#268
staticlibs merged 1 commit intoduckdb:v1.3-ossivalisfrom
staticlibs:cancel_statement_check_13

Conversation

@staticlibs
Copy link
Collaborator

This is a backport of the PR #245 to v1.3-ossivalis stable branch.

Statement#cancel() call works on connection level. So currently it is well possible to run query in one statement, and then interrupt this query calling cancel on another statement.

This change adds a check that cancellation can only be performed if the query on current statement is still running. Otherwise stmt.cancel() call is a no-op.

Testing: new test added that checks that other statement cannot be cancelled.

This is a backport of the PR duckdb#245 to `v1.3-ossivalis` stable branch.

`Statement#cancel()` call works on connection level. So currently it is
well possible to run query in one statement, and then interrupt this
query calling cancel on another statement.

This change adds a check that cancellation can only be performed if
the query on current statement is still running. Otherwise
`stmt.cancel()` call is a no-op.

Testing: new test added that checks that other statement cannot be
cancelled.
@staticlibs staticlibs merged commit d592827 into duckdb:v1.3-ossivalis Jun 15, 2025
@staticlibs staticlibs deleted the cancel_statement_check_13 branch June 15, 2025 23:49
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.

1 participant