From 7c66f055f54dead657e972edd5e0690d174fd17b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Thu, 16 Mar 2006 13:31:35 +0000 Subject: [PATCH] favour microseconds in "time eq. XX" event queries --- org.glite.lb.server/src/query.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 196c9be..2377719 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -613,6 +613,10 @@ static char *ec_to_head_where(edg_wll_Context ctx,const edg_wll_QueryRec **ec) trio_asprintf(&out, "%s OR (e.time_stamp >= %s AND e.time_stamp <= %s)", conds, aux, dbt); free(aux); } + else if (ec[m][n].op == EDG_WLL_QUERY_OP_EQUAL) { + trio_asprintf(&out, "%s OR (e.time_stamp = %s AND e.usec = %d)", + conds, dbt, ec[m][n].value.t.tv_usec); + } else trio_asprintf(&out, "%s OR e.time_stamp %s %s", conds, opToString(ec[m][n].op), dbt); free(conds); @@ -625,6 +629,10 @@ static char *ec_to_head_where(edg_wll_Context ctx,const edg_wll_QueryRec **ec) trio_asprintf(&conds, "(e.time_stamp >= %s AND e.time_stamp <= %s)", aux, dbt); free(aux); } + else if (ec[m][n].op == EDG_WLL_QUERY_OP_EQUAL) { + trio_asprintf(&out, "(e.time_stamp = %s AND e.usec = %d)", + dbt, ec[m][n].value.t.tv_usec); + } else trio_asprintf(&conds, "e.time_stamp %s %s", opToString(ec[m][n].op), dbt); break; -- 1.8.2.3