From a3c6709694acb65d148fe285d8d05fc06a850a2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 11 Apr 2012 08:34:41 +0000 Subject: [PATCH] Indexing on parent_job is built in. Fix for SB #78743 --- org.glite.lb.server/src/query.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 574fb62..ff7fecb 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -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; -- 1.8.2.3