--- a/ChangeLog Thu Sep 09 08:42:14 2010 +0200
+++ b/ChangeLog Thu Sep 09 08:43:15 2010 +0200
@@ -11,6 +11,9 @@
* fix subquery_selection_index responsability mess-up: it wasn't doing what
it should have done (see cw.rset related_entity implementation)
+ * consider subquery aliases in Select.clean_solutions
+
+
2010-08-02 -- 0.26.5
* fix solutions computation crash with some query using sub-queries (closes #37423)
--- a/stmts.py Thu Sep 09 08:42:14 2010 +0200
+++ b/stmts.py Thu Sep 09 08:43:15 2010 +0200
@@ -626,7 +626,7 @@
solutions = self.solutions
# this may occurs with rql optimization, for instance on
# 'Any X WHERE X eid 12' query
- if not self.defined_vars:
+ if not (self.defined_vars or self.aliases):
self.solutions = [{}]
else:
newsolutions = []
@@ -634,6 +634,8 @@
asol = {}
for var in self.defined_vars:
asol[var] = origsol[var]
+ for var in self.aliases:
+ asol[var] = origsol[var]
if not asol in newsolutions:
newsolutions.append(asol)
self.solutions = newsolutions