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 697517 - Select X as Y broke when using fts.
Select X as Y broke when using fts.
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: FTS
git master
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
Depends on:
Blocks: 668728
 
 
Reported: 2013-04-07 22:08 UTC by Rafael Fonseca
Modified: 2013-04-09 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rafael Fonseca 2013-04-07 22:08:09 UTC
A simple query like "select nie:url(?s) as url where { ?s fts:match 'network' }" will return the error:

'Could not run query, near "AS": syntax error'

Doing a bisect I discovered that commit 1943dfb0 is responsible for the error.
Comment 1 Martyn Russell 2013-04-09 17:22:41 UTC
I believe Carlos fixed this in tracker-0.16 branch recently (and in master):

commit 9f80a3e08519134ad6ba41d847ea55319757f4bd
Author: Carlos Garnacho <carlosg@gnome.org>
Date:   Mon Apr 8 15:43:20 2013 +0200

    Fix AS ?foo handling in FTS queries
    
    FTS queries implicitly add an "AS var" clause to the translated
    SQL select query so values can be matched with the outer query that
    accesses FTS tables, which resulted in doubly added AS clauses if
    it was specified explicitly in SPARQL too.
    
    So, make sure the clause is just added once.
Comment 2 Rafael Fonseca 2013-04-09 18:42:14 UTC
(In reply to comment #1)
> I believe Carlos fixed this in tracker-0.16 branch recently (and in master):

I can confirm it is fixed.