Skip to content

Commit

Permalink
Skip only one triple in CONSTRUCT with unbound vars
Browse files Browse the repository at this point in the history
(rasqal_query_results_get_triple): Alter skipping to use
rasqal_query_results_next_triple rather than reset to next result when a
triple has an unbound or non-RDF part.

Fixes Issue #0000583
http://bugs.librdf.org/mantis/view.php?id=583
  • Loading branch information
dajobe committed Dec 15, 2014
1 parent 13365ce commit d66b53f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rasqal_query_results.c
Expand Up @@ -1329,7 +1329,6 @@ raptor_statement*
rasqal_query_results_get_triple(rasqal_query_results* query_results)
{
rasqal_query* query;
int rc;
rasqal_triple *t;
raptor_statement *rs = NULL;

Expand Down Expand Up @@ -1398,13 +1397,11 @@ rasqal_query_results_get_triple(rasqal_query_results* query_results)
break;

/* Have to move to next triple internally */
rc = rasqal_query_results_next_internal(query_results);
if(rc) {
if(rasqal_query_results_next_triple(query_results)) {
/* end of results or failed */
rs = NULL;
break;
}
query_results->current_triple_result = -1;
}

return rs;
Expand Down

0 comments on commit d66b53f

Please sign in to comment.