Repository navigation
sqlite3 Controlling Transactions documentation not updated #73307
Description
Activity
commit 284676cf2ac8 changed the sqlite3 module so it will no longer implicitly commit an open transaction before DDL statements. The docs have been updated but there is still an incorrect paragraph that has not been removed.
Attached is a patch that remove the old paragraph.I would just like to note that I think that the correct solution is to do an implicit commit before:
- VACUUM
- ATTACH
- DETACH
- BEGIN
After read some issues, there are two major concerns:
1, backward compatibility.
2, implicit commit is bad, tolerates bug-prone codes.However they are not contradictory if we print a warning when doing an implicit commit. Some messages like this:
Warning: sqlite3 module issued an implicit commit before executing VACUUM, you should commit this transaction by yourself, that's a good habit, etc..Then we can keep backward compatibility, and no longer commit implicitly.
Thanks for the patch, Aviv!
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Feb 26, 2017
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: