/ Check-in [cb1d0652]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New test case for check-in [74ef97bf51dd531a] that takes the fix in the previous check-in into account.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cb1d06521de5918a2324a41e207b48c5e5149c23b927b9e3e1f3c3b38b82658e
User & Date: drh 2019-05-22 23:12:10
Context
2019-05-23
16:38
Improvements to the view-self-join optimization so that it works on all VIEWs, not just on Common Table Expressions. check-in: d2fe370c user: drh tags: trunk
2019-05-22
23:12
New test case for check-in [74ef97bf51dd531a] that takes the fix in the previous check-in into account. check-in: cb1d0652 user: drh tags: trunk
22:49
Renumber the Select.selId values in the copies of SELECT statements that implement VIEWs when the VIEW is expanded, so that when the same VIEW is used twice in the same join, each expansion as a distinct selId. This fixes ticket [ce823231949d3abf42453c8]. check-in: 3cacc4b9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/view.test.

707
708
709
710
711
712
713








714
715
716
717
718
719
  INSERT INTO t16 VALUES(1, 1, 1);
  INSERT INTO t16 VALUES(2, 2, 2);
  INSERT INTO t16 VALUES(3, 3, 3);
  CREATE VIEW v16 AS SELECT max(a) AS mx, min(b) AS mn FROM t16 GROUP BY c;

  SELECT * FROM v16 AS one, v16 AS two WHERE one.mx=1;
} {








  1 1 1 1 
  1 1 2 2 
  1 1 3 3
}

finish_test







>
>
>
>
>
>
>
>






707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
  INSERT INTO t16 VALUES(1, 1, 1);
  INSERT INTO t16 VALUES(2, 2, 2);
  INSERT INTO t16 VALUES(3, 3, 3);
  CREATE VIEW v16 AS SELECT max(a) AS mx, min(b) AS mn FROM t16 GROUP BY c;

  SELECT * FROM v16 AS one, v16 AS two WHERE one.mx=1;
} {
  1 1 1 1 
  1 1 2 2 
  1 1 3 3
}
do_execsql_test view-26.1 {
  WITH v17(x,y) AS (SELECT max(a), min(b) FROM t16 GROUP BY c)
  SELECT * FROM v17 AS one, v17 AS two WHERE one.x=1;
} {
  1 1 1 1 
  1 1 2 2 
  1 1 3 3
}

finish_test