Indexing on parent_job is built in.
authorZdeněk Šustr <sustr4@cesnet.cz>
Wed, 11 Apr 2012 08:34:41 +0000 (08:34 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Wed, 11 Apr 2012 08:34:41 +0000 (08:34 +0000)
Fix for SB #78743

org.glite.lb.server/src/query.c

index 574fb62..ff7fecb 100644 (file)
@@ -1209,22 +1209,15 @@ static char *jc_to_head_where(
                        break;
 
                case EDG_WLL_QUERY_ATTR_PARENT:
-                       if (   !is_indexed(&(jc[m][n]), ctx)
-                               || !(cname = edg_wll_QueryRecToColumn(&(jc[m][n]))) )
-                       {
-                               *where_flags |= FL_FILTER;
-                               break;
-                       }
-
                        *where_flags |= FL_SEL_STATUS;
                        aux = edg_wlc_JobIdGetUnique(jc[m][n].value.j);
                        if ( conds )
                        {
-                               trio_asprintf(&tmps, "%s OR s.%s%s'%|Ss'", conds, cname, opToString(jc[m][n].op), aux);
+                               trio_asprintf(&tmps, "%s OR s.parent_job%s'%|Ss'", conds, opToString(jc[m][n].op), aux);
                                free(conds); conds = tmps;
                        }
                        else
-                               trio_asprintf(&conds, "s.%s%s'%|Ss'", cname, opToString(jc[m][n].op), aux);
+                               trio_asprintf(&conds, "s.parent_job%s'%|Ss'", opToString(jc[m][n].op), aux);
                        free(aux);
                        break;