SQLite
Ticket Change Details
Not logged in
Overview

Artifact ID: 06f58599932dfaeee270128aa139de1031f96dc8
Ticket: bfbf38e5e9956ac69f9491e5112636ff2ecef923
Segfault on a nested join
Date: 2012-11-02 13:51:11
User: drh
Changes

  1. Appended to comment:

    drh added on 2012-11-02 13:51:11:
    Simplified test case:

    CREATE TABLE t1 (
      id1 INTEGER PRIMARY KEY AUTOINCREMENT,
      value1 INTEGER
    );
    INSERT INTO t1 VALUES(4469,2),(4476,1);
    CREATE TABLE t2 (
      id2 INTEGER PRIMARY KEY AUTOINCREMENT,
      value2 INTEGER
    );
    INSERT INTO t2 VALUES(0,1),(2,2);
    SELECT
     (SELECT sum(value2==xyz) FROM t2)
    FROM
     (SELECT curr.value1 as xyz
        FROM t1 AS curr LEFT JOIN t1 AS other
       GROUP BY curr.id1);