/ Ticket Change Details
Login
Overview

Artifact ID: b556e7c9998dd37c6efa6c9663998d510316cb52
Ticket: 98825a79ce145686392d8074032ae54863aa21a3
Incorrect result from a DISTINCT + GROUP BY + ORDER BY query
User & Date: drh 2014-04-03 15:17:34
Changes

  1. Change foundin to "3.8.4.2"
  2. Change icomment to:

    The following query answers 'wrong' even though the correct answer is 'right':

    CREATE TABLE t1(x);
    INSERT INTO t1 VALUES('right'),('wrong');
    SELECT DISTINCT x
     FROM (SELECT x FROM t1 GROUP BY x)
     WHERE x='right'
     ORDER BY x;
    

    Bisecting shows that this problem was introduced by check-in [1e64dd782a126f48d78c4] on 2014-02-08 and first appeared in SQLite version 3.8.4.

  3. Change login to "drh"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change severity to "Critical"
  6. Change status to "Open"
  7. Change title to:

    Incorrect result from a DISTINCT + GROUP BY + ORDER BY query

  8. Change type to "Code_Defect"