summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 609c2fb)
raw | patch | inline | side by side (parent: 609c2fb)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 6 Mar 2003 06:03:51 +0000 (06:03 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 6 Mar 2003 06:03:51 +0000 (06:03 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1569 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/backends/back_sqlite.py | patch | blob | history | |
roundup/backends/rdbms_common.py | patch | blob | history | |
test/test_db.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index b06151929c6e49b760d76352369c823e016b5019..c4407b66f5075ad0a7b57a380badb7ac4b3b5d14 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
2003-??-?? 0.5.7
- fixed Interval maths (sf bug 665357)
+- fixed sqlite rollback/caching bug (sf bug 689383)
2003-02-27 0.5.6
index 69d258523dbd1e335b435b710c0775b18bce85b2..8d2e57fab7eea4df499d15a544891a1503b66b64 100644 (file)
-# $Id: back_sqlite.py,v 1.8 2002-12-12 09:31:04 richard Exp $
+# $Id: back_sqlite.py,v 1.9 2003-03-06 06:03:51 richard Exp $
__doc__ = '''
See https://pysqlite.sourceforge.net/ for pysqlite info
'''
self.rollbackStoreFile(*args)
self.transactions = []
+ # clear the cache
+ self.clearCache()
+
def __repr__(self):
return '<roundlite 0x%x>'%id(self)
index 55a400b285326a24885571b2277d80526a4fe107..7388dbcb88d6807e35712e3ef049e3b441d04b9e 100644 (file)
-# $Id: rdbms_common.py,v 1.38 2003-02-28 03:33:46 richard Exp $
+# $Id: rdbms_common.py,v 1.39 2003-03-06 06:03:51 richard Exp $
''' Relational database (SQL) backend common code.
Basics:
self.rollbackStoreFile(*args)
self.transactions = []
+ # clear the cache
+ self.clearCache()
+
def doSaveNode(self, classname, nodeid, node):
''' dummy that just generates a reindex event
'''
diff --git a/test/test_db.py b/test/test_db.py
index 2ca56b0f8790ea1aa17eacd29c7e14e92713fceb..7af06e75241ceb0780fbf95a6736721e0f52e59f 100644 (file)
--- a/test/test_db.py
+++ b/test/test_db.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: test_db.py,v 1.73 2003-03-03 21:05:19 richard Exp $
+# $Id: test_db.py,v 1.74 2003-03-06 06:03:51 richard Exp $
import unittest, os, shutil, time
self.assertNotEqual(num_files, self.db.numfiles())
self.assertEqual(num_files2, self.db.numfiles())
+ # rollback / cache interaction
+ name1 = self.db.user.get('1', 'username')
+ self.db.user.set('1', username = name1+name1)
+ # get the prop so the info's forced into the cache (if there is one)
+ self.db.user.get('1', 'username')
+ self.db.rollback()
+ name2 = self.db.user.get('1', 'username')
+ self.assertEqual(name1, name2)
+
def testDestroyNoJournalling(self):
self.innerTestDestroy(klass=self.db.session)
ae(filt(None, {'nosy': '2', 'status': '1'}, ('+','id'), (None,None)),
['3'])
- def testNode1(self):
- node1 = self.db.user.getnode('1')
- name = node1.username
- self.db.user.set('1', username = name+name)
- name1 = node1.username
- self.db.rollback()
- node2 = self.db.user.getnode('1')
- self.assertEqual(name, node1.username)
- self.assertEqual(name, node2.username)
-
- def testNode2(self):
- node1 = Node(self.db.user, '1')
- name = node1.username
- self.db.user.set('1', username = name+name)
- name1 = node1.username
- self.db.rollback()
- node2 = Node(self.db.user, '1')
- self.assertEqual(name, node1.username)
- self.assertEqual(name, node2.username)
-
# TODO test auditors and reactors