Skip to content

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

Merged
kamipo merged 1 commit intorails:masterfrom
kamipo:add_query_canceled_exception
Nov 27, 2017
Merged

Add new error class QueryCanceled which will be raised when canceling statement due to user request#31235
kamipo merged 1 commit intorails:masterfrom
kamipo:add_query_canceled_exception

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