You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/09/21 08:18:17 UTC
svn commit: r290627 -
/httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py
Author: nlehuen
Date: Tue Sep 20 23:18:13 2005
New Revision: 290627
URL: http://svn.apache.org/viewcvs?rev=290627&view=rev
Log:
Testing with NO isolation level.
Modified:
httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py
Modified: httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py?rev=290627&r1=290626&r2=290627&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/SQLiteSession.py Tue Sep 20 23:18:13 2005
@@ -19,6 +19,12 @@
from Session import *
from time import time
+ISOLATION_LEVEL = None
+
+# TODO : solve the problem with an exception being raised when
+# the database file is locked and wee try to read/write to it. This
+# could be solved by carefully selecting an ISOLATION_LEVEL.
+
try:
# If this code is included into Session.py,
# we don't want to add a dependency to SQLite
@@ -47,7 +53,7 @@
self.filename = filename
# check whether the sessions table exists, and create it if not
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()
@@ -73,7 +79,7 @@
timeout=timeout, lock=lock)
def count(self):
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()
@@ -85,7 +91,7 @@
db.close()
def do_cleanup(self):
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()
@@ -100,7 +106,7 @@
db.close()
def do_load(self):
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()
@@ -119,7 +125,7 @@
db.close()
def do_save(self, dict):
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()
@@ -136,7 +142,7 @@
db.close()
def do_delete(self):
- db = sqlite.connect(self.filename)
+ db = sqlite.connect(self.filename, isolation_level=ISOLATION_LEVEL)
try:
try:
cur = db.cursor()