Commit 28f136c4 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-data: Handle SQLITE_DONE in tracker_triples filter()

The filter() function is meant to return SQLITE_OK or an error condition.
The way to notify that a cursor is finished is returning TRUE on the next
call to eof(), so just do that.

Returning SQLITE_DONE here rather seems to stop query execution altogether
(without apparent errors) than finishing this cursor, which will definitely
bring side effects if the virtual table is being evaluated multiple times.

Closes: tracker-miners#55
parent 1cac469c
Pipeline #87811 passed with stage
in 2 minutes and 11 seconds
......@@ -444,7 +444,10 @@ triples_filter (sqlite3_vtab_cursor *vtab_cursor,
rc = init_stmt (cursor);
if (rc == SQLITE_ROW)
if (rc == SQLITE_DONE)
cursor->finished = TRUE;
if (rc == SQLITE_ROW || rc == SQLITE_DONE)
return SQLITE_OK;
return rc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment