After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761455 - Dates on SELECT as variables are not date type when used in the WHERE clause
Dates on SELECT as variables are not date type when used in the WHERE clause
Status: RESOLVED OBSOLETE
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2016-02-02 13:31 UTC by Carlos Soriano
Modified: 2021-05-26 22:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Carlos Soriano 2016-02-02 13:31:12 UTC
$ TRACKER_VERBOSITY=3 tracker sparql --query "SELECT DISTINCT nie:url(?urn) tracker:coalesce(nfo:fileLastAccessed(?urn), nie:contentAccessed(?urn)) AS ?atime WHERE {?urn a nfo:FileDataObject;  tracker:available true . FILTER ( ?atime > '2015-12-29T00:00:00Z'^^xsd:dateTime)}"
...
(tracker sparql:8610): Tracker-DEBUG: Preparing query: 'SELECT DISTINCT (SELECT "nie:url" FROM "nie:DataObject" WHERE ID = "1_u") COLLATE TRACKER, COALESCE(SparqlFormatTime ((SELECT "nfo:fileLastAccessed" FROM "nfo:FileDataObject" WHERE ID = "1_u")), SparqlFormatTime ((SELECT "nie:contentAccessed" FROM "nie:InformationElement" WHERE ID = "1_u"))) AS "2_u" FROM (SELECT "nfo:FileDataObject1"."ID" AS "1_u", 1 FROM "nfo:FileDataObject" AS "nfo:FileDataObject1", "nie:DataObject" AS "nie:DataObject2" WHERE "nfo:FileDataObject1"."ID" = "nie:DataObject2"."ID" AND "nie:DataObject2"."tracker:available" = ? AND ("2_u" > ?))'
Results:
 
 
$ TRACKER_VERBOSITY=3 tracker sparql --query "SELECT DISTINCT nie:url(?urn)  tracker:coalesce(nfo:fileLastAccessed(?urn), nie:contentAccessed(?urn)) WHERE {?urn a nfo:FileDataObject; nfo:fileLastAccessed ?atime ; tracker:available true . FILTER (?atime > '2015-12-29T00:00:00Z'^^xsd:dateTime)}"
...
(tracker sparql:8278): Tracker-DEBUG: Preparing query: 'SELECT DISTINCT (SELECT "nie:url" FROM "nie:DataObject" WHERE ID = "1_u") COLLATE TRACKER, COALESCE(SparqlFormatTime ((SELECT "nfo:fileLastAccessed" FROM "nfo:FileDataObject" WHERE ID = "1_u")), SparqlFormatTime ((SELECT "nie:contentAccessed" FROM "nie:InformationElement" WHERE ID = "1_u"))) FROM (SELECT "nfo:FileDataObject1"."ID" AS "1_u", "nfo:FileDataObject1"."nfo:fileLastAccessed" AS "2_u", "nfo:FileDataObject1"."nfo:fileLastAccessed:localDate" AS "2_u:localDate", "nfo:FileDataObject1"."nfo:fileLastAccessed:localTime" AS "2_u:localTime", 1 FROM "nfo:FileDataObject" AS "nfo:FileDataObject1", "nie:DataObject" AS "nie:DataObject2" WHERE "nfo:FileDataObject1"."ID" = "nie:DataObject2"."ID" AND "2_u" IS NOT NULL AND "nie:DataObject2"."tracker:available" = ? AND ("2_u" > ?))'
Comment 1 Sam Thursfield 2021-05-26 22:25:51 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/tracker/-/issues/

Thank you for your understanding and your help.