-
Notifications
You must be signed in to change notification settings - Fork 54
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
Autocommit behaves differently from sqlite3 #58
Comments
I dislike the way standard lib does it. Instead of inspecting each SQL string (which is error prone), we use sqlite3_stmt_readonly. Unfortunately, to maintain db-api compatibility, all database-modifying stuff must be run in a transaction. The only way around this is to set the isolation level to Note: see next comment below, I've added an exclusion for |
I could probably extend the checks, actually, to include |
The following is now working properly for me:
|
FWIW, I gave up using |
@erlend-aasland I agree with your decision and think it's absolutely correct to be more compatible. Since I had the opportunity (and a lot less users) Ive taken a few liberties. At the end of the day, @simonw you could always look into apsw as well. |
Yeah, not living in the stdlib gives you a lot of freedom :) Come to think of it, I may get away with it in the upcoming |
I was getting the error "cannot change into wal mode from within a transaction" when trying to switch to WAL mode using this code:
Upon further experimentation, it appears that setting
db.isolation_level = None
fixes this - but this fix is not necessary forsqlite3
. Here's a console session illustrating the difference between the two:Now the same sequence with
pysqlite3
:Is this a deliberate difference, or accidental?
The text was updated successfully, but these errors were encountered: