From 03dd605c088051782fe1922cbe43df2971cdde59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Fri, 10 Feb 2012 11:03:57 +0000 Subject: [PATCH] Fix for SB #47774 part 2) (part 1) so far unfixed) --- org.glite.lb.server/src/query.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); -- 1.8.2.3