-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Off-by-one error in dict_put_impl #939
Comments
MPvHarmelen
added a commit
to MPvHarmelen/virtuoso-opensource
that referenced
this issue
Jan 11, 2021
MPvHarmelen
added a commit
to MPvHarmelen/virtuoso-opensource
that referenced
this issue
Jan 12, 2021
MPvHarmelen
added a commit
to MPvHarmelen/virtuoso-opensource
that referenced
this issue
Jan 12, 2021
MPvHarmelen
added a commit
to MPvHarmelen/virtuoso-opensource
that referenced
this issue
Jan 13, 2021
Unfortunately it turned out not to be that easy. The off-by-one error is a fact, but wasn't causing the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an off-by-one error in this if-statement:
virtuoso-opensource/libsrc/Wi/xslt.c
Lines 3589 to 3591 in 4bdeace
Substituting
size
forinserts - deletions
, this statement reads:which means that the first time an insertion is skipped,
size
is strictly larger thanht_dict_max_entries
, whilesize
should only be allowed to be at most exactly equal toht_dict_max_entries
.This causes the following query to return 10001 results, even though
ResultSetMaxRows
is set to 10000 invirtuoso.ini
:The number of results returned by this query is consistently one larger than the value of
ResultSetMaxRows
.In turn, this causes the following code to fail to return the
X-SPARQL-MaxRows
header in the case of construct queries, becauselength (rset)
is actually one larger thanmaxrows
:virtuoso-opensource/libsrc/Wi/sparql_io.sql
Lines 3915 to 3916 in 4bdeace
The text was updated successfully, but these errors were encountered: