Skip to content

Add new error class QueryCanceled which will be raised when canceling statement due to user request #31235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Nov 27, 2017

This changes StatementTimeout to QueryCanceled for PostgreSQL.

In MySQL, errno 1317 (ER_QUERY_INTERRUPTED) is only used when the
query is manually cancelled.

But in PostgreSQL, QUERY_CANCELED error code (57014) which is used
StatementTimeout is also used when the both case. And, we can not tell
which reason happened.

So I decided to introduce new error class QueryCanceled closer to the
error code name.

…ng statement due to user request

This changes `StatementTimeout` to `QueryCanceled` for PostgreSQL.

In MySQL, errno 1317 (`ER_QUERY_INTERRUPTED`) is only used when the
query is manually cancelled.

But in PostgreSQL, `QUERY_CANCELED` error code (57014) which is used
`StatementTimeout` is also used when the both case. And, we can not tell
which reason happened.

So I decided to introduce new error class `QueryCanceled` closer to the
error code name.
@kamipo kamipo merged commit 0e2cd3d into rails:master Nov 27, 2017
@kamipo kamipo deleted the add_query_canceled_exception branch November 27, 2017 02:55
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.

2 participants