Modify ↓
Opened 9 years ago
Closed 9 years ago
#12420 closed defect (fixed)
Safety level may not be changed inside a transaction on SQLite with synchronous=normal if PySqlite 2.8.1 (3.8.2)
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.11 |
Component: | database backend | Version: | 1.0-stable |
Severity: | normal | Keywords: | pysqlite |
Cc: | Branch: | ||
Release Notes: |
Fix raising |
||
API Changes: | |||
Internal Changes: |
Description
2016-03-28 00:56:58,865 Trac[pool] ERROR: Exception caught on create Traceback (most recent call last): File "/home/jun66j5/src/tracdev/svn/branches/1.0-stable/trac/db/pool.py", line 105, in get_cnx cnx = connector.get_connection(**kwargs) File "/home/jun66j5/src/tracdev/svn/branches/1.0-stable/trac/db/sqlite_backend.py", line 190, in get_connection return SQLiteConnection(path, log, params) File "/home/jun66j5/src/tracdev/svn/branches/1.0-stable/trac/db/sqlite_backend.py", line 298, in __init__ _set_synchronous(cursor, params.get('synchronous')) File "/home/jun66j5/src/tracdev/svn/branches/1.0-stable/trac/db/sqlite_backend.py", line 408, in _set_synchronous cursor.execute('PRAGMA synchronous = %s' % _quote(value)) OperationalError: Safety level may not be changed inside a transaction 2016-03-28 00:56:58,865 Trac[chrome] ERROR: Error during check of EMAIL_VIEW: TimeoutError: Unable to get database connection within 0 seconds. (OperationalError: Safety level may not be changed inside a transaction)
Attachments (0)
Change History (5)
comment:1 by , 9 years ago
Keywords: | pysqlite added |
---|
comment:2 by , 9 years ago
Patch (jomae.git@t12420) looks good to me. I tested it on trunk with PySqlite 2.8.1, SQLite 3.12, Python 2.7.10 Windows x64.
TRAC_TEST_DB_URL=sqlite:test.db
TRAC_TEST_DB_URL=sqlite:test.db?journal_mode=wal
TRAC_TEST_DB_URL=sqlite:test.db?journal_mode=wal&synchronous=normal
All tests pass.
comment:3 by , 9 years ago
Owner: | set to |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
Thanks for the reviewing and testing! I'm going to push it.
comment:4 by , 9 years ago
Milestone: | next-stable-1.0.x → 1.0.11 |
---|
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
After pysqlite 2.8.0, this issue is reproduced. Also, the same issue is raised with
journal_mode=wal
parameter.