Commit d7b38111 authored by Tres Seaver's avatar Tres Seaver

Merge pull request #47 from zopefoundation/do3cc_fix_for45_master

Do3cc fix for45 master
parents d15abe89 23ea0bee
......@@ -15,6 +15,10 @@
- Add support for Python 3.5.
- Avoid failure during cleanup of nested databases that provide MVCC
on storage level (Relstorage).
https://github.com/zopefoundation/ZODB/issues/45
4.2.0 (2015-06-02)
==================
......
......@@ -1085,7 +1085,8 @@ class Connection(ExportImport, object):
def _release_resources(self):
for c in six.itervalues(self.connections):
if c._mvcc_storage:
c._storage.release()
if c._storage is not None:
c._storage.release()
c._storage = c._normal_storage = None
c._cache = PickleCache(self, 0, 0)
......
......@@ -33,6 +33,15 @@ from ZODB.tests import (
)
class MVCCTests:
def checkClosingNestedDatabasesWorks(self):
# This tests for the error described in
# https://github.com/zopefoundation/ZODB/issues/45
db1 = DB(self._storage)
db2 = DB(None, databases=db1.databases, database_name='2')
db1.open().get_connection('2')
db1.close()
db2.close()
def checkCrossConnectionInvalidation(self):
# Verify connections see updated state at txn boundaries.
......@@ -122,7 +131,7 @@ class MVCCTests:
self.assertTrue(r2['gamma']['delta'] == 'yes')
finally:
db.close()
class MVCCMappingStorageTests(
StorageTestBase.StorageTestBase,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment