--- a/server/sources/rql2sql.py Wed Jun 02 15:55:16 2010 +0200
+++ b/server/sources/rql2sql.py Wed Jun 02 16:13:28 2010 +0200
@@ -1180,14 +1180,15 @@
def _temp_table_scope(self, select, table):
scope = 9999
for var, sql in self._varmap.iteritems():
- if table == sql.split('.', 1)[0]:
+ # skip "attribute variable" in varmap (such 'T.login')
+ if not '.' in var and table == sql.split('.', 1)[0]:
try:
scope = min(scope, self._state.scopes[select.defined_vars[var].scope])
except KeyError:
scope = 0 # XXX
if scope == 0:
- return 0
- return 0
+ break
+ return scope
def _var_info(self, var):
try: