From: Zdeněk Šustr Date: Fri, 10 Feb 2012 11:03:57 +0000 (+0000) Subject: Fix for SB #47774 part 2) (part 1) so far unfixed) X-Git-Tag: gridsite-core_R_1_7_17~116 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=03dd605c088051782fe1922cbe43df2971cdde59;p=jra1mw.git Fix for SB #47774 part 2) (part 1) so far unfixed) --- diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 9fcda60..df17d99 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -716,11 +716,14 @@ int check_job_query_index(edg_wll_Context ctx, const edg_wll_QueryRec **jc) if ( !jc || !*jc ) return edg_wll_SetError(ctx,EDG_WLL_ERROR_NOINDEX,"unrestricted queries unsupported"); + glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "Checking indices\n"); + + /* - * First check presense of jobid - Primary key + * First check presense of jobid - Primary key, and parent - built-in index */ for ( i = 0; jc[i]; i++ ) for ( j = 0; jc[i][j].attr; j++ ) - if ( jc[i][j].attr == EDG_WLL_QUERY_ATTR_JOBID ) return 0; + if ( (jc[i][j].attr == EDG_WLL_QUERY_ATTR_JOBID) || (jc[i][j].attr == EDG_WLL_QUERY_ATTR_PARENT) ) return 0; if ( !ctx->job_index ) return edg_wll_SetError(ctx, EDG_WLL_ERROR_NOINDEX, "no indices configured: jobid required in query");