[redland-dev] [Redland librdf RDF API 0000384]: librdf_query_results_get_count returns 0 (before results are iterated?)

Mantis Bug Tracker mantis-bug-sender at librdf.org
Mon Aug 30 23:49:25 CEST 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=384 
====================================================================== 
Reported By:                presbrey
Assigned To:                
====================================================================== 
Project:                    Redland librdf RDF API
Issue ID:                   384
Category:                   api
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-08-30 21:49
Last Modified:              2010-08-30 21:49
====================================================================== 
Summary:                    librdf_query_results_get_count returns 0 (before
results are iterated?)
Description: 
librdf_query_results_get_count no longer returns a correct result count
until the query_results have been manipulated in some undetermined (by me)
way.

I call librdf_query_results_get_count directly after librdf_query_execute
in mod_authz_webid to do ASK-style ACL checks and it used to work great.

I'm attaching test code, repeating the meat of it below, and pasting the N3
into "additional information"...

librdf_query_results *rdf_query_results = librdf_query_execute(rdf_query,
rdf_model);
printf("[query] %d results, sparql: %s\n",
librdf_query_results_get_count(rdf_query_results), query); // 0 results :(
printf("[results] %s\n", librdf_query_results_to_string(rdf_query_results,
NULL, NULL));
printf("[query] %d results, sparql: %s\n",
librdf_query_results_get_count(rdf_query_results), query); // 8 results

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-30 21:49 presbrey       New Issue                                    
2010-08-30 21:49 presbrey       File Added: test.c                           
======================================================================



More information about the redland-dev mailing list