-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
misuse of sqlite3_interrupt #681
Comments
During longevity test,
|
Could you please send me PR? |
My case seems like different from the author's. Mine just got interrupt error during normal call. Not sure what caused the failure. |
@leslie-wang "another row available" isn't actually an error. When you call "next", SQLite returns |
Sure. I'll try to make a simplified program, and see if it can reproduce, then create a seperate issue for that. |
#691 was created with simplified program and dataset. Please help taking a look. Thanks. |
@mattn Was this question addressed to me? I'm honestly not sure how to fix this problem. It seems to be a fundamental issue - SQLite doesn't actually support cancellation the way Go wants. In theory you could use a progress callback rather than |
I want to interrupt heavy query. So I think that using context is not enough to do it. |
I'm not sure what you mean by that. |
@rittneje Now I read the doc of progress callback. If sqlite3_iterrupt is not right way to cancel query, I hope to implement another way. If you know the usage of the API, please send me PR. |
I'm not really familiar with it, I'm afraid. I'm not even sure if it will work. It just appeared to be the only alternative for canceling a query. Your best bet might be to ask for advice on the SQLite mailing list. |
This library is not using
sqlite3_interrupt
correctly. When called, it interrupts all current and future active statements, until the active statement count reaches 0. (An active statement is any statement for which the last call tosqlite3_step
returnedSQLITE_ROW
, and it has not been reset or finalized since.) Consequently, it is entirely possible for one operation getting canceled to result in other, unrelated operations being canceled.Consider the following (contrived) example.
This example always outputs "interrupted", even though the outer query was not canceled.
The text was updated successfully, but these errors were encountered: