fix simplify for rql w/ subqueries, bad local variable overwrite. Closes #87988 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 30 Jan 2012 17:16:49 +0100
branchstable
changeset 679 de1bbfec40c3
parent 678 a031d85966f1
child 680 c09b14362934
fix simplify for rql w/ subqueries, bad local variable overwrite. Closes #87988
ChangeLog
__init__.py
--- a/ChangeLog	Fri Dec 09 12:12:56 2011 +0100
+++ b/ChangeLog	Mon Jan 30 17:16:49 2012 +0100
@@ -1,7 +1,13 @@
 ChangeLog for RQL
 =================
 
---
+	--
+
+    * #87988: fixed bug in simplify with sub-queries
+
+
+2012-11-09 -- 0.31.0
+
     * #78681: don't crash on column aliases used in outer join
     * #81394: HAVING support in write queries (INSERT,SET,DELETE)
     * #80799: fix wrong type analysis with 'NOT identity'
--- a/__init__.py	Fri Dec 09 12:12:56 2011 +0100
+++ b/__init__.py	Mon Jan 30 17:16:49 2012 +0100
@@ -136,8 +136,8 @@
     def _simplify(self, select):
         # recurse on subqueries first
         for subquery in select.with_:
-            for select in subquery.query.children:
-                self._simplify(select)
+            for subselect in subquery.query.children:
+                self._simplify(subselect)
         rewritten = False
         for var in select.defined_vars.values():
             stinfo = var.stinfo