-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07/03/2011 12:54 PM, Fernando Martins wrote:
Regarding the leakage in Shared.DC.ZRDB.Results.Results mentioned
in:
https://mail.zope.org/pipermail/zope/2011-January/176106.html
which might very well be the leakage introduced in 2.10 that made
ZSQL methods useless, what are the chances of being solved?
I see that Tres Seaver made a new package, SQL Adaptor (not useful to
me) because of this bug. Is it an indication the bug is too hard to
fix?
The leakage occurs due to a feature (caseless column aliases) which
would break backward compatibiltiy if removed. If you can live without
that feature (your app already uses the column names spelled the same
way as the RDBMS returns them, or you can change it to do so), you
should be able to apply the attached patch to remove the leaking feature.
Tres.
- --
===
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk4R3DEACgkQ+gerLs4ltQ4gjQCglmXM907m+ysUeVyUnOHo0+sO
jUgAoJ7VWMc8XCmTQgzZ9nL8OxbZJkAO
=QTY8
-END PGP SIGNATURE-
=== modified file 'lib/python/Shared/DC/ZRDB/Results.py'
--- lib/python/Shared/DC/ZRDB/Results.py 2005-11-18 14:39:19 +
+++ lib/python/Shared/DC/ZRDB/Results.py 2011-01-27 16:09:13 +
@@ -38,7 +38,6 @@
self._names=names=[]
self._schema=schema={}
self._data_dictionary=dd={}
-aliases=[]
if zbrains is None: zbrains=NoBrains
i=0
for item in items:
@@ -49,10 +48,6 @@
if schema.has_key(name):
raise ValueError, 'Duplicate column name, %s' % name
schema[name]=i
-n=name.lower()
-if n != name: aliases.append((n, SQLAlias(name)))
-n=name.upper()
-if n != name: aliases.append((n, SQLAlias(name)))
dd[name]=item
names.append(name)
i=i+1
@@ -70,11 +65,6 @@
if k[:2]=='__':
setattr(r,k,getattr(Record,k))
-# Add SQL Aliases
-for k, v in aliases:
-if not hasattr(r, k):
-setattr(r, k, v)
-
if hasattr(brains, '__init__'):
binit=brains.__init__
if hasattr(binit,'im_func'): binit=binit.im_func
___
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )