/ Ticket Change Details
Login
Overview

Artifact ID: ac020a732f90523bbefaf29b9dadfd28d289d60d
Ticket: cb3aa0641d9a413841c004293a4fc06cdc122029
Incorrect result from a subquery containing over-constrainted ORDER BY
User & Date: drh 2016-01-13 15:00:25
Changes

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

    The query at the end of the following SQL should return a value of "1", but it sometimes returns "NULL" on recent versions of SQLite:

    CREATE TABLE t1(x INTEGER PRIMARY KEY);
    INSERT INTO t1 VALUES(1),(2);
    CREATE TABLE t2(y);
    INSERT INTO t2 VALUES(3),(4);
    SELECT quote((SELECT x FROM t2, t1 ORDER BY x, y));
    

    This problem appears to have been introduced on 2014-08-29 14:20:46 by check-in [2a74129a21f], though it is unclear if that check-in actually caused the problem or just unmasked it. The problem appears to be cause by misbehavior in the partial sorting by index optimization.

  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 subquery containing over-constrainted ORDER BY

  8. Change type to "Code_Defect"