This issue is now recorded as http://www.sqlite.org/src/info/2500cdb9be

On Wed, Apr 10, 2013 at 4:39 AM, Perry Wagle <[email protected]> wrote:

> I have a problem with a field name being ambiguous when it wasn't before.
>  Is this a bug or a feature?
>
> Firefox 19 uses Sqlite 3.7.14.1 which does what it should.  Firefox 20
> uses Sqlite 3.7.15.2 which complains that "title" is ambiguous in the ORDER
> BY in the below query:
>
> SELECT (CASE bms.title ISNULL WHEN 1 THEN moz_places.url ELSE (CASE
> bms.title WHEN '' THEN moz_places.url ELSE bms.title END) END) AS title,
> (CASE moz_places.favicon_id ISNULL WHEN 1 THEN '' ELSE (SELECT
> 'moz-anno:favicon:' || moz_favicons.url FROM moz_favicons WHERE
> moz_favicons.id = moz_places.favicon_id) END) AS favicon, moz_places.url
> AS url, moz_places.visit_count AS visit_count, moz_places.frecency AS
> frecency, bms.id AS id, bms.dateAdded AS dateAdded, bms.lastModified AS
> lastModified, (SELECT max(visit_date) FROM moz_historyvisits WHERE place_id
> = moz_places.id) AS visit_date FROM (SELECT fk AS id FROM moz_bookmarks
> WHERE parent IN (6068538) GROUP BY fk HAVING count(*) = 1) AS t,
> moz_places, moz_bookmarks AS folders, moz_bookmarks AS bms WHERE t.id =
> moz_places.id AND t.id = bms.fk AND bms.parent = folders.id AND
> folders.parent != 4 GROUP BY bms.id ORDER BY title COLLATE NOCASE ASC,
> title COLLATE NOCASE ASC
>
> I claim "title" shouldn't be ambiguous, since the first SELECT expression
> was named "title".  What's the consensus?
>
> -- Perry Wagle ([email protected])
>
> PS.  The SQL is autogenerated, and I didn't write the generator.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to