/ Ticket Change Details

Artifact ID: a8a0089dfa936c43222e5aea843b88a84e83937d
Ticket: 1c69be2dafc28b9f2d80ff022c89395afa106083
Incorrect GROUP BY when input and output columns have the same name
User & Date: drh 2014-06-10 20:11:36

  1. icomment:
    It has come to light that some legacy Android applications are coded
    with queries that are logically equivalent to this:
    CREATE TABLE t1(a,x);
    CREATE TABLE t2(a,y);
    SELECT t1.a AS a, x, y FROM t1, t2 GROUP BY a;
    The original fix for this ticket (see check-in [f2d175f975cd]) caused such
    queries to give an error:  "ambiguous column: a".  The query is indeed 
    incorrect.  Nevertheless, we need to find a way to get SQLite to run and
    return the correct result even for these incorrect, legacy queries.
  2. login: "drh"
  3. mimetype: "text/x-fossil-wiki"
  4. resolution changed to: "Open"
  5. status changed to: "Open"