/ Ticket Change Details
Login
Overview

Artifact ID: 23c14e4ae53293a5067ae105a3a78a5a49821eab6fecfdeeae39f9aa45cf0ad1
Ticket: 787fa716be3a7f650cac1b1413f12f95f5e7639d
Assertion fault when multi-use subquery implemented by co-routine
User & Date: drh 2018-11-09 13:39:45
Changes

  1. Change icomment to:

    Here is another test case that does not make use of the IN operator. The common factor is now the use of co-routines to implement a subquery and then evaluating that subquery more than once.

    CREATE TABLE t1(a1, a2, a3);
    CREATE INDEX t1a2 ON t1(a2, a1);
    CREATE INDEX t1a3 ON t1(a3, a1);
    CREATE TABLE t2(d);
    INSERT INTO t1 VALUES(1, 1, 1), (2, 2, 2);
    INSERT INTO t2 VALUES(22);
    SELECT * FROM t1 WHERE (a2=1 OR a3=2) AND a1 = (
      SELECT d FROM (SELECT DISTINCT d FROM t2) WHERE d=22
    );
    

    This new test case demonstrates that checkin [8d663bfaaa4656c4f4ff1] is not a solution to the problem.

  2. Change login to "drh"
  3. Change mimetype to "text/x-fossil-wiki"
  4. Change title to:

    Assertion fault when multi-use subquery implemented by co-routine