Disable autocommit for new connections
Bug #785305 reported by
Drew Smathers
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oursql |
New
|
Undecided
|
Unassigned |
Bug Description
I could very well be wrong on this, but from my understanding, autocommit should be disabled for databases such as MySQL that have this feature to be compliant with python's DB-API. I had an agonizing time discovering this when trying to get test cases to rollback when run on oursql. Perhaps oursql, similar to MySQLdb should set autocommit off for new cursors.
Related branches
lp:~djfroofy/oursql/autocommitoff-oursql-785305
Ready for review
for merging
into
lp:~habnabit/oursql/master
- Aaron Gallagher: Pending requested
-
Diff: 11 lines (+1/-0)1 file modifiedoursqlx/cursor.pyx (+1/-0)
To post a comment you must log in.
SET autocommit='OFF' is a connection setting, not a cursor setting. Wouldn't it be a little more efficient to run at connection time rather than every time a cursor is created?