Commit 18e191e5 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-data: Correct SQL query for ontology checks

The column does not exist in that table, should be fetched from the
rdfs:Resource table. This results in the query returning the column
name as a string (due to the quotes), and turning out as a 0

Those dates are kinda thrown away for readwrite connections, so it
didn't matter there. They stick around for readonly connections in
the internal TrackerOntologies, but the modification date has no
use or purpose on those.
parent f68c1b02
......@@ -2227,7 +2227,7 @@ db_get_static_data (TrackerDBInterface *iface,
stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_SELECT, &internal_error,
"SELECT (SELECT Uri FROM Resource WHERE ID = \"tracker:Ontology\".ID), "
"\"nao:lastModified\" "
" (SELECT \"nao:lastModified\" FROM \"rdfs:Resource\" WHERE ID = \"tracker:Ontology\".ID) "
"FROM \"tracker:Ontology\"");
if (stmt) {
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