we may have to cleanup solutions when we've no rewritten const (that doesn't mean nothing changed...)
--- a/__init__.py Mon Feb 22 18:46:41 2010 +0100
+++ b/__init__.py Thu Mar 04 12:11:28 2010 +0100
@@ -128,6 +128,7 @@
for subquery in select.with_:
for select in subquery.query.children:
self._simplify(select)
+ rewritten = False
for var in select.defined_vars.values():
stinfo = var.stinfo
if stinfo['constnode'] and not stinfo['blocsimplification']:
@@ -176,9 +177,10 @@
rhs = copy_uid_node(select, rhs, vconsts)
vref.parent.replace(vref, rhs)
del select.defined_vars[var.name]
+ rewritten = True
if vconsts:
select.stinfo['rewritten'][var.name] = vconsts
- if select.stinfo['rewritten'] and select.solutions:
+ if rewritten and select.solutions:
select.clean_solutions()
def compare(self, rqlstring1, rqlstring2):