Phantom of GadflyAdapter

GadflyAdapter sometimes causes phantom read.

The reason is that many connections are made simultaneously
on a gadfly database through the thead local variable
_v_connection. Threadsafety level 2 or higher is required
to use the thread local variable.

To remedy this fault, it is enough to use
usual variable as _v_connection. But users need to control
lock/unlock of the connection by themselves.

Simple patch:

---     2005-12-06 22:19:47.000000000 +0900
+++ 2005-12-12 22:41:07.000000000 +0900
@@ -51,6 +51,8 @@
     # The registerable object needs to have a container
     __name__ = __parent__ = None 
+    _v_connection = None
+    paramstyle = 'qmark'
     def _connection_factory(self):
         """Create a Gadfly DBI connection based on the DSN.

Tadashi Matsumoto
Zope3-dev mailing list

Reply via email to