Skip to content
This repository has been archived by the owner. It is now read-only.

twistedcaldav/sql.py fails in _db_init #142

Closed
macosforgebot opened this issue Mar 31, 2008 · 6 comments
Closed

twistedcaldav/sql.py fails in _db_init #142

macosforgebot opened this issue Mar 31, 2008 · 6 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Mar 31, 2008

rmu@… originally submitted this as ticket:264


with pysqlite2 version 2.4.1 on debian linux, sql.py fails in _db_init with

pysqlite2.dbapi2.OperationalError: cannot commit - no transaction is active

What seems to happen is

  • autocommit mode is turned on
  • "begin exclusive transaction" is executed (?)
  • schema is checked/initialized/upgraded/whatever
  • commit
  • previous isolation level is restored

The commit fails because obviously no transaction can be active in autocommit-mode.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 1, 2008

@cyrusdaboo originally submitted this as comment:1:⁠ticket:264


Actually autocommit mode is being turned off by setting the isolation_level to None prior to begin exclusive transaction. I think what may be happening is that there are no changes done to the database inside the transaction and therefore the commit does nothing.

However, I am not seeing this on my setup.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 2, 2008

rmu@… originally submitted this as comment:2:⁠ticket:264


According to http://oss.itsystementwicklung.de/download/pysqlite/doc/usage-guide.html#controlling-transactions setting isolation_level to None enables autocommit mode.

I guess you want to set it to something like EXCLUSIVE.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 2, 2008

rmu@… originally submitted this as comment:3:⁠ticket:264


version info: python: 2.4.5 pysqlite: 2.4.1 libsqlite: 3.5.7

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Apr 16, 2008

@wsanchez originally submitted this as comment:4:⁠ticket:264

  • Priority changed from 5: Not set to 2: Expected
  • Milestone set to 2.0
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Mar 26, 2009

@wsanchez originally submitted this as comment:5:⁠ticket:264

  • Milestone changed from CalendarServer-2.2 to Linux Port
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 26, 2011

@cyrusdaboo originally submitted this as comment:6:⁠ticket:264

  • Radar deleted
  • Status changed from assigned to closed
  • Resolution changed from to Cannot reproduce

Linux port seems to be working fine now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.